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




Pausing Between Tweens



I hope the following will become understandable..

I have 6 menu items that I want to tween in, but not all at once but slowly after each other.

This is one of my probs that I would like to know...

I have a tween class as below and rather than repeat the same tween class for several itmes i have I would like to pass the name of the mc to a tween function but not having much success:
heres what I would ideally want:

so I have this one ...

var newYPos:Tween = new Tween(theMcID.menuOne, "_x", Regular.easeOut, 0, 100, 3, true)

then just after this one has fired I would like to start the next one

EG

var newYPosA:Tween = new Tween(theMcID.menuOne, "_x", Regular.easeOut, 0, 100, 3, true)
then
var newYPosB:Tween = new Tween(theMcID.menuTwo, "_x", Regular.easeOut, 0, 100, 3, true)

but this does both at same time.

now I have put/used the:
newYPoAs.onMotionFinished = function....
to start the next , but it has to wait for the tween before to complete whcih is not what I am after I would like it to flow in 1,2,3,4,5,6 etc.

also to do this for all six I think is a bit clumpy probably a much better way to do this:


Code:
var newYPosA:Tween = new Tween(theMcID.menuOne, "_x", Regular.easeOut, 0, 100, 3, true);
newYPosA.onMotionFinished = function(){
var newYPosB:Tween = new Tween(theMcID.menuTwo, "_x", Regular.easeOut, 0, 100, 3, true);
newYPosB.onMotionFinished = function(){
var newYPosC:Tween = new Tween(theMcID.menuThree, "_x", Regular.easeOut, 0, 100, 3, true);
newYPosC.onMotionFinished = function(){
var newYPosD:Tween = new Tween(theMcID.menuFour, "_x", Regular.easeOut, 0, 100, 3, true);
newYPosD.onMotionFinished = function(){
var newYPosE:Tween = new Tween(theMcID.menuFive, "_x", Regular.easeOut, 0, 100, 3, true);
newYPosE.onMotionFinished = function(){
var newYPosE:Tween = new Tween(theMcID.menuSix, "_x", Regular.easeOut, 0, 100, 3, true);
}
}
}
}
}
Ideally I am after the following:

var newYPosE:Tween = new Tween(theMcID.menuSix, "_x", Regular.easeOut, 0, 100, 3, true);
wait a second, then fire the next , then the next then the next.

Well if any one has any ideas it will be appreciated

me



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-06-2008, 05:43 PM


View Complete Forum Thread with Replies

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

Help W/ Fuse Kit- Pausing Tweens?
I've got a project that I'm working on with several tweens that are called using the fuse kit. I'm really new to this and am trying to figure a few things out with it.

Can anyone direct me as to how I might pause the tweens and play them in sequence. As I have it set now, they all play at launch. I'd like them to play in order as the previous one ends.

Should I set up a listener? or how would I go about accomplishing this?

Thanks for your time. Here is the as I have thus far...

-Matt


Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup( Shortcuts , CustomEasing, PennerEasing );

cover_mc._scale = 100;
cover_mc.rotateTo(0, 50, "easeInBounce");

cover_mc.scaleTo(0, 3, "easeInOutElastic");
cover_mc.colorResetTo(100, 3);
cover_mc.bezierTo(100, 100, 10, 15, 5, "easeOutElastic");
cover_mc.rotateTo(20, 10, "easeOutElastic");


prop_mc._scale = 20;
prop_mc._brightOffset = 100;
prop_mc._rotation = -50;

prop_mc.scaleTo(100, 3, "easeInOutElastic");
prop_mc.colorResetTo(100, 3);
prop_mc.rotateTo(0, 2, "easeOutElastic");

firm_mc._scale = 10;
firm_mc.scaleTo(100, 3, "easeOutInCubic");
firm_mc.slideTo(476, 10, 2, "easeInBounce");

news_mc._scale = 20;

news_mc.scaleTo(100, 3, "easeInOutElastic");
news_mc.bezierTo(100, 100, 10, 15, 5, "easeOutElastic");
news_mc.slideTo(476, 225, 2, "easeInBounce");

Pausing ALL Tweens, Sounds, And Functions In A Movie
Hey,

I have a flash demo that I created which is full of tween events and audio. It also has a wait() function that I use a lot - it takes one variable, the number of seconds to wait until proceeding to the next frame in the timeline... Now I've been given the task of adding a global pause and play to the entire thing. Is there a way to code a global function that will pause everything on the screen, including all timelines, all tween's, all audio, and the wait function until the play button is pressed? I've scoured the boards and google and I can't come up with anything. Any help would be greatly appreciated.

The movie has about 4 movie clip symbols on the stage, and each one contains multiple child movie clips with tons of tween events and audio.

Here's the wait function (hopefull it helps to see it):

ActionScript Code:
function wait(secs:int):void {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, secs*1000); // stop for 2 seconds
}

Tweener.pauseTweens(this) Not Pausing Tweens On Object
Howdy Folks,

Happy New Year!

I am playing around with the Tweener class and its really fantastict.

One issue I am running into is calling the Tweener.pauseTweens() method.

When I use:


ActionScript Code:
Tweener.pauseTweens(this);

The tweens that are occuring on the object I am trying to pause still continue.

When I do this:


ActionScript Code:
Tweener.pauseAllTweens();

The tweens pause properly.

When I trace out this before calling Tweener.pauseTweens(this) I get:
Calling pauseRotation: this = [object HourGlass]

So I assume that the tweens should be paused because this is referencing the correct object where the tweens are occuring but for the life of me I cannot figure out why its not pausing.

Using Tweener.pauseAllTweens(); really isn't an option because it would affect other tweens that are occuring on other object I don't want paused.

Any suggestions would be greatly appreciated.

cheers,

frank grimes

Pausing ALL Tweens, Sounds, And Functions In A Movie
Hey,

I have a flash demo that I created which is full of tween events and audio. It also has a wait() function that I use a lot - it takes one variable, the number of seconds to wait until proceeding to the next frame in the timeline... I copied it from either this site or another one, I'm not sure. Now I've been given the task of adding a global pause and play to the entire thing. Is there a way to code a global function that will pause everything on the screen, including all timelines, all tween's, all audio, and the wait function until the play button is pressed? I've scoured the boards and google and I can't come up with anything. Any help would be greatly appreciated.

The movie has about 4 movie clip symbols on the stage, and each one contains multiple child movie clips with tons of tween events and audio.

Here's the wait function (hopefull it helps to see it):
function wait(secs:int):void {
stop();
var myInterval = setInterval(function () {
play();
clearInterval(myInterval);
}, secs*1000); // stop for 2 seconds
}

Shape Tweens, Graphic Symbols, Motion Tweens
I am working on learning assignment for school and i want to make sure i did this right. i do not have a manual to look this up.
i am supposed to use shape tweens, Could someone tell me a definition and how to create them.
I also need a definition between a graphic and raw artwork?

i am making a small animation and I need to use shape tweens using raw artwork? i used the rectangle tool and the brush tool and made a scene on its own layer. i did not convert it to a graohic symbol. is that an example of a shape tween or am i totally off? and it plays behind the motion tween animation i created on various other layers.

anyone?

Pausing Everything?
I have some movies on main time line comming one by one and the main timeline is also running.I want to put a pause and a Play button on the main timeline which should pause the main movie.If i put simple play() command it only stops the main time line and if their is any MC, MC keeps running.How can i pause everything on the stage.Any easier ways???

Pausing MC's
I have an if statement that evaluates a variable and performs an action until the variable reaches 10. The only problem is, 10 cycles through happens very quickly, and I need the process to slow down. Is there a way to insert a pause within the if statement telling the computer to wait for a few seconds before proceeding to the next pass?

Pausing?
is there some way to pause? i dont mean in a movie, but in actionscript. is there a way?

Please Help - Pausing
i have a problem

loadVariablesNum ("data.txt", 0)

loadMovieNum (songpath, 1);

songpath is a variable in data.txt that has the song file, for some reason it wont play, but if i put the loadmove before the loadvariables and put the actual filename there, it works, so i thought it might be that its trying to use the variable before loadvariable has loaded them?

so is there any way to create a delay between the loadvariable and loadmovie

btw, im wanting the movie to play as soon as it loads

please help

Pausing A Swf Within A Swf
I have a video clip (.swf) running inside (with loadMovie command) of a movie (which will ulitimately be exported as .exe or .swf). I need to be able to stop and start the movie so that viewers can refer to information before continuing on.
I can stop the flash movie, but not the video clip. How can I "pause" the entire movie, video clip and all?

Pausing
Does anyone know how you get your movie and music to pause at the same time???

Pausing
is there any easy way to have a movie pause for about 15 seconds on a frame, and then continue to play again
thanks
DiGiT

