all groups > flash actionscript > may 2007 >
You're in the

flash actionscript

group:

Help in modifing action to create a button link to an external site.


Help in modifing action to create a button link to an external site. aravot
5/20/2007 9:31:02 PM
flash actionscript: I have this action for a button, what do I need to change to make it open an
external link and the button to stay selected/highlighted.

[Q]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

}
}[/Q]

Thank you.
Re: Help modifying button action to open an external link kglad
5/21/2007 2:03:52 AM
Re: Help modifying button action to open an external link aravot
5/21/2007 5:37:27 AM
Re: Help modifying button action to open an external link kglad
5/21/2007 5:49:27 AM
put that in your on(release) handler if you want it to execute when your button
is released. for example,



on(release) {
getURL("http://www.adobe.com");
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

}
}
Re: Help modifying button action to open an external link aravot
5/21/2007 6:26:26 AM
Re: Help modifying button action to open an external link kglad
5/21/2007 8:24:34 PM
the code i posted would cause nothing to occur onRollOver.

AddThis Social Bookmark Button