actionscript 3.0 help

zimu

Diamond Member
Jun 15, 2001
6,209
0
0
i miss older actionscript :(

basic thing i'm trying to do. i have a button on a page that triggers a motion tween (button moves to another area of the page). at the end of the tween i want the browser window that you are viewing the flash in to load a different URL - no frames no nothing, just on _SELF.

any idea how to do this? i'm so sick of googling this, it's such a simple task yet i see no simple way to do it - people have all sorts of weird functions and crap!

please help!
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
I assume your looking for navigateToURL("yourpage.html","_self");

if that doesn't work perhaps use javascript to change the location?

Actionscript:
//this will need to be somwhere before all AS declarations
import flash.external.ExternalInterface;

//at the end of the tween
ExternalInterface.call("pageChange");
-----------------------------------------------------
Javascript:
function pageChange() {
window.location="newpage.html";
}
 

NiKeFiDO

Diamond Member
May 21, 2004
3,901
1
76
navigateToUrl(new URLRequest('http://www.somewhere.com'), '_blank');

If Drakkon's doesn't work, IRRC, URLRequest takes a URLRequest object as a parameter.

Easy way to find out is to (withing flash cs3) highlight "URLRequest" and hit f1 for help