PDA

View Full Version : Req: An explaination of this code. . .



TheMerryMaker
July 22nd, 2003, 08:04 PM
first is this-

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

this makes a movie clip and not a button play an animation on roll over but will stop the animation and play it in reverse on roll out. this i got off this forum and is very cool and i plan on using it alot once i understand it. i was hoping someone could explain whats going on here cuz i dont want to be just blindly coping code.

Second-

can the "telltarget" command be used with the above? If so, how?

If someone could direct me to info on this or expain it, that would help me a ton. Thanks

claudio
July 22nd, 2003, 08:16 PM
It checks if the movie clip position intersects the mouse coordinates. If true, go to and play next frame. If false, go to and play previous frame.

And telltarget is deprecated, you should use dot syntax.
But what you want to do?

TheMerryMaker
July 23rd, 2003, 02:39 AM
first off, what does "And telltarget is deprecated, you should use dot syntax." mean?

second, thanks for the help.

third, what i want to do is this: when a button is rolled over i want thats buttons animation to play and the previous animation to play in reverse and i supose i want the same on roll out to get the ease out effect. and i want it to look something like this.... http://www.boredomprevention.com

claudio
July 23rd, 2003, 03:17 AM
Deprecated means its no longer suppported. It will work but probably wont on next versions of flash.
Instead you should use the dot notation or the with action.

And i dont get what you want to do..maybe something like this?