Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Text Rollover Underline?

    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 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

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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

    Code:
    on (release) {
    getURL("put the url here");
    }
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •