Link to home
Start Free TrialLog in
Avatar of greg7740
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.

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();

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mynamebecory2
mynamebecory2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just to add. why are you calling swfComplete?
seems pointless as mynamebecory said - you've created an event listener - so your swfcomplete will trigger automatically once your swf loader has finished loading.
Avatar of greg7740
greg7740

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?
yes, thanks Blue Genie.