Gaaah! Can't figure this one out!
Hi,
Would appreciate anyone's help - I keep getting the ArgumentError: "Error #1063: Argument count mismatch on LoadXML(). Expected 1, got 0."
Usually this has to do with events or argumants passed in, but both seem fine to me. Does anyone have any ideas????
Here is the only code in the fla:
var URLString:String = "homepage_rollover_copy.xml";
var newXML = new LoadXML(URLString);
and here is the class related to the fla:
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.xml.*;
public class LoadXML extends MovieClip {
public var _xml:XML;
public var xmlReq:URLRequest = new URLRequest();
public var xmlLoader:URLLoader = new URLLoader();
public function LoadXML(thisURL:String){
var url:String = thisURL;
xmlReq = new URLRequest(url);
xmlLoader.addEventListener(Event.COMPLETE,xmlLoaded);
loadXMLFile();
}
function loadXMLFile():void{
xmlLoader.load(xmlReq);
}
function xmlLoaded(event:Event):void {
_xml = new XML(xmlLoader.data);
//xmlList = xml.children();
}
public function get xmlData():XML {
return _xml;
}
}
}
thanks!