Tweening In Reverse......Help
I am using the TweenLite class and I have several buttons that tween objects onto the stage, thats the easy part. I am having trouble with reversing the tween and delaying the animation of another tween before the reversal is finished. All of my objects are to the left and right of the stage. I tried using onComplete but with no success. Any help would be greatly appreciated, thanks.
FlashKit > Flash Help > Actionscript 3.0
Posted on: 07-28-2008, 05:40 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
2 Questions. (Tweening And Reverse)
I was wondering if there was a way to "tween" a number through a scene similar the way you can do it to an object without going frame by frame and setting it individually. For example, the starting frame would be at 0 and the ending frame would be at 100, and depeding on when you clicked the object you would get a different value of that number
So far I tried to test it using this and it just oputs 0
First Frame for the Object
Code:
on (press) {
x=0;
trace(x);
}
End Frame for the Object
Code:
on (press) {
x=100;
trace(x);
}
What I'm thinking is that the object assumes the actionscript of the first frame until the last frame and thats why I'm getting 0.
Secondly, is there anyway to say
"when you get to frame 'y' play in reverse until frame 'z' supposing you started at 'z'"
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!
Tweening Alpha Fade Without Tweening?
can this be done in one frame with a loop?
i have tried searching for anything like this in the movies and on the board.. guess i am just not asking the right question to the search engine....
anyway,
i have a button. onRollOver i would like to get the current _alpha of a moveclip (MC) and increase the _aplha of that clip by an increment to 100.
onRollOut this process would reverse.
i would like this to all happen in one frame if possible with the ability to set the speed of the fade through a variable.
definately not asking anyone to do this for me (unless you are feeling generous, haha) but at least point me in the right direction.
thanks.
kc
djshank@optonline.net
Reverse An MC
yes my flash bible would answer this question quickly but I dont have it!! please help
what is the action to reverse movie please?
How To Reverse
How do you make a movieclip reverse ?
i mean make them go back after a certain time (for instance at then end of the movieclip)
Thx guys
Reverse MC?
Is there any way of getting a movie clip to play in reverse
Ive asigned a button to play a movie clip but I want the movie clip to play in reverse is this possible
Reverse The MC
What could be added to this code to keep the MC playing in reverse instead of moving back just one frame while the mouse is over the button?
on (rollOver) {
if (_currentframe>1) {
prevFrame();
}
}
on (rollOut) {
stop();
}
Thank you,
JF
XML In Reverse
i had this problem like a year ago, but i forgot what it was
i have an xml document like:
[ things ]
___[ a / ]
___[ b / ]
___[ c / ]
[ / things ]
i load the xml, put these into an array and get them out using a for..in loop
so i tested this before i hit the submit button
when i use the for..in, it goes backwards
if i get the maxLen of the array and use a for loop, it works fine
funny huh?
Reverse
Can someone tell me why this would not work for me as a Button action..
on (press) {
while (this.textMc._currentframe>1) {
// keep playing the previous frame...
this.textMc.prevFrame();
}
}
// if the mouse is NOT over the clip
on (release) {
this.textMc.stop();
}
OR EVEN THIS....
on (press) {
if(this.textMc._currentframe>1) {
// keep playing the previous frame...
this.textMc.prevFrame();
}else{
stop();
}
}
// if button is released
on (release) {
this.textMc.stop();
}
I wanted the simplest possible way of making a movie play backward,,,
Many thanks
Getting A Gif To Reverse?
Hi i hope this doesnt post twice i already did it once and it never posted sorry if it does. I have a gif that i want to reverse. I have my image going one way now i want it to go another way. Any ideas on how to do this? Thanks
Reverse?
hi,
workin with a menu which tells a certain swf. to load. i want to know if there's a way to have
1. the button which tells to unload a movie
AND
2. tell the same movie to play reverse. something with tellTarget maybe?
i have this action on the button:
on (press) {
unloadMovie("bio.swf");
thanks in advance,
noodle
How To Reverse An MC
Hello,
I have an MC that contains a video that's 175 frames long. I'd like it to play forward and backward endlessly but I can't figure out how to reverse it so that I can paste the reverse onto the end of the forward clip or how to script it so that when it reaches the end of the clip it plays itself backwards. Seems so simple, yet I can't get it.
Much appreciated,
Llyfre
Reverse
Ok,
Here is what i am trying to do. I am trying to make a slide show. And it intels pictures. Well anyway, I want this slidshow to have a certain feature when a user press on a pic the lets say he or she press on the 9th pic and the slides will scroll to that pic. well here is the tricky part. If he or she press on the third pic, then the slides will scroll back to the third pic. How can I do this? what source will I need to look up? Thanks All.
Reverse
Ok,
Here is what i am trying to do. I am trying to make a slide show. And it intels pictures. Well anyway, I want this slidshow to have a certain feature when a user press on a pic the lets say he or she press on the 9th pic and the slides will scroll to that pic. well here is the tricky part. If he or she press on the third pic, then the slides will scroll back to the third pic. How can I do this? what source will I need to look up? Thanks All.
Reverse
I'm using the follwing AS to f & R the MC.
onClipEvent (load) {
centerPoint = 390;
}
onClipEvent (enterFrame) {
_x += (centerPoint-_root._xmouse)/10;
}
My stumbling block and question is this, can the MC be stopped/paused, if so
what would be the AS if it is possible. I have 2 books in which none speak of the ability to stop or pause the clip.
Thanks,
FlashDummy
p.s. Great site
Reverse A M.c. In Mx To Pro 8
does anyone know if actionscript has changed in the flash pro 8 from flash mx. i have tried the same exact code to play and reverse a m.c. on mouse rollOver and rollOut. and the same code doesn't work in pro 8 as it does in flash mx. does anyone have any ideas. i am desperate.
thanks,
jeff
How To Reverse An M
Hello,
I have an MC that contains a video that's 175 frames long. I'd like it to play forward and backward endlessly but I can't figure out how to reverse it so that I can paste the reverse onto the end of the forward clip or how to script it so that when it reaches the end of the clip it plays itself backwards. Seems so simple, yet I can't get it.
Much appreciated,
Llyfre
Reverse
Hi Me Again
I had a question ---- Is it possible to play a timeline in reverse order? ---- by that I mean ---- Imagine a ball animated to move from left to right --- is there any way by which the play head can be made to move in reverse order---- that is without animating the motion back---- i.e. form right to left....
Reverse AS?
Alright I have a pretty big animation with alot of letters in it where they change from one color to white now I don't want to spend alot of time doing it so that it would fade back to blue in the same order it did the first time so is there some type of actionscript where It would play it but backwards and then start the animation again?
Like gotoAndPlay(80) = reverse; or something?
EDIT/ and I know that my title is Reverse AC it should be AS lol.
Reverse MC
Able to get the swap function to work but seem can't get the reverse function to work (prefFrame):
Code:
var swaps:Array = [one, two, three, four, five];
var highest:Number = _root.getNextHighestDepth();
var current:Number;
for (i=0; i<swaps.length; i++) {
swaps[i].onRollOver = function() {
current = this.getDepth();
this.swapDepths(highest);
this.gotoAndPlay(2);
};
swaps[i].onRollOut = function() {
this.swapDepths(current);
this.onEnterFrame = function(){
prevFrame();
}
};
}
The functions I'm attempting to simulate is similar to this concept: http://www.templatemonster.com/flash...ates/8785.html
Any suggestion or better functions than above?
Thanks,
Friggin' Mick
Reverse The MC
OK - I'm been searching the forum, and found some useful information, but I still can't get it to work the way I would like it to.
Here the thing, I've made a simple animation and ONE button. When you RollOver the button the animation STARTS to play, and when RollOut the animation plays backward (prevFrame)..
I'm kinda stuck here, found alot of useful code in here, but I can't figure out how to put it together so it will work my way!
So ANY help would be NICE!
Oh, and BTW the animation needs to be stoped at the last frame!
Reverse
I wouold like to make an interactive button be able to reverse action in a scene. Any ideas?
In Reverse
hey,
Well, i got flash 8 about 2 days ago and have been teaching myself without tutorials, anyways im having a problem... say i press the left arrow key to make the box for instance move left then when i press cntrl+enter the animation is in reverse :S please help us.
Alex
How To Reverse Movement
Hi, I'm a newbie in scripting. Anyways, here's the scenario:
I have a bouncing ball (using regular tweens). It then moves from left to right using:
this._x = this._x + six;
Then, as soon as it hits a certain point, say, 500 pixels, I'd like to reverse it. Si I added an <if> condition, that says this: (I'll just add the whole script!)
onClipEvent (enterFrame) {
six = 10;
end = 400;
if (this._x >=end) {
this._x = this._x - six;
} else {
this._x = this._x + six;
}
}
So as soon as it hits the "wall", it should reverse, and it does for one step, but then it goes back again, and is stuck in an oscillating movement. Perhaps someone could help explain how to keep the ball moving backwards???
thanx
Reverse Movie
can I use action script to reverse a movie.
I'm working on a rotating UI and want to use buttons to control the direction of the rotation. Any suggestion on how to achieve this would be very welcome. I can send a file with the movies in it.
I've seen action scripts that make things rotate in place. But I need icons to rotate around a center and stay still (not around around their own center as well)
[Edited by sandbender on 07-11-2001 at 06:25 PM]
Reverse Directions?
Here is my code:
onClipEvent(enterFrame) {
this._x = this._x * 0.95;
}
How can I make this object travel from left to right instead of the other way around? I know I can just change 0.95 to a whole number, but then it won't ever stop. I want to have the 'friction' effect to it, but I can't seem to get it to work. Putting a negative sign in front of it didn't seem to work, or maybe I'm doing it wrong?
Reverse Movies
I have a question, how do you 'reverse' a movie when its finished.
I would like my movie to go back and stop after the user clicked on a button. How ............?
Thx guys
Play In Reverse?
Hey FlashFriends,
I have a button with a mouseover event of on press play, on release stop. I have another button that i want to attribute the same action to, but the play to play reverse.
Possible?
Thanks for any help....
Jonathan
Play Reverse
I have a Movieclip and I want a button inside it to make the movieclip play backwards.
Dissolve In Reverse?
How might I go about doing this effect in reverse? Instead of disappearing, I would like text to apparate. I've tried reversing the frame order afterward, but instead of flipping/rotating throught motion tween, the item just moves toward the second keyframe in a rather unimpressive way. Here's the example:
http://www.flashkit.com/tutorials/Te...47/index.shtml
Movies In Reverse
Hello everyone at Flaskkit!!!......I enjoy your site, and it has helped me drastically with the progression of my newly designed, interactive flash website. Thanx to all who helped.
I was wondering if it is possible to play a motion tween in reverse. Rather than having to complete a new motion tween with the same effects, i would prefer to just play it backwards. Nothing seems impossible with Flash 5.0, but I may be getting carried away with the endless functions. Anyone with help/comments/suggestions please inform me.
Your help is much appreciated,
Thank you.
Xtrem Rukus
How To Reverse MC's Movement?
Hi, I'm a newbie at actionscript and would like to know how make an object reverse it's movement after reaching a certain point...Here's my movement script:
onClipEvent (enterFrame) {
this._x=this._x+10;
}
That'll make it slide across the screen. But if I'd like it to reverse after it reaches, say x=600, how do I proceed?
Thanks....
Reverse Script Help Please.
I have a small problem, well Iˇ¦m just practicing. Ok picture this;
I have two buttons, one that when pressed plays the movie clip, and stops when released.
on (press) {
tellTarget ("mc") {
play ();
}
}
on (release) {
tellTarget ("mc") {
stop ();
}
}
So far so good! Now for the other button I want it to reverse the movie. So far I have got this;
on (press) {
tellTarget ("mc") {
prevFrame ();
}
}
on (release) {
tellTarget ("mc") {
stop ();
}
}
Doesnˇ¦t work how I want, you see it only goes to the previous frame one at time, and this is only if you keep clicking the button! I need a smooth reverse by pressing and holding down the mouse button.
How would I do this?
Reverse Movieclip
Once I have created a button that triggers a movieclip on a rollover state, how can I get the movie to play backwards on the release state?
Reverse Loading Of MC's
Hello again...OK this is a another MAJOR irritant.
I am loading a few different swf's in a LOADING main file when corrosponding keys are pressed. This happens in chronological orde ...that is..1.swf and then 2.swf etc.
They are loaded into a MC on the main timeline(root)
Each of tehse MC's is movable UP-DOWN using cursors to read the whole file.
Now a button in 1.swf lets me load 2.swf , etc.
But if I go in reverse and load 1.swf from 2.swf then a problem occurs. 1.swf loads from its originl position, but I wud like it to be loaded in its last position.
Can anyone HElp?..
Thanx
Playing In Reverse?
hello,
is it possible to play a clip from frame 0 to 10 and then on the click of a button get the clip to play in reverse from 10 to 0?
thanks for your help...
scott
How Can I Reverse And Instance?
I have seen the posts about reversing movie clips but I am tring to use a function instead of a full MC.
I have an instance named "landscape". The _xscale=300.
This is used with the function
_root.movePieceright(This);
This code sets the x limits
if (_x>0) {
_x = 0;
}
if (_x<400-_width) {
_x = (400-_width);
}
Next I have a button with code
on (release) {
if (_x>=0) {
function movePieceright (Landscape) {
with (Landscape) {
_x += -2;
}
}
}
}
This starts moving the instance to the right until it reaches limit.
Is it possible to have another function movePieceleft take over and move the instance to the left when the right limit is reached?
Reverse Play
I have a timeline with six images which have the effect of travelling in a loop from foreground and then into the distance. I want to have 2 buttons one for forward movement and one for reverse movement. I would like to use an on roll over event to trigger this movement. "Next frame" and "play" works fine in the forward direction. However, "previous frame" stops after only one frame and has to be "roll out" "roll over" repeatedly to make it move backwards. Is it possible to get a timeline to play backwards with actionscript or is it necessary to duplicate the timeline and reverse the frame order, jumping between the two.
If it isn't possible I think it would be a welcome addition to future flash releases.
Thanks for you wisdom.
Manson
Reverse Movies
Im not entirely new @ flash however there is one effect i need help with...With buttons i make mouseover effects how can i implement it so that mouseout makes movie clip play in reverse. I can easily do it with a mouseout clip however i want it so if someone only mousesover half the effect however far it has gone it reverses to how it was....
Anyone who can help would be apprciated!!
Thanks
Reverse Frames
hi guys,
i need to know how to write an actionscript like a telltarget that makes a movieclip play backwards.
to make it clearer.. i have this button with mc on up and over, i need the mc on up to play backwards.
thanx in advance
Play In Reverse
Hello i need to play a scene backwards 35 frames.
What exactly in the action scripting I need to use.
thanks
Jimmynut
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 Scrolling
Can anyone point me in the direction of a good tutorial on how to scroll? I don't mean text box scrolling. For example:
In my scene, I have a movie clip that consist of an up arrow, a down arrow, and a block of pictures and text. I want, when you roll over the up arrow, for that block of picts and text to move up, when I roll out, stop. When I roll over the down arrow, for that block of picts and text to move down, when I roll out, stop. Kind of like Play and Reverse, if that makes sense.
I can do the up arrow fine. Just on rollover, play the movie. On rollout, stop. But in the down arrow, I have it gotoAndStop _currentframe - 1
All that does is go back one frame, and I have to rollover again to get it to move back another frame. Any help will be appreciative.
Reverse Animation?
I'm trying to reverse the animation of my menu on "roll-out" I need to know the ActionScript and where exactly to put it.
Basically... I have a "button" that's actually a MovieClip. On "roll-over" it slides down more "buttons"
I posted on my other thread, but no replies, thought I'd try it here.
Thanks for any help you can offer...
Sadcomedian
How Do You Reverse The Timeline?
I have a series of thumbnails that I want to animate so that each page of thumbnails scrolls into view (approx. 15 per page) on the forward and back button.
ie.. page 1 > <page 2> <page 3
My question is...is there a script for the back button that would reverse the timeline to the previous page ( so that the tween goes backwards to the previous spot ). I 've seen thia type of interface before, I don't know how it is done...Any help is much appreciated!
How Do You Reverse Timeline?
I have a series of thumbnails that I want to animate so that each page of thumbnails scrolls into view (approx. 15 per page) on the forward and back button.
ie.. page 1 > <page 2> <page 3
My question is...is there a script for the back button that would reverse the timeline to the previous page ( so that the tween goes backwards to the previous spot ). I 've seen thia type of interface before, I don't know how it is done...Any help is much appreciated!
Reverse IP Banning
Hey,
I want a Flash button that will allow access to a webstie only if the user is on the LAN - The website is on the internet, but the restricted pages are stored on one of the servers in school. something like an "If IP address = this, get URL (access.html)", else "get URL (noaccess.html)"
Any help would be appreciated
Reverse Onload
Fighting for A few day's allready with the following prob;
I have loaded a movieclip into the stage with the action LoadMovie embeded into a button, so far ok, but in a different button I put the same action for a different MC to end up on the same spot as the previous one. Now my conundrum> how do I get the movieclip that is allready on the main stage to reverse it's animation BEFORE it gets replaced by the movieclip that i load in by the LoadMovie action....So i want the clip to first reverse the animation exactley on the moment that I give the command to replace it for a different one...can somebody please show me how???
|