How to Make a Flash Banner Clickable With the Action Script Button

Written by willa dunn
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Make a Flash Banner Clickable With the Action Script Button
Type ActionScript code to control user interactions. (Thinkstock Images/Comstock/Getty Images)

Adobe Flash enables you to build animated creations such as banners. Flash banners often present usable information to your site users, and also allows them to be redirected to another site location with the click of a button. Image banners generally provide hyperlink coding that surrounds the image tag to enable the click location, but you can also make your Flash banner clickable with ActionScript.

Skill level:
Moderately Easy

Other People Are Reading


  1. 1

    Launch Flash and open the source file for your project.

  2. 2

    Select "File" and "Publish Settings." Click the "Flash" tab and ensure the version is set to "ActionScript 3.0."

  3. 3

    Select the "Rectangle Tool" and draw a box that covers your entire banner. Convert the box to a movie clip by pressing "F8."

  4. 4

    Type "urlBtn" in the "Instance Name" field of the Properties panel. Set the "Color" button to "Alpha" and the alpha value to "0%" to create an invisible box.

  5. 5

    Press "F9" to display the Actions panel. Type the following script:

    urlBtn.addEventListener(MouseEvent.CLICK, get Target);

    function get Target(e:MouseEvent):void {

    var urlTarget:URLRequest = new URLRequest("");
    try {
      navigateToURL(urlTarget, '_blank');
    } catch (e:Error) {
      trace("Cannot perform link action");


    Change the URL path to your own. The function uses the Instance Name of the movie clip. Test the button by selecting "Control" and "Test Movie."

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.