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

Reply via email to