Rollover button with hyperlink??

Thread Solved

Join Date: Sep 2009
Posts: 30
Reputation: Moirae is an unknown quantity at this point 
Solved Threads: 0
Moirae's Avatar
Moirae Moirae is offline Offline
Light Poster

Rollover button with hyperlink??

 
0
  #1
Oct 10th, 2009
Hello everyone!
I'm making some rollover buttons in flash, and I could use some help. I have this button that has text on it e.g home, contact and stuff like that, and I would like to make this text an hyperlink. I couldn't find a tutorial for this .
Could you give me a hint, because I'm a bit stuck and deadline is near

I'll attach the looks of the button (in OVER state).

P.s. I tried getURL but it doesn't work (or I didn't use it properly).
Thanks
Cheers!
Attached Thumbnails
homeBtn.jpg  
“The spread of civilisation may be likened to a fire; First, a feeble spark, next a flickering flame, then a mighty blaze, ever increasing in speed and power.”
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert
 
0
  #2
Oct 10th, 2009
Well what version of flash are you using?

What version of actionscript are you using?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 30
Reputation: Moirae is an unknown quantity at this point 
Solved Threads: 0
Moirae's Avatar
Moirae Moirae is offline Offline
Light Poster
 
0
  #3
Oct 10th, 2009
Hi, I'm using Adobe Flash CS3 Professional with AS 3.0. Is that O.K.?
“The spread of civilisation may be likened to a fire; First, a feeble spark, next a flickering flame, then a mighty blaze, ever increasing in speed and power.”
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert
 
0
  #4
Oct 10th, 2009
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 30
Reputation: Moirae is an unknown quantity at this point 
Solved Threads: 0
Moirae's Avatar
Moirae Moirae is offline Offline
Light Poster
 
0
  #5
Oct 11th, 2009
Thanks a lot, I will try it and let you know if i managed
“The spread of civilisation may be likened to a fire; First, a feeble spark, next a flickering flame, then a mighty blaze, ever increasing in speed and power.”
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 150
Reputation: rajarajan07 is on a distinguished road 
Solved Threads: 19
rajarajan07's Avatar
rajarajan07 rajarajan07 is offline Offline
Junior Poster
 
0
  #6
Oct 12th, 2009
I assumed that your button name as homeBTN and add the code in the timeline actions.
Graphics and Multimedia Syntax (Toggle Plain Text)
  1. homeBTN.addEventListener(MouseEvent.CLICK,TestURL);
  2.  
  3. function TestURL(e:MouseEvent):void
  4. {
  5. var serverpath:String="http://www.yahoomail.com";
  6. var urlrequest:URLRequest=new URLRequest(serverpath);
  7. navigateToURL(urlrequest,"_self");
  8. }

You can use _blank instead of _self to open in new window.

Hope this helps!
Thanks & Regards,
RajaRajan. R

trulyraja2009@yahoo.in
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 30
Reputation: Moirae is an unknown quantity at this point 
Solved Threads: 0
Moirae's Avatar
Moirae Moirae is offline Offline
Light Poster
 
0
  #7
Oct 12th, 2009
Great stuff rajarajan, you helped me so much!!! iamthwee your linked also helped very much, thank you
“The spread of civilisation may be likened to a fire; First, a feeble spark, next a flickering flame, then a mighty blaze, ever increasing in speed and power.”
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 106
Reputation: surindersharma is an unknown quantity at this point 
Solved Threads: 1
surindersharma surindersharma is offline Offline
Junior Poster
 
0
  #8
Oct 12th, 2009
Originally Posted by rajarajan07 View Post
I assumed that your button name as homeBTN and add the code in the timeline actions.
Graphics and Multimedia Syntax (Toggle Plain Text)
  1. homeBTN.addEventListener(MouseEvent.CLICK,TestURL);
  2.  
  3. function TestURL(e:MouseEvent):void
  4. {
  5. var serverpath:String="http://www.yahoomail.com";
  6. var urlrequest:URLRequest=new URLRequest(serverpath);
  7. navigateToURL(urlrequest,"_self");
  8. }

You can use _blank instead of _self to open in new window.

Hope this helps!
thanks for sharing nice code it help me lot
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 30
Reputation: Moirae is an unknown quantity at this point 
Solved Threads: 0
Moirae's Avatar
Moirae Moirae is offline Offline
Light Poster
 
0
  #9
Oct 13th, 2009
Oh, I noticed one thing - _self doesn't work in my case, only _blank, i tried _parent and _top also but only _blank seems to work, any ideas why??
“The spread of civilisation may be likened to a fire; First, a feeble spark, next a flickering flame, then a mighty blaze, ever increasing in speed and power.”
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 150
Reputation: rajarajan07 is on a distinguished road 
Solved Threads: 19
rajarajan07's Avatar
rajarajan07 rajarajan07 is offline Offline
Junior Poster
 
0
  #10
Oct 14th, 2009
Are you checked with the browser or from flash?
Thanks & Regards,
RajaRajan. R

trulyraja2009@yahoo.in
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Graphics and Multimedia Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC