View Full Version : Simple Text Rollover Underline?

03-09-2009, 05:43 PM
Hi all, i am quite new to Flash, ok at doing animations etc but not used actionscript.

I have a simple banner with images fading in and out, and a layer with text at the bottom saying 'click here to visit this page'. It has a link in the link box which works.

I just want it to underline when the mouse pointer is over it. I've looked on the net, found a couple of answers but none were simple for me :o because they all assumed you knew what you were doing with actionscript.

I knid of worked out you can use css to assign a:hover {text-decoration: underline;} but i dont kow how or where. I don't really need another seperate css file if it can be avoided as i won't be changing the link or anything else, i'd rather just have it in the flash file if possible.

Many thanks in advance for any help :thumbsup:

03-10-2009, 12:10 PM
What kind of container is the link? Is it a button or movieClip?

Your link has to be created with actionscript anyways, so you can't get around using some. However it can be very minimal, but can you post what kind of container it is and the code for the getURL?

03-10-2009, 04:28 PM
Hi, thankyou for the reply. I'm sorry if i'm a bit of a newbie.

I haven't done any code, i simply created a text box on the stage, typed my text into it, and then typed the url into the relevant box in the properties pane at the bottom of the screen. :confused::rolleyes::o

03-10-2009, 11:03 PM
Ok so take your text and convert it to a button. There is a menu item if you click on the text box and then there is a menu option somewhere in the main toolbar that allows you to convert to a button... and you can then double click on the text and you'll see 4 frames in the timeline. The first frame is the normal button state, the second is the mouseover state, third is on click state, and 4th is the space that the button should be active for.

Put your text on the three first frames, and then draw a box where you want the click position to be (this is hidden, but just gives the button its target area). Then on the second frame change your text to underline.

Get back to the main timeline and then put actionscript ON the button itself, so click once on it and open the Actions Panel

on (release) {
getURL("put the url here");

03-12-2009, 12:18 PM
Ok thankyou for your help, i got it to work but now the underline just flickers or doesn't display except on certain parts of the text. The hit box easily covers all the text however :confused:

Anyway thats another problem so i'll look into it. Many thanks.