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

Multiple Interfaces

as3 interfaces are easy and fun once you get used to them but what would you think if I told you you can use multiple interfaces at the same time. I know might sound a bit confusing but we've been through so much already that we should be just fine. In this video we continue with our fire example and now create a new interface that will be in charge of playable elements. The idea behind here is that we want an interface that would define what elements are playable(Aka can start and stop in the control of external elements). In other words what objects/classes will have public play/stop functions. By the end of this video we will add this new interface and implement it on the Dog and our new Fire. We then will add new functionality to our Main class where we will randomly animate playable content when the user is not interacting with elements. One of the main things we are learning here is the capability of one item to have more then one interface(there is no real limit to how many) contrary to inheritance that can only have one element in the inheritance line in as3.

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