Hi all,
Just curious and I think it may shed a little light on this issue,
but isn't there a way to grab another SWFs library assets and
plug them into your own swf? If so, then you could just assign ids to the
loaded library assets and then call on them in your swf??
I thought I remembered something about this a while back,
but I could be mistaken.

Best,

Karl


On Dec 1, 2010, at 3:44 AM, Glen Pike wrote:

Hi,

If your loaded asset is a swf, you cannot just access the bitmapData property - it does not have one.

However, you can draw the contents of a MovieClip / Sprite / DisplayObject into a BitmapData object, which you can then pass to the constructor of a Bitmap.

http://help.adobe.com/en_US/as3/dev/ WS5b3ccc516d4fbf351e63e3d118a9b90204-7d60.html

You should also use the INIT event rather than the COMPLETE event for loaded objects because your SWF may have to initialise when it's loaded and you cannot be guaranteed that height, width and child clips are on stage.

    HTH

    Glen

On 30/11/2010 19:18, ACE Flash wrote:
hi there,

I am pulling my hair off :), i was able to use any PNG or JPG file in my code, the SWF file just didn't work. Would you please take a look for me? Is
there anything I am missing??

I am using flash 9 and all files are on the same domain. Thanks

====================================

import flash.net.URLRequest;import flash.display.Loader;

// I am able to use the PNG/JPG files

var fileURL:String = "http://www.google.com/images/logos/ ps_logo2.png"

// BUT!!!  the SWF just doesn't work!!!!, it always return null!

//var fileURL:String = "xxxxx.swf"

var request:URLRequest = new URLRequest(fileURL);
var loader:Loader = new
Loader();loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
dataCompleteHandler);loader.load(request);
function dataCompleteHandler(e:Event):void{
        var image:Bitmap = new Bitmap(e.currentTarget.content.bitmapData);
        addChild(image);}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to