Hi,
Although a bit late, I am making a move to AS3 and facing some issues.
After banging my head around a bit, I would like to ask for some help :)
My CLICK event is not getting detected from withing my class file.
In the code snippets below, the "reportClick" function is not getting
triggered when I click my mouse in stage.
Here is how the files are setup:
****** MyGesture.as
package Gestures
{
import flash.display.*;
import flash.events.*;
import flash.filters.*;
........
public class MyGesture extends MovieClip
{
........
public function MyGesture(){
........
addEventListener(MouseEvent.CLICK, reportClick);
........
}
........
function reportClick(e:Event)
{
trace("reportClick");
//dispatchEvent(new Event(MyGesture.clickOK));
}
}
}
****** Mediaplayback.as (This is my Document Class)
package Gestures
{
import flash.display.*;
import flash.events.*;
import flash.filters.*;
import Gestures.MyGesture;
........
public class Mediaplayback extends MovieClip
{
private var my_gesture:MyGesture = new MyGesture();
........
public function Mediaplayback(){
addChild(my_gesture);
........
}
}
}
////////////////////////////////////////
Can someone tell me what I am doing wrong?
Thanks a lot
Sajid
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders