Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Stop And Play Button For Movie Clip Within Moive Clip



hi i have problems with my buttons. i have got 2 fla files. 1) shell.fla 2) content.fla.

The shell.fla has a movie clip(name:holder) to load the content.swf. And within the content.swf i have got movie clip within movie clip.

Thru a search from the forum i came across this script

first frame:


Quote:




function stopAllClips(clip) {
clip.stop();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
stopAllClips(clip[i]);
}
}
}
};

function startAllClips(clip) {
clip.play();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
startAllClips(clip[i]);
}
}
}
};




for the button:


Quote:




on (release) {
if(!_root.stopped){
_root.stopAllClips(_root.holder_mc);
_root.stopped = true;
} else {
_root.startAllClips(_root.holder_mc);
_root.stopped = false;
}
}




everything works fine except after i pause and play, i doesn't play from where it has stopped. Anyone has got any ideas as to how i can solve this problem. Thanks very much.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 04-18-2006, 10:30 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Problem Adding Stop And Play Funtion For My Music In A Movie Clip Button
ok i made this movie clip button using this tutorial on this website. tutorial website link


The audio button im trying to make is, one that slides in from the side when u move the mouse over it and when u take the mouse away it goes back to hiding. heres a link of the button im talking about link to the button im trying to create

heres my attempt to build the audio button. link to my website im still building. you will see the music note. Just move the mouse over it to see what im talking about. theres no audio in the file cause im not sure which way i need to add the audio in the flash movie, to have it work properly with the buttons.

my test website its still under construction



so basicly i just need help making my button have sound and getting the sound to start and stop when i click the play or stop text thats in the movie clip button. please help me im new to flash and its really hard to me. im more of a photoshop person and im not good at coding at all. but i do what i have to do to get the job done.

I Need A Movie Clip To Play, Stop And Play Again In The Next Frame
I need a movie clip to play, stop and play again in the next frame. So pretty much i have to get the movie clip to play once and stop then when you go to the next frame it should play again once and stop again. What i have is a slide show type thing where you click on the next button to advance to the next frame and in each frame i have all the animations in their own movie clips.

-Thanks

Stop/play Movie Clip
How can I stop/play a movie clip I placed on the stage with createEmptyMovieClip?

I need to be able to stop it when I click a button.

Any ideas? Please?

