Coding in Flash
Actions vs. Methods
In Flash “global” methods are called Actions.
From previous lesson you know that every object has set of methods that serve at it’s “functionality”.
Actions – are such methods but they don’t belong to some certain object on the stage – they are part of your Flash movie at all. They exist only for one instance –the file you are currently working with. Because of that there is no need to write in the code the name of the object those methods belong – it’s only one available – your (movie, file, environment).
Let’s test your Flash proficiency. If you’ve completed our Flash basic course it will be a simplest task for you.
- Create a button on the stage
- Add a script to the button wiht the purpose to open a site http://provider.ca in separate windowon button release.
on (release) {
getURL("http://provider.ca", "_blank");
}
Method getURL() does not require the object name. Later you will see that all movie and button symbols you use on the stage need to be named to be refered.