Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Button 'reverse' Problem



Hi
I have a button that triggers an event when you mouse over it. I would like the event to reverse back when you move the mouse off the button. That is to say the event moves backwards from the position it had reached prior to mousing out. The event doesnt 'slam' back to its starting position it reverses, even if the full event hasn't finished. I have also seen this done within the button, say it fades from one colour to another, where the fade reverses from the point directly before you mouse off the button. Would this be the same script?
Cheers
Burnsie



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 07-20-2005, 09:32 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Button Reverse
Hey guys,
I have a button animation on rollover where something small pops up. How do I get the animation to kinda reverse itself on rolloff?

Reverse Mc Button
I made a button with an mc that appears when the mouse is over the buton. When I rollout, get of the button it should play the mc but in reverse. Got a simple solution?

Reverse Button
hey guys,

maybe you could help me out here

I would like a button to on the over action to play a mc than on the role out action I would like it to play in reverse from the point it was at when the role out happens..


Thanks to any one that can help!

Reverse Button
Hi all. I've got 2 buttons and a mc called bottles_mc on the main timeline. One button for forward, one button for reverse. Can not figure out actionscript to make reverse button go ONLY to the previous stop();. The mc is a bunch of bottles rotating in a circle. I want you to be able to cycle through forwards and reverse while stopping at each bottle automatically. I have the forward button working, but the reverse button is elusive. Im using Flash 8.

Any help would be great. Thanks.

forward button script --->

on(release){
bottles_mc.play(_currentframe);
}

reverse button script --->

on(release){
bottles_mc.onEnterFrame=function(){
this.prevFrame();
if(this._currentframe==1){
delete this.onEnterFrame;
}
}
}





























Edited: 09/08/2007 at 11:28:25 AM by musicismything

Reverse Button
I have 16 buttons.
When each is pressed 15 disappear and another image comes in.

How do I create the reverse effect?

So you press the image and it disapperas and the 16 buttons reappear

Thanks

Reverse A Button
Did a search and found nothing so if it has been coverd sorry.

I want a button that whne u rollover does the aniamtion but if u rollout it stops where it is and plays back.

Up until now i have jsut been putting hte same aniamtion in the Up state and in the over state jsut reversed. So when the button is in its up state it jsut plays the reverse of the over state. This cna lead to a choppy look cause if you mouse off fast enough it looks like it jumps to the last frame then plays.

I've uploaded a FLA of my current way of doing button aniamtions BUTTON FLA

So if every one is confused now any ideas?

Play Reverse Button...
I need to make a button inside an MC so when you roll over the button it will play tho movie backwards untill you take your mouse from the button...


I know it should look some thing like:

on (rollOut) {
stop();
}

I don't know the action that would play it in reverse...

Thanx!

Button Animation Reverse
Hi, I've first want to say thanks, for the help, this forum is great. When I use a movieclip in a button for the mouseover, and mouseout after that, it just stops. Is there any way I can smoothly reverse it from the current frame, to return to the normal state without excessive actionscripting?

Thanks much!

Button Reverse Problem
I have reverse animations on my buttons with a simple glow on rollover and fade to normal on rollout. I have a Hit state only button over the animation and it works fine, just that i find that sometimes I will rollover it and the animation sticks sometimes even after i have rolled off it. Any ideas?

Code is as follows:

14 Frames:

Action Layer
frame 1
Code:
stop();
frame 7
Code:
stop();
Button Code
Code:
on (rollOver) {
gotoAndPlay(2);
}

on (rollOut) {
gotoAndPlay(7);
}

Button Reverse Problem
I have a very strange problem. I have some Navigation buttons in a website, that when rolled over, change, then reverse when rolled off. The problem is, if the user moves the mouse very quickly over top of one of the buttons, and then moves out of the flash area, the button 'sticks' in it's 'onmouseover' state and doesn't reverse. This only happens when a user moves 'very quickly' over the button and back out of the flash area. Here is the actionscript I used:

onClipEvent (enterFrame) {

if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this._currentframe<this._totalframes) {
this.nextFrame();
}

} else {

if (this._currentframe>1) {
this.prevFrame();
}
}
}


