Graphic Selections & Desktops : legace and 25 unknown users

 Word :   Username :  
 
Bottom
Author
 Thread :

[Flash Cs4] How to hyperlink images in Flash CS4 Pro

 
n°11442
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-14-2009 at 07:25:56 PM  
 

Hi all :hello:

 

im doing some work in flash and i wanted to create a http:// hyperlink on an image not a button and it must work in CS4

 

ive tryed google and most of the tutorials ghive me copmiler error, migration issue function getURL is no longer used :P

 

and i dont want to have convert the image if possible i like .png  :he:

 

oh and its in AS3 not AS2 or flash lite :P

 


Message edited by thetmyster on 05-14-2009 at 07:33:00 PM

---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
mood
GoogleAds
profil
Posted on 05-14-2009 at 07:25:56 PM  
 

answer
n°11443
Gruzz
Profil: Moderator
Avatar
profil
Posted on 05-14-2009 at 07:43:11 PM  
 

You mean on a Graphic File then? :) You'll have to figure out how to do an hit test on an Graphic file in Flash. I'm sure you will find something on Google if you search for hit test. :D

answer
n°11444
uttaresh
The Penguin Master
Profil: Penguin Pro
Avatar
profil
Posted on 05-14-2009 at 07:59:31 PM  
 

I've used getURL before, and I've also linked images, but I don't remember how; it was a long time ago. :(


---------------
Glomping the internet populace.
http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gif
One forum at a time.

answer
n°11445
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-14-2009 at 08:03:59 PM  
 

its all so annoying ive now got it as a button and you can click it ..

 

but it will not take me to a url :P

 

and apparently in flash CS4 GetUrl Is no longer used (in-compatible :P)


Message edited by thetmyster on 05-14-2009 at 08:08:24 PM

---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer
n°11450
truth
-------------------------
Profil: Big Penguin
Avatar
profil
Posted on 05-15-2009 at 10:22:20 AM  
 

getURL() is out dated now.
 
AS3 uses flash.net.navigateToURL method which requires
input of type flash.net.URLRequest.
 
put graphics in a movieclip, instance name like "mc_img1" and..
 

Code :
  1. import flash.net.URLRequest;
  2. import flash.net.navigateToURL;
  3. import flash.events.MouseEvent; //we'll use all these
  4. stage.addEventListener(MouseEvent.CLICK, evthandler); //let stage listen
  5. function evthandler(evt:MouseEvent):void { //handles all click events
  6.     switch (evt.target.name) {         // name of what was clicked
  7.         case "mc_img1" :          // was movie instance "mc_img1" clicked ?
  8.             var url = new URLRequest("http://www.crystalxp.net/" );
  9.             navigateToURL(url,"blank" );     //open in new browser window
  10.             url = null;     // garbage
  11.             break;           // finished
  12.         default :
  13.             trace(evt.target.name + "no event handler" );
  14.     }
  15. }


---------------
http://img504.imageshack.us/img504/108/sigglassms3.png
answer
n°11451
thetmyster
Life is a maze, Love is a riddle
Profil: Top Penguin
Avatar
profil
Posted on 05-15-2009 at 12:03:52 PM  
 

wow truth! thanks, ill try that :D


---------------
http://www.crystalxp.net/forum/mesimages/298907/Sig%20No%20bars%20%20%20copy.png
Glomping the internet populace.http://fc02.deviantart.com/fs48/f/2009/196/0/f/0f93b76ffd0ce94dcd8f1041c69e8b42.gifOne forum at a time.
answer

Go to:
Add a reply