Creating instances from Library movie clips using ActionScript


show more Creating instances from Library movie clips using ActionScript provides you with in-depth training on Developer. Taught by Todd Perkins as part of the ActionScript 3.0 in Flash Professional CS5 Essential Training show less
please wait ...

Creating instances from Library movie clips using ActionScript

Many types of apps, especially games, need to be able to re-spawn or clone different assets. In order to do this in Flash, you have to create new instances from library symbols at run time. So let's imagine a scenario - go ahead, and test the movie here - and we have this skateboarding game. Let's say as a skateboarder is going through the town, the whole background is scrolling to the left, and as the boarder goes to the town, there are going to be little obstacles that come up, like trashcans. One way to create the obstacles is to build them in Flash and have them be part of your FLA file from the beginning.

However, that creates more objects in memory that you don't need because they won't always be on the Stage. The most effective way to create a game is to have objects on the Stage appear immediately when you need them, and delete them as soon as you don't need them anymore. The experience is the same to the user, but as you program the game, you get much better perfor...

Creating instances from Library movie clips using ActionScript
Video duration: 4m 23s 7h 8m Beginner Updated May 23, 2012

Viewers:

Creating instances from Library movie clips using ActionScript provides you with in-depth training on Developer. Taught by Todd Perkins as part of the ActionScript 3.0 in Flash Professional CS5 Essential Training

please wait ...