I have two classes. One of the class file has declared an Array. I want to add item to the array from another class on a button class. I don’t know how to do this.
MyArray class
package{
public var myArrar:Array
public class MyArray{
public function MyArray(){
}
}
}
MyButton class
package{
import flash.display.*
import flash.events.*
public class MyButton extends MovieClip{
public function MyButton():void{
this.addEventListener(MouseEvent.CLICK,clickHandler)
}
function clickHandler(e:MouseEvent):void{
myArrar.push("as3")
}
}
}
I am getting this error
1120: Access of undefined property myArrar.