change cursor to finger

Can anyone tell me how to change the cursor from a text cursor to a finger on a dynamic text button on rollover?

Thanks Heaps
RipleyWaspAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CyanBlueCommented:
Make sure that the textField in the text button you have does not have 'Selectable' button selected in the properties panel... (The Ab button right next to the Single line drop down menu...)
   http://www.computer-training-software.com/manuels/images-flash-02/textfield.jpg

CyanBlue
0
halfbloodprinceCommented:
set the button's following properties:
useHandCursor = true
buttonMode = true
mouseChildren = false
0
RipleyWaspAuthor Commented:
Neither of these options are working. I am using dynamic text so it is coming in from a stylesheet as TextFields. When clicked on either text the image changes. The actionscript is quite long but I have included some of it so you get an idea of how one of the buttons works.

function makeGUI():void{
      addChild(about);
}

var myTextL:URLLoader = new URLLoader();
var myTextR:URLRequest = new URLRequest("style.css");
myTextL.load(myTextR);
myTextL.addEventListener(Event.COMPLETE, dataOK);

var about:TextField = new TextField();
about.text = "about";
about.filters = new Array(dropS);
about.x = textX; about.y = textY + 50;

about.setTextFormat(myTF);

about.addEventListener(MouseEvent.CLICK, aboutAction);

function aboutAction(e:MouseEvent):void {
      myR = new URLRequest("2.jpg");
      loadImage();
      myInputText.htmlText = textA[1];
}

Thanks for helping!!
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

CyanBlueCommented:
Add this line after you set the x/y of it...

CyanBlue
about.selectable = false;

Open in new window

0
RipleyWaspAuthor Commented:
Sort of fixed, the cursor stays as arrow now, would like to change to pointer on rollover.
0
CyanBlueCommented:
I don't think you can do that unless you create an invisible sprite above or down below the textField and then make that do rollOver...  The textField is not supposed to be an UI element...

CyanBlue
0
RipleyWaspAuthor Commented:
Ok thanks
0
CyanBlueCommented:
Sure thing...  Please close the topic if you think your question is answered...  

CyanBlue
0
RipleyWaspAuthor Commented:
Would like to keep open as I have seen a site that has it working and know they did it dynamically.
0
CyanBlueCommented:
Okay...  Keep us posted...  ;)

CyanBlue
0
RipleyWaspAuthor Commented:
Will do.
0
IqAndreasCommented:
Did you ever get that official solution you were looking for?

As was already mentioned, it is not possible to change the cursor when over a TextField directly. You can see a list of all available properties and methods of the TextField class here:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#propertySummary

However, if you wrap the TextField with a Sprite, you can achieve that hand cursor effect. Give the attached source code a try, and if you have any questions about it, or if you want me to modify the source in any way to suit your needs, just ask.

Good luck with your programming,
Andreas
function makeGUI():void{
      //When is this function called?
      addChild(aboutBTN);
}

var myTextL:URLLoader = new URLLoader();
var myTextR:URLRequest = new URLRequest("style.css");
myTextL.load(myTextR);
myTextL.addEventListener(Event.COMPLETE, dataOK);


//Creat the textField
var aboutTF:TextField = new TextField();
aboutTF.text = "about";
aboutTF.filters = new Array(dropS);
aboutTF.setTextFormat(myTF);
aboutTF.selectable = false;

//Crate the button that holds the textField
var aboutBTN:Sprite = new Sprite();
aboutBTN.x = textX;
aboutBTN.y = textY + 50;

aboutBtn.buttonMode = true;
aboutBtn.mouseChildren = false;
aboutBtn.useHandCursor = true;

aboutBTN.addChild(aboutTF);

//Now make the "hitArea" for the button
var hit:Sprite = new Sprite();
hit.graphics.beginFill(0x000000);
hit.graphics.drawRect(0,0,aboutBtn.width, aboutBtn.height);
aboutBtn.hitArea = hit;

//Now, listen for the mouse events!
aboutBTN.addEventListener(MouseEvent.CLICK, aboutAction);

function aboutAction(e:MouseEvent):void {
      myR = new URLRequest("2.jpg");
      loadImage();
      myInputText.htmlText = textA[1];
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CyanBlueCommented:
Uh, ain't that what I have been said already???

CyanBlue
0
RipleyWaspAuthor Commented:
Yes I am closing it, I havent tried this yet, but it wasn't what I was after but will probably work. Have given up on this one.
0
CyanBlueCommented:
I'd say that's a nonsense, but if you say so...

CyanBlue
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.