[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip

lets say that there are 4 buttons are in movieA, and the other clip is called movieB

when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on

so far my code for button1 is:

on (release){
this._parent.movieB.gotoAndStop(5);
}

on (release){
_root.movieB.gotoAndStop(5);
}

button2:

on (release){
this._parent.movieB.gotoAndStop(10);
}

on (release){
_root.movieB.gotoAndStop(10);
}

with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame

can anyone shed some light on this?

Button Inside A Moive Clip
Ok I have an intro scene and first thing that comes up in it a movie clip with a warning and the skip intro button, i just want to know how to make it so when i press the skip button in the moive clip to skip to scene 2 and play frame 1.

Movie Clip To Play While There Is A Stop Action
I am trying to get a movie clip to continue playing the main time line while there is a stop action in the main time line. Is there a continue despite stop action or something? This is pretty urgent so any help would be appreciated.

thanks

Detecting Movie Clip Play Or Stop
Hi,
is there any way to detect if an MC that was loaded into my movie has stopped playing?

Thanks,
LeoBeer.

How Can I Toggle Play/stop On A Movie Clip?
I'm working on a simple play/pause control for a movie clip.

Is there some property on movieclips that I can query to find if the movieclip is currently playing or stopped?

Otherwise, I figure I could add one myself, and alter it every time I play or stop the movie clip, but I don't want to.

Stop And Play:controlling Movie Clip?
Flash Gurus, you are the only ones that can help me with this!

Is there any way I can do these things:

I have a welcome screen where players can choose easy or hard mode. I want each button to load the correct .swf when pressed. How can I do that if I want each .swf to load in a new frame?

Also, if I want to have a Stop and Play button that controls a short animation, what AS do I need for that?

You really will do me a huge favour if you manage to crack these little nuts!


Any ideas?

Stop And Play:controlling Movie Clip?
Flash Gurus, you are the only ones that can help me with this!

Is there any way I can do these things:

I have a welcome screen where players can choose easy or hard mode. I want each button to load the correct .swf when pressed. How can I do that if I want each .swf to load in a new frame?

Also, if I want to have a Stop and Play button that controls a short animation, what AS do I need for that?

You really will do me a huge favour if you manage to crack these little nuts!


Any ideas?

Controlling PLAY/STOP In A Movie Clip Symbol?
From my main timeline, I know how to use actionscript2 to play/stop my movie using buttons, and when I do that, my main timeline stops but my single movie clip symbol keeps chugging right along. Can someone point me in the right direction?

Is there actionscript that will allow me to control the play state of a symbol? For example:

code:
// play button
play_btn.onRelease = function() {
play();
}
// stop button
stop_btn.onRelease = function() {
stop();
}


I have button instances in my main timeline that when pressed, stop and start the playing of the movie. Can I add extra lines to halt or start the playing of a symbol, using those same buttons? I'm sure there is, I'm just too n00b to know.

Thanks gang. This is my first post, and I did try searching to find my answer first, I just didn't find what I was looking for - maybe it is because I don't know what I should be asking!

xY

[MX04] Buttons To Stop & Play A Movie Clip
The stupidest question ever. Can someone please post the code to do this:

When a certain button is pressed I want a movie clip named "equalizer" to stop, and when another button is pressed it has to start again.

What do I write in those two buttons action panel?

Thanks and forgive me if you can.

Tell Movie Clip To Play/stop From Main Timeline?
I have a main timeline that has a movieclip called "Clock". At one point in the main timeline I want the movieclip to play and at another point I want it to stop. I can't get script to control the movieclip.

Any tips?

Thank you so much for your time.

Load Moive(.swf) Into A Dummy Movie Clip
Good day,
I would like to know how to load my movie(.swf) into a dummy movie clip in Flash MX

The motive is to reduce my load time.I understand the theory but don't know how make it work.

The purpose:
I want the .swf files remain in the visitor's browser cache, therefore it will appear instantly when the visitor load it again.

hmmm.... i hope someone will underrstand what i am trying to say...

Make A Button Within A Movie Clip Make The Main Movie Clip Play?
hi, is it possible to make a button within a movie clip make the main movie clip play?

at the moment i have it set to play(); on release put this plays the movie clip rather than the main movie, is there any way to make it play the acutal main movie insteat?

How To Stop Movie Clip From Playing In Button?
Pls refer to the link below:

http://www.tsldesigns.com/test/dynamicbutton.html


Hello, pls help. Just Click Refresh and you will see the Movie Clip animates even without mouse over. How do I stop this?
Where should i put the stop() action? You can email suggestions to sulin@tsldesigns.com Thanks.
Or I can also send you the fla to check. Basically I created 2 Movie Clips in Flash, with opposite animation - Menu In and Out. In the Up Button state, I put Menu In Movie Clip and in the Over Button State, I put Menu Out Movie Clip. I put stop() actions at the last frame of both MCs.
Now, where should I put the stop() action to stop the Menu In MC from playing on loading Flash movie?

Hope to get reply soon. Thank you.

best regards,
Su Lin

Button To Play Movie Clip
I am building a website and I have a movie clip that I have placed on the main timeline. I need the movie clip to play all the way through and then stop at the end, when a button on the main timeline is pushed. I know it is probably really simple but I have looked all over the web and have had no luck getting anything to work. I would appreciate any help

Play Movie Clip On Button Hit
I've been trying to use the search but it doesn't seem to work from me right now!

I'm trying to make a button that has a movie clip in the down state.

I've found out that the button goes back to the over state once the button is pressed so I'll have to make an invisible button over the movie clip and use some actionscript to make the movie clip play when the button is pressed.

Is this correct or am I heading down the wrong path?

My movie clip is called "slider_bottom" and the button is called "bottom_slider", do I have to give the movie clip an instance name?

How do I stop the movie clip from playing until the button has been pressed?

Thanks for your time, I'm sure that this is a simple problem, but I'm a newbie!

S

Button To Play Movie Clip
Hello,

I am hoping someone can help me out I am not knowledgable with flash especially CS3 but that is what I have. My page is a website I have several buttons on my main timeline. I would like it so that when the user clicks on a button it will play a movie clip (from the library). Also can the movie clip be on a particular frame (example frame 30). Does anyone know if this is possible and how to make it work?

Thanks,
Desperate

Play Movie Clip Without A Button.
I had posted this issue in another thread, but i didn't get a solution, then i decided to write another one, and reformulate my question.
If i can, i'll close the old thread. Ok?!

I have a stage with a movieclip. This movieclip has an internal animation.

The presentation is: at the frame 146, the main timeline stops, when i'm able to click on main menu (main menu = movieclip on main timeline), and when i do this, it opens a submenu. This submenu is a child movie clip.

But now my boss told me to change this, he wants that this animation doesn't stop, and opens the submenu whithout clicks.

I don't wanna lose much time reorganize my animation, i need to use AS. Can anyone help me? Thanks in advance =)

Here is the link to the file .fla:

http://www.4shared.com/dir/9953408/7d0d3ee8/Tasker.html

Stop Animated Movie Clip On Button Press
Hi

I have two arrows that control an animated movie clip that has words scrolling vertically. When you click on one arrow it plays the movieclip forward, and when you click on the other arrow it plays the movieclip backward. I want you to have to keep clicking on the forward arrow to have it continue animating through the different words. I've place stop actions at the points I want the movieclip to stop animating but when you click the forward or backword button it never stops and just plays through the whole thing. Here is my FLA: http://digitalarts.bgsu.edu/portfolios/jimmel/help.fla

Thanks!

Stop Animated Movie Clip On Button Press
Hi

I have two arrows that control an animated movie clip that has words scrolling vertically. When you click on one arrow it plays the movieclip forward, and when you click on the other arrow it plays the movieclip backward. I want you to have to keep clicking on the forward arrow to have it continue animating through the different words. I've place stop actions at the points I want the movieclip to stop animating but when you click the forward or backword button it never stops and just plays through the whole thing. Here is my FLA: http://digitalarts.bgsu.edu/portfolios/jimmel/help.fla

Thanks!

Button On Roll Over Should Play A Movie Clip
what i mean to say is that.. i m making a flash site..and the link have a roll over effect. now when a person roll's his mouse over the link ..the link should play a movie clip(object not a swf file)

now what should i give the script for it!!!

On Button Press, Play Movie Clip ?
I have a scene with several buttons, each of which play a different movie clip, but I am having trouble with my action scripting - calling the clip.

I had the action in a frame label, but I want the clip to play without sending it anywhere, just to pop up and play, and go away when it's over...

can someone help me with the actionscript for this...

D..

Play Movie Clip Within Button On Mouseout
Hey, i did a search for this, but couldn't find anything that matches the description.

I have a button, and in the button's 'OVER' keyframe, i have a movie... So the movie plays (basically an object tween) and it gets to a stop frame within the movie. When the user takes the mouse off the button, i want the movie to start playing again, so it finishes it's tween back to normal.

So the user mouses over the button, it fades frame orange to blue, (for example.) Then when they mouseout it fades back to orange again.

Bit complicated, but thanks in advance

Making A Button Play A Movie Clip
How do you make a button go-to-and-play a certain frame on a movie clip on rollover, and rollout?

I need the actionscript.. thanks.

Play And Pause A Movie Clip With Button
Ok, I'm trying out a new navigation, and I need help. I have 5 buttons, and an animated movieclip next to the buttons. When you roll over any of the buttons, I want the movie clip to play. When you roll off, I want it to stop where it is. The buttons will lead to different HTML pages, (or a frameset, if that will make it easier for the header .swf file to keep from reloading--any thoughts on this would be helpful as well.) Seems simple, but I can't seem to find an answer anywhere. Thanks for the help.

How To Play Movie Clip On Release Of A Button?
eh, I thought I knew how to do this...it seems so simple but for some reason my method is not working.

I want to play a simple two frame movie clip(stop action included inside of it, yes, so it doesnt repeat over and over again) on release of a button. so i figure the script should look something like this, where no01 is the instance name of the movie clip and (1) is the first frame of the movie clip.

on (release) {
no01.play(1)
}

that is on release and play(MovieClip) actionscript commands there...but it's not working. i don;t understand why, seems simple enough. so if any one has any ideas and can point me in the right direction, it'd be much appreciated. the sooner the better too. thanks a bunch in advance!!!

Rigging Button To Play Movie Clip
Hi,

I have a grey box w/ text over it(actually its a list of prices) in which I have converted into a Movie Symbol. I have the movie animated to slide IN and OUT of the flash movie. So its two parts labled in and out.And I have a button labeled "prices".

How do I Rig the button up so that onRelease. the prices slide on screen. And then when another button is clicked. It slides off and another box of info slides on?

[F8] How Do I Make A Button Play A Movie Clip?
How do i make a button i made, play a particular movie clip i want it to play and also reveal a set of more buttons. so i have a button that says "Ontario", then when i press it, a picture of the province will fade in(which i already set the fade in through transistion in the movie clip) and then a set of buttons that are major cities llike "Toronto", "Ottawa", "Hamilton", and so on appear as well. and that all happens from clicking the one button "Ontario". is this possible. if so how do i go about doing this?

[F8] How Do I Make A Button Play A Movie Clip?
How do i make a button i made, play a particular movie clip i want it to play and also reveal a set of more buttons. so i have a button that says "Ontario", then when i press it, a picture of the province will fade in(which i already set the fade in through transistion in the movie clip) and then a set of buttons that are major cities llike "Toronto", "Ottawa", "Hamilton", and so on appear as well. and that all happens from clicking the one button "Ontario". is this possible. if so how do i go about doing this?

Help With Button Coding To Play A Movie Clip
I have three buttons (instance names are: redbutton, yellowbutton, and bluebutton) and three basic movie clips (instance names are: redmovieclip, yellowmovieclip, and bluemovieclip).

How do I code the AS3 to get the buttons to play each movie clip for the corresponding color at X:265 and Y:108?

Basically, I want the buttons to play the movie clips (which are just squares) on demand, and then make them disappear and show the next movie clip at the same X and Y positions (X:265 and Y:108) accordingly.

If someone could paste the proper code and help me out, it would greatly appreciated. And, I would be able to get on with the rest of my hard life

Movie Clip To Play After Pressing A Button
a bit basic but im stuck

i have a button that when the mouse is over the button it runs a movie clip,

but i want it to continue to play when the mouse goes off the button

help!

Button With Mouse Over To Play A Movie Clip...
wonder if someone can help me out?

I am trying to create a button that will do the followings:

step 1 - the button can play a short moive clip when it first appears
step 2 - stop and stay as the last frame image
step 3 - when the mouse over, it will play that short movie clip again
step 4 - when it is hit, it will go display a new url on the same window

i have made the movie clip and the button symbol. but when i put them together, it can only do the first 2 steps...

i am putting this button on my main movie as the front page of my website.
would be much appreciated if someone could help.

A Button In One Swf Causing A Movie Clip In Another Swf To Play?
I currently have one swf referenced in another. One the main one I want a button to have a gotoAndPlay action that causes a movie clip in the other SWF to play a different frame. Anyone know how to accomplish this?

How To Play Movie Clip While Dragging Button?
I was wondering what the best way is to play a movie clip while dragging a button inside a separate movie clip.

Example: I'm creating a children's book in Flash form. Some childrens' books have movement using a pull tab on the side of the page. I have created two things for one of these pages:
A) The pull tab movie clip consisting of a button inside of it. Its code is as follows:
on (press) {
startDrag(toggleDrag2,false,596.5,118.0,666.5,118. 0);
}
on (release) {
stopDrag();
}

This way (and it works), the pull tab cannot be dragged along the y axis, and its movement along the x axis is restricted.
B) A movie clip with a symbol in it that has a motion tween, 75 frames, a stop action and key frame on each of the 75 frames.


There is exactly 75 x coordinates the pull tab can be dragged along (its instance name is toggleDrag2 and the movie clip instance name is Flying Violin).

What I'm not sure how to do is make the Flying Violin move with the pull tab. Not literally along the the x-axis, but with each increase in the x axis of the pull tab, I want the FlyingViolin to play one frame, then stop and wait for the x-axis to increase or decrease. If it decreases, the FlyingViolin movieclip moves back a frame and stops.

Here is the code I came up for the FlyingViolin movie clip:

onClipEvent(enterFrame){
var _x1 = _root.toggleDrag2._x;

if(_root.toggleDrag2._x>_x1)
_root.FlyingViolin.play();
if(_root.toggleDrag2._x<_x1)
_root.FlyingViolin.gotoAndPlay(_currentFrame-1);
}

What I wanted to do was assign a new variable the x value of the pull tab (toggleDrag2), allow the x value to increase, and when it increases any amount, the ActionScript checks to see if toggleDrag2's x value is now greater or less than it was before, and if it is, the FlyingViolin movie clip either plays or decreases a frame (_currentFrame-1).

