Thanks again Grant...

I like the way this is going, but there is still a problem. In my
Flash movie there are multiple movie clips on the stage at any one
time. Some might be animating, and others might be stopped, awaiting
a trigger to animate.

If I go through all the objects adding them to my array when I stop
them, and then start everything in my array, its going to kick off all
the clips whether they were running at the time or not.

Now your note below saying that its not easy to detect if a movieclip
is currently playing... does this mean I'll need to rethink my whole
movie architecture?

Is there a standard way that people do this sort of thing? I would
have thought its a fairly common requirement, to implement a global
pause button.

bye!

Tuesday, November 9, 2004, 12:12:30 PM, you wrote:

GC> Hi again Ryan,

GC> Rather than trying to detect if a movie is currently playing (don't
GC> believe there is an easy way to do this anyway) I'd build an array in my
GC> first function, then cycle back through and start playing those clips
GC> when removing the pause.

GC> In the first run through:

GC>     mcArr = new Array();
GC>> for(var i in _root) {
GC>>         if(typeof(_root[i]) == "movieclip") {
GC>>                 _root[i].stop();
GC>                           mcArr[mcArr.length] = _root[i];
GC>>         }
GC>> }

GC> Then when you un-pause:

GC> for(var i=0;i<mcArr.length;i++) {
GC>         thisPath = eval(mcArr[i]);
GC>       thisPath.play();
GC> }

GC> Not sure you're going to need the eval off the top of my head, anyway,
GC> hope that helps.

GC> Cheers,
GC> G

GC> -----Original Message-----
GC> From: Ryan Sabir [mailto:[EMAIL PROTECTED] 
GC> Sent: Tuesday, 9 November 2004 12:03 PM
GC> To: Flash Developers List
GC> Subject: [fugli] RE: Pausing a Flash movie


GC> Thanks!

GC> I got it going using a similar method to what you described...

GC> Now the problem is, when I start it again, I need to know what clips
GC> were playing at the time of the pause, so only those ones get restarted.
GC> Is there a way to find out the status of a MovieClip, i.e. whether it is
GC> playing or not?

GC> bye!


GC> Tuesday, November 9, 2004, 11:18:46 AM, you wrote:

GC>> Hey Ryan,

GC>> Maybe you can throw in a for loop to find and stop each clip:

GC>> for(var i in _root) {
GC>>         if(typeof(_root[i]) == "movieclip") {
GC>>                 _root[i].stop();
GC>>         }
GC>> }

GC>> Not a really clean solution 'cos it'll eat processor like crazy if 
GC>> you have a lot of elements in the root, but worth a try.

GC>> Cheers,
GC>> Grant

GC>> -----Original Message-----
GC>> From: Ryan Sabir [mailto:[EMAIL PROTECTED]
GC>> Sent: Tuesday, 9 November 2004 10:38 AM
GC>> To: Flash Developers List
GC>> Subject: [fugli] Pausing a Flash movie



GC>> Hey all,

GC>> I've got a Flash movie with numerous animated movieclips in it. I've
GC>> been asked to add a pause function to it now.

GC>> Am I right in thinking I will need to send a stop() to all the
GC> embedded
GC>> movieclips? Is there a simple way to go through all the clips and
GC> pause
GC>> them, then restart them when the user unpauses?

GC>> At the moment my pause just stops the main timeline, but all the
GC>> embedded clips keep running.

GC>> thanks...

GC>> -----------------------
GC>> Ryan Sabir
GC>> Newgency Pty Ltd
GC>> 2a Broughton St
GC>> Paddington 2021
GC>> Sydney, Australia
GC>> Ph (02) 9331 2133
GC>> Fax (02) 9331 5199
GC>> Mobile: 0411 512 454 http://www.newgency.com/index.cfm?referer=rysig



GC>> ---
GC>> You are currently subscribed to fugli as: [EMAIL PROTECTED]
GC>> To unsubscribe send a blank email to
GC>> [EMAIL PROTECTED]
GC>> Aussie Macromedia Developers: http://lists.daemon.com.au/

GC>> ---
GC>> You are currently subscribed to fugli as: [EMAIL PROTECTED]
GC>> To unsubscribe send a blank email to
GC> [EMAIL PROTECTED]
GC>> Aussie Macromedia Developers: http://lists.daemon.com.au/


GC> -----------------------
GC> Ryan Sabir
GC> Newgency Pty Ltd
GC> 2a Broughton St
GC> Paddington 2021
GC> Sydney, Australia
GC> Ph (02) 9331 2133
GC> Fax (02) 9331 5199
GC> Mobile: 0411 512 454
GC> http://www.newgency.com/index.cfm?referer=rysig 


GC> ---
GC> You are currently subscribed to fugli as: [EMAIL PROTECTED]
GC> To unsubscribe send a blank email to
GC> [EMAIL PROTECTED]
GC> Aussie Macromedia Developers: http://lists.daemon.com.au/

GC> ---
GC> You are currently subscribed to fugli as: [EMAIL PROTECTED]
GC> To unsubscribe send a blank email to [EMAIL PROTECTED]
GC> Aussie Macromedia Developers: http://lists.daemon.com.au/


-----------------------
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig 


---
You are currently subscribed to fugli as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to