greg7740
asked on
How do I correct this error, Incorrect number or arguments.
I know I need something in the parenthesis of swfComplete when I run the function. I've tried everything.
1136: Incorrect number of arguments. Expected 1.
Thanks.
1136: Incorrect number of arguments. Expected 1.
Thanks.
stop();
var request:URLRequest = new URLRequest("myURL");
var swfLoader:Loader = new Loader();
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfComplete);
var newID = 0;
function swfComplete(e:Event):String {
MovieClip(swfLoader.content).innerVariable = newID;
return (newID);
}
swfLoader.load(request);
swfComplete();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm new to actionscript and I was trying to use the value of the variable created inside the function. How would I get the value of newID if I don't call the function. Thanks.
you figured out how to get the ID i assume?
ASKER
yes, thanks Blue Genie.
seems pointless as mynamebecory said - you've created an event listener - so your swfcomplete will trigger automatically once your swf loader has finished loading.