Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-09-2009, 04:43 PM   PM User | #1
Garindan
New to the CF scene

 
Join Date: Feb 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Garindan is an unknown quantity at this point
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
Garindan is offline   Reply With Quote
Old 03-10-2009, 11:10 AM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
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.
gnomeontherun is offline   Reply With Quote
Old 03-10-2009, 03:28 PM   PM User | #3
Garindan
New to the CF scene

 
Join Date: Feb 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Garindan is an unknown quantity at this point
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.
Garindan is offline   Reply With Quote
Old 03-10-2009, 10:03 PM   PM User | #4
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
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.
gnomeontherun is offline   Reply With Quote
Old 03-12-2009, 11:18 AM   PM User | #5
Garindan
New to the CF scene

 
Join Date: Feb 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Garindan is an unknown quantity at this point
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.
Garindan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:58 PM.


Advertisement
Log in to turn off these ads.