The hand cursor on the control panel above the text box

I know about the buttonMode property in MovieClip (to get the mouse cursor on a hover), and I want to do the same with TextField, but it doesn't seem to implement this property. Does anyone know if there is something similar or, if not, another way to control the cursor for a text field?


@James: I extend the MovieClip class and then create objects from inside the cllass (including the text box) in the code, which complicates things a bit (at least in my fragile brain). It is strange that I set buttonMode = true on the MC, and it applies to everything except TextField when it returns to the carriage (or just a pointer if I set Selectable = false on TextField).

@ForYourOwnGood: A point used for ease of use, but I want the text box to be a seamless part of a larger object, and it just doesn't seem right without a hand cursor. What you put seems to be what I need, but does Flex seem to be specific? I can not find the equivalent in Flash (in particular, CS4), despite trawling through LiveDocs. Am I fading ?: S

+3
source share
6 answers

try adding

mouseChildren = false; (in a class that extends MovieClip)

It should stop the text box from the mouse.

+9
source

mode. , .

+4

TextField , MovieClip. , , , TextField, . , .

TextField , CursorManager.

- ...

myTextField.addEventLstener(MouseEvent.MOUSE_OVER, onMouseOver);

private function onMouseOver( event : MouseEvent ) : void{
   CursorManager.setCursor(cursorClass, priority, xOffset, yOffset);
}
+2

_sprite.buttonMode = true , :

_textField.htmlText = "<a href='event:null'>"+yourText+"</a>";

+2

None of this is required, try setting the TextEield property of mouseEnabled to false:

textField.mouseEnabled = false;

This will disable any mouse interactions on TextField that stop flash memory for viewing for selection.

+1
source

I would very primitively place alpha = 0 movieClip on top of the text field / label of your button, which also returns handCursor

0
source

Source: https://habr.com/ru/post/1702531/


All Articles