Post edited 7:57 pm – April 30, 2009 by Eldian
Post edited 7:57 pm – April 30, 2009 by Eldian
Post edited 7:58 pm – April 30, 2009 by Eldian
Hey Smonte can you please help me with this one. I am trying to load a single image to the stage via a XML.
XML file and image file are in the same folder as the fla file.
Here is my XML file
Here is my actionscript code.
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
var xmlData:XML = new XML();
function xmlLoaded(e:Event):void{
xmlData = new XML(e.target.data);
var picLoader:Loader = new Loader();
var picRequest:URLRequest = new URLRequest(xmlData.pictures.pic[0]);
picLoader.load(picRequest);
addChild(picLoader);
}
urlLoader.load(new URLRequest(”logo.xml”) );
I keep getting this error.
TypeError: Error #2007: Parameter url must be non-null.
at flash.display::Loader/_load()
at flash.display::Loader/load()
at picture_fla::MainTimeline/xmlLoaded()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()