Skip to main content
Participant
May 20, 2007
Question

Help modifying button action to open an external link

  • May 20, 2007
  • 3 replies
  • 343 views
I have this action for a button, what do I need to change to make it open an external link when button is clicked and the button stay selected/highlighted.

quote:

on(rollOver) {
num=4;
if(_root.link<>num){
gotoAndPlay("s1");
}}


on(rollOut, releaseOutside) {
num=4;
if(_root.link<>num){
gotoAndPlay("s2");
}}


on(release) {
num=4;
if(_root.link<>num and _root.animation==1) {
_root.animation=0;
_root.link_prev=_root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.link=num;
_root.play();

_root.scroller.scroller.gotoAndStop(3);
_root.DY = stage.height+4
_root.DX = stage.width+4

}
}


Thank you.
This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
May 21, 2007
the code i posted would cause nothing to occur onRollOver.

you must have code elsewhere causing a problem. look for rollOver coding to remedy.
aravotAuthor
Participant
May 21, 2007
Thank you, I modified as suggested but the link opens on hover without even clicking the menu.
kglad
Community Expert
Community Expert
May 21, 2007
you can use getURL().
aravotAuthor
Participant
May 21, 2007
I am not familiar with flash, which part of the code I need to replace with getURL()?
kglad
Community Expert
Community Expert
May 21, 2007
put that in your on(release) handler if you want it to execute when your button is released. for example,