Ryan Potter wrote:
Here is another way that might help. You can use Fuse to sequence and wait.
Code Post:
http://thoughtwillrise.com/
Fuse:
http://mosessupposes.com/Fuse/index.html
Very cool! :-)
But, if I put same code after line 15 in exemple below??? :-(
Rodrigo Schramm
Actionscript:
1.
function drawLoadManager(){
2.
trace("Draw Load Manager Called");
3.
var lm = this.loadManager = new Fuse();
4.
lm.push({ func:"myMethodOne", scope:this, command:"pause"});
5.
lm.push({ func:"loadData", scope:this, command:"pause"});
6.
lm.push({ func:"loadMyClip", scope:this, command:"pause"});
7.
lm.start();
8.
}
9.
10.
function myMethodOne(){
11.
12.
do some code.......
13.
14.
// resume the load manager to load the next item
15.
this.loadManager.resume();
16.
}
17.
function loadData(){
18.
this.xml = new XML();
19.
this.xml.ignoreWhite = true;
20.
// CREATE A REFERENCE TO THE CURRENT TIMELINE
21.
this.xml._parent = this;
22.
this.xml.onLoad = function () {
23.
// resume the load manager to load the next item
24.
this._parent.loadManager.resume();
25.
}
26.
this.xml.load(this.datafile);
27.
}
28.
function loadMyClip(){
29.
this.myClip.loadMovie(load something);
30.
// create some sort of load handler
31.
this.myClip.onLoad(){
32.
// resume the load manager to load the next item
33.
this._parent.loadManager.resume();
34.
}
35.
}
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of iashido
Sent: Tue 3/21/2006 7:16 AM
To: Flashcoders mailing list
Cc:
Subject: Re: [Flashcoders] wait or sleep
http://proto.layer51.com/d.aspx?f=454
On Mar 21, 2006, at 4:13 PM, Danny Kodicek wrote:
>
>> Using setInterval, I can only call a method (or funciton) same time
>> later. I can't continue to run from the same point, at same function.
>> Exist another solution for this?
>
> Yes, put your remaining code into a separate function:
>
> id=setInterval(function(){myRemainingCode},2000)
>
> You can comfortably (well, messily) create a whole set of commands
> that run at intervals. The only problem is that you might want to
> avoid any other functions running in the intervening time.
>
> Danny
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
www.itseveryday.ro
www.iashido.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
------------------------------------------------------------------------
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com