PDA

View Full Version : TextField >> no mouse hand dont appear



_dfm_
April 13th, 2008, 09:22 AM
hi,
I have made class that extends Sprite. In sprite I make 2 Text Fields with the following properties:

//title
var titleFormat:TextFormat = new TextFormat();
titleFormat.align = TextFormatAlign.LEFT;
titleFormat.color = 0x0075BF;
titleFormat.font = "Myriad Pro";
titleFormat.size = 12;

_title_txt = new TextField();
_title_txt.x = 2;
_title_txt.y = 4;
_title_txt.embedFonts = true;
_title_txt.selectable = false;
_title_txt.width = WIDTH - 4;
_title_txt.defaultTextFormat = titleFormat;
_title_txt.cacheAsBitmap = true;
addChild(_title_txt);

//description
var descriptionFormat:TextFormat = new TextFormat();
descriptionFormat.align = TextFormatAlign.LEFT;
descriptionFormat.color = 0x040404;
descriptionFormat.font = "Myriad Pro";
descriptionFormat.size = 11;

_description_txt = new TextField();
_description_txt.x = 2;
_description_txt.y = 17;
_description_txt.embedFonts = true;
_description_txt.selectable = false;
_description_txt.width = WIDTH - 4;
_description_txt.height = HEIGHT - 20;
_description_txt.multiline = true;
_description_txt.wordWrap = true;
_description_txt.defaultTextFormat = descriptionFormat;
_title_txt.cacheAsBitmap = true;
addChild(_description_txt);



I add to class addEventListener(MouseEvent.ROLL_OVER, sadasda), but when I roll over text mouse hand disappear and when I roll on background it appear again. I want to make when is on text also to stay a mouseHand. Any clues ?

sekasi
April 13th, 2008, 12:55 PM
edit: nm, tried it and didnt work :)

_dfm_
April 13th, 2008, 02:27 PM
edit: nm, tried it and didnt work :)

what you mean did not work? Don't post stupid comments!!! It is only fragment of code.

Felixz
April 13th, 2008, 05:17 PM
mouseChildren=false;

_dfm_
April 14th, 2008, 12:49 PM
ActionScript Code:

mouseChildren=false;





10x :)