SWFLoader doesn't get going until you addChild it.  If you use
flash.display.Loader, you might be able to load w/o addChild

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of flexawesome
Sent: Saturday, May 17, 2008 3:16 PM
To: [email protected]
Subject: [flexcoders] Re: a simple question of BitmapData




Hi there, I have updated the code ( enabled line5 ) and get the 
duplicate copy of gif file. 

Is there a way to prevent to use addChild but still can get the copy 
of the image?

Cheers

http://www.privatepaste.com/29lCTCERRY
<http://www.privatepaste.com/29lCTCERRY> 

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "flexawesome" <[EMAIL PROTECTED]> 
wrote:
>
> Hi there,
> 
> do you know how can I use it to duplicate the image? It seems 
doesn't 
> work. any ideas?
> 
> Thank you
> 
> loader = new SWFLoader();
> loader.addEventListener(Event.COMPLETE, Bitmapdata) 
> 
> loader.source 
= "http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_tech-
<http://us.i1.yimg.com/us.yimg.com/i/us/nt/ma/ma_tech-> 
> grp_1.gif"
> //addChild(loader);
> 
> 
> private function oBitmapdata(e:Event):void
> {
> 
> var img:Image = new Image();
> var data:BitmapData = Bitmap(loader.content).bitmapData;
> var bitmap:Bitmap = new Bitmap(data);
> 
> img.addChild(bitmap)
> 
> addChild(img);
> 
> }
>



 

Reply via email to