Pausing?
I'm trying to pause a movie clip so it loops back to the beginning every 5 seconds or so... Can somebody pllleeeasee help me.
Thanks.

Pausing
I'm creating a simple game and after my title screen I have 2 buttons, play and instructions. How do I pause the movie here so that it doesn't just jump to the next scene?

Pausing?
Okay.. I'm horrible at working with flash and trying to explain what it is I'm trying to do, so bare with me.

I'm making a horse race viewer for my website. I send data to the movie (ie. horse names and stats and stuff like that). That all works fine. Here's the layout of my scenes and such:

Scene 1: Preloader
Scene 2: Horse Introductions
Scene 3: Race Information
Scene 4: The Actual Race
Scene 5: The Results

I've found that the stop() function seems to 'erase' my variables and their data.. so I'm trying to do something without using the stop function in my movie. But... I want users to be able to view the horse introductions and such for as long as they want to and click a button when they're finished reading to move on to the next part of the movie. I've tried doing the following:

frame 21 has nothing in it
frame 22 gotoandplay(21)
frame 23 has nothing in it

and when the button is pressed, it will go to frame 23 and continue to play the movie. but.. it won't. it just sits there. any help would be greatly appreciated as I can't think of anything else to do and being unable to use the stop function is really mucking things up a bit.

thanks in advance

Pausing
Is there any way to make a flash movie pause on a certain frame for a specified amount of time?
thanks in advance!

Pausing
How can i pause the motion inside the movie for few seconds and then to continue it ( as in to freeze the move on a certain keyframe without adding or spreading it over the timeframe) and i dont mean using the "Ease in and out"
example: on the banner the object reaches some stage in the morphing stops for 2-3 seconds and continues the morph.
thanks in advance for any help guys.

Pausing
I have created a pause feature in my game that uses a recursive function to pause a movieclip and all it's nested movie clips so that all the animations stop. It uses the movieclip.stop() function. That works fine, but when I do the same thing to try to resume using a movieclip.play(), things go haywire. It seems to resume from where it was in my movieclips, but it keeps going through their timelines even if it was supposed to be stopped on a certain frame. Anyone have any ideas (I'll put the code below).


Code:
MovieClip.prototype.pauseAll = function() {
for (name in this) {
if (typeof (this[name]) == "movieclip") {
this[name].pauseAll();
}
this.stop();
}
};

MovieClip.prototype.playAll = function() {
for (name in this) {
if (typeof (this[name]) == "movieclip") {
this[name].playAll();
}
this.play();
}
};
_root.pauseAll(); // this works fine to pause

_root.playAll(); // resumes, but keeps going through the timelines

[F8] Pausing
Hi

I am using Flash8 and AS2 and I want to put in a pause between two functions. This will then give the effect of some text sitting on the stage and doing nothing between times of activity.

What's the easiest way of achieinvg a "Break in the action"? I could do it using setInterval but that does seem like a rather complex way since I will then have to write another function (which I guess will be called twice - first at time 0 and then say 1 second later).

Thanks in advance

Edward

Pausing An Mc
I have a series of images that fade in and out. When an image is fully faded in I need the mc to pause and stay paused for a set amount of time and then resume. How can I pause the MC and then have it play? thanks

As1 To As 2 Pausing
Hi i´ve this code that works on as1 and i need to put it to work on as2.
It´s a code to pause an animation on the main scene of _level2, and all the mcs and submcs on it.

// on click of a button

for (i=1; i<=4; i++)
{
var myClip = _level2 ["mc" add i];
var mySubClip = _level2 ["mc" add i add "." add "mc" add i add "a"]
myClip.stop ();
mySubClip.stop ();
}

Thx

Pausing
I've a got a game, want it so that when a player press's P, the game pauses and then when its pressed again it plays again is there any simple way to do this?

Help With Pausing Mc For 10s
I have a scene where a post-it note flies in from offscreen. Once it settles at it's destination, a close button appears.
If the close button is clicked, the note disappears (gotoAndPlay(76)).

Here's the tricky part: If the button doesn't get clicked, the post-it note needs to stay there for 10 seconds then goto frame 76 (where it disappears). What code would I use?

If you can help, I'd really appreciate it!!!

Pausing An Outside SWF
Does anyone know how to do this? I have Pause/Play controls on my main timeline that need to control outside timelines.