Any ideas? Is there a way to fix this?

Thanks in advance!

2 Click Button, Reverse MC
I've got a button that I want to do 2 things to a movie clip. The first click causes the MC to play till it hits the end of it's animation and then stops. The second click of the button will cause the MC to play it's animation backwards. Here's my script so far.


Code:
on (release) {
stagemask.onEnterFrame = function() {
if (stagemask._currentframe == 1) {
stagemask.play();
} else if (stagemask._currentframe == 35) {
stagemask.prevFrame();
} else {
delete this.onEnterFrame;
}
};
}
It plays forwards fine and when I click it the second time the MC goes back only one frame (unless my eyes decieve me).

Any help with this please?

How To Reverse Animation In Button?
I have an animated button that plays a movie from frame 1 to 9 when I mouse over it. When I move my mouse off of it, it stops. What I want to do is go in reverse when I move my mouse off of it and I don't want it to just play the movie from 9 to 1, I want it to go in reverse from the frame I was on when my mouse was over the button. Anyone have any idea how to do this?


Prindel

Reverse Action On A Button
Hi I am trying to make it so that when the "print button" is clicked a line comes down and displays a sub menu with more options on. I have done this by masking out the sub menu and tweening the mask out as the line comes down... easy...but...

I want the action to reverse when another (or the same) button is clicked so the line goes back up and hides that menu and then opens the new menu (of the corresponding button

My site is here so you can see what i have done - (click the button that says print)

http://vectorsesh.com/vectorsesh_2/v_3.html

please help me

Button Reverse Action?
I am trying to make a MC button with the

on (press){ gotoAndPlay(2); }

but i need it to on press again, do something else...basically gotoAndPlay(8) which in essence reverses the action that the previous press command initiated, but i can't figure it out...

Please help a noob out!

thanks for any help you guys might can lend!

Reverse Play Button
i have never been able to figure out a script to create a reverse play button, i have created one that have a different script on every frame, but it's so tedious and i don't have time for tedium.

dose anyone know a simple script that will play the movie clip in reverse, without it going back one frame and stopping?

Reverse Button Movie
I have a button with a movie clip in the over state. The movie clip looks like a camera panning up over an image of a person. so when you mouse over, you start at the bottom of his necktie and move upward toward his face. When you mouse off, I want the exact opposite to happen. If you are just at the bottom of his neck, I want you to pan down from the bottom of his neck to the beginning of the over state movie. So it's basically reversing however much of the 'over' movie has played at the point where you mouse off. I'm not that advanced as far as actionscript goes...is there a (fairly) simple way to do this?

Reverse Last Action With Button?
Is it possible? Say I click a button that plays a section of a movieclip. Is it possible to reverse that action, or undo it somehow when another button (any other button) is clicked?

Reverse Button Movie
I have a button with a movie clip in the over state. The movie clip looks like a camera panning up over an image of a person. so when you mouse over, you start at the bottom of his necktie and move upward toward his face. When you mouse off, I want the exact opposite to happen. If you are just at the bottom of his neck, I want you to pan down from the bottom of his neck to the beginning of the over state movie. So it's basically reversing however much of the 'over' movie has played at the point where you mouse off. I'm not that advanced as far as actionscript goes...is there a (fairly) simple way to do this?

Help With Reverse Animation On Button
The buttons are animated with a movie clip inside each button and the movie clip plays on rollover, however I need this same movie clip inside the buttons to play reversed, when the cursor is moved away from the button.
I know how to do this with an instance but I already made each button and fooled around a thousand times with the animation and I do not wish to start over again!
I have only experimented with this type of action script before and I must say I am a little lost =(
Can anyone help me as to how I would go about doing this ?
Any coding would help.

I know there is a simple way of doing it with action script, but I have no more time to fool around and I need your assistance =P
If you could supply the code it would help me out.
(I can modify it to work with my page and my buttons)
Just need something to work off of.

Maybe a code I can put on the button, or whatever you can come up with.

For future reference,
thanks






























Edited: 09/19/2008 at 04:43:32 AM by coffincup

Play And Reverse MC Within A Button
Hey, I'm trying to create an animated button which contains a movie clip in the over state which plays forward and then reverses. I have the MC working when its playing strictly on the root, but when its enbeded within the button it doesn't function.

Heres what I have:

button -> mc on over state of button with a stop action at the end of the forward animation and a gotoAndStop(1) action at the end of the reverse animation.

attached to the MC I have ->
on (rollOver) {
_root.newsMC.gotoAndPlay(1)
}
on (rollOut) {
_root.newsMC.gotoAndPlay(6)
}

Does anyone have a remedy?

Reverse Button Effect
I need help with a movie clip used in a button.

I have a magazine draw on a webpage with a button over the magazine. The hit state is the size of the magazine so when you mouse over the magazine you see the corner edge of the magazine curl up.

I did this by creating a button, then loaded in a movie clip on the over state. Nothing is currently on the up or down state. Hit state is as stated, size of the magazine.

My question or problem is that after you mouse over the magazine you get the corner to flip up but when you move off the hit state it just snaps back to the beginning of the movie clip or just doesn’t show the button effect anymore. I want it to play the movie clip in reverse when the mouse leaves the hit state, so it looks like the page curl folds back down.

Idea came from http://www.claracollins.com/ trying to mimic the same page curl effect.

Thanks,

Layoric

Button With Reverse Action
I would like to make a button that when you roll over it, there is like a darkening of the background of the button, then when you roll off of the button, the background of the button returns to its original color , but not instantaneously...

www.2advanced.net   the navigation buttons at the top right ... something like that.  The background in the button deepens in color then returns just as quickly when you roll off.  How do you do that?



Reverse Button Action?
Is there a simple way to reverse the action shown when a button is rolled over, after it has been rolled off. In otherwords, I have something for instance come out of the button when it is rolled over that shows what the link is to. When it is rolled off of I want that to retract as opposed to just disappearing. I have figured out a couple ways of doing it that seem very inefficient, so any help is certainly appreciated! Thanks!

Button Animation... Want To Reverse On Mouse Out
I have a button that on mouseover animates. On mouseout, it just returns to state 1. What I want to happen is that when the mouse goes out, I want the animation to play backwords to get to the first state. Anyone know how this is done... Thanks in advance for your help...

chris

Button Script To Play The Mc In Reverse
I'm making a basic image slideshow and everything works on it fine (all the 'next' buttons work to change to the ext image) but the 'previous' buttons don't, because i don't know how to script the buttons. I want, when a the 'previous' button is clicked, for the movie to play the movie in reverse and stop after 6 or so frames. i think getting it to stop will be easy because i already have a stop script on the frame for each image.

I hope u can understand what i want, cheers guys

ZedMedia

Movieclip Reverse Button Problem
Hello all. I have a brilliant snippet of clip-reversing actionscript intended for use with an interactive menu. My intention is to place buttons on the menu when it has completely rolled out, but that seems to be troublesome as is demonstrated by the attached clip. There is some difficulty with overlapping hit areas, I believe. Any assistance is greatly appreciated. Thanks!

Reverse Movie Leaving The Button
When I roll over a button I have a movie clip play (text slowly appears) but when I move the mouse the text disappears instantly. Is there a way to play that movie clip in reverse when my mouse leaves the button?

Reverse Play Button Issue
Hello you wonderful forum people!

I have a button (actually a MC) that plays reverse when you hover over it.

Everything works great, no problem at all. My question is regarding the starting point...

I'll try to explain best I can...

You'll notice that when you start this SWF, at the very beginning, button (MC) is animating from the ending point (I marked it with black "END" text) to the starting point (I marked it as white "START" text inside the black circle).

That's exactly how it suppose to be when you roll out that button, and when you are hovering over it, button (MC) is animated from the START point to the END point.

Is there any way to set that button so it doesn't animate immediatelly when you start that SWF ? I mean, I don't want to see that animation from the END point to the START point, I want that button to "sit" on START frame and wait until I hover over it... then animation from START to END should begin, and of course when you roll out that button, animation from END to START should normally play.

It's just that first little thing when you start this SWF. It shouldn't animate, it should begin with START frame and stand still until I hover over that button.

Both, SWF as well as FLA files are attached...

Many THANKS in advance !

Reverse Function With Loadmovie Button
I have this action setup to where it calls a movie clip when you click open and when you close it the movie clip plays backwards but now I need it to do the samething with a .swf file but everytime I click it the file opens but doesnt play backwards so how sould I go about doing this with this action that I have put together.

This is what I have so far and I dont know why it wont play backwards the file comes up but when I want it to play backwards it just goes to frame 1 and does the samething again.


ActionScript Code:
stop();

function playBack (name:String):Void {
    var mc = this[name];
    if ( mc.played ) {
        mc.played = false;
        mc.onEnterFrame = reverseNow;
    } else {
        mc.played = true;
        mc.onEnterFrame = playNow;
    }
}

function reverseNow (Void):Void {
    this.prevFrame();
    if ( this._currentframe == 1 ) {
        this.stop();
        delete this.onEnterFrame;
    }
}
function playNow (Void):Void {
    this.nextFrame();
    if ( this._currentframe == this._totalframes ) {
        this.stop();
        delete this.onEnterFrame;
    }
}

maximus.onPress = function (Void):Void {
    maximus1.loadMovie("maximus1.swf");
        playBack(this._name + "1");
    playBack("closemax");
}

When Button Down Play MC In Reverse When Up Stop
Hello AS3 Gurus!

I am having a lot of problems getting the AS3 Timer class to replace the functionality of AS2's setInterval.

You can download the FLA here, to see what I have so far:
download_fla

What I want to have happen is as follows:
(1) Clicking on the certain peel, shows a different "layer" of a product that is on a turntable (works as desired).

(2) Clicking the right facing arrow rotates the product to the right and loops around and around until the mouse button is released (works as desired).

(3) Clicking the left facing arrow rotates the product to the left (playing the movieClip in reverse in an indefinite loop) until the mouse button is released (this I can sort of get to work -- it plays in reverse, but does not stop when the mouse button is released. Also, it does not loop -- in reverse -- continuously until button is released and all buttons become inoperable after pushing the left arrow the first time).
I cannot figure out how to "kill" the timer event to stop the turntable on button up and I cannot figure out how to have it loop continuously in reverse.

I would sell my soul for a .playReverse(); method!

Can anyone shed any light on the problem?

Also, there is commented out code in the FLA of how I used to solve this problem in AS2. If I could hammer this code into AS3 format/syntax, I would be happy with that too -- The most elegant solution is what I am after.

Any input is greatly appreciated.

Anyone up to the challenge?

Regards,

-john

Reverse Movie Direction Without Button
I have created a movie that I would like to loop forward the back then forward again continuously. Any ideas?

Reverse Animation Using Button Hitarea
Hi there,

I'm a total noob to Actionscript / flash and i'm trying to put something together for my new site. Basically, what im trying to do is animate an image when the mouse is rolled over it, and animate it back out again when the mouse leaves the area.

Attached to this post are the two test files i'm working on. The first (titled working.fla) does exactly what im trying to do, but messes up when you run the mouse over the right-hand side of the movie area. The second (titled helpme.fla) was another test to see if I could get the same animation while hovering over a button instead of hovering over the movie clip.

So, the question is - is it possible to do this using a button as the 'hitarea' for the movie clip animation? And if so, how do I alter the included files to get this working?

Any help is greatly appreciated,
JT

Single Button Movie Clip Reverse
I have seen many reversals using two buttons but that kind of defeats the purpose. I don't want to create the identical frames in reverse and use a stop either. I would like to have a single direction clip that plays forward/ reverse when clicking a single button and operates independently of the main timeline so I can use it as a flyout. I would ultimately want to run a crawl (tickertape) with editable text on this fictitious flyout. Am I nuts?

TimeLine Help, Playing In Reverse With Button On Release
Hows it going
Im trying to have a movie clip play forward and in reverse, so something like, on release play this movie at the enterframe rate untill youve played for a set number of frames or until you get to a varriable which detimines the play lenght. Similar to this.

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

but with a button on release, and id like to have on button to play in reverse and on for forward.

thanks chris

Remember Button Click And Reverse Animation
Hi,

I have a website that is separated into sections. Each section starts with a frame label and has an animation. I want Flash to remember which button was clicked so that no matter what other button is clicked next, Flash will reverse the animation for the button they were on and then go to the new frame label that was clicked. I am using ActionScript 3.0 and I already have the functions and code added to the buttons, so the navigation works, I just need the reverse action. Can anyone help?

Thanks!

Reverse Movie Clip When Clicked On Another Button
When you click on a button it loads the movie clip that is on the main timeline. What I want to be able to do is when you click on another button the movie clip that you are on reverses and the new movie clip loads up.

Reverse Movie Clip On Button Press?
The site is www.amberbutler.com/index2.html.

Notice that when you click a link, the current content frame dissapears and the next one animates in.

I want the current content frame to animate out and then the next one animate in.

I can't find a tutorial anywhere and I've tried everything I can think of, even naming variables to call a series of complex MCs from the _root. Can anyone point me in the right direction?

Thanks!
sogj

Button That Makes Movie Go In Reverse From Current Frame
I have created a movie that when button1 is pressed the movie plays, then when button1 is released the movie stops at the current frame, when button1 is pressed again it resumes at the current frame.

My problem: I want a button2 that will make the movie go in reverse from the current frame and have the same qualities that button1 has (on release stops at current frame). How can I achieve this? Thanks.

Script For Playing Mc Reverse As Soon As You Leave The Button Area
hi there
there was a little tutorial months ago about this subject. If you enter a button a mc starts, but as soon as you leave the button area, the mc has to play in reverse....

it was an example with a ball or something...

does somebody know?
help me out here please, it was just a simple script....

greetz
melvin

[F8] Newbie Flash Button With Reverse In Multiple Layers
Hello All,

I have a movie I created, and I want to make it a movie clip button. The reason for that is that I want the movie to reverse on roll out. now, I don't know actionscript, but I can figure out how to take pre-typed one, and play with it. There was a tutorial on making movie clips into button, but it seems to not work, everywhere, and I didn't find a simple one anywhere else.

So, actually there are 2 questions:
1. How to I make this a button with rollover and roll out?
2. What do I need to add to make in roll out a reverse movie clip? there is the kirupa guide, but it only works when you have one layer. I need it to reverse all layers, and I can't make this movie into one layer because of all the text effects.

I also attached the button I made, but I need it to have the rollout reverse effect.

Thank you!

Ori

How To Reverse An External Movie When Unloading Using A Button On Maintimeline
How do I reverse an external movie when unloading it by using a button on the maintimeline? and can I apply the same code to every button on the main timeline ? Im really just looking to make the movies load and unload smoothly as well as efficiently.

Thanks

Several Questions - Delay, Swap Depth, And Forward/Reverse Button
I got several questions, so instead of posting 3 seperate posts and taking up space I'll roll it all in one. Thanks in advance.

Delay
I have a slide show that plays, and it processes the do..while statement to quickly causing flash to crash. All I need is a simple delay. I've noticed setTimeout, but I really don't understand how to use it. Anyone know where to get some documentation on it?

Swap Depth
The slide show I have can also be played 1 frame at a time. I want the picture to swap depths when the user hovers over. However, the slide show is within 2 loaded .swf files. How can I get it to swap depths with the _root or is this even possible?

Forward/Reverse
I have a .flv file and I can play and pause the file using custom buttons that I've made in my swf. How can I get forward/reverse functions?

Play In Reverse Button In Swf File No Longer Works Once Loaded Into The Master Swf
Hi

I have a main swf file that loads in 2 other swfs.
The 2 other swfs have on their timelines a movieClipController that
plays their timelines in reverse when a button is clicked.
When I view the 2 swfs on their own everything works as it should, the
timelines play in reverse.
But when I load either of the swfs into the main swf and click on the
button that reverses the timeline nothing happens.

This is the code on each frame of the MC Controller

Frame 1. stop();

Frame 2. _root.prevFrame(); // Frame 2 has the label "base" on the
layer above.

Frame 3. gotoAndPlay("base");

This is the code on the (play in reverse) button

on (release) {
_root.control.gotoAndPlay("base");
}


Can someone please help with this.

Regards Max

How Do You Reverse Your Animation Or Do A Reverse Wipe...
...when loading a new movie or going to a new scene? In other words, when a new movie is fading in and then stoping to reveal buttons or navigation, how do you tell your movie to reverse your frames or reverse the intro animation, then go to and play a new movie? I apoligize it's hard to explain. Here is an example...

http://www.djstevelawler.com/
1)enter the site
2)skip the intro
3)you will then see the turntable and all of the animation fade in along with a drumset that if clicked reveals your navigation.
4)click on "chart" for example
5)the entire animation reverses itself or fades out the way it first came in, this is the effect that I'm after.
6)the chart page fades in along with the navigation
7)clicking the back button and the chart page fades out again just as it faded in and load the portal page.

