HI,
I did this:
........
public function MyGesture(){
this.buttonMode=true;
........
}
........
but it still does not fire...
Any idea what might be causing this problem?
The MyGesture class is instantiated from Mediaplayback.as (which is my
document class).
Could this nesting be the problem?
Sajid
On Mon, Aug 17, 2009 at 10:44 AM, Latcho<[email protected]> wrote:
> try a 'this.buttonMode=true' on MyGesture class
> Latcho
>
> Sajid Saiyed wrote:
>>
>> 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
>>
>>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders