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.
Printable View
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.
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.
It's for BitmapData, Filters and various other things...
The clone() method returns an exact copy of the bitmap, filter or whatever else.
How exactly does that work? Does it store a clone in memory or duplicate it on-screen? What would be a need for clone()?
snowflakes for example
whats a usage example?
see above :)
*looks up* man, gotta clean my ceiling. No code up there though :P
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 :rolleyes:
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)
ah, cool thanks.
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...?Quote:
Originally Posted by FlashGuru