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
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-16-2004, 11:25 AM
View Complete Forum Thread with Replies
Sponsored Links:
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?
View Replies !
View Related
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?
View Replies !
View Related
Play/Stop Integrated Button For Controlling Movie...
Hi there,
I have a movie that I wish to control with a single button. Initially the button graphic is a "play triangle" (like on a stereo), which sits in the corner happily as the movie plays.
What I want it to do is when the user clicks on the button, the movie stops, and the button changes to a "pause button". Then when the user clicks on that button, the movie starts up again, and the button changes back to the "play triangle".
I am still new to Flash, so please be gentle.
Thanks,
Tatlar
View Replies !
View Related
Start And Stop Main Timeline From Movie Clip Symbol
Hi All,
I have a main movie where I have 4 different movie symbols in 4 differnet frames.
I want to stop the main timeline > play the first symbol movie > at the end of the first clip, start the main timeline again and play the next movie clip.
I tried putting "root.play();" at the end of the symbol movie clips, but it does not seem to affect the main timeline.
View Replies !
View Related
Movie Clip Symbol Won't Play On Main Timeline
Hi everyone,
I've created a movie clip symbol with it's own animation on its timeline. I've placed this symbol onto the first frame of the main timeline but when I test it, it doesn't play. There's no stop actions or anything on either timelines so I'm not sure why this is happening. I thought that the animation in a movie clip symbol will automatically play (i.e. if you test in a browser) once it's on the main timeline - is this right? Or am I doing something wrong. Maybe I need to tell it to play?
Appreciate any advice.
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
Controlling Movie Clip Play Order
Good Day,
I have a web site that opens with two movie clips. One (A) folds open some navigation menus, the other (B) opens some rectangles that hold content. I want "A" to play out then, once it is played, I want "B' to start. It sounds simple but I cannot get the right code. I need something I can use for other applications in other pages. I have this code so far; (naigation_mc = "A" page01_mc = "B")
if (navigation_mc.play=true) {
page01_mc.gotoAndStop("start");
} else {
page01_mc.gotoAndPlay("start");
}
Perhaps there needs to be more code to controll this?
View Replies !
View Related
Controlling Movie Clip Play Back Virtually
I have a 3D object that rotates around its self, the effect I want is a virtual 3D movie clip so the viewer would be able to turn the object at their discretion. I am not sure how to script this movie clip to play back frame by frame only when the end users mouse curser rolls over the object (like scrubbing the time line). I need some guidance. Thank you
View Replies !
View Related
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.
View Replies !
View Related
[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.
View Replies !
View Related
Using Stop(); On A Shape Tween Of A Swapped Movie Clip Symbol Within A Motion Tween
Thanks a lot for your time. I'm new to actionscript, and language syntax and I never really got along to begin with so I appreciate any help in the matter.
Basically the title says it all - I made a motion tween in the main scene, made a movie clip symbol (to shape tween a gradient) and added a stop(); inside the gradient-tweened-symbol. I then swapped the movie clip symbol with the motion tween in the main scene, and got exactly the effect I wanted (the item moved, then tweened itself) but the stop(); seems to have no effect.
I know this looks like one of those "that idiot didn't google before posting" questions, but I've been looking for about a half hour with different permutations of stop, doesn't work, actionscript, and flash, and I haven't found anything that seems to target this problem specifically.
If you've got any idea what's going wrong, please feel free to respond or show me how to better seek help on my own. Thanks again.
View Replies !
View Related
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.
View Replies !
View Related
Controlling Play And Stop Movies
hi, everyone
pls help me.
i wonder why when i convert the "forward" button to movie clip, it does work!
the below actionscript is attached to "forward" button:
on (release){
nextScene();
}
this actionscript only work when it is button instance. but it does work if "forward" button inside the movies instance.
any idea?
View Replies !
View Related
Controlling Audio With 'play' 'stop' 'back' Buttons
I have loaded a audio swf file into a host, which when preloaded goes to the next frame, and the audio plays.
What i want to try and do, is control the audio with play, stop, pause and back buttons like a stereo so they work as they are called, controlling the audio file which has been pre-loaded into a movie called 'host'.
if any experts in this can help me, i will be much happy like innit..
lee
View Replies !
View Related
Controlling A Loaded SWF File , Play , Stop , Rewind ...
Hey Guys ,
I am loading in a video into my movie clip which I converted to SWF with sorrenson squeeze & Want to know how to control the movie from my main timeline , basically I just want to stop and play , and possibly have a timeline , BUT I know that to do a timeline I would have to have the movie embedded ?
Any thoughts ? I have herd about using the 'tell-target' command , but I am not sure how to use it ...
basically my files are called "movie.swf" and my place holder is called "loader"
Any thoughts , links , something would be good.
Thanks
Chris
View Replies !
View Related
Controlling Loaded MovieClip (play/gotoAndPlay/Stop)
Hi all, i have an empty movie in _level0, and i load an animated movieClip inside it with LoadMovie. Everything was ok on loading, it loads good, but i want to control timeline of this loaded movie, and i cant.
Something like this:
currentwork.loadMovie("fondos/1.swf");
In principal timeline, if a push a button for example telling:
currentwork._alpha=50;
it works, but if i say:
currentwork.gotoAndPlay(2);
or
currentwork.stop();
it doesnt play. Whats the problem? cant i control loaded movieclip?
Thanks in advance
View Replies !
View Related
Controlling The Movie, With A Symbol.
Hey, I'll get straight to the point. I created a Menu entirely in a movie clip. After the menu is done requesting the information from the user, I wanted a button in the Movie Clip to make the main Movie go to the next scene. How do you do this? Can it even be done?
[Some Info]
version- Flash MX
Menu Instance - "menu"
button instance - "nxtscene"
If you can help i'd be much appriceated!
-FViral
View Replies !
View Related
Stop Movie From A Symbol
Hello!
I made a preloader in a symbol. I also inserted the preloader symbol in the main movie. Now, I would like to know what is the code to stop the main movie from the symbol and what is the code to continue playing?
Best Regards
George Mercury
View Replies !
View Related
Help With Stop Movie Symbol
hi!
i wonder how to stop the symbol (type = movie) to selected frame when i calick an item into the scene?
2nd question how to set opacity to some object when i click some other object!
any suggestion appreciated..
thanx in advance...
View Replies !
View Related
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?
View Replies !
View Related
[F8] Movie Plays > Stop > Reverse > Stop > Play
I am fairly new to involved action scripting. I have successfully scoured flashkit threads for years to get my answers but this one has been driving me crazy for the past couple days. I have tried numerous solutions but none of them do exactly what I am trying to do.
I am creating an online portfolio that I want to control with two buttons that will play forward on release and stop at every piece unless the user is pressing and holding down - I also would like the scrolling animation to play in reverse on press and stop at every piece unless press and hold which happens to be skateboards in this section. I am posting the .fla for this section. This is what I have been able to accomplish so far. I moved everything into the main timeline from a movie clip because I could not get that to work at all. Should I move it back to movie clip? I also want it to stop at the first board.
here is the code I was able to peice together that just plays continously without stops.
Empty movie clip on second frame.
PHP Code:
onClipEvent (enterFrame)
{
if (_root.goBack)
{
_root.prevFrame();
}
else
{
_root.nextFrame();
}
_root.frameNo = "Frame : " + _root._currentFrame;
}
Forward button.
PHP Code:
on (press)
{
_root.goBack = false;
}
Reverse Button.
PHP Code:
on (press)
{
_root.goBack = true;
}
I have only done basic stops; goToAndPLay, getURL and such I am a little out of my league here but I started the ball rolling and would like to make this work as I intended. Any help making this do anything close to what I am describing would be much appreciated
View Replies !
View Related
Play Next Scene From Within Movie Symbol
This is pertaining to Flash MX Actionscript
In a movie symbol, I put
Code:
_root.gotoAndPlay("nextSceneName", 1);
But the it won't go to the next scene. I've tested extensively on what the problem is: it's that exact line of code. If I replace that line with anything else, it will run that "something else." So the problem shouldn't be in the surrounding code or whatnot.
View Replies !
View Related
Movie Symbol To Play RANDOMLY, Frames 1-5 Or 6-10
Movie Symbol to play RANDOMLY, frames 1-5 or 6-10
What actionscript do I need to create this?
1--2--3--4--5--6--7--8--9--10 FRAME#
K--------------K------------- K=Keyframes
When I drag this movie symbol into my work i want it to randomly play frames 1-5 or 6-10 and repeat this random selection. Can anyone help me with this?
Thanks!
View Replies !
View Related
Actionscript Code To Execute/play A Movie Symbol?
So this is what I want to do. A menu similar to this...
http://www.kirupa.com/developer/mx20...ith_slider.htm
But what I would be doing is, the little slider on the bottom would be a movie clip. So that it does a cool effect while moving to its desination. But I would only want it to play when it was moving....what would be the code to do this? Or maybe a link to some way I can find it on my own would be helpful. Thanks for your time.
-Phys
View Replies !
View Related
Help:make Button Play Frame From Seperate Movie Symbol
I am trying to make an animation for my TEE Physics class as we are going to do a report & talk on something. For some strange reasons I chose airconditionares
so the intro to this animation is of side on view of an airconditionare (really scabby looking) with what is meant to be ribbons hanging off it. in the center is a "controller" basically a square with airconditionre control written on it and a button saying "on"
all of the ribbons are copies of a movie symbol and i want to make it so that when the on button is pressed then the ribbon movie symbols will go to frame 2 and start fluttering in the breeze.
My problem is that my limited knowlede of scripting animations is makes it so that i have no idea how to do this
I've tried searching for help but can't find any.
thnx in advance for any help I get
View Replies !
View Related
How To Create Looped Sound Clip With Play/stop Buttons?
Hi everyone, basically, What I want to happen is when the flash file loads up on my page a small soundclip (.wav) starts playing, and it has to be looped so it plays exactly continuously and seamlessly; there can't be a 'gap' when it reaches the end and starts playing again.
I'd like to offer two controls: a stop button so people can stop it, and a play button so they can start it up again if they wish.
If that's too complicated then just the stop button would do.
When I've tried to do this myself the sound loads up again after the stop button has been pressed and the play button didn't work.
Im quite new to flash so a step by step guide would be of great help.
Thank you very much for your time and help.
View Replies !
View Related
Controlling A Movie Clip From A Button Inside Another Movie Clip.
I'm confusing myself just typing this.
I'm working on an interactive map. The map itself is a MC inside a container, but also contains all the buttons as well. On my main stage(scene 1 and menu) is a window(MC) that will show info and photo of building. Now if I create a button on the main stage I can control the movieclip(images) easily. But when I use a button from inside map(MC) it doesn't seem to recognize the (images.gotoAndStop(frame))command.
I'm just not sure what to put in order to be able to control the MC's timeline from within that map movieclip.
Sorry if this is confusing. Of course at the same time it might be a simple solution for most people here as well. At least that is what I'm hoping anyways.
View Replies !
View Related
Controlling The Playhead In A Movie Clip Via Buttons In Another Movie Clip
Alright, first off, I've tried literally everything I can think of, and all of the scripting looks perfect (from what I understand), so I can't think of what could possibly be wrong with the script.
Here's some information upfront about where these movie clips are located:
Main Timeline > tv_mc
Main Timeline > menu > menu2 (buttons controlling tv_mc are located here)
(Note: menu2 is a graphic, not a movie clip. It was only made so that I could move the menu itself without tweening several layers.)
Here's what I want to accomplish:
I want the buttons inside of menu2 to control the playhead in tv_mc, a movie clip. The first 25 frames of tv_mc are just the "stage" moving into view so that the information can be displayed.
There are five buttons in menu2 containing the following script:
Code:
on (release, releaseOutside) {
if (!mainwindow) {
_level0.tv_mc.gotoAndPlay(1);
mainwindow=1;
_level0.tv_mc.set(framenext, bio);
} else if (mainwindow==1) {
_level0.tv_mc.gotoAndStop(bio);
}
}
"bio" is the name of the frame in tv_mc. Basically, what I want this to do is check and see if the "stage" is already viewable, and if it isn't, to display the stage and then display the information as well, which is the purpose of storing the frame name in "framenext".
tv_mc also has this code:
Code:
if (!framenext) {
stop();
} else {
gotoAndStop(framenext);
}
At the moment, the menu buttons work to display tv_mc, but wont move the playhead past 25. I'm guessing that the "framenext" variable is somehow not getting any information, or not getting any information across to tv_mc from menu2.
I'm really effing lost at this point. Any help at all? I'd post the .fla, but the size is pretty big. :T
View Replies !
View Related
Movie Clip Symbol
You know when you place a movie clip symbol on the stage, the first frame is shown by default. Is there any way to display other frames by default, such as the last frame? I'm talking about the FLA, not the SWF.
View Replies !
View Related
Play Movie Clips To Fade Off THEN Play New Movie Clip
Hey guys, I've been doing a little searching and I can't find the answer to my dilemma.
I've made up some buttons that play a little movie clip animation when pressed. The scenario is like this: Push the "Illustration" button and little files pop onto the screen. Each file will be a button that opens up an image. Push the "Pictures" button and the "Illustration files" should fade off the screen so the "Pictures files" could pop in in it's place.
I can't find a way to make the "Pictures" movie WAIT for the "Illustration" movie to be done before it pop in. One goes in, and the other simultaneously goes out and I don't want that.
Is there any way?
View Replies !
View Related
Cannot Stop Movie Clip - This.stop() Confusion
Hello,
In my pong game when someone scores a goal I want the ball to pause in the middle of the screen, wait xx seconds and then randomly move.
Code:
// Return to kick off position
this.stop();
this._y = 325;
this._x = 275;
a = 0;
var myInterval = setInterval(this, "wait", 30*1000);
This calls function wait that simply uses this.play(); to allow the ball to move again.(See below)
Code:
onClipEvent (load) {
this.wait = function() {
this.play();
clearInterval(myInterval);
};
}
However I cant EVER get the ball symbol to stop no matter what I do.
Ive included all the code attached to the clipevent for the ball below.
Im thinking it must be due to the nested loops or somethings, very very confused
Code:
onClipEvent (load) {
this.wait = function() {
this.play();
clearInterval(myInterval);
};
}
onClipEvent (enterFrame) {
//Kick Off, play whistle and select random direction from 4 diagonals
if (a == 0) {
_root.kickoffwhistle.start();
//Use variable to ensure random numbers are generated only once per game
var randNumber1:Number = Math.pow(-1, Math.floor(Math.random()*2));
//-1 ^1 or ^2 = 1 or -1
var randNumber2:Number = Math.pow(-1, Math.floor(Math.random()*2));
//move it on the y axis at -1 or 1 & //move it on the x axis at -1 or 1
this._y += this.randNumber1;
this._x += this.randNumber2;
++a;
//set a trigger to increment so only actioned once.
}
if (randNumber1>0) {
this._y += this.yspeed;
//move it on the y axis at the set speed
} else {
this._y -= this.yspeed;
//move it on the y axis at the set speed
}
if (randNumber2>0) {
this._x += this.xspeed;
//move it on the x axis at the set speed
} else {
this._x -= this.xspeed;
//move it on the x axis at the set speed
}
// Ball(this) collides with PL1 and ball travelling upwards then deflect off randomly {
if (this.hitTest(_root.P1footballman) && this.yspeed<0) {
// Define boundaries for collision detection
var pl1bounds:Object = _root.P1footballman.getpl1bounds(_root);
this._x = Math.round(Math.random()*(pl1bounds.xMax-pl1bounds.xMin))+pl1bounds.xMin;
//Revert direction of ball by using formula below
this.yspeed = this.yspeed*-1;
//Randomly play miss sound effect if ball in goal area
if (this._x>133 && this._x<450) {
var result = Math.round(Math.random()*2);
if (result == 0) {
_root.MissedGoal.start();
}
}
//play football kick & header sound
_root.footballkickorheader.start();
}
if (this.hitTest(_root.cpu) && this.yspeed>0) {
var cpubounds:Object = _root.P1footballman.getcpubounds(_root);
this._x = Math.round(Math.random()*(cpubounds.xMax-pl1bounds.xMin))+cpubounds.xMin;
this.yspeed = this.yspeed*-1;
if (this._x>133 && this._x<450) {
var result = Math.round(Math.random()*2);
if (result == 0) {
_root.MissedGoal.start();
}
}
//play football kick & header sound
_root.footballkickorheader.start();
}
//Roatation properties of the ball
i = getProperty(this, _rotation);
setProperty(this, _rotation, i+5);
//Rotate ball i degees per frame
_this.rotation = i;
//Player Scores routine
//If ball object is beyond defined CPU goal area
if (this._y<75 && this._x>133 && this._x<450) {
_root.goalcry.start();
_root.P1footballman.score++;
//add1 to the cpu score
_root.playertxt = 'PLY: '+_root.P1footballman.score;
//Play start whistle for KICKOFF
_root.kickoffwhistle.start();
//Return to kick off position
this._y = 315;
this._x = 275;
a = 0;
//Stop ball in correct position
this.stop();
//5 seconds then calls function "wait" to use this.play() to move ball
var myInterval = setInterval(this, "wait", 5*1000);
}
//CPU Scores routine
//If ball object is beyond defined Player goal area
if (this._y>470 && this._x>133 && this._x<450) {
_root.goalcry.start();
_root.cpu.score++;
//add1 to the cpu score
_root.cputxt = 'CPU: '+_root.cpu.score;
//Play start whistle for KICKOFF
_root.kickoffwhistle.start();
// Return to kick off position
this.stop();
this._y = 325;
this._x = 275;
a = 0;
var myInterval = setInterval(this, "wait", 30*1000);
}
if (this._x>620 || this._x<5) {
this.xspeed = this.xspeed*-1;
//if it hits an edge inverse the xspeed
_root.bounce.start();
//Play bounce side effect
}
if (this._y>470 || this._y<75) {
this.yspeed = this.yspeed*-1;
//if it hits the top or bottom of pitch inverse the yspeed
_root.bounce.start();
//Play bounce side effect
}
}
View Replies !
View Related
Prob With Movie Clip Symbol
Hi =) I have tried time and time again 2 get my Movie Clip 2 play in my main time line but for some reason it wont work ?
1.I have clicked on the static frames in my main movie 2 select the full animation.
2.I have coped the frames.
3.I have created a new Movie Clip Symbol.
4.In the blank stage I have selected the first frame (( I have then edit à paste frame`s ))
5.I have returned 2 the main movie.
6.I have removed the old version of the animation in the frames that I converted into a Movie Clip
7.I have inserted a frame in 1 by pressing F6
8.I have open up the library and dragged the Movie Clip onto the stage.
9.But that is were MY PROB`s START. =(
Thanx 4 taken the time 2 read this and well if u can help me out a bigger thanx 2 u =)
View Replies !
View Related
Running A Movie Clip Symbol In The Other SWF
hello
i am portuguese and my english is not good!
i am running a movie clip symbol in the sample.swf , and i want to run a other movie clip symbol in the other sample1.swf , directly and with just a button click!
what are the actions?
obrigado ( thanks in portuguese)
Aquiles Boiça
View Replies !
View Related
Running A Movie Clip Symbol In The Other SWF
hello
i am portuguese and my english is not good!
i am running a movie clip symbol in the sample.swf , and i want to run a other movie clip symbol in the other sample1.swf , directly and with just a button click!
what are the actions?
obrigado ( thanks in portuguese)
Aquiles Boiça
View Replies !
View Related
Removing Movie Clip Symbol
On frame one I have the main page with navigation.
frame two I have a symbol movie clip from the library loading
I placed a button on this movie clip to close it and go back to
frame one. It doesn't want to do this... the code I put in was
on release
goto scene 1 frame 1
But it doesnt do this.. what is the code?
View Replies !
View Related
|