So I’m trying to load a .png and display it but the iPad and iPhone show a white screen. Here is my code:
public class Test extends Sprite
{
private var loader : Loader;
private var urlRequest : URLRequest;
public function Test()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
loadAssets();
}
private function loadAssets() : void
{
urlRequest = new URLRequest("TestImage.png");
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load(urlRequest);
}
private function onLoadComplete(event : Event) : void
{
addChild(loader.content);
}
}
This works fine when tested in AIR but not when I test on the device using the [TEST on DEVICE] build. My TestImage.png is in the bin folder where my Test.swf gets compiled into.