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 } }
FlashKit > Flash Help > Flash Newbies
Posted on: 04-24-2007, 10:55 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[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
How To Make The Wings Of A Fly Stop When The Flash Movie Stop?
Hello,
I made a simple "Fly Flying" flash animation. The wings of the fly are moving up and down while the fly is flying from one location to the other. My problem is:
The wings of the fly are still moving up and down when the fly is landed on the ground. I tried to add a stop(); action script at the last frame. However the wings are still moving even the movie is stopped.
How can I make the wings stop moving when the flash movie is stop? Please download and take a look at my flash file (fly_flying.fla):
http://space.uwants.com/batch.download.php?aid=313219
Thanks and best regards
Alex
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.
Movie Clip Stop
How do I stop a movie clip at a certain location, it just keeps playing...
Stop Movie Clip
hi all,
i need help. i have placed a MC of a moving flower on scene 2 of my movie.
on that frame, i duplicate this MC, creating a field of floating flowers.
however, when i click to return to scene 1 of the movie, the flowers do not disappear and continue to duplicate and float over scene 1.
how can i remove/stop the MC when i hit the return button.
thanks!
bittergawd
Stop Movie Clip
Hey all.
I have a movie clip within a graphic symbol. The movie clip is basically a mouth moving that is stuck onto a face in the graphic to give the impression this it is talking. I just want to know whether there is anyway to stop and start the movie clip at specified frames, rather than having to create a seperate graphic symbol without the mouth.If someone could talk me through the process I would be most grateful.
Olly
Stop A Movie Clip
I have Frame 2, where the action is stop(). On that frame there is a movieclip. Now that movie clip still runs, even though there is a stop(). How can I actually stop that movie clip? If it helps, I'm making a game and when the player gets hit by an enemy I wanted to enemies to stop moving.
Thanks,
Meesta Plunk
Movie Clip Help ( Stop )
Hey guys, Im making a scroller kinda thing and I have a question. Right now I have it moving and each thumbnail will be a button. ( right now the cartoon bottle with the cape button only works. My questions is I need it so when I rollover the whole thumbnail I need the movie to stop moving and the rollover effect happens. Right now the cartoon works when I rollover it but I need the whole thing to stop. Any help?
http://xquisitegraphix.com/portfolio...incbanner.html
Thanks
Tom
AIM: xquisitegraphix
HELP How To Stop A Movie Clip?
I have a movie clip imported on the stage in Scene 1 frame 1, and the movie clip is 20 frames long. I want to know how could I tell the movie clip to play itself one time, then stop and move on to the next frame in Scene 1 (Scene 1 frame 2). What I actually mean here is I just want the movie clip to hold only 1 frame in Scene 1, because I have another motion tween on frame 2, but I don't want them to be played overlapping. So is there any actionscript I can add to the movie clip to tell it to play itself, and after it has done playing, then move to the next frame in the same Scene?
I have below actionscript applied on the movie clip:
onClipEvent(enterframe){
startDrag(blossom);
}
I have attached the FLA file of this movie clip, please have someone to tell me what's wrong and how to solve the problem.
Thanks,
Karen
karen_yan@hotmail.com
My Movie Clip Won't Stop
I've tried adding stop actions to the main timeline as well as within the movie clip timeline, but my clip won't stop. I've even tried adding a stop action at the end of just about every layer, but to no avail. There isn't even any exotic scripting going on. I've just got a movie within a movie that I'd like to stop near the end of the clip. The only scripting I have on the darn thing is a stop action.
Suggestions?
Stop(); At The End Of A Movie Clip
Hi all,
I have a movie clip in the 1st frame stop(); code to prevent it from running then in the 3rd frame stop(); also to stop it again, in 2nd frame only keyframe and the movie clip contains a button with up, over, down and hit stats on hover only the color is clanger and for on(release) action I but getURL(http://www.google.com); on the scene there is another movie clip like a button on on(Rullover) the is a code to telltarget the first movie clip and gotoAndPlay(2) to the second frame.
I facing a big problem the button inside the 1st movie clip is not working not change the color and didn't open the website although if I take this button Cut and paste to the scene it is work fine. Is stop(); is prevent the code for the button or what the exactly problem.
Plz it is urgent, I have to finish that website into two days
Regards,
How Stop Movie Clip ?
Hi, I'm very beginner in Action Script.
I want to make field "next piece" in tetris. For this I create movie clip (nextpiece) which contains 7 frames with 7 pieces. When I want to show for examaple that the next piece is something (in 4th frame) I use this in my code:
"nextpiece.gotoAndStop(framenr);" where framenr is 4 in this example.
It doesn't work. Movie Clip is running all the time. It stops only if I paste in stop(); in action script in this frame but it always stops in first frame where meets "stop();"
Best regards,
rafter
Movie Clip + Stop
Hi,
How can I stop a movieclip from playing before it is selected.. because if I type:
ActionScript Code:
myMovieClip.stop();
then that just stops my whole movie altogther.. im using the movie clip as a button mode.
temps
HOW TO STOP A MOVIE CLIP
I HAVE 2 MOVIE CLIPS IN MY FILE BUT I ONLY WANT TO STOP ONE OF THEM. I WANT THE OTHER ONE TO KEEP DOING WHAT IT IS SUPPOSED TO DO. HOW CAN I STOP ONLY ONE MOVIE CLIP WITHOUT STOPING THE OTHER ONE???? THANK YOU
Stop A Movie Clip
Hi,
i have a stage on which i have 2 movie clips.
they play till frame 55.
on frame 55 i would like to make movie clip named "intro" stop and let
continue to play the movie clip "background snow"
how can i do that ?
thanks a lot,
RAF
How Do I Stop A Movie Clip?
Hi, i'm a basic Flash MX user and i've been trying out the tips from this site. I want to see the tips and tricks i've learned from here for some of my works, but in order to do that, I do need to know how to appropriately stop a movie clip after certain number of repeats and make sure the object in the movie clip is in a position I want it to be.
I believe I do have a method to stop a movie clip, but I feel it is inefficient and that there's a better way to do so.
Getting Movie Clip To Stop
i'm making a little 2-player shooter game and i want to the shots to stop after the player shoots 5 times.
i want to know how i'd make the if statement.
thanks!!
tis is the file if you guys need to look at it and i know it's all messed up and there are a lot of things that could be better like putting all the action script on one layer instead of movie clips but right now it works. i just want to know how to get the shots to fire five times then stop.
and maybe get them to reset after 3 seconds ?
THANK YOU!!
How To Stop Movie Clip
hello
I've got big problem, I dont know how stop movie clip when mouse is over that movie, please help me in polish forums nobody want help me thanks
How To Stop The Movie Clip?
Hi again!
I have a walk cycle and I put it in a scene
after walking for a while
I need to make her stop walking and do some actions before
start to walk again
how can I make that happen?
thank you very much :D
Start And Stop Movie Clip
Hi!
I a newbie in Flash MX 6.0 and I 'd like to know how can I start a MovieClip and How can I stop it?
I also would like to make a button that 'd show some animation while I have the mouse over it.
Could you guys help me out?
Stop Movie Clip From Looping?
I have a movie clip with a short 15 second video in it. but when it reaches the end it continues to loop and replay the video. I put in the commands
stop();
gotoAndPlay(51);
but it ignores them and continues to loop.
Any suggestions?
How To Stop Movie Clip From Going Out Of Stage
hello all
i m new to this group
i have a problem that i make a game tutorials
using keypress now i have the problem that when using keys my movie clip went out of stage so i want the help that how can i stop my clip to going out
hope u will
bye
How To Stop Movie Clip From Going Out Of Stage
hello all
i m new to this group
i have a problem that i make a game tutorials
using keypress now i have the problem that when using keys my movie clip went out of stage so i want the help that how can i stop my clip to going out
hope u will
bye
Stop A Sound In A Movie Clip
Hi everybody.
I am quite new to Actionscript and I've got this "tiny" problem. I am using Flash 5. I have asked lots of people, but nobody could help me. However, as an experienced Director developer, I beleive this shouldn't be any difficult at all, to somebody who knows actionscript a bit.
I have a button with a movie clip on the "Up" state containing a sound named "soundA". When the user rolls over the button, there is a graphic and a sound playing (lets say "soundB") in the "Over" state. Of course, I want soundA to stop when the user rolls over the button, but the sound keeps playing even if I click the button and the playback head jumps to another frame!
I have achieved stopping both sounds, but I cannot tell the movieclip to stop its own sound (soundA), without interrupting soundB. I have created an object at the beginning of my movie with the following script:
wait1_sound = new sound(_root.wait1_loop);
where "wait1_loop" is the name of the movieClip's instance, and then used this script on the button:
on (rollOver) {
wait1_sound.stop(["soundA"]);
}
but "soundA" keeps playing.
What I am doing wrong here???
Thanx to everybody who will offer his invaluable assistance...
Tokola.
Stop Start Movie Clip
Hi
I would like to have a scene with a play button on.
when the button is clicked, I would like it to call a movie clip that would run frame 1 to frame 4 and stop. When the play button is hit again, I would like it to run from frame 5 to frame 8.
Is this possible?
Movie Clip Stop When Collide
Ok I made a movie clip with the main purpose of moving accross the screen. I would like to have him stop moving and play a certain frame whenever he collides with another object. Can someone tell me what I need to add to this script inorder to make him do this?
Actionscript:
onClipEvent (load) {
moveright = true;
speed = 4.5;
}
onClipEvent (enterFrame) {
if (moveleft) {
_x -= speed;
_y -= 1.5;
_xscale = -100;
}
if (_x<-20) {
moveleft = false;
moveright = true;
}
if (_x>600) {
moveright = false;
moveleft = true;
}
if (moveright) {
_x += speed;
_y -= 1.5;
_xscale = +100;
}
}
Need To Stop A Movie Clip On Frame 1
I have a movie clip on frame 1, but when the scene starts i need that movie clip to be static or stopped. Is there a way of telling flash to stop that movie clip when it is in frame 1?
thanks
I Want One Movie Clip To Stop, While The Others Loop
hello...
i have a flash mx 2004 file and i would like it so that one movie clip fades in.....(it is text).....and then stops when it is completely faded in.
in the background i have a blinking starfield...i want the stars to continuously blink....
i can get the text to stop looping....but then the stars stop too.
is there any way to have the text stop once the alpha is at 100% and then have the stars contiuniously loop?
thanks
john =)
Movie Clip Stop On Mouseout?
Hi
I have a movieclip that plays and continues playing when you roll over a button. How do I make the movieclip go back go frame 1 when the mouse rolls out of the space that the movieclip occupies? I tried using an invisible button, but since there are 3 buttons on the movieclip, the mouse stayed as a hand cursor while over the entire movieclip instead of only changing to a hand cursor when it was rolling over the 3 buttons.
thanks,
nitakt
How Do I Get My Movie Clip To Stop At A Certain Point
I have this code on my mc
onClipEvent (enterFrame) {
var speed = 14;
var viscosity = 1.3;
xpos = _root.xpos+200;
// X Pos
difference = xpos-this._x;
xvelocity = (xvelocity+(difference)/speed)/viscosity;
this._x += xvelocity;
}
and this code on my buttons-
on (release) {
_root.main._x = 600
stop();
}
the mc will ease to the spot but then return to its starting position.
Help!
Cant Get Movie Clip To Stop On Rollover
hi guys
i have a dum question i think!!
ok....... i cant get one movie clip to stop when i rollver a button, so what ends up happening is that the new movie clip just goes ontop of the first one
any help would be great guys!!
i knwo its simple stuff i think but as you can tell im all new to this
cheers
Gary
Dynamically Stop A Movie Clip
hello,
Newbie here and had a hopefully easy question. I'm, currently trying to stop a movieClip dynamically but not sure what way to take. Presently I've loaded seperate movieClips all have there own instance names. Here's a sample of my code:
function moviePicker(num)
{
switch(num)
{
case 1:
linkage = "home";
break;
case 2:
linkage = "local";
break;
case 3:
linkage = "search";
break;
case 4:
linkage = "more";
break;
case 5:
linkage = "driving";
break;
default:
trace("not picked");
break;
}
holder_mc.attachMovie(linkage, linkage+"_mc", this.getNextHighestDepth());
}
I'm also using the Key class to load the movie which is:
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyDown = function()
{
switch (Key.getCode())
{
case Key.SPACE :
startStopMovie();
break;
case Key.LEFT :
leftArrow();
break;
case Key.RIGHT :
rightArrow();
break;
}
}
Key.addListener(keyListener_obj);
The "space" command calls to a function called startStopMovie(); which is:
function startStopMovie()
{
demoMovie = sections[0] + "_mc";
if(!stopping)
{
trace("is stopped "+ stopping);
holder_mc[demoMovie].stop();
stopping = true;
}else{
trace("is playing "+ stopping);
holder_mc[demoMovie].play();
stopping = false;
}
}
which stops the first movie clip fine and I'm passing an array for "sections[0]" as:
var sections:Array = new Array("home", "local", "search", "more", "driving");
Is there a way to dynamically pass a number for that sections array when pressing the left or right key.
Here's the code in all it's glory - Thanks for any help!!!!
stop();
_quality = "BEST";
//////////////////////////////////////////////////
//declare variables
_global.demo = this;
var stopping:Boolean = false;
var section:String = home;
var linkage:String;
var newID:String;
var whereAmI:Number = 1;
var sections:Array = new Array("home", "local", "search", "more", "driving");
/////////////////////////////////////////////////
//Initialize
function init()
{
demo.createEmptyMovieClip("holder_mc", demo.getNextHighestDepth());
holder_mc._x = 0;
holder_mc._y = 0;
moviePicker(1);
}
/////////////////////////////////////////////////
//show movie
function moviePicker(num)
{
switch(num)
{
case 1:
linkage = "home";
break;
case 2:
linkage = "local";
break;
case 3:
linkage = "search";
break;
case 4:
linkage = "more";
break;
case 5:
linkage = "driving";
break;
default:
trace("not picked");
break;
}
holder_mc.attachMovie(linkage, linkage+"_mc", this.getNextHighestDepth());
}
/////////////////////////////////////////////////
//stop/play movie
function startStopMovie()
{
demoMovie = sections[0] + "_mc";
if(!stopping)
{
trace("is stopped "+ stopping);
holder_mc[demoMovie].stop();
stopping = true;
}else{
trace("is playing "+ stopping);
holder_mc[demoMovie].play();
stopping = false;
}
}
/////////////////////////////////////////////////
//Left Arrow
function leftArrow()
{
if(whereAmI > 1)
{
whereAmI--;
moviePicker(whereAmI);
}
}
/////////////////////////////////////////////////
//Right Arrow
function rightArrow()
{
if(whereAmI < 5)
{
whereAmI++;
moviePicker(whereAmI);
}
}
//////////////////////////////////////////////////
//keyboard
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyDown = function()
{
switch (Key.getCode())
{
case Key.SPACE :
startStopMovie();
break;
case Key.LEFT :
leftArrow();
break;
case Key.RIGHT :
rightArrow();
break;
}
}
Key.addListener(keyListener_obj);
//////////////////////////////////////////////////
//initialize
init();
trace("sections: "+sections[0]);
Getting Movie Clip To Stop At Last Frame
Hi,
I've been trying to figure this out for ages, and it's driving me bananas. I've got a piece of video (a panarama)...i've to 2 control buttons on it going left and right. The code is as follows
forward_btn.onPress=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe+3);
if (_root._currentframe+3 > _root._totalframes){
_root.gotoAndStop(_root._totalframes);{
this.onEnterFrame = function() {
}
}
}
}
}
forward_btn.onRelease=function (){
controller_mc.removeMovieClip();
}
forward_btn.onReleaseOutside=function (){
controller_mc.removeMovieClip();
}
rewind_btn.onPress=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe-2);
if (_root._currentframe-2 < 1){
_root.gotoAndStop(1);
}
}
}
rewind_btn.onRelease=function (){
controller_mc.removeMovieClip();
}
rewind_btn.onReleaseOutside=function (){
controller_mc.removeMovieClip();
}
This code works fine until you reach the end of the video piece,, where it goes on to play everyone other scene in the flash file.
I'm trying desperately to get it to stop at the very last frame. I've tried using various forms of the following code to help stop it
on (rollOver) {
this.onEnterFrame = function() {
mc.play();
if (mc._currentframe == 10) {
mc.stop();
delete this.onEnterFrame;
}
};
}
Would anyone be able to help with this?....
..Or have any other suggestion or code that I code control a panorama with instead, and avoide this problem?
I look forward to hearing from you,
Kind Regards,
A
How To Stop Movie Clip From Looping
Hey guys, a newbie here. I have this movie clip that I purchase and made some changes to, but for some reason can't figure out why it keeps replaying over and over. I'm trying to get it to pause at the end where it says "Call for a free trial." I don't see anything in the action script that would cause it to replay. Can anyone help me figure this out?
The clip can be viewed at:
www.paragon-nj.com/test.html
The FLA file is at:
www.paragon-nj.com/fire.fla
Thanks for all your time
Wil
Why Does This Function Stop My Movie Clip?
Morning everyone hope you all had a good weekend Im having a problem with some code I made:
stop();
trace(_global.fid);
var i:Number;
for(i = 1; i <= _global.fid; i ++) {
tempname = "link"+i;
tempname._visible = true;
trace(i + " " + tempname + " " + tempname._visible)
}
for (i = _global.fid+1; i < 11; i ++) {
tempname = "link"+i;
tempname._visible = false;
trace(i + " " + tempname + " " + tempname._visible)
}
Alright so this is all pretty straight forward im just tracing the variable FID
and then adding whatever its value is to the name "link"
That all works good and great its this part that is screwing up:
if (_global.fid == 1 || _global.fid == 2 ||
_global.fid == 3 || _global.fid == 4 ||
_global.fid == 5) {
module1.set1.gotoAndPlay("link"+_global.fid)
} else if (_global.fid == 6) {
module1.set2.gotoAndPlay("link"+_global.fid)
} else if (_global.fid == 7) {
module1.set3.gotoAndPlay("link"+_global.fid)
} else if (_global.fid == 8) {
module1.set4.gotoAndPlay("link"+_global.fid)
} else if (_global.fid == 9) {
module1.set5.gotoAndPlay("link"+_global.fid)
} else if (_global.fid == 10) {
module1.set6.gotoAndPlay("link"+_global.fid)
}
So here depending on what the variable is its to go into a MC called
module1. then go into the MC set1 and play the label link+ whatever the FID is. Now it all works perfectly like if the variable is 3 it will go to link3 but here is the tricky part It wont play it just goes to Link3 and stops for no reason! Its driving me crazy because I have no stop commands and if I just play the movie clip that link 3 is in it doesnt stop at all. Does anyone see anything in the code that would do this??
I need any help someone can offer as soon as possible.
Thanks so much,
Chris
Stop Action On Movie Clip
Hay y'all,
I hope someone could help me. I'm currently in school creating a video game and I have a movie clip that is movable, but once it gets into position I want it to stay there and not be able to be moved by the person playing. Is there a way to write a stop action on it? The actionscript I have now isn't allowing that. I could send a copy of that if it would help.
Thanks. Much appreciated.
Movie Clip Stop Functionality
Very general scenario.
I design so that I have several movie clips on my main timeline that each run on different cues. I usually place a simple stop(); command at the end of each movie clip. My question is: should I unload the movie somehow instead of using this stop command. In other words, say I have 5 movie clips that run on different cues on the main timeline, will I be losing bandwidth or clogging up my user's flash player somehow by not unloading the movie, or is the stop function good enough?
Movie Clip Stop Problem
This code is on the _root time line. It seems self-explanatory:
Code:
on(release) {
stop();
subtitle.stop():
}
Not working, the MC subtitle keeps playing. Any idea's on how to make this work without having to make a button inside the subtitle MC?
Is It Possible To Stop A Tween In A Movie Clip
Hello Kglad and other forum expert!
I have a movie clip (really just an image converted to a movie clip).
I a "zoom" effect set on two layers - on for the zoom mask, and the other for the base image.
I just use the modify/transform in some keyframes to have the image motion tween from normal size to a larger size.
The tween (aka zoom) is shown through the mask layer.
I did not create the motion tween using actionscript, but in the timeline between 2 keyframes.
Is there a way I can stop the tween when the movie plays ( by clicking a "pause" button).
Thanks for a great info resource,
eholz1
How To Stop A Movie Clip Moving
I'm not newbie to flash but I am newbie to coding using actionscript!!!
I am trying to create a button that moves a movie clip ("content1") diagonally across the screen but once the movie clip reaches a certain x co-ordinate I want it to stop and then when I click another button I would like it to return to it's starting position. At the moment the movie clip moves if I click one of the buttons but as soon as I click another one it stops which it shouldn't it should go back in the other direction. The other problem is that once I've clicked a button I cant seem to get it to stop moving once it reaches a certain _x position it just keeps on moving off the stage.
Below is the script I have so far not including any conditions to check if "content1" has reached it _x position
Could anyone help please!!!!
-------------------------------------------
//on Right movie clip containing the button
onClipEvent (enterFrame) {
_root.content1._x += speedX;
_root.content1._y -= speedY;
}
-------------------------------------------
//on Right button inside movie clip
on (press) {
speedX = 5.5;
speedY = 1.33;
}
-------------------------------------------
//on Left movie clip containing the button
onClipEvent (enterFrame) {
_root.content1._x += speedX;
_root.content1._y -= speedY;
}
-------------------------------------------
//on Left button inside movie clip
on (press) {
speedX = 5.5;
speedY = 1.33;
}
-------------------------------------------
Flash Mx - Stop Movie Clip
I have a movieclip playing in scene 1.
When I press the menu button I want the clip to stop and move to the next scene.
Right now the clip doesn't stop and the scene change isn't made.
What is the actionscript for this and does it go into the frame or into the button?
Thanks for help
kleb
Movie Clip (start & Stop)
okay i made a (.flv) file and imported it into flashMX and put it inside movie clip symbol.. it plays fine, but loops over and over forever.. how do i play it just one time!? and how do i start, pause or stop it from a button on the main stage.
the mc variable is local inside the symbol, and isn't visible from the main stage.. so how do i go about doing this...
no looping.. and a symbol movie clip control from main stage...?
How To Stop Movie Clip On Mouse Over
i am giving motion tweening in the movie clip but i want to know how to stop movie clip on mouse over please help any one ...
send me scripting ASAP ...
Thanx,
Gubba
Flash Mx - Stop Movie Clip
I have a movieclip playing in scene 1.
When I press the menu button I want the clip to stop and move to the next scene.
Right now the clip doesn't stop and the scene change isn't made.
What is the actionscript for this and does it go into the frame or into the button?
Thanks for help
kleb
Stop Action On Movie Clip
hey, new to this site and new to flash...here's the problem...i have a GIF that i converted into a movie clip, so i could apply a transformation...Now i cannot get the stop action to work on the last frame of the transformation and the transition loops infinitely...strange...
i use MX2004...
yeah this IS my first project with flash ever, and the first problem that i cannot seem to find a solution to.
thanks in advance
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?
Stop Movie Clip On Stage
Hi,
I'm a beginner at action script and this is my first question to a forum - ever.
I want to bring a MC onto the stage, move it to a certain position and then stop it there.
I can get it on, into the position but I don't know how to stop the clip. I know this has to be very simple, but I just can't work it out. Sorry.
Would anyone be kind enough to give me a clue?
Thanks
Stefan
This is what my script looks like:
stop();
warden_mc.onEnterFrame = function () {
this._x -=10;
if (this._x < 12) {
Stop();
};
};
Making A Movie Clip Stop When Colliding With Another Movie Clip....
OK I have a stage are which is surrounded by walls on all four sides, (wall_left , wall_right , wall_top , and wall_bottom.) Also, I have a character which is named "Omekk" (Some fag name I made up.) I can control 'omekk' with the keys, but I don't quite understand the hitTest function. I am using flash MX. On the left wall I put the code
Code:
onClipEvent (load) {
Omekk.hitTest(wall_left);
}
and the top wall I put:
Code:
onClipEvent (load) {
Omekk.hitTest(wall_top);
}
...and so on and so forth. The problem is, when I test the movie, the character STILL goes through the wall... What's up with that? Are there more actions that I have to put on the wall? Actions on Omekk himself? Error in the syntax? What is it??
If someone helps, I'd be SOOOOO happy. I feel like such a moron because I can NEVER understand this. I'm about to just give up flash if I don't get it... I suck and I can never get the hang of it.
Sorry,
Josh
|