full Pause in Flash
- Started
- Last post
- 12 Responses
- blastofv0
thanks guys – I think this approach would work best from fugged:
"you can use eventlisteners in each movieclip which listen to the click event broadcasted by the pause button then execute their own stop method"
...although I haven't done anything like that before. Is that a pretty straight forward bit of script?
My problem is that i have the main timeline delaying in certain spots, while MCs run on top, and it's basically all over the place as I've tried to work in all of the client's little nits along the way. This is one of those website flyovers with the fake cursor etc, but now that they've realized that their copy is far too long-winded, they want to work in a clean pause option throughout.
Agggh.
- blastofv0
thanks fortified – yeah, I scratched my head for sure, but I also get the basic idea of what's being suggested. That's my problem – I know just enough about how all this works to get myself stuck.
BUT – this is also a client who can afford a few extra bucks for scope-creep, which we're definitely dealing with. Any of you guys want to take a stab at cleaning this up for me?
Shoot me an email, let me know what it'll cost me... or let me know if you want to see the files first. I just need to get it working, and I'm pretty sure I'd spin my wheels if I tried to handle it on my own...
- fortified0
It's super easy, shouldn't take someone who knows what they're doing more than 15 minutes or so. So then, I wouldn't imagine based on what you've described, it should cost more than $50.
I just sent you an email.
- PonyBoy0
woah... some good solutions in this thread! :) All the diff. ways I could think to do it... (event listeners in the mc's... loop through a list of mc's etc)...
... all good ideas!
- blastofv0
thanks fortified – gmail seems to be down right now, but I'll get back to you soon.
- st33d0
no, no,
thankYOU.
- st33d0
This following code will stop all clips on _root. It's simple and doesn't involved complicated actionscript.
http://pastebin.coconut.se/?id=5…
I'll leave it to another NTer to show how to start them all again.
;)
- elee0
create an array of all the movie clips that you have, then loop throuh the array to pause each one...
function pauseAll():Void {
for (var i:Number = 0; i < array.length; i++) {
array[i].pause();
}
}
- monNom0
you could set a global variable something like
pause = false;
then have each MC check that variable onEnterFrame. and if it's true, stop themselves
so your clipEvent would be
onClipEvent(enterFrame)
if(_root.paused) this.stop()
- fugged0
there's a few ways you can do this depending on which version of actionscript and how clean you want your code.
you can use eventlisteners in each movieclip which listen to the click event broadcasted by the pause button then execute their own stop method
you could keep a reference to all movie clips in an array stored on the main timeline and then enumerate and call the stop method.
you could enumerate all of the movie clips that exist in the current timeline (or recurse into nested movieclips as well) and call the stop method.
You could always just wave your hands in the air. Wave 'em like you just don't care.
- fortified0
He says he's not an AS guy, my guess is he is scratching his head at both responses.
Either response would work.
here is some code that might get fucked up when I paste it here. Lemme know, I could email you the .fla too.this.mc_assets = new Object ();
// array of clips to affect
this.mc_assets.mc_names = ["mc1" , "mc2", "mc3", "mc4", "mc5"];
this.mc_assets.xmlFiles = ["RNT18" , "RNT01", "RNT31", "RNT15", "RSA9319"];
for (var i = 0; i
- fortified0
yep got all buggered when I pasted it.