开发者

TypeError: Error #1006: myInitializer is not a function. - AS3

开发者 https://www.devze.com 2023-01-09 02:31 出处:网络
I\'m having a difficult time working on my flash application. Everytime I run my code, this error bumps at me.

I'm having a difficult time working on my flash application. Everytime I run my code, this error bumps at me.

TypeError: Error #1006: myInitializer is not a function.

I am quite sure that my myInitializer() funct开发者_StackOverflow社区ion is indeed a function:

public class newClass extends MovieClip {
    public function newClass() {
    this.width = this.width;
    this.height = this.height;
    }

    public function myInitializer(initX:Number, initY:Number):void {
        this.y = initY;
        this.x = initX;
    }
}

and this is how I call it from another as file:

myClass = new newClass();
myClass.myInitializer(161, 380); 

any thoughts about this?


Is that a Typo ?

myClasss.myInitializer(161, 380);

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号