2. Dynamically Adding Objects to the Stage

Now that you know how to access and manipulate objects that are already on the Stage, you’ll learn how to add objects dynamically from the Library using ActionScript.

The difference with this method is that the objects you are going to manipulate are not placed on the Stage in the Flash application, also called at authortime. Instead, you’ll use objects that are in the Library, and after the application is compiled into a SWF, you’ll dynamically update the Stage using ActionScript with objects in the Library.

Creating Named Library Assets

If you remember, in order to access the properties or attributes of items on the Stage, you needed to have an instance name that ActionScript could reference. When ...

Get Fundamentals of ActionScript 3.0: Develop and Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.