AS3 arguments

前端 未结 3 1922
北海茫月
北海茫月 2021-01-14 22:47

Why do you think the code below does not work? What would you change/add to make it work?

Any help is appreciated..

function TraceIt(message:String,         


        
3条回答
  •  臣服心动
    2021-01-14 23:30

    Change your bb function to look like this:

    function bb(f:Function, args:Array):void
    {
        func = f;
        argum = args;
        exec();
    }
    

    As you have it now, it accepts a variable number of arguments, but you are passing in an array(of the arguments) from aa.

提交回复
热议问题