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

Animating a Fire

Now that we have our art on stage and its ready to animate its time for us to start animating. More or less at this stage we know what we want but we don't know exactly what we want. In this video we start exploring optional animations until we feel its right. We start with animating one of the layers and then learn a few more tricks regarding reusing of code and how we can reuse our animation for other layers. By the end of this video we will have a working fire. We will create a stop method that will enable us to stop our animations and start them. This is in a goal to enable us to control the animations from our main class. Notice that even though we don't actually call the touch method it will automatically trigger when user clicks on the fire when published! Nifty right? This is happening because in an earlier class we set a mouse event that calls the touch in the main - Even before we created the class everything was set in place! Really cool and exactly the point of polymorphism and interfaces. The idea of not needing to worry about totally separate blocks of code but instead building out the internal logic set knowing the external one will work as it was worked on earlier and we do not need to change anything within it.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!

Casting and DataTypes

In this short video we talk more about why you would want to do this and the steps involved. We go into a few real world examples of where this could be come very useful.

02:27

Interface Errors

So far we created a Cat,Dog and even a cup of water they all where totally different elements but yet our main class know how to work with all of them and that will be our goal as well with our new el

06:20

Playing With Fire

We plan our Fire project that will have an interface

04:06

Animating a Fire

In this video we continue our project and add animation to our class.

15:59

Multiple Interfaces

Contrary to class inheritance we can have multiple interfaces.

13:31

AS3 Interface Inheritance

Interfaces can work with inheritance as well. In this secion of our learning we explore this concept and see it in action.

02:39

Vectors

Since Flash player 10 we can work with Vectors. Vectors are a smarter way to do arrays in AS3.

04:03

Conclusion

Why are interfaces so important?That is a really good question and I would add when do you want to use an as3 interface.

04:21