|
-
Total Universe Mod
what is clone?
I'm just messing around listing properties for the various objects and I can't seem to figure out what the the .clone property does.
-
Senior Member
A clone property would be the same property as its parent since a clone is the exact copy of a parent. So if you have clones of movieclips for example.
The term clone is also used to create new nodes in xml: cloneNode.
- The right of the People to create Flash movies shall not be infringed. -
-
It's for BitmapData, Filters and various other things...
-
The clone() method returns an exact copy of the bitmap, filter or whatever else.
-
Total Universe Mod
How exactly does that work? Does it store a clone in memory or duplicate it on-screen? What would be a need for clone()?
-
Senior Member
- The right of the People to create Flash movies shall not be infringed. -
-
Total Universe Mod
-
Senior Member
see above
- The right of the People to create Flash movies shall not be infringed. -
-
Total Universe Mod
*looks up* man, gotta clean my ceiling. No code up there though :P
-
Senior Member
You wanted a usage example?! I didn't know. I thought you wanted to know for which purpose you need to clone. Don't know a coding example in Flash 8 yet. I will wait until I get the program. However, it's amazing how much code is out before the program is out
- The right of the People to create Flash movies shall not be infringed. -
-
clone() creates a copy of the object in actionscript. Nothing visual at all:
Code:
myBitmap = new flash.display.BitmapData(100,100,true,0x00000000)
myBitmap.draw(someMovieClip,someMovieClip.transform.matrix)
otherBitmap=myBitmap.clone()
this.attachBitmap(otherBitmap,1)
-
Total Universe Mod
-
Noob..
 Originally Posted by FlashGuru
clone() creates a copy of the object in actionscript. Nothing visual at all:
Code:
myBitmap = new flash.display.BitmapData(100,100,true,0x00000000)
myBitmap.draw(someMovieClip,someMovieClip.transform.matrix)
otherBitmap=myBitmap.clone()
this.attachBitmap(otherBitmap,1)
So whit this code, flash will make multiple copies of an object (i'm assuming that its a bitmap object...)? So if i wanted an object to create a trail of itself somthign like this would be what im looking to use...?
Last edited by mtxoracle; 03-30-2006 at 03:57 PM.
Reason: more clarification of my understanding (and so i dont sound i'gnant)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|