logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Full Schedule
g
g Flash and Animation Site

BellaOnline's Flash and Animation Editor

g

Add a Hyperlink to a Button in Adobe Flash CS3 Professional


I have received many requests from readers about creating links in Flash movies that will take your visitor to another website such as your eBay store. In most cases, this link will either be a button or a text link. In this tutorial, we will take a look at how to create a button link in your Flash movie.

I am assuming that you have already created a button symbol that we will name "ebayButton" for the purpose of this tutorial. If you are reading this tutorial without a Flash project in mind, that's OK. We will use a built-in button component for demonstration purposes. If you are working on a Flash project, you might want to use different names for the symbol and instance names.

  1. Start a new ActionScript 2 Flash project or open your current project into Flash. If you are starting with a blank project, you will have one Layer and one Keyframe in the Timeline. If you are using an ongoing project, go to the Keyframe on the Timeline where you wish the button action to occur.

  2. If you need a button, you will find it in the Components panel (Window, Components). Now, click and drag an instance of the Button component from the panel onto the Stage.

  3. We need to give the button a Label so that we will remember its purpose. At the bottom of the workspace, click on the Parameters tab. You will see a list of parameters. The default label for the label parameter is "Label". Let's change this to "Go" or whatever name you wish to use. When you click Enter, you will notice that the label on our button has changed to "Go".

  4. Now we need to give the button an instance name so that we can program the button with ActionScript. Click on the Properties tab to go to the Properties panel. Let's give this button the instance name of "ebayButton".

  5. Click on the stage to deselect the button and go back to the Keyframe on the Timeline. Click Window, Actions from the Menu bar to open the Actions panel. Type the following code into the panel.

ebayButton.addEventListener(MouseEvent.CLICK, goWhere)
function goWhere (evt) {
var url = "http://myworld.ebay.com/name_of_your_eBay_store"
navigateToURL(new URLRequest(url))
}


This code creates an Event Listener for your ebayButton (ebayButton.addEventListener) and when the button is clicked (MouseEvent.CLICK) Flash will preform the goWhere function which will send your visitor to your eBay store.




Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Twitter Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Facebook Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to MySpace Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Del.icio.us Digg Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Yahoo My Web Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Google Bookmarks Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Stumbleupon Add Add+a+Hyperlink+to+a+Button+in+Adobe+Flash+CS3+Professional to Reddit



 



RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the Flash and Animation Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.

g


g features
The Motion Toolbar Tools

Apple Motion 5 - The Toolbar

Apple Motion - HUD

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor