Dear,
Question: What is Obverse of var animals:Pets = new Pets(); ??
Script:
package {
import flash.events.MouseEvent;
public class Pets {
public function Pets() {
// constructor code
my_btn.addEventListener(MouseEvent.CLICK, onClick)
}
private function onClick(e:MouseEvent) {
trace(Start);
}
}
}
Problem: when i call Pets class from another class ( new Pets() ); , it's run the class and the addEventListener work fine BUT:
First Time: trace result
Start
Second Time: trace result
Start
Start
Third Time: trace result
Start
Start
Start
As well as....
Thanks a lotttt