Copy link to clipboard
Copied
I keep getting syntax errors using the snippet code and I'm following the directions... Just want the button to link to an outside webpage - very new to Animate - and frustrated. Any suggestions much appreciated.
that's html5 code. if you're publishing for as3, using as3 code:
button_1.addEventListener(MouseEvent.CLICK,f1);
function f1(e:MouseEvent):void{
navigateToURL(new URLRequest('http://www.adobe.com'),'_blank');
}
Copy link to clipboard
Copied
what code you using that's triggering an error and what's the error?
Copy link to clipboard
Copied
Thanks for looking ...
I'm using this:
* Click to Go to Web Page
Clicking on the specified symbol instance loads the URL in a new browser window.
Instructions:
1. Replace http://www.adobe.com with the desired URL address.
Keep the quotation marks ("").
*/
this.button_1.addEventListener("click", fl_ClickToGoToWebPage_2);
function fl_ClickToGoToWebPage_2() {window.open("http://www.adobe.com","_blank")}
and error is
1120 Access of undefined property window
I replaced in my version the domain with the appropriate one - as instructions indicate to do
Copy link to clipboard
Copied
that's html5 code. if you're publishing for as3, using as3 code:
button_1.addEventListener(MouseEvent.CLICK,f1);
function f1(e:MouseEvent):void{
navigateToURL(new URLRequest('http://www.adobe.com'),'_blank');
}
Copy link to clipboard
Copied
Thank you VERY much. It works. 🙂
Copy link to clipboard
Copied
you're welcome.
Copy link to clipboard
Copied
* Click to Go to Web Page
Clicking on the specified symbol instance loads the URL in a new browser window.
Instructions:
1. Replace http://www.adobe.com with the desired URL address.
Keep the quotation marks ("").
*/
this.button_1.addEventListener("click", fl_ClickToGoToWebPage_2);
function fl_ClickToGoToWebPage_2() {window.open("http://www.adobe.com","_blank")}
and error is
1120 Access of undefined property window
I replaced in my version the domain with the appropriate one - as instructions indicate to do