Please help me out with this. Even if you can point me toward a tutorial I would be extremely grateful.

Thanks!

OnMouseOut{freeze Button Animation, Reverse Animation Back To..}
This is my question in an action script "perspective", since i dont wanna spend the time typing this question out in plain english..

How would i implement this effect into a button I made that contains a MovieClip as the over state? ::

onMouseOut{
stop button's Over animation on current showing/playing frame;
then reverse animation back to start
OR
fade out current showing/playing Over animation frame, back to the button's load state (not over)
};

[MX04] Click A Button Once To Play, Then Again To Play In Reverse
Alright, so I've got this MC that is set up to play 2 other Movie clips upon being clicked, and what I would like to have happen is; upon clicking this MC again, these 2 other movie clips will being playing in reverse, and if clicked again will play forward, and so on ad infinitum.

I've attempted to do this by having this code in the first frame of the "button" MC, in a separate actions layer.


PHP Code:



stop();

this.onRelease = function() {
    gotoAndPlay(2);
    this._parent.wing1.play();
    this._parent.wing2.play();
};




And this code on the second frame.


PHP Code:



stop();

this.onRelease = function() {
    gotoAndPlay(1);
    this._parent.wing1.prevFrame();
    this._parent.wing2.prevFrame();
};





As of right now, this will simply play the two movie clips upon clicking, stop them and reverse them a single frame, when clicked a second time, then begin playing them again from that point if clicked a third time.

