Click to See Complete Forum and Search --> : what is clone?
jAQUAN
09-05-2005, 06:28 PM
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.
cancerinform
09-05-2005, 07:42 PM
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.
annexion
09-05-2005, 08:09 PM
It's for BitmapData, Filters and various other things...
FlashGuru
09-06-2005, 06:51 AM
The clone() method returns an exact copy of the bitmap, filter or whatever else.
jAQUAN
09-06-2005, 04:53 PM
How exactly does that work? Does it store a clone in memory or duplicate it on-screen? What would be a need for clone()?
cancerinform
09-06-2005, 04:55 PM
snowflakes for example
jAQUAN
09-06-2005, 06:15 PM
whats a usage example?
cancerinform
09-06-2005, 06:26 PM
see above :)
jAQUAN
09-06-2005, 06:28 PM
*looks up* man, gotta clean my ceiling. No code up there though :P
cancerinform
09-06-2005, 06:33 PM
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:
FlashGuru
09-06-2005, 07:34 PM
clone() creates a copy of the object in actionscript. Nothing visual at all:
myBitmap = new flash.display.BitmapData(100,100,true,0x00000000)
myBitmap.draw(someMovieClip,someMovieClip.transfor m.matrix)
otherBitmap=myBitmap.clone()
this.attachBitmap(otherBitmap,1)
jAQUAN
09-06-2005, 07:40 PM
ah, cool thanks.
mtxoracle
03-30-2006, 03:54 PM
clone() creates a copy of the object in actionscript. Nothing visual at all:
myBitmap = new flash.display.BitmapData(100,100,true,0x00000000)
myBitmap.draw(someMovieClip,someMovieClip.transfor m.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...?
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.