Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I link to a URL from a button? 1

Status
Not open for further replies.

ag5t

Technical User
Feb 8, 2002
70
US
I have just learned how to make a button (dot) that changes colors in the up, over and down states. Now, how do I make that button link to a URL on the web when someone clicks on it? Also, I imported the button into a movie and then tried to type text next to it, but the text won't stay on the screen. I want to make a flash file that has several buttons (dots) with URL links and text - so that you can click on the dots and go to certain web sites. Is this done with actions or properties? I'm new to this and still learning basic Flash. Thanks.
 
Several ways to achieve this...

If you drag (from the Library) an instance of your button on stage, you can then right-click it and open the Actions window. Then add this script to the button...

on(release){
getURL(" "_blank");
}

Or you could simply use the text tool (no buttons), and type in some text on the stage. Make sure the text is static in the properties panel. When done typing, mouse highlight a word or a few words in the text, and while highlighted, type in the URL you want to go to in the URL box, the lowest box in the textfield's properties.
Test your movie. When hovering over the previously highlighted text, your mouse cursor will change to a pointing finger icon, and clicking it will take you to the URL typed in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top