| |||||||||||||||||||||||||||||||
|
I'm not sure you need to be accessing your bitmap via a movieClip. I'm doing something similar but I use the bitmap directly from the library. I se the bitmap up an auto generated class using 'Linkage' i.e. 'myBitmap' then if I need the bitmapData in yourscript simply say: var myBitmapData:myBitmap = new myBitmap(); var myBitmapInstance:Bitmap = new Bitmap(myBitmapData, "auto", true); this.addChild(myBitmapInstance); No need for a movieClip. I'm going to guess that when you use the movieClip you are accessing the bitmap as a child of that movieClip and trying to extract the bitmapData from that. I tried a similar approach and it did not work. Seems that bitmaps assigned in authoring mode return a type of Shape and not Bitmap when you try to access them. I'm guessing this is a bug in the alpha version. hth, Rob On Fri, 23 Feb 2007 13:12:55 -0500, Dave Geurts <dave.geurts> wrote: > Hello, > > So I have a movieClip in the library that is set to Export as a > class with the Auto Create Class feature, with the name > "rotate_sphere". rotate_sphere basically contains a .png that I would > like to copy as bitmapData to a new bitmap Object so that I can take > advantage of the smoothing parameter on 'New > Bitmap(bitmapData,snapping,SMOOTHING)'. Because this object needs to > scale and I would like to keep it looking "smooth" with keeping the > edges anti aliased. I am getting a Type Coercion error which reads: > cannot convert rotate_sphere$ to flash.display.DisplayObject when I am > trying to get the bitmapData. _______________________________________________ Flashcoders To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com