ADDING A LINK TO A BUTTON IN FLASH OR ACTIONSCRIPT

First you should be familiar for creating the button in flash.
Here i am showing you how to create the button in flash and also need some knowledge in action script 3.0. if you have not then you can also understand easily by referring the keyword can find the more details on the adobe site.

 

1) Select the rectangle or round shape tool from the tool menu then drag and draw the shape what ever you can draw. see the below image.

 

tool bar

 
2) Select the created shape and Right click on selected shape and create the symbol by select the convert to symbol option. see the below image.
 

create symbole

 
3) Name the appropriate to the symbol like linkbutton.

4) Now select the properties window from the toolbar and give the name to the symbol to access this symbol to in action script. see the image.
 

properties

 
5) Select frame and right click on it and this will open the window to write the action script.
 

actionscriptwindow

 
6) Write the following action script code in that window.

import flash.events.MouseEvent;
import flash.net.navigateToURL;
import flash.net.URLRequest;
linkbutton.addEventListener(MouseEvent.CLICK,onLinkButtonClicked_EH);
function onLinkButtonClicked_EH(event:MouseEvent):void
{
navigateToURL(new URLRequest(“http://yoururl.com”),”_blank”);
}

7) Last pres Ctrl+Enter button to run the swf.

When you click on the button it will redirect to the new page you can use the any url and the target tag to _self, _parent instead of the _blank as per your requirement.

See Related Tutorial
Adobe Flash Player  
Fullscreen Flash
Server Side Playlist for Flash Media Server

Leave a Reply

Your email address will not be published. Required fields are marked *