var menu:MovieClip = asdf();
function asdf(s:String='', myx:int=0, p:MovieClip=null):MovieClip // eventual crash with a stackOverflow error
//function asdf(s:String='', myx:int=0):MovieClip // works fine
//function asdf(p:MovieClip=null,s:String=''):MovieClip //works fine
//function asdf(a:String='',b:String='',c:String=''):MovieClip// eventuall crashes with a stackOverflow error
{
var m:MovieClip = new MovieClip();
return (m);
}
I guess this is fairly self explanatory, I am curious why I am getting errors from the functions with more than 2 arguments. I know I could use ‘…rest’ as a work around but I really thought that this should work fine.
from reading through the docs this should work fine.
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/arguments.html