ActionScript Basic Question

Posted by TheDarkIn1978 on Stack Overflow See other posts from Stack Overflow or by TheDarkIn1978
Published on 2010-06-11T01:52:44Z Indexed on 2010/06/11 2:13 UTC
Read the original article Hit count: 240

Filed under:

i've only ever created external .as files that extended a class such as sprite. now i just want to create one that doesn't extend anything and call it from a frame script.

package
{
public class Test
    {
    public function Test(val:Number, max:Number)
        {
        trace(val, max);
        }
    }
}

from my frame script of an .fla that is in the same folder as Test.as, i'll write this:

Test(50, 100);

this produces the following error:

1137: Incorrect number of arguments.  Expected no more than 1.

© Stack Overflow or respective owner

Related posts about actionscript-3