02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous Video
Chapter is concluded.Next is

Conclusion

The idea of interfaces is very simple. Instead of needing to always know what's inside an element we can now treat elements not only based on there public interface but more specifically based on there actual implementation interfaces. This comes really handy if we only want to get the code hints for “playable” elements or want to guaranty that only elements that have implemented our interface can pass our gate holder. There is much more to interface then just this although this would probably be enough o make interfaces a really great addition to our tool belet there is a few more benefits. When you work with a team it makes it much easier to give the developers that are working with you a clear interface they must adhere without the need on your end to actually know what they are doing withing there elements. It enables you to continue building the project without focusing on the details. This is true as well when you are working on internal projects. Working with interfaces enables you to focus on the big picture when you want to work on the big picture and focus on components without the need to worry about how they would work in the main interface as once you set them up once every other object you will create that implements the same interface should not effect the main architecture in the future. There is one last benefit that is more exclusive to Flash. As many times in flash you will work with external venders/3rd party tools and even your own code that you load into your main architecture this will save you a lot of file size - as now the main class doesn't actually need to know what you actually have within your code but it only needs to know what interfaces you adhere to that relate to it. This file sizes differences are actually really dramatic you can easily save large amounts of data from getting loaded more then ones enabling you to keep your main files smaller.

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