ActionScript 2.0 :: Reversing Animation Using A Function?
Mar 11, 2007
I have an mc which when rollOver plays an animation (works like a button), on rollOut I want the animation to play in reverse... I have seen it done before using a fucntion, but can't seem to get it to work... If I just reverse all the frames and get it to play that on rollOut it doesn't work properly...
View 14 Replies
Similar Posts:
Jul 2, 2011
I'm trying to do the following:
1. Have a permanent animation on the background, running over and over again.
2. My buttons should control that animation. What I want to do is to reverse the animation (going backwards on the timelime) when the user press the button, no matter in which frame the animation is.
3. Finally, when the animation is "gone", the buttons must point to an specific label.
I'm not sure how to to the reverse motion thing and if that's possible usings AS2. BTW, I'm attaching the file (just 8Kb) to show the idea, the real animation in the background is gonna be a movie clip but it's heavy to upload and I don't believe anyone will download it.
View 0 Replies
Apr 1, 2009
I have a 23 frame animation that is moved forward or back on a mouse over. The problem is trying to reverse it. It is ok until it gets to frame 1 then it just stops. I need to get it to jump to frame 23 and to start reversing aagain.
function reverseIt(e:MouseEvent):void{
rewind = true;
this.addEventListener(Event.ENTER_FRAME,revFrame);
[code]....
View 1 Replies
Feb 26, 2012
I am trying to make a banner where two colored squares roll across the screen. The first blue square does just fine, however when trying the same thing with a green square (in a different layer) it does ok the first half of the tween, but reverses direction in the second half (where I placed a keyframe)- even though I rotated the green square the same way as the first half.
View 7 Replies
Jun 10, 2007
i am having a problem in reversing the animation in a movie clip i am posting the function i used on main timeline pls solve this
[Code]...
View 5 Replies
Oct 13, 2008
*trouble with gotoandplay and roll out functions* basically i have an after effects movieclip (followed the after effects button tutorial on this site) that i have made into a button. it works ok on rollover and rollout i use tweener which works a treat and when i click it goes to another frame and plays a small sequence of smoke exploding.
problem: its a look problem really. when i rollout the smoke click sequence tweens back to frame 0 as per my rollout instructions IS there a way for me to have the click smoke sequence play all the way through before going back to frame 0 on my rollout ? i see tweener has a oncomplete statment is that of anyuse? ive tried a few thigns but it always reverts to the rollout and reverses the footage.
[Code]...
View 6 Replies
Sep 30, 2003
Was just wondering if its possible to somehow have some AS code, to play like 1-20 frames backwards, instead of copying it to like 21-40 and reversing it manually in the timeline
View 1 Replies
Jun 16, 2006
im trying to do is have a button that shows an animation (created by a duplicateMovieClip function) with onRollOver and stops the animation with onRollOut. It works when i roll over and it stops when i roll out, but then it continues in a loop up to the point where i rolled out (instead of cutting off completely as i would like). Id be extremely grateful if you could tell me where im going wrong.
View 2 Replies
Jun 14, 2009
I'm having problems getting my player to switch directions and just bounces off of the walls of the stage. I tried reversing the rate but it still shoots off into the distance and this is what I have now, it just stops the guy at the edge and nothing more. Does anyone know how I can properly make him bounce?
[Code]...
View 8 Replies
Jul 17, 2007
I seem to be having trouble reversing the contents of an array
this is the code:
Code:
stop();
// Attributes arrays
var nd:Array = new Array();
[Code].....
i've tried changing the 'for' loops for both the 'n' and 'i' variables to decrement them and also tried idnum.reverse(); but i can;t get it to work.
It's a news page so i'm basically trying to get the newest story(which is attached to the highest id number in the databse) to post first and then post the rest in descending order.
View 2 Replies
Apr 21, 2011
I am trying to have a small simple animation. This animation needs to have a roll over listener. This roll over listener must begin a downward motion for this movie clip. And then another listener must be a click or rollout that will make the clip reverse and begin an upward motion at any point that it is executed. This is the code I got so far, but the only thing that seems to work is the rollover downward motion. I cannot seem to get the upward reversing motion to execute.
stop();
mc.addEventListener(MouseEvent.ROLL_OVER, playy);
function playy(e:MouseEvent):void
[code].....
View 3 Replies
May 29, 2009
I make a button with some animated effects. On main work area I select object and press F8 to convert button with the name of (button1). The Up as it is which I make: w=70, h=50. Press F6 and same button on Over, here I again select object and press F8 and convert to Movie Clip. Here I insert 10 frames, one by one the button extend width and height. On 10th frame the button size 110x90 width and height. To animate and stop the button I put "stop" action on frame 10.I want that if the user's mouse over on button than the 10 frames play as I mentioned above but if the user don't want to click on (button1) than all of these 10 frames play reverse or add more frames and button will go to their original size and place. Is there any script bcuz I am new and don't know about action scripts.
View 1 Replies
Feb 9, 2009
I have to reverse the display order of a number of MovieClipsin a container. Somehow I cannot figure out how to do this as whenI use a loop construct and count through all Children I will always"pre"-alter the Indexes of the children still to come.
View 1 Replies
Jan 3, 2009
Take a look at this page [url]...
I have a movieclip with 100 frames which contain happy and sad faces alternatively. the playhead starts from frame 100 and skips a frame to 98 then 96 and so on until 2. it skips the sad faces.... but for some strange reason .. it flickers. [code]...
View 0 Replies
Jul 9, 2009
I have a function set up to determine the speed of the mouse, if the mouse is moved to the left it is returned as a variable in a negative number. I also have a function to make a movie clip scroll along, at the moment if you set the speed to 3 it will move to the left. So a positive number will move the movieclip to the left So you can see my predicament because the numbers are opposite, is there way of reversing one of them?
Here it is in short
[Code]....
View 1 Replies
May 9, 2004
Heres my scenario, I have a menu bar that is off stage with just a little part showing. I want to be able to rollover the part showing so the whole menu eases into the stage. I have this done, however, i would like it so that when I roll off the menu bar it will ease back out.Im just unsure of how to go about this. Ill post what I have, in the meantime I'll still keep trying to tweek the code.
[Code]...
View 5 Replies
Oct 27, 2006
I have added the following code to my mc, but how do I get it to display scene 1 frame one when it is done? After it is done reversing I need it to immediately go to that scene because it has all of my buttons showing. Here is my fla file:
[Code]...
View 9 Replies
Jul 12, 2010
basically i want this function to only be called after the 'animation'. when the hero dies hero.play() is called and this plays the death animation for the hero, i then called gameOver() which brings up a menu, but i only want the gameOver function to be called if the hero.play() animation is completed.
View 9 Replies
May 27, 2007
Have been struggeling for days now , I have in the _root a function called elastic and then on the stage a movieclip containing 9 smaller clips called t1 --> t9, these movieclips are each at a different y-axis and when this function is called they appear (slide) in, but now I want to slide in t1-->t4 at _x = 200 and t6-->t9 at _x=400, how can i do this within this function/code?
Code:
mc = ["t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9"];
var i = 0;
while (i < mc.length)
[code]....
View 2 Replies
Feb 23, 2010
I just got stuck with something while making an animation. I am making an animation where I want the last frames to keep repeating I want everything else to stop playing but to have specific animations repeat from a certain key-frame. Something like the animation on this site.
View 2 Replies
Feb 10, 2011
I need to create an animation and provide some results of the move function at the END of the animation. However, i am not able to control the output till the move function is completed
I tried the isPlaying- that doesn't seem to detect that the animation is completed... so continues to output resukts before the animation is complete
sample code I tried
private function mvbut():void{
var mv:Move= new Move;
mv.xFrom=Math.random()*300;
[Code]....
View 1 Replies
Apr 29, 2010
I have a .fla which loads in images and then animates them. My preloader works but the animation starts before the images are loaded. Can anyone figure out how to load images before the animation function starts?
View 3 Replies
May 18, 2010
I'm a little new to the AS thing so I need a little help. I need a simple function that will stop an animation on the main timeline for about 10 seconds then restart again.
View 2 Replies
Jun 4, 2007
I'm trying to make a button that has an animation as well as a function. Currently i have an MC with an animation in it and on roll over/out it plays forward or in reverse. Now I've tried adding a function that when clicked, the animation goes straight to the end of the animation until clicked again.
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
[Code]....
Tried with variables, setting whether or not it was clicked, yes or no. But the enterFrame kept resetting it.
View 4 Replies
Jun 19, 2004
I have a movieclip that shows an animation onRollOver and an animation on RollOut but onRelease the animation enlarge itselfs but now when I'll roll out when the animation isn't open (so i didn't release) the animation plays the animation for the minimizing of the animation. Here's my code (I know its a bit amateuristic but I'm not a programmer )
[Code]....
View 4 Replies
May 2, 2010
What I'd like to know is that if I could set up a eventlistener to wait until the MovieClip has reached the final frame, then fire a function.
Solution:
In the last frame of the MovieClip timeline:Code: Select all dispatchEvent(new Event("EventName"));
In the main timeline/class:Code: Select allMovieClip.addEventListener("EventName", FunctionName);
View 4 Replies
Jun 9, 2011
I have a fully functioning scrollbar (MOUSE_DOWN and MOUSE_MOVE) and a fully functioning mouse wheel scroll. But I would like some code to move the scroll button according to my contents y position, when using the mouse wheel scroll.
[Code]...
View 9 Replies
Feb 3, 2011
I have just learned how to create the wonderful "drawing" effect in flash by reversing frames. However, when I publish my work (either as .swf or as an animated .gif) the drawing draws, and then the completed graphic disappears.
I have the settings set so that it will not loop since I do not want it to "draw" more than once. So what do I do so that when the animation is done drawing, it doesn't disappear?
View 3 Replies
Mar 17, 2009
I downloaded a free fla file open source for pageflip. It uses a global function which is this:
_global.mcnt = 0; //counter (used on a page where is an animation).
So now I want to put an animation in a page and i assume that i have to call or use this function. the problem is that i don't know how.
View 4 Replies
May 11, 2009
I have been having trouble with the timer, knowing how to plug into the scripts/Functions the correct way. Below is the script (probably not written as efficently as it could be, but I'm trying) Anyway, the script is uses simple tweens for a movieclip. I would like to use the timer/setinterval function to pause the animation between tweens (Using the event listener after the tween stops to start the interval/pause) Is this the right concept or am I barking up the wrong tree.
[Code]...
View 3 Replies