AS3 GetURL?
Another big suprise for AS3 is the missing GetURL where we used to script it on buttons to open up url. However that was replaced in ActionScript 3.0. We use navigateToURL instead.
Just follow the example when scripting your button. Remember like in previous tutorials, you need to add an eventlistener to your button to attached a function to it.
this.YourButton.addEventListener(MouseEvent.CLICK,openURL); function openURL(event: MouseEvent) { var request:URLRequest = new URLRequest("http://www.isgoodstuff.com"); navigateToURL(request); }






Thank You Very Much
Thank you so much! !
How would I add that to this block? I keep getting an error;
onClipEvent (load)
{
num = 5;
this.title1.gotoAndStop(num);
this.title2.gotoAndStop(num);
this.title3.gotoAndStop(num);
this.title4.gotoAndStop(num);
}
on (rollOver)
{
if (_root.link != num)
{
_root.menu2["item" + num].gotoAndPlay(“scontact”);
this.gotoAndPlay(“scontact”);
} // end if
}
on (releaseOutside, rollOut)
{
if (_root.link != num)
{
this.gotoAndPlay(“s2″);
_root.menu2["item" + num].gotoAndPlay(“s2″);
} // end if
}
on (release)
{
if (_root.link != num)
{
_root.link_prev = _root.link;
_parent["item" + _root.link].gotoAndPlay(“s2″);
_root.menu2["item" + _root.link].gotoAndPlay(“s2″);
_root.link = num;
} // end if
is because the script you are using is Actionscript 2.0. The ones im showing is Actionscript 3.0. The syntax and commands are all different. Thus, you get an error.
thx for the script!
Greetz
Nick
Why Give Me This Error ? The currently targeted Flash Player does not support the getURL action.
getURL(_root.link, “”);
The currently targeted Flash Player does not support the releaseOutside event. on (releaseOutside, rollOut)
The currently targeted Flash Player does not support the releaseOutside event. on (releaseOutside, rollOut)
etc if Anyone Know Please Post
Thanx! Very nice and 100% ok code!
Works great!
But what do I need to change in order to make it follow the url in the same tab?
Thanks,
-James
u can refer here