Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-11-2009, 04:00 PM   #1
jithu2000
Registered User
 
Join Date: Aug 2009
Posts: 4
Default Pausing the action script motions and child movies

I am doing a presentation demonstrating hardware components. For that I have used frame by frame animation for showing components. The explanation for these components are done as subtitle scrolling. It is created using actionscript 3 motion. The particular subtitle text will be generated according to the currentFrame. When I pause the entire movie i need to pause the scrolling text that i created using action script. I was searching for a week , how to do this. Is there event to identify whether main movie is stopped or paused. Or any other way to do this. Please help to do this.


The child movies and sound i added in time line should be paused while pausing the movie ....

Please Help me ...Thanks in advance
jithu2000 is offline   Reply With Quote
Old 08-11-2009, 04:19 PM   #2
sk_86
Registered User
 
Join Date: Feb 2009
Posts: 11
Default

you have to reference the child movieClip. lets say you are on the main timeline and this is where your demonstration is at. inside this we have a movieclip called buttons_mc and inside that we have another movieClip called someClip_mc from the main timeline you would write:

buttons_mc.someClip_mc.stop();

stop can be replaced with whatever you like.
hope i answered your ?
gluck
sk_86 is offline   Reply With Quote
Old 08-12-2009, 02:38 PM   #3
jithu2000
Registered User
 
Join Date: Aug 2009
Posts: 4
Default

Thanks for your help....

But I need to know the event for knowing whether main movie is stopped ???

The function to stop the sub movie should be invoked when the main movie (ie SWF file) playing is topped...

How can i do this...Plz reply...
jithu2000 is offline   Reply With Quote
Old 08-12-2009, 02:47 PM   #4
kingundkong
kingundkong
 
kingundkong's Avatar
 
Join Date: Jul 2009
Posts: 320
Default

just put it in a boolean variable:
var isRunning:Boolean=false;
and when the movie starts playing you set it to true and when it reaches the end of all your frames your dispatch an event changing isRunning to false again.
I hope this helps!
__________________
kingundkong is offline   Reply With Quote
Old 08-12-2009, 02:55 PM   #5
jithu2000
Registered User
 
Join Date: Aug 2009
Posts: 4
Default

I want to stop the submovies , when the main movie is stopped in between playing. ie not at the end of frames.. Whenever the user purposefully stops or pause the main movie, submovie and scrolling should stop...
jithu2000 is offline   Reply With Quote
Old 08-12-2009, 03:07 PM   #6
abeall
Senior Member
 
Join Date: Feb 2006
Location: Washington, DC
Posts: 2,812
Send a message via AIM to abeall
Default

AFAIK, there's no built in event to tell when a movie is playing or stopped, surprisingly. However, you are in control of when the main movie is stopped, so you could use a recursive function stop all children and sub children:
ActionScript Code:
function stopAllChildren(container:DisplayObjectContainer){     var i:int = container.numChildren, child:DisplayObject, mc:MovieClip;     while(i--){         child = container.getChildAt(i);         if(child is MovieClip){             mc = child as MovieClip;             mc.stop();             if(mc.numChildren)                 stopAllChildren(mc);         }     } }
__________________
Aaron Beall | Flash portfolio | Fireworks extensions | Twitter

Last edited by abeall; 08-12-2009 at 03:09 PM.
abeall is offline   Reply With Quote
Old 08-12-2009, 03:23 PM   #7
jithu2000
Registered User
 
Join Date: Aug 2009
Posts: 4
Default

Thanks....Let me see whether it works.
jithu2000 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:46 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.