Accessing drawing items & stage content in as3
To my surprise i found the other day that, with the new AVM2, you can now access the content that you have drawn to the stage. It makes perfect sense, but i just assumed that it was locked. As a test, if you can draw something on the stage and then add the code
getChildAt(0).x = 100
This is reallly handy if you want to remove all the content from a clip, maybe move it into another, or add it dynamically to a child, then add effects. One note your drawing items are merged together (it doesnt preserve layers) unless there is a MovieClip between the layers. This is the only time that it splits layers into separate clips.
This entry was posted on Friday, April 25th, 2008 at 2:41 am and is filed under Flash. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.