A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Creating Links to different Pictures

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    26

    Question Creating Links to different Pictures

    I am wondering if someone can please help me. I am trying to get each of the following pictures in my flash file to link to different webpages. I have tried a bunch of different things, and can't quite get it to work right. I have put different urls on the images, but when I click on them they all go to that first url. Can someone please help. I don't know if I have to write a if statement to accomplish this. Thanks in advance
    Last edited by feeco; 01-07-2010 at 02:59 PM.

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Posts
    141
    You can do this with code. You need to covet photos to movie clips and give each a unique instance name. They type the following code into the actions panel: (change blue type to your names/destination)

    instanceName.addEventListener(MouseEvent.CLICK, functionName);
    function functionName(event:MouseEvent):void{
    var url:String = "web addy";
    var request:URLRequest = new URLRequest(url);
    flash.net.navigateToURL(request, "_blank");
    }

    This will open up the website in a new window. Note that each function name also has to be unique. like getURL; getURL1...

    hope this helps!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center