views:

54

answers:

1

Hello everyone,

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() function 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?

A: 

Is that a Typo ?

myClasss.myInitializer(161, 380);

kanchirk
yes, it is a typo. but it didn't fix the problem. well apparently, OOP's rules include the case sensitivity of filenames so i had to make sure that my filenames and class names are the same case-sensitivity wise. that solved the problem. thanks. :)
Kim Rivera