Hi all
DesplayExample.mxml is:
<?xml version=“1.0” encoding=“utf-8”?>
<mx:Application
xmlns:mx=“http://www.adobe.com/2006/mxml”
xmlns:custom=“components."
xmlns:local="”
layout=“absolute”>
<custom:DesplayExample/>
</mx:Application>
and
DesplayExample.as :
package components
{
import flash.display.Sprite;
public class DesplayExample extends Sprite
{ import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
private var container:Sprite;
private var pictLdr:Loader
public function DesplayExample()
{
container = new Sprite();
addChild(container);
pictLdr = new Loader();
var pictURL:String = "test.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
}
public function imgLoaded(event:Event):void
{
container.addChild(pictLdr.content);
}
}
}
Anyone have any ideas why image dont load ?