02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoPrevious Video

Polymorphism in action

Its the grand finally. time for us to take everything we did so far from creating 3 separate classes that have the same functionality through implementing them to follow our interface ITouchable now is the moment we all waited for its time for us to create our first polymorphic moment! With our classes implementing the ITouchable interface its time for us to create together the first time together a Polymorphism.

Intro

we will create together updates to two of our visual inherited objects. explore with us how to work with visual inheritance.

04:01

Overriding built in methods

Not only methods we create yourself can be overridden. Actually built in methods can be overridden as well. In this example we will show you how to override the play and stop methods of the movieclip.

09:41

Integrating Intervals

Working with time in as3 as part of our inheritance practice.

06:20

Touchable

Before we can create a polymorphism we need to create a seperate class that isn't in our inheritance line

08:01

Hidden feature addFrameScript

An undocumented method for movieclips addFrameScript enables us to add frame script.

09:12

The is Operator

The is operator enables us to check and see if an object is a Object type.

03:08

Our first Interface

The steps involved to create an interface are very easy. The most important thing to understand is what an interface actually is.

04:52

implements

Learn how to tell a class to implement an interface i AS3. In the last video we created an interface and in this one we will define what objects are a type of that interface and what are not.

03:50

Polymorphism in action

With our classes implementing the ITouchable interface its time for us to create together the first time together a Polymorphism.

02:25