Access the Parents, Children, and Grandchildren of Objects


show more Accessing the parents, children, and grandchildren of objects 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 ...

Accessing the parents, children, and grandchildren of objects

Your knowledge of the display list can be used to access any object in Flash, from virtually any location. One example of that is the parent property, which allows you to communicate backwards from one object to its parent display object container. On the Stage here, I have boarder_mc, which is an animation. If I double-click on that movie clip, you can see the animation. Inside of that movie clip, on frame 1, I have an instance called boarderSolo.

If I double-click on that instance, I'll enter a movie clip called boarderSolo. You'll see that I have the basic bitmap shape with the boarder and then the skateboard inside of a movie clip, with an instance name of board. So let's say I want to communicate to the skateboard. In order to do that, I'll need to communicate to the boarder itself, which is inside of the boarder_mc movie clip. Let's go to the first keyframe of the actions layer, and open up the Actions panel. In here, under the line of code where I created the v...

Accessing the parents, children, and grandchildren of objects
Video duration: 5m 50s 7h 8m Beginner Updated May 23, 2012

Viewers:

Accessing the parents, children, and grandchildren of objects 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 ...