Groups | Blog | Home
all groups > flash actionscript > december 2004 >

flash actionscript : Action script help


David Stiller
12/9/2004 9:43:31 AM
Webstudents1207,

You got it. The trick to that is to remove your script from the button
itself and put it on a keyframe of a timeline. Give your button an instance
name so that you can "call it by name," so to speak.

// Assuming a button instance named "hermit" ...
// put this code in a keyframe of the main timeline:

hermit.onRollOver = function() {
gotoAndPlay(2);
}

In essence, you're addressing one of the events this button inherits
from the Button class (onRollOver; see the ActionScript dictionary for
details). All instances of the Button class inherit a Button's properties,
methods, and events. By assinging a function to the onRollOver event,
you're telling this particular button what to do when a roll over happens.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Webstudents1207
12/9/2004 1:57:51 PM
Hey does anyone know a different way to write this
on (rollOver) {
gotoAndPlay(2);
}
Jeckyl
12/10/2004 9:32:44 AM
So you want script that isn't script and somehow feel the need to have dots.

I really don't understand what you want.
--
All the best,
Jeckyl

AddThis Social Bookmark Button