I generally used "previous frame", but thta can't work with this, otherwise it'll leave the fram that the MC is on.

I'm probably overlooking something simple, but any ideas?

FLV Pausing
Hello all,

I'm trying to make a flash swf with two frames. On the first frame is an flv with buttons such as play and a seek bar. On the second frame there is no video and just some other information. I am trying to make it so when you press a button on the first frame the video is paused and you get taken to the second frame, then if you click a button on the second frame you can go back to the first frame and continue the video from where it was paused.

Unfortunately I can't seem to do this, the video seems to pause ok, but it plays from 0 again after you click back from the second frame. I can't get it to stay paused when navigating to a different frame.
The only way I could get it to pause was by having the layer with the video on extending along to the second frame(without making it into a new keyframe, so it's one long keyframe lasting 2 frames) but the problem with that is the triangle on the seekbar is still visible on the second page, even though the second page's background is above the seekbar's layer and everything else from the first page is hidden.

If anyone has any ideas about what to do it would be much appreciated.
Thanks.































Edited: 10/11/2008 at 02:38:21 PM by pinefresh

Pausing
Is there any way to create pausing functions, so that, code is only executed in steps for user interraction.
For example:- The ability to run a search algorithm where there is a pause of one second between each displayed comparison of a letter, or everytime the user clicka abutton, one line of code is run.

Pausing
sorry if this a noob question but i'm just starting with action script in flash...
can someone tell me how to pause the movie at the end i.e. make it not loop anymore?

and im using MX 2004 actionscript...

Pausing
Does anyone know a simple piece of code that i can use that will pause the execution of my code for a set amount of time before resuming?

Pausing
sorry if this a noob question but i'm just starting with action script in flash...
can someone tell me how to pause the movie at the end i.e. make it not loop anymore?

and im using MX 2004 actionscript...

Pausing An SWF In A MC
Kind folks,

I have a pause/play button that I would like to use to pause an external swf that plays in a movie clip. The movie clip has an instance name of "window". Different swfs play in it from time to time.

Is it possible to write a script that will reference the instance name "window" and it will pause whatever swf is playing in there at the time?

And how would I write the code? I've tried a couple ways and it didn't work.

Tweens, Tweens And Tweens
This is not a question of 'how-to' tween but
the problem that i've run into is in flash 5 created a video, all done and said, went back to up date in MX and looked in the Library and there were duplicates of tweens, tweens that I had done in the inital stages of the project, you name it was there...

I didn't import a library from another project, so, question, why do i still have the tweens for things that had been deleted or changed? I'm not aware of a tween memory.

It's probably fixable by the click of a button, but it's a waste of file size, so any help would be appreciated.

thanks in advance
kirsten

I Need A Lil' Help With My Tweens Please
could one of you flash mx'ers take a look at my file and tell me why the characters in my movie clip (contact_mc) are tweening funny, even though they seemingly look okay on the frames. also, is there an easier way (actionscript, perhaps?) to get actual typed-in text to fade in and out on RollOver and RollOut, respectively?

thanks

cook

Tweens
Hello all. I am working on an animation in MX in which I have created an old cardiac monitor that use to use needles to display the patients rythym on the paper. Anyhow, I have the needles on the stage and they will move in different way due to different lead on the monitor. The problem that I am having is when I change the tween of one needle movie clip it influences the others. I have tried placing them in diffent folder and even renaming them to corespond to the individual needles but it dosen't work. I need to know how to tween simular movie clips with out influencing the other tweens. Any ideas?

Thanks in advance.

Task

Tweens ?
hi

i sometimes get files in the library called tween ... what are they ?

Mx.tweens
well im doing my site in mx.tweens...

btw new to the forums :P

but w/e.. anyways i wanted to do something like...
http://www.eggrollindustries.com/hoo.swf

and this is what i got so far...
http://www.eggrollindustries.com/mxtween.swf

at first i thought i could use some kind of if statement with a recycling preloader.. when you clicked a button it would unload the current external .swf then the nav box would move to the center and you would would preloader the next external swf.. then move back up and load it....

heres a code sniplet:
nav_mc.myButton5.btn5.onRelease = function() {
_root.current.enabled = true;
this.enabled = false;
_root.current = this;
moveIt(400, 100, 0, 0);
};

so my question would be... once you click a button... in that function how would you tell it to move to a specific x and y and preload... maybe something like this?
total = Math.round(_root.getBytesTotal());
loaded = Math.round(_root.getBytesLoaded());
per = loaded/total*100;
_height = per;
if (loaded == total) {
moveIt(200, 100, 0, 0);
_root.currMovie = "anexternalmovie";
container.loadMovie(_root.currMovie+".swf");
}
}

and then the "externalmovie" would be the other box that would popup...
(im trying to make it move to the center... load.. then move to another location after loading. heh its kinda hard to explain but yea.

how would i do something like the hoo.swf? would i use a recycling preloader and ex. swfs? and how would i tie it together lol? big post for my first but ive been asking other places but they dont really help...

Too Many Tweens
Hey, just a quick question for anyone who can help. Basically i do a lot of my animation in Flash using motion tweening and I find a huge problem wit the amount of tweens I end up having in my library. I thought that if i did them as mc's this would help. Is there anyway of not having them show in the library or an easier way (apart from actionscripting instead of tweening). Many thanks in advance.

Help With Tweens
when i make things move in flash using motion tweens and such effects it seems to work fine when i play it through the timeline
but when i hit ctrl + enter (test movie) i cant see the tweens happening...

any suggestions as to what it is im doing wrong?

Tweens In AS?
hey, is is there any sort of code to get a color or shape tween?

[CS3] Help With Tweens
(Actionscript 3.0) hey. I'm working on a project where i'm trying to get letters to fade from alpha - 0 to 100. IT AINT WORKING! anyways, what it does, is when i try to preview it, it shows the letter automatically, and - Get this - it is in a completely different font!!! If anyone knows the source of this problem, or can tell me how to fix it, it would be appreciated. thanks a bunch.

AS Tweens
so ive looked at the tutorial on this site, and its fine and all but im trying to apply it to a site im creating. All i really need is a specified Mc to easeIn or out depending on what button is pressed.

ive included my fla, any help would be appreciated

Tweens
hi there!

to make tweens by code, we have 2 options:
mx transitions [ex. new Tween(ball_mc, "_alpha", Strong.easeIn, 100, 0, 3, true);]
or laco tween classes [ex. my_mc.tween("_x",300,3,"easeOutElastic",1);]

as we know, using second option (laco tweens) we can delay a tween, by puting a number in seconds at last (see my example).

my first question is:
is there an option to delay a tween , made with mx.transitions?

my second question is:
considering that we cand use 2 values at the same time with laco tweens [ex. my_mc.tween(["_x","_alpha"],[200,5],10); ]
do we have the same option using mx.transition classes?
i already tried but it seems not to work....maybe i miss something here...

Tweens?
if i want to make a little clip of characters singing along with a song, would several tweens be the most appropriate way to do it?

Tweens
While working on a lil project (a signature file actually) ive noticed my library has been filling up with Tween## graphic symbols.

Im guessing it is doing this because I add a motion tween on a vector graphic instead of converting it to a symbol and then tweening it but I am not sure, if someone could clear this up for me mebbe I could keep my library's size down

Thanks

For Those Asking About Tweens
I highly recomend Lee's new tutorial on http://www.gotoandlearn.com about animating with fuse kit. It will save you a lot of headache and trouble. Fuse kit is quite impressive as an external tweening class.

Tweens?
if i want to make a little clip of characters singing along with a song, would several tweens be the most appropriate way to do it?

Tweens
I'm trying to make a simple animated logo for my band's website, and for some annoying reason, when I use tweens to make the initials IHB (the band's called In-House Band) move to the centre of the screen, they dissapear. This is only during the movement itself, and it actually reappears when the final keyframe is reached. Why doesn't it work?

As V. Tweens
I know tweens vey well, but i dont know how to use AS to move stuff. is it better to use AS versus tweens? please look at my current project here

Would it be practical to use as on all that?
Because i know it was easy to do with tweens + layers
If you think i should use as for this please let me know
Any tutorial links would be neat too.
thanks alot

Pausing An Animation
Hi,

I want to pause an animation for a few seconds.
I dont want to increase the frames to make the animation to pause.
can any body tell me how i can do it using actionscript.

thanks
GugZ
India

Pausing The Timeline - Why Am I So SAD
It's got to be easy, but I just can't find a way of setting up an actionscript to pause the timeline for say 10 secs or until the user clicks the screen.

I know that I can just insert extra frames to make up an extra few seconds, but there must be a way to do it with actionscript.

Sorry if this has been posted/answered before. I did trawl for ages trying to find the answer....

Cheers.

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