Once the two MCs finish reach their final frames, the button does nothing.


Any help would be appreciated.

Problem With "reverse Animation" Button
Hi, I am having some trouble with a movie clip that has another movie clip inside it that serves as a button. The parent movie clip has the following code over it (not in any frames inside it):

on (rollOver) {move =1;}
on (rollOut) {move=0; }

onClipEvent(enterFrame) {
(move) ? nextFrame() : prevFrame();
}

..and inside the parent movie clip there's a layer with a "stop" action at the fist frame and at the last frame. What the above code does is to plays forward or backward the parent movie clip dependig on where the mouse is over it or not.

The problem is as follows: I have inside this parent movie clip another movie clip with a "onpress" event over it. When the button is pressed, a url is supposed to be opened. But when I click it, nothig happens. Even the nested movie clip has an small animation that doesnt plays.

This problem its driving me nuts!! Can anyone help me?

Movie In Button: How To Play Movie In Reverse...
I have a MC inside a button and I put in in the "Over" state. Can someone help me how to make the MC play in reverse on mouseOut? Or is there a better or easier way of doing this? Tnx!

Button Again, "over" Reverse When Off
Hello, have a small prob.
I have a button where when you role over it, an animation slowly happens to the button. When you click or roll off, it suddenly goes. How do i make it so when i click or roll off the button, the animation slowly goes away likE it came?

cheers

Copyright © 2005-08 www.BigResource.com, All rights reserved