First, I'll admit that I'm a complete noob when it comes to coding in Flash. Now, here's what's frustrating me - I recently purchased "Flash Advanced" from Peachpit Press so that I could just try to get my hands around Action Script. I just wanted to do something very simple: create a button with a getURL link. The book says that the code for the button should look like this:
button_name.onRelease = function() {
getURL("http://www.myurl.com");
};
But, that only gives me a syntax error which reads:
**Error** Scene=Scene 1, layer=Layer 2, frame=1:Line 1: Statement must appear within on handler
Now, if I use what I suppose would be considered obsolete syntax:
on(release) {
getgetURL("http://www.myurl.com")
}
it works just fine with no errors.
So, what's going on? What's all this "new" Action Script about if it doesn't work?
Bookmarks