Pause Playback for Nested Movie Clips
Anybody know a script solution for how to target pause of a
myriad of different movie clips from a button script on the root
timeline?
I'm using this script which works fine for pausing the root
timeline, but if I've passed off control to a movie clip, you would
have to press this button again to make the movie clip stop.
Here is the button script:
on (release) {
if (global_sound.getVolume() == 100) {
global_sound.setVolume(0);
stop();
Help appreciated. Thanks!
kglad,
I mean I've issued a stop(); in the root timeline and now the
movie clip is going to play until it is done. Once it is finished,
I issue a resume back to the root timeline with a _root statement
and the playback continues in the root timeline. Essentially the
movie clips need to complete their playback and then they can
return back to allowing the root timeline to continue.
Similar Messages
-
hi,
I recently downloaded a flash template that was built on AS2
and have been trying to figure out how it works for a couple of
weeks now (excuse my ignorance when it comes to AS). I have a
question about nested Movie Clips. The way the template is
constructed invovles a massive amount of nested movie clips and a
large number of instances of each movie clip. The way i understand
it is that if an instance of a movie clip is put on the stage and
given an instance name, any modifications to that movie clip should
be unique to that instance. However when i modify the colour of any
of the movie clips i select, it changes the colour of all other
instances.
Am i missing something obvious here??
Thanks in advance for your help
Kind Regards
DamienYea. This particular template i am working with appears to
change and manipulate colours dynamically as you said. Also it
doesn't have all of the content (txt and images) within the actual
flash document. They are all loaded dynamically through a txt
document and external files (jpgs amoungst others) which makes it
alot harder to edit since i dont fully understand the xml format
they have in the txt document. As well as this, the template has
no, and i mean NO documentation what so ever which makes it much
more difficult to work through. But i guess i will keep pluggin
away at it :)
Thanks again for your help Ned
Damien -
Flash Buttons and a nested movie clip
I have made my movie clip and now I want to nest it into a
button. I am not sure what code I need to use for this and how to
nest it. I want, when a person rolls over the button for the movie
clip to run. When they roll off of the button the movie clip stops.
When they click on the button it takes them to a link. If anyone
can please help me with this, I would SO greatly apprecaite it.
Thank You ahead of time.Thank You SOOOO Much for replying to this. I can't tell you
how much I appreciate your help.
I just assumed that was the only way I could do it, (nest
it.) So, my MC is called jiggle.
So everywhere you have the my_mc. Should I replace it with
jiggle.onRollOver etc....?
ALso you say to attach the code to the action layer in the
frame the MC appears, not in the MC itself.
So, in the timeline that I have my MC , I have an actions
layer. Do I not want an actions layer there? Should I just save the
timeline with my MC and then cut and paste it into another timeline
that has the actions layer?
I actually have 5 of these MC.that all need to do the same
thing, they are each for a different button. -
Buttons with nested movies clips...
Hi guys
I'm a flash newb. Have just read some tutorials on creating
flash buttons that contain nested movie clips for the different
states. So I went and made 5 of them for my site, all seems great
the rollover effects are just as planned, and I thought I could add
URL link to them in Dreamweaver but thats not working out. Been
googling my *** off to add URL via actionscript (of which I
understand VERY little) , found some code (add the following to key
frame :on(release) {
getURL('
http://www.generic.com',
'_parent');
Major problem is, when I try to add AS to the frame/button,
I'm getting told I 'current selection cannot have actions applied
to it' If I persist and add the script anyway, funnily enough it
doesn't work.
I did an experimental button, consisting of diff coloured
boxes, and AS will apply to that no problem.
I'm tearing my hair out, as I already posted the flash links
on my site and have had to add a note for visitors to use static
links in the interim.
I would love to post the .fla file but I don't see an option
anywhere here to do so.
If some wise soul can help my dumb *** out of this bind it
would be greatly appreciated.You were using AS2 code, which will not work in AS3. That
particular code is placed on an object, which AS3 does not allow
for, which is why it wouldn't let you... all code in AS3 goes into
timeline frames.
For mouse interctive objects (buttons, movieclips, etc) you
assign event listeners to the object. Let's say your button has an
instance name of "btn", here's a variety of the possible event
listeners avaiable, and I've assigned them to the button....
btn.addEventListener(MouseEvent.CLICK, clickHandler);
btn.addEventListener(MouseEvent.DOUBLE_CLICK,
doubleClickHandler);
btn.addEventListener(MouseEvent.MOUSE_DOWN,
mouseDownHandler);
btn.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
btn.addEventListener(MouseEvent.MOUSE_OVER,
mouseOverHandler);
btn.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
btn.addEventListener(MouseEvent.MOUSE_WHEEL,
mouseWheelHandler);
All of those "...Handler" things at the end are the names of
functions you create to take action when the listener hears
something it's assigned for... you can name them anything you want,
and here's and example of how the function might look for the CLICK
event...
function clickHandler(event:MouseEvent):void {
trace("clickHandler");
Again, you can name the function anything you want, and the
code within the function can be whatever you need done when the
button is clicked... just be sure to include the argument
"event:MouseEvent" because the listeners throws an argument to the
function and the function needs to expect it. The "event" part of
that is a variable name, so you can name it whatever you like, such
as "e", which is commonly done. The MouseEvent defines the class,
and should be exactly what it is.... a MouseEvent, caps and
all. -
Hi All,
First off, I am a noob to Flash and AS3, but have learned a lot over the last few weeks working on this project (http://www.jtapia.com/vcore/vcore_eng_up.html - go to COMPANY INFORMATION > PROCESS SUMMARIES to see the problem).
My problem is I have a nested movie clip that houses a text URL link to a PDF file in another nested MC. The link works fine OUT of the parent clip but does not work when nested inside the clip. The odd thing is, I have almost the SAME exact thing in the navigation and it all works fine (except it isn't a URL link but I do use an event listener to look for MOUSE_OVER, etc).
The only code refrencing the parent clip is:
1) The fluid layout code (a stage event listener)
2) At different stages in the main timeline, I adjust the nested timeline to various points in the nested clip (i.e. - MovieClip(mc_page_text).gotoAndPlay(2); )
Everything works great EXCEPT the URL links. The animations, everthing else works - no errors.
I've been reading and searching for help on this for hours and can't find a solution. Any help is much appreciated!
Thanks!
Jake
PS - if I left out critical info, please let me know and sorry in advanceHi kglad,
There really isn't any code...the parent clip (main timeline) is on a stop(); frame - the link is via the STATIC TEXT properties box under OPTIONS > LINK. I think that is what's so confusing to me. The only other code is this (as I mentioned in the first post):
the fluid layout code:
function resizeListener (e:Event):void { //fluid layout code
// trace("stageWidth: " + stage.stageWidth + " stageHeight: " + stage.stageHeight);
mc_page_text.x = ((stage.stageWidth / 2) - 258);
mc_page_text.y = ((stage.stageHeight / 2) - 161.5);
mc_logo.x = ((stage.stageWidth / 2) - 354.05);
mc_logo.y = ((stage.stageHeight / 2) - 244);
mc_contact.x = ((stage.stageWidth / 2) + 132.95);
mc_contact.y = ((stage.stageHeight / 2) - 239.7);
mc_nav.x = ((stage.stageWidth / 2) - 500);
mc_nav.y = stage.stageHeight - 178;
mc_footer.x = ((stage.stageWidth / 2) - 500);
mc_footer.y = stage.stageHeight - 15.05;
mc_bg.width = stage.stageWidth;
mc_bg.height = stage.stageHeight;
mc_fade_out.width = stage.stageWidth;
mc_fade_out.height = stage.stageHeight;
And these two references to the mc_page_text MC (the parent clip of the actual STATIC TEXT items) from the main timeline:
MovieClip(mc_page_text).gotoAndPlay(2);
MovieClip(mc_page_text).gotoAndPlay("textFADE");
Thanks for the help!
Jake -
HitTest for multiple Movie Clip at the same time
I have a movie it is a triangle.I duplicate it and I want to hitTest on the first triangle movie clip and I added 3 different line movie clips on the 3 side of triangle.I tried to write a code something like that.
if(firstTriangle_mc.hitTestObject(line1_mc,line2_mc,line_3mc){
trace("Ok");
but I've got error.I think it is not allowed hitTestObject for multiple Movie Clips.So is there anyone have an opinion about it?What should I do?Here is another test for multiple movie clips for hitTestPoint but only the first work the others don't
uc_mc.addEventListener(Event.ENTER_FRAME,hitle);
function hitle(e:Event) {
if (uc_mc.hitTestPoint(cub1,cub1Y,true)&&(cub2,cub2Y,true)&&(cub3,cub3Y,true)) {
uc_mc.alpha=0.5;
}else{
uc_mc.alpha=1;
The code above doesn't work.What should I do? -
Dynamic Instance for a MOVIE CLIP
Hi Please help me!!!!!!!!!!
I am creating dynamic Movie Clip using as3, but I don't have
any idea about dynamic Instance name, please give me some idea that
how I can assign Instance name for a movie clip.
I am waiting your reply.
Thanks
Sushil KumarYou can assign a value to the name property of the MovieClip,
but refering to the variable name of your MovieClip instance is
preferable. This code illustrates the difference: -
Can't get nested movie clip to play
Hi everyone,
I have a movieclip on one of the frames on the maintimeline.
Within this movieclip is a nested movieclip which itself is
contained by another clip. The first movie clip plays to a certain
frame where I've got some code telling the nested movie clip to
play at that frame but this nested clip doesn't play. I'm not sure
if I'm targetting the nested clip incorrectly or whether something
else is wrong with the code.
The .fla file can be downloaded at:
http://www.officelinkonline.com.au/Ad/
if someone would take a look. The movie clip in question is
on the layer called text5, and within this mc on frame 15 is the
code I'm trying to use to get the nested movieclip to play at that
point. The code used on that frame is:
this.innerText5_mc.free_mc.play();
stop();
pauseAnim = setInterval (this, "nextFrame", 4000);
I wondered if someone could take a look and see what I might
be doing wrong? Basically the free_mc clip just makes the word
"FREE" scale up.
Would really appreciated any advice.
ThanksThanks again. I'm a bit worried that you weren't able to see
the font that I used. All of the text used in the animations are
static text fields. I don't seem to have the option to embed these
characters since it's static text. It'll only let me embed if the
text fields are dynamic. Does this mean I have to change them all
to dynamic text fields, and if so do I need to embed the font in
every text field in every frame of the animation or can you do this
in one place?
Appreciate your continued help. -
How do i make an image pause in a flash movie clip
Please can someone help me. I am trying to find out how to pause or stop an image in a basic flash movie clip, after it has entered from one side and before it exits the other side.
I have been trying to work it out myself for three days but no joy. I am practicing for a test with a training agency which gave me a disk to use but nowhere in it does it say how this is done. I am also having a lot of difficulty making stop start buttons work with this movie clip. I am using a trial cs5.5 version of Flash which expires in 7 days so i need to know this soon. I am up to speed on most of the features, its just this one thing that has me stumped. A lot of the tutorials or examples i have found on the net are very long winded and hard to follow exactly. Could someone let me know, step by step the sequence i should follow after i have created an object and made it go from one side of the stage to the other.Hi
Thank you for getting back to me. Yes i am using a timeline tween. I have an image on my stage which moves in from one side and out the other side. I am trying to stop or pause the image. The effect i will be asked to reproduce in my exam will be something very much like the banner on the website http://www,iactweb.com. If you go to this website you will see images arrive on the banner and pause before exiting the other side. I am fairly up to speed on all the aspects of getting this effect but i have forgotten what i learned during the course on how stop or pause the images. I am using the trial cs5.5 version of flash . Thanks again for getting back to me. -
How to stop , play nested movie clips....
Hi all,
I'm calling a swf file in a container_mc, which is in
another swf file(Interface), by loadMovie() method. The Major
problem I've stucked with is that in the interface I'm having a
Play/Pause Button, which is not stopping the nested movieclips of
the external swf file which is loaded in the container_mc
movieclip.
The other major issue is that I'm not able to add a
progressbar(sliderbar) which runs according to the animation, to
this interface. Please help ASAPI have a similiar situation however the container_mc has me
puzzled, I'm not sure what that is - perhaps you can answer my
question:
I have a master swf called index.swf. The index.swf has a
main tool bar of buttons which load frames; each frame is named to
coincide with the main bar button (i.e. genInfo, setup,
mainentance, etc). This works perfectly. My problem is with Movie
Clips.
Each frame has a sidebar which loads external swfs (i.e.
genInfo.swf) - each external swf is made up of a series of Movie
Clips which run in succession along the timeline; each Movie Clip
belongs within its own frame (i.e. MCseg1 is in frame seg1; MCseg2
is in frame seg2, etc).
I need to pause and play each individual Movie Clip at will;
I have built two buttons (pauseBtn and playBtn) into a Movie Clip
called MCpausePlay. The first frame of MCpausePlay contains the
pauseBtn; this frame is coded with the global "stop();" In order to
move to frame(2) which contains the playBtn, the pauseBtn is coded
with -
on(release) {
gotoAndPlay(2);
The playBtn is coded:
on(release) {
gotoAndPlay(1);
When clicked, the MCpausePlay moves from pause to play.
That's all I have been able to get this to do.
How do I code MCpausePlay to pause and then play each
individual Movie Clip? (How do I get a Movie Clip to control other
Movie Clips?). Should I code the Movie Clip, the frames within the
Movie Clip, or each individual button within the Movie Clip? And,
does this MCpausePlay belong on the Index.swf file, or should it be
on each external swf? Or perhaps built in to every Movie Clip? I
have tried all and have not had any success. -
I am making a website based in flash actionscript 3.0 i have a button nested in its own movie clip, because I have the button expanding to be able to read it i have figured out the only way to do this is by creating it as a movie clipa nd inside the movie clip creating it as a button
I added an event listener to the blog button by saying,
blog.addEventListener(MouseEvent.ROLL_OVER,gotoblog);
function gotoblog(evtobj:MouseEvent){
gotoAndStop(2)
this part of the code works it goes to the 2nd frame of the timeline it is in and stops wich is a blown up version of the origanal symbol
i added on frame 2 a second command
blog.addEventListener(MouseEvent.CLICK.gotoblogpage);
function gotoblogpage(evtobj:MouseEvent){
gotoAndStop("blogframe")
trace("the blog button was clicked")
i have named the symbol blog and have name the frame of where the blog page is going to be "blogframe" this line of code at the bottom is where i run into trouble the output window in Flash is saying "The blog button was clicked" just like i want it to. no errors are accouring why than is the playhead not going to frame "blogframe"? if the button is working when i click it the code is right i belive the problem here is it does not want the playhead to go to the frame i want it to. So i gues my question is, how can i make a button withing a movie clip interact with the main timeline?I have a similar problem if could please help me i'd really apreciate it!!
So i have a looping animation of some thumbnails, the hierarchy goes like this
Scene1(main timeline) -> imgBar(MC)->imgBarB(MC within the imgBar MC)
My buttons symbols are in the last MC "imgBarB" where i have this code:
ss1.addEventListener(MouseEvent.CLICK, OneButtonClicked);
function OneButtonClicked(event:MouseEvent):void{
MovieClip(root).gotoAndStop("ssbox1");
I want to control the Btns in my "imgBarB" MC to play a labeled frame(named "ssbox1") on another MC on the main timeline,this other MC goes like this:
Scene1(main timeline)->ssbox_mc(MC where my labeled frame is) -
How do I target a nested Movie Clip in an FLV component?
Hello all!
I have a video player that's control bar's x & y are over
the top of the video. It is set to alpha 0, and when the user rolls
over the video the control bar's alpha goes to 1 and becomes
visible. I have a few even listeners and a function that makes this
happen.
My issue is that the buffer handle and the volume handle do
not go to alpha 0, despite the fact that their parents do. The
instance of "volumeHandle" is the child of "volumeSlider".
"volumeSlider" does go to alpha 0, then to alpha 1 on rollover, but
it's child "volumeHandle, is always visible. The same applies to
the respective instances of the buffer bar.
I have tried volumeHandle.volumeSlider.alpha = 0; ,but that
doesn't work.
My guess is that the conflict lies in the linkage of the
controls for the buffer and volume handles.
Any guidance would be greatly appreciated! Thanks in advance.
ShawnAlso, the AS I have for the volume bar movie clip, instance
name "volumeSlider" is:
stop();
this.handleLinkageID = "VolumeBarHandle";
this.handleLeftMargin = 3;
this.handleRightMargin = 3;
this.handleY = 11;
this.fullness_mc.fill_mc.slideReveal = true;
The VolumeBarHandle linkageID applies to the same MC as the
"volumeHandle" instance.
This is one of the two movie clips that will not go to alpha
0.
Thanks again. -
Where is the date for my movie clips?
In the previous version of iMovie when you clicked on a movie clip you could see the date near the preview window. Now in iMovie 6 you have to double click on the clip to get the date info. Anybody else notice this. I thought it was useful to have the date there for putting clips in time order...
Mac OS X (10.3.9)Notice that the displayed time is the value of the very first frame of the underlying media clip. I.e. if you split the clip at the playhead, ALL the splitted clips still point to the same time.
iMovie 2.1.2 did this right by always showing the correct time even with splitted media clips! -
Single droptarget for multiple movie clips
I have a movie clip which i use as a drop target. And I have four additional movie clips which can be dragged and dropped into the droptarget movie clip. But when I place a movie clip into a droptarget and I drop the second one too, the droptarget for the second one becomes the first movie clip but not the actual droptarget movie clip.
Please suggest.Thank you for the reply. Can you give me an idea what the below code does?
mainContainer is a movie clip. mc1, mc2 are three movie clips
mainContainer.addChild( mc1 );
and while dropping mc2
mc2._droptarget - what this will refer to? -
Multiple Preloaders for Multiple Movie Clips
Designed in Flash 8, the site's timeline is all in Scene 1
and is comprised of an introduction, which contains a short video,
and 6 movie clip categories that the user selects to view. Since I
want the intro to play as soon as possible, I'd like to limit the
first preloader to just the video in the intro and not
_root.getBytesTotal. Then, as the viewer watches this short video,
the rest of Scene 1 movie clips will keep on loading. After the
intro, the viewer will choose which of the 6 categories to view.
These categories are identified with buttons which play the
particular movie clip. Since I don't know the order of the
categories they will select, I thought there should be a separate
preloader for each category. Hopefully, after they view a category,
the rest of the categories will have loaded and the loading time
will be nil. The design for the preloader is comprised of a status
bar and a percent loaded. Is there a way to limit the
_root.GetBytesTotal to specific frames? I know I could break these
categories up into separate SWF files but then I loose the
advantage of one loading while another is being viewed.MovieClipLoader is a built in class of functions that will
allows you to easily load Media (swfs/jpgs) from external sources.
This will create a MCL object
var mcl:MovieClipLoader = new MovieClipLoader
We want the MCL object to receive events for any movie that
is loaded into the main timeline
mcl.addListener(this);
Ok. now we have a movie clip loader that is able to recieve
events. Since we want to show the progressive download and want to
do something with that content after it loads, we need to declare
two event handlers onLoadProgress and onLoadInit. onLoadProgress is
pretty straight forward. onLoadInit executes it's action as soon
all of the AS on frame 1 of its time has finished loading. In this
case, we want two different things to happen. 1st, load the first
clip and show it.... 2nd, load all remaining clips into the buffer.
But first, lets declare those next...
function onLoadProgress( target:MovieClip,
bytesLoaded:Number, bytesTotal:Number):Void {
// standard preloader code goes here
function onLoadInit( target:MovieClip ):Void {
// display the clip - this will be as easy as just calling
our loadClip function for the mcl...more on that in a minute
// If you want something special to happen, i.e. movie fades
in or a mask is applied to it, you'd do that here.
Now all we need to do is call the loadClip member function
for the MovieClipLoader. Just replace the two parameters with the
location of the swf and then the name of the instance you want it
to load into
mcl.loadClip( "myswf.swf", targetMovieClip );
The other movie clips are now a breeze as well. For each
button, just add an on(release) or onRelease = function (depending
on your situation) to just call that mcl.loadClip() line from up
above. Just change the movie you want loaded.
Let me know if you need more help...
Maybe you are looking for
-
ORA-1403 encountered when generating server alert SMG-4120
Hi Gurus, Kindly help what's the following error: ORA-1403 encountered when generating server alert SMG-4120 I'm using Oracle Database 10.2.0.1.0 Thanks, BTF Edited by: Benj Flores on Oct 9, 2008 1:50 AM
-
Have a new ipod touch ans can no longer connect to itunes store. Any suggestions?
-
My iphone 5S is stuck on a screen displaying the itunes symbol and a charging cable. I tried connecting it to itunes and updating it to the new software, and backing it up but it keeps saying unknown error 4005, Also when I first tried backing up my
-
How do I get my mail to look like it did in 10.6?
I do not like this. I want my old mail back.
-
Actually two questions since upgrading to version 9 of Firefox: 1) In order to refresh a page (in case that page has updated information) I see no refresh symbol and have to click on the URL window and actually reenter it. Is that the only way? 2) Wh