Flash how to?
- Started
- Last post
- 15 Responses
- yarsrevenge
Does anyone know of a tutorial where I have a movieclip that plays on rollover, but on rollout, it plays that movieclip in reverse at the exact point when you rollout?
- stevegee0
check flashkit.com and kirupa.com, I remember learnging some actionscript for that a while back but don't zactly remember where.
- yarsrevenge0
well ya those are the typical... just cant seem to find one. Flashkit has turned more so into a clusterf**k of a site for tutorials... you get wacky yields on search results.
- davi-t0
Create a function to make a MC go to _currentframe -- (ie. reverseFunction);
Use an interval to keep repeating that until it gets to frame 1 (use if statement to check).
var reverse_interval = setInterval(reverseFunction,fram... that can be any number just depends on how fast u want it to go back.
Once it gets back to the first frame, you need to clear the interval.That's the basics on how to do it. You can tweak the hell out of it by adding a bunch of extra features (ie. to work on any event handler). The actual AS code...well...that you'll have to figure out urself. Read the Help section in Flash for the above AS snippets. Its a lot easier than u think.
- yarsrevenge0
Ching Chong Chang... welcome to the china club.
It's all chinese to me vato. Thanks though.
- visualplane0
uh, you can do it with tell targets, and the go to action. To have the reverse effect, you have to create it manually. There's a reverse frame thing somewhere. wtf?
- effeuelle0
use prototypes
frameTo(1, 0.2, "linear")
- who0
you can write this actionscript
into a blank keyframe above your movie clipmyMovieClip.onRollOver = function() {
myMovieClip.gotoAndPlay(2)
}myMovieClip.onRollOut = function() {
myMovieClip.gotoAndStop(1)
}(myMovieClip = movie clip instance name)
Good luck!!!
- who0
I don’t know what happened
onRollOv er = onRollOver
gotoAnd Play = gotoAndPlayonRollOu t = onRollOut
gotoAnd Stop = gotoAndStop
- aXion0
what about the prevFrame() thing?
onEnterFrame = function ()
{
prevFrame ();
play()
}on the first frame (or RollOver) kill the onEnterFrame...
- davi-t0
effeulles proto works great too. But if AS is alien to u, I'd use the other way. Do a search on Kirupa, I KNOW its on there.
- kevinv0330
Try this.
- visualplane0
The simplest way is using tell targets:
- Rand0
welcome to the brave new world of "design"
- sect0
2 movieclips : 1 button and 1 movieclip that has an animation on it
instance name for button is 'btn' and instance name for movieclip with animation is 'mcAnimate'. place this script on frame 1
onEnterFrame = function () {
btn.onRollOver = function() {
mcAnimate.nextFrame();
}btn.onRollOut = function () {
mcAnimate.prevFrame();
}
}...as you rollover on your button, it plays forward, as you rollout, it plays back reverse
- F_180