|
Generic
External Scripts on
(rollOver) { On the services button we could cut and paste the same script and modify the destination: on
(rollOver) { And we could continue from there. Instead, what I do is keep a folder on the web server and on my development machines with the script examples above in separate external files. In this case, Ive made a folder called xscripts and placed external script files within it. For example this script: on
(rollOver) { Is stored in a file
called rollover1.as (the as is for ActionScript.) Ive made a series
of rolloverX.as files that reference frame labels 1, 2, 3, etc. That way,
whenever I have to use the script I simply reference it within an Flash
movie Im developing. #include "xscripts/rollover1.as" We would place this
statement in preferences button Instance. Then, all we need to do is cut
and paste this statement into the other buttons and change the number
of the script being referenced accordingly. #include
"xscripts/rollover1.as"
in the preferences button. For the time being,
Ive left the rest of the buttons without scripts. Well place
scripts in each at a later time.
Ive added the
include statements to the appropriate buttons and created the scripts
in the appropriate referenced folder for you. Make sure to place the folder
into the same folder where youre keeping your swf files. Load xscripts.zip
and m0006.fla. |