Did I do this right?

-Galen

Getting A Button To Play Part Of A Movie Clip
Hello all,

I would like part of a movie clip to play when a button in the main movie is released. I put a stop action on the first frame of the movie clip and on the frame where I want the movie clip to stop. I have following script on the button -

}
on (release) {tellTarget ("/clip") {
play ();
}
}

This script results in the following error -

Target not found: Target="/clip" Base="_level0"

Can anyone help with what I am missing?

Thanks,
CG

How To Play Movie Clip While Dragging Button?
I was wondering what the best way is to play a movie clip while dragging a button inside a separate movie clip.

Example: I'm creating a children's book in Flash form. Some childrens' books have movement using a pull tab on the side of the page. I have created two things for one of these pages:
A) The pull tab movie clip consisting of a button inside of it. Its code is as follows:
on (press) {
startDrag(toggleDrag2,false,596.5,118.0,666.5,118. 0);
}
on (release) {
stopDrag();
}

This way (and it works), the pull tab cannot be dragged along the y axis, and its movement along the x axis is restricted.
B) A movie clip with a symbol in it that has a motion tween, 75 frames, a stop action and key frame on each of the 75 frames.


There is exactly 75 x coordinates the pull tab can be dragged along (its instance name is toggleDrag2 and the movie clip instance name is Flying Violin).

