Ramblings

August 20, 2009

Copying DisplayObjects in AS3

Filed under: as3 — michaelangela @ 7:02 am

Going to try to get back into blogging… again…! It’s just been super busy which is a good thing all things considered.
After learning a neat little shortcut on copying objects using a byte array, there was a link to this for duplicating DisplayObjects. Quite useful.
kirupaForum – View Single Post – ActionScript 3 Tip of the Day

ActionScript 3 no longer has a duplicateMovieClip method for MovieClip instances (or any DisplayObject instances). Instead, it’s suggested that you just create a new instance of the display object you wish to duplicate using its constructor. This, however, is not the same as duplicateMovieClip, and, really, is more like using AS1 and AS2’s attachMovieClip. For a more accurate representation of duplicateMovieClip in AS3, consider the following function…

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: