Fuse, the animation engine from mosessupposes.com has a build-in
Sequence class. I't easy to add commands to this sequence like method
calls. You might want to look into it.
Bart
2006/1/30, Kevin Cannon [EMAIL PROTECTED]:
On Sun, Jan 29, 2006 at 10:04:22AM +0100, Sander wrote:
If your
On Sun, Jan 29, 2006 at 10:04:22AM +0100, Sander wrote:
If your functions are motion-based, have a look at Fuse. It's a set
of Tween classes that lets you execute a lot of tweens in sequence. 2
can fire off when 1 finished if you want. You can tween position,
alpha, rotation and many
If your functions are motion-based, have a look at Fuse. It's a set
of Tween classes that lets you execute a lot of tweens in sequence. 2
can fire off when 1 finished if you want. You can tween position,
alpha, rotation and many more.
http://www.mosessupposes.com/fuse/
Sample code from
Trying to cut down on hundreds of lines of repeated code with
functions, but I have a real newbie question:
What is the best way to get functions to fire in sequence.
(have function 1 wait until function 2 is finished etc.)
Right now the functions below all fire at the same time.
function1 ()
function1() {
function2();
}
function2() {
function3();
}
You could also use onEnterFrame to conditionally check for flags
indicating the progress of execution:
var f1Fired = false;
var f2Fired = false;
var f3Fired = false;
this.onEnterFrame = function() {
if (f1Fired) {
Thanks! I can tell right away that functions are going to save me a ton
of troubleshooting!
Do you know if they speed up player performance as well?
--dan
function1() {
function2();
}
function2() {
function3();
}
You could also use onEnterFrame to conditionally check for flags
The more of them you use, the slower the performance.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
That's a drag!
Well, I'll use them sparingly -- they helped alot in this project.
Thanks Again!
--dan
The more of them you use, the slower the performance.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How to call functions in sequence
That's a drag!
Well, I'll use them sparingly -- they helped alot in this project.
Thanks Again!
--dan
The more of them you use, the slower the performance
Yes, don't think in terms of avoiding functions. If something needs
to be repeated, it's a candidate for a function. Performance is
important for a game, but if an app's object-orientated design makes
it a millisecond slower than procedural (inline) code, that's
acceptable if you get the
10 matches
Mail list logo