What I'm not sure how to do is make the Flying Violin move with the pull tab. Not literally along the the x-axis, but with each increase in the x axis of the pull tab, I want the FlyingViolin to play one frame, then stop and wait for the x-axis to increase or decrease. If it decreases, the FlyingViolin movieclip moves back a frame and stops.

Here is the code I came up for the FlyingViolin movie clip:

onClipEvent(enterFrame){
var _x1 = _root.toggleDrag2._x;

if(_root.toggleDrag2._x>_x1)
_root.FlyingViolin.play();
if(_root.toggleDrag2._x<_x1)
_root.FlyingViolin.gotoAndPlay(_currentFrame-1);
}

What I wanted to do was assign a new variable the x value of the pull tab (toggleDrag2), allow the x value to increase, and when it increases any amount, the ActionScript checks to see if toggleDrag2's x value is now greater or less than it was before, and if it is, the FlyingViolin movie clip either plays or decreases a frame (_currentFrame-1).

Did I do this right?

-Galen

Getting A Button To Play Part Of A Movie Clip
Hello all,

I would like part of a movie clip to play when a button in the main movie is released. I put a stop action on the first frame of the movie clip and on the frame where I want the movie clip to stop. I have following script on the button -

}
on (release) {tellTarget ("/clip") {
play ();
}
}

This script results in the following error -

Target not found: Target="/clip" Base="_level0"

Can anyone help with what I am missing?

Thanks,
CG

