English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can someone please tell me what is wrong with this simple script?

From Actionscript 2.0

on(release) {
getURL("http://yahoo.com");
}

I also tried this one from Actionscript 3.0...

on(release) {

flash.net.navigateToURL("http://yahoo.com");

}

For both, error message keeps saying-
1087: Syntax error: Extra characters found after end of program: Source }

There are no other characters.

Another error appears sometimes saying something like "mouse action permitted on instance of symbol only" but it is an instance of the button symbol in the library.


I am new to this and would appreciate any help. I'm going crazy!

Thanks

2007-11-15 15:35:43 · 4 answers · asked by Hello Kitty 7 in Computers & Internet Programming & Design

4 answers

You should really just take the time to read a book on CS3 Actionscript. It's a relatively new technology and quite different from AS2.

2007-11-15 15:38:52 · answer #1 · answered by mdigitale 7 · 1 1

Hello,

I have a really big hunch you're writing that script inside of an entire frame or a non-button object. Make sure that code is under the button instance itself. You can do this by selecting the button object and then pulling up the action script screen.

Alternatively, if you want to control the button from the frame or elsewhere, you must give button instance a name. Then can control that button through the following syntax:

//assume our object instance name is btnPopUp
//note: you can give your button instance a name under
//the property menu
btnPopUp.onRelease = function()
{
getURL("http://yahoo.com");
}


I hope that helps good luck.

2007-11-15 16:58:12 · answer #2 · answered by xytose 3 · 0 0

You should really just take the time to read a book on CS3 Actionscript. It's a relatively new technology and quite different from AS2.

2007-11-15 16:42:50 · answer #3 · answered by Anonymous · 0 2

hi, individual :O Actionscript is amazingly perplexing for novices. It takes months to get the dangle of it. Even diverse variations of Actionscript are perplexing to earnings (that is at AS3 now). i in my opinion hate to be an enthusiasm killer, yet you ought to stop searching for the respond. Time to flow on... besides you're on a mac, so make an internet site or some thing... lol

2016-10-16 22:24:00 · answer #4 · answered by staude 4 · 0 0

fedest.com, questions and answers