You have to enable this event by setting the object's
doubleClickEnabled property to true.

  Attila

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From:    Enrique Chávez <[EMAIL PROTECTED]>
To:      Flashcoders mailing list <[email protected]>
Date:    Thursday, July 12, 2007, 9:02:06 PM
Subject: [Flashcoders] MouseEvent.DOUBLE_CLICK Bug?
--====----====----====----====----====----====----====----====----====----===--
Hi.

I am trying to use the doubleClick event, but it never trigger the handler

My function is something like that

private function loadIconComplete(event:Event):void
{
    var rIcon:LoaderInfo = event.target as LoaderInfo
    var fIcon = rIcon.loader
    var iStage =  lIcon.content as MovieClip
    iStage.label.autoSize = TextFieldAutoSize.CENTER
    iStage.label.text = xmlInfo.appProperties.label
    iStage.hit.x = iStage.label.x
    iStage.hit.width = iStage.label.width
    iStage.hit.addEventListener(MouseEvent.DOUBLE_CLICK, dobleClick);
    iStage.hit.addEventListener(MouseEvent.CLICK, onClick);
    iStage.hit.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
    iStage.hit.addEventListener(MouseEvent.MOUSE_UP, onUp);
    iStage.icon.addChild(fIcon)
}

All the events trigger the handlers except the doubleClick

i also try with a simple sample.

in a normal FLA 1 frame

import flash.display.Sprite;
import flash.events.*;
var size:uint    = 100;
var bgColor:uint = 0xFFCC00;
function SpriteExample() {
    var child : Sprite = new Sprite();
    child.addEventListener(MouseEvent.DOUBLE_CLICK, dobleClick);
    child.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    draw(child);
    addChild(child);
}
function dobleClick(event:MouseEvent):void {
    trace("dobleClick");
}
function mouseUpHandler(event:MouseEvent):void {
    trace("mouseUpHandler");
}
function draw(sprite : Sprite):void {
    sprite.graphics.beginFill(bgColor);
    sprite.graphics.drawRect(0, 0, size, size);
    sprite.graphics.endFill();
}
SpriteExample();

And dont work .

Anyone know something about it..??

Cheers

-- 
Enrique Chavez aka Tmeister
http://www.klr20mg.com
http://www.tmeister.net
http://desktoptwo.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to