Play Movie Clip When Button Released
Hi apologies in advance for the really basic question coming up....

I've created a movie clip symbol called MovieOne (I put a lot of thought into the name!) and I want to make an instance of it play when a user clicks a button. I get that I have to use actions to make this happen, but that's about all I get! Do I need to create an instance of MovieOne and insert it into its own layer in the timeline? If so how do I stop it from just playing straight away?

I tried this action for my button (where Mov1 is the instance name of the movie clip)

on (release) {
    gotoAndPlay(Mov1);
}

but I wasn't surprised when that didn't work!

I had a search for a tutorial on this but no luck - could anyone point me in the right direction?

Any help is v much appreciated - really want to work this one out...

Thanks

Make A Button Play A Movie Clip?
I followed the tutorial on how to make an animated button, but it didn't say how you assign the button to do anything. Is it possible to assign a button to start a movie clip on another part of the site? A movie clip that's not embedded in the buttons movie clip?

Movie Clip Button Animations Stop Working With Preloader
I have a flash movie that has a layer with animated movie clip buttons. The buttons are also the buttons I use to call in the external swfs. I went through Lee's tutorial on external swfs, and my actionscript for that is close to his, though I have more buttons. Now when that actionscript is in place the onrollover for the movieclip buttons does not work. If I remove the external swf actionscript the buttons start to work again. Obviously this needs to be set up different. The movieclip buttons have an onrollover attached, and the main scene calls for a onrelease. How does this need to be setup. I tried moving the onrollover to the main scene but that did not seem to work either. Any suggestions and/or explanation why this is doing what it is doing?

Thanks in advance for any help.
LW

New Movie Clip -- Want To Play At Certain Frame Upon Button Release
I have a movie clip that I wish to play (from library) when a button it pressed -- I want it to start at frame 2 -- frame 1 sets the x,y coordinates for the movie clip -- please help

Thx

How In The WORLD Do You Enable A Button To Play A Movie Clip?
it shouldn't be ROCKET SCIENCE, but i can't figure it out, even with the manual from hell!

I just want a user to mouse over a button which plays a small little movie clip. help please!!!!!!!!!!!!!

Position Movie Clip To Play When Pressing A Button
i have a button set to play a movie clip when i click on it.
the movie clip automatically plays in the top left corner of my flash movie (x=0 y=0) i want to position it in a certain spot on my flash movie, is there action script for that?

How Do I Make A Movie Clip Play OnClick Of A Button?
I'm having trouble with getting movie clips to load and play onClick of buttons.

Do I need to use variables?

How Do I Make A Movie Clip Play When A Button Is Pressed?
I have 2 layers that I want to make into a movie clip. One is tweens and the other is a path for the tweens. How do I convert those into a movie clip, and how do I have them play when a button is pressed?

Movie Clip Button: Cannot Play A Frame Label
I am making a simple web site for a friend, and everything is running peachy keen up to now. But this web page is not only something my friend asked me to do, but a learning experiance for myself. My problem is as follows:

The web page I created requires me to use a movie clip as a button, however I am not educated enouph to make the MC button able to play a specific frame label. However the script works when I place it in an ordinary, boring button. Here is the current script that doesn't work, and thank you for your time.

on (release) {
if (Proc = False) {
if (CurrentSection != "Home") {
}
}
gotoAndPlay("Home");
}


Edit: The MC button works when I make it go to an external web page through the gotourl thingy.

I Want A Movie Clip To Play EVERYTIME A Button Is Pressed
In the below script I want textboxmc (which is a movie clip) to restart and play again everytime pellabutton is released.

pellabutton.onRelease = function () {
stop ();
Betaimage._visible = false
Yakuzapic._visible = false
Pornopic._visible = false
textboxmc._visible = false
Betabox._visible = false
Pornobox1._visible = false
Yakuzabox1._visible = false
boxmovie._visible = true
textboxmc._visible = true
Pellaimage._visible = true;
Pellaimage.gotoAndplay(1)}

Please can anyone help?

Thanks in advance

Copyright © 2005-08 www.BigResource.com, All rights reserved