I Think This Might Be Quite Simple... Please Help Me Stop A Movieclip
Hi everyone,im very new to AS3 so sorry if this is a basic question!I made a movie clip which is a turnip - when you click it its leaves grow. (it has a button on top of it as i wanted the mouse curser to change to a hand so the user knows it will do something)this is the script i used for the buttonturnip1.addEventListener(MouseEvent.MOUSE_UP,turni pGrow);function turnipGrow(event:MouseEvent){turnip1.play();}my probem is that i only want it to happen once then if the user clicks the turnip again nothing happens. at the moment the leaves dissapear and grow again on the second click (and on every click)its all on one frame.also... is there a way to make the mouse curser change to the hand without making a button? can it be done with a movie clip?Thanks very much for any help!Kira
KirupaForum > Flash > ActionScript 3.0
Posted on: 07-23-2008, 02:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Movieclip Won't Stop On Stop Command?
Inside a movieclip (track) I have a ball on a motion path. At the end of the first motion path, a box comes up and the movie is suppossed to stop on it. For some reason, it keeps going right on to the next motion path. The stop is on it's own layer, and the weird thing is, there are two other stop commands on the same layer, at the beginning and the end of the movie, which both work. I have tried everything I know. Please help. Thanks,
-A
How To Play/stop A Movieclip Inside A Movieclip?
This is probably really simple and stupid but I can't figure it out. I'm trying to play a movieclip exported from my library which inside a movieclip on the stage.
Code:
//create container MC
var myContainer:MovieClip = new MovieClip();
stage.addChild(myContainer);
//bring in animated MC from library and load into container
var myAnimatedMC:AnimatedMC = new AnimatedMC();
myContainer.addChild(myAnimatedMC);
//play mc?
myContainer.myAnimatedMC.play();
The movieclip is added onto the stage but it just won't play. The last step doesn't work? Any ideas?
How Do I Get A Moving Movieclip Stop At Another Movieclip
I got two questions, im using the movement code from the "RPG inventory and movement" tutorial. This is the code:
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}
Is there anyway i can put something so the movieclip wont move through another movieclip with the tag "wall" for example. And one oter: How do i make it so that if the movieclip moves into another movieclip with the tag "exit" for example, it will switch frame?
How Do I Get A Moving Movieclip Stop At Another Movieclip
I got two questions, im using the movement code from the "RPG inventory and movement" tutorial. This is the code:
onClipEvent (load) {
moveSpeed = 19;
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown (Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown (Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown (Key.LEFT)) {
this._x -= moveSpeed;
}
}
Is there anyway i can put something so the movieclip wont move through another movieclip with the tag "wall" for example. And one oter: How do i make it so that if the movieclip moves into another movieclip with the tag "exit" for example, it will switch frame?
Stop A Movieclip With A Setinterval From Another Movieclip
This seems really simple but it's getting a bit frustrating for me.
I have two separate movieclips on a stage. One has three graphics that are cycled through every 4 seconds using an interval. This movie is named adsmc. I have another movieclip called btnset that has a pause button in it. What I want btnset to do is that when pause is clicked adsmc stops completely. This doesn't currently happen, it continues to cycle. Now if I take the interval code out, the btnset stops adsmc when clicked. How can I stop the cycling of adsmc while keeping my time intervals? Actionscript included below...
adsmc code(I have three actionscripts here on frames 1, 5, and 10, they are basically the same except for telling the movie what frame to go to.):
stop();
var interval:Number = setInterval(function () {
gotoAndPlay(5);
clearInterval(interval);
}, 4000);
btnset code:
stop();
btnpause.onPress = function () {
trace(_root.adsmc._currentframe);
_root.adsmc.stop();
}
Stop A Movieclip Inside A Movieclip
I use 2 movieClips as buttons placed inside another movieclip in order to achieve something like a dropdown menu.Those 2 movieclips have 2 (stop) frames inside them and they are used as On/Off states.The movieclip that holds those 2 button/clips is used for animating the buttons (actually appear/disappear with motion tween and alpha fade).
My problem is that the movieclips/buttons are always go back to the 1st frame in each keyframe of their animation.
Is there any way to achieve this dropdown menu (even another way) so that the states (actually the frame which each movieclip/button stops) remains always the same troughout the whole animation?
Simple Stop()
on my scene1, i have a movieclip, that i start, but when it gets to the end of the movieclip, it will not stop. i have stop(), but nothing... any help please.. i know this is simple..
thanks a mill.
Stop Movieclip
Hi, I've searched flashkit forums, movies and tutorials; and tried almost everything. In my flashmovie, there are two movieclips playing; but when I push a button; they have to stop.
I've tried this code on my stop-button, but didn't work
on (release) {
moviecl.stop()
}
this didn't work too:
on (release) {
_root.moviecl.stop()
}
Please can someone help me?
How Do I Stop A Movieclip?
This movieclip keeps going on and on when I test it. It's frustrating. So is the stupid motion tween. Anyway, I put a stop both in the movieclips 40th frame and the actual timeline's 40th frame. I'm using MX Pro, what is going on?
[f8] Stop Movieclip
I created a simple movie clip of a ball spinning. It is suppose to roll onto the stage and stop. However, the ball keeps spinning. I did a quick search to find an actionscript to stop the ball from spinning and found this.
mymovieclip.stop();
The movieclip is called ball so that translates to:
ball.stop();
However, it doesn't seem to work. I originally had it in the timeline but also placed it on a button and it doesn't work. Does anyone know how to stop a movie clip.
Stop MovieClip
Hi. I have hard time to make this picture slideshow to stop playing on start. I'm just beginer.I guess that any of you could help me with it.I want the player to indicate that the movieclip is still loading frames, but the frames which are downloaded are available for preview to user.Later I want to add some more options Like "Slideshow button", but first thing first...
compressed files are attached to this email. "viewer.swf" is the loader of external file "SouthWestPic.swf".
How To Stop MovieClip
hi
attached is the fla of a navigation im trying to build
the problem is I'm not sure how to stop the motion of the Movieclip once one of the smaller black circles is mouseovered.
any help would be most appreciated
14
Can Stop Movieclip
Hello,
I have edited this MP3 Jukebox for my website here.
Now for my website I imported the MP3 Player and put it in a movieclip. When I place it in the .fla of my website as a movieclip it comes up just fine and runs perfectly. However, when I click the continue button on the Jukebox it goes through the rest of the movieclip and loops back to the beginning. Where the continue button and bandwidth settings come back up. How may I stop it from doing this? I believe it would be somewhere in the jukebox code as I have put a stop(); in the layer and on the movieclip itself. Any suggestions?
Stop Movieclip
I have used stopallsounds(); to stop sounds when I click on a menu in my flash movie. Is there anything similar I can do to stop all other activitys (movie clips and so on) in the flash movie? The menu movie clip lies in one layer and the rest of the "movie" lies in another layer, playing one movie clip at the time.
Canīt Stop Movieclip
hi there !
I made a movieclip with 5 frames inside. Well, outside, when i push a button stop, runs the code: this.movieclip_name.stop(); , but, doesnīt stop.
Inside these frames there is a enterframe function that call drawing api functions.
thacks
barbara
Canīt Stop Movieclip
hi there !
I made a movieclip with 5 frames inside. Well, outside, when i push a button stop, runs the code: this.movieclip_name.stop(); , but, doesnīt stop.
Inside these frames there is a enterframe function that call drawing api functions.
thacks
barbara
Stop That MovieClip
I have an MC that continuously loops. I want to stop it with the click of a button and then start it again with a button.
How do I make the playhead stop right where it is instead of targeting a specific frame?
Thanks in advance Flashers.
-dp
STOP Movieclip
Hi I'm gonna start a crowd scene for a website (if it works) and I want it so that when you hover over a character only he stops walking, so far Ive got it so that the clip stops but they walk on the spot (it wouldnt work woth them all on the timeline so I put them individually in mc's) then when you move the mouse they continue walking.
Also is there a way to get it so that when you hover over a character a speech bubble(which ive created) appears over them and then goes when they continue walking?
your help would be much appreciated
I've attached the flash file but had to take out most of the characters so that I could upload the file so it is a demo really!
Thanks again
Simple Stop(); Problem - Help
I have a button on my main timeline, and a stop(); command in a movie clip. When I play my flash movie, the whole movie stops and the button won't work.
Is there a way of putting a stop command that only stops the little movie clip, not the entire flash movie?
A Simple One... If Mc._x<-200, How To Stop The Mc Moving?
this is simple and reveals my non existent ac skills:
i have a simple sideways scrolling menu. it functions ok, but i don't manage to stop the scroll when the menu_mc has reached it's end, that it, when menu_mc._x < -200. i've tried different if-statements without success. here's the part that does work all right:
Code:
_root.onEnterFrame = function() {
if (_root._ymouse > 50 && _root._ymouse < 150 and _root._xmouse >-10 && _root._xmouse <900){
menu_mc._x -= (_xmouse+menu_mc._x)/4;
pointer_mc._x += (_xmouse-pointer_mc._x)/6;
}
}
i know, i should manage to do this myself, but i don't seem to get it just right. as always, i'm grateful for help...
[F8] Simple If/else GotoAnd Stop Help.
Hello, I KNOW this can be done in a very simple manner (as I have done it before I swear!)
Right now my brain is refusing to cooperate and I need a push..
I have basically 2 MCs. One is dragable on x-axis only. It outputs it's location to a dynamic text in a numerical form
For simplistic sake let's say it shoots out 1, 2, 3, 4, 5, ...10
Now, what I WANT is my second MC has 10 frames. 1 for each of the output numbers.
Besides doing something like:
Code:
if (output ==1){
sedcondMC.currentframe ==1;
}
else if (output == 2){
secondMC.currentframe == 2;
}
//you get the idea
}
What is it I need to do to make secondMC's current frame match the output number? So when out put is 3 secondMC is showing it's 3rd frame, and so on?
Thanks,
~MoN
Simple Stop And Play
I have been trying to create a very simple slideshow for a friends site I done for him to advertise his business. The photos, I suggested would be better if they were done as a slideshow and the idea was to have each picture fade in, stop, click to play, fade out fade in next, stop, etc etc.
I have tried every tutorial I can find and done most of the things in the Visual Quick Start Guide Macromedia Flash 8 and still I cannot get it to work. All I really want is to stop, click and play at each point along the timeline at regular points.
Can anyone please help me with this. The .fla I am working on can be found here
Any help will be greatly appreciated as I am running out of hair left to pull out.
Nig
Movieclip Following Cursor. Help To STOP?
I want to make a movieclip follow the cursor usin onClipEvent(enterFrame)action.
In that mc there is a menu. (as seen on: http://www.nasa20.com)
I don't know how to stop movieclip to enable the menu button.
Could Anybody help me with this question??
thanks!
Stop Movieclip With Actionscript?
Hello,
This is the situation. I have a movieclip of 52 frames, which are all labelled, so I can use them in scripts.
I placed the movieclip in a scene, and want the movieclip to run once and then let stop it at a certain frame.
Is there any actionscript I can use?
Hope that there's someone with a solution.
Greetz
Rik
How I Stop A Main-movieclip While I Run Another....
How i stop a main-movieclip while i run another animation?
I use Flash 5:
My mainmovie clip is: mainmovie
The button on the navigation to load the swf-file (second animation) has the following code:
on (release) {
loadMovie("brillen.swf", "_root.Target_screen");
}
Everything works perfectly but how can i stop the "mainmovie" while i run for example "brillen.swf" and so on?
And how can i start the "mainmovie" again after the animation of "brillen.swf" is finished?
How To Stop MovieClip Animation
Hi,
Within my Library, I have created a movieClip called MovieA. Inside this movie I have placed several animated movies, call them subMovie1, subMovie2, etc.
Is there a way to stop the animation of all the subMovies within MovieA? I want to do this by a command like...
MovieA.stop();
(I cannot run a stop command for each individual SubMovie, because I may have multiple SubMovies per MovieX. And there are other reasons, too many for this post.)
Of course, MovieA.stop() doesn't work, hence my post.
Thanks.
Stop Movieclip Animation
Please tell me how to stop the particular Movieclip animation on a click of a button in flashMX.
Stop MovieClip Issue
In my code I am trying to stop my main timeline and the timeline of the movieClip. But I am having trouble getting the code to work.
Code:
on (release) {
//trace("test");
//trace the currentFrame of the mainmovie
trace("currentframe"+this._currentFrame);
_root.gotoAndStop(this._currentframe);
_root.VSound.stop();
for (var i in _root) {
if (typeof (_root[i]) == "movieclip") {
//trace currentFrame of movieclip
trace((_root[i])._currentframe);
//((_root[i]).gotoAndStop(_currentframe))
((_root[i])._currentframe).stop;
}
}
}
Movieclip Following Cursor - Needs To Stop
Hope someone can help.
Ive got an mc that follows the cursor and rotates to follow it thanks to some code off a tutorial that i dont really understand.
The MC is also animated. I need the rotation to stop when the MC reaches the cursor. I also need it to stop when it gets a certain distance from the cursor.
Any thoughts.....fla attached
Also, how easy is it to add some acceleration to the the MC as it follows?
Ta
[F8] Movieclip Stop On Mouseout
Thanks in advance for the help!!! This is very simple, I'm sure. I have a movieclip that plays above a link on rollover. When you move the mouse away from the hit area, the movie clip stops. I'd just like the movieclip to roll through all of its frames whether a user mouses out or stays on the hit area.
Stop Movieclip On Frame
I've got a movieclip of a moving leg (voorbeen) and i want it to stop on a frame. So at frame actions, i enter
ActionScript Code:
onClipEvent (enterFrame){
voorbeen.stop();
}
How To Stop Movieclip On Particular Place
Hi everyone
i want to be stopped my movieclip on particular place.
here given code
onClipEvent(enterFrame)
{
this._y -= 2;
}
this code helps me to move movieclip. its ok but when it reaches 20 then i want to be stopped how can i do so ?
Please help me.
thanx in advance
waiting
How To Stop Movieclip From Playing?
Hi, newbie here. I have a problem stopping or unloading a movieclip. I created an empty movieclip in my main timeline and loaded another movieclip(notswf) into it using the code below.
this.attachMovie("levitate", "home", 2);
stop();
I put the above code in the first frame of my main movie as i want the movieclip "levitate" to start playing automatically
(levitate is the name of movieclip i want to attach)
(home is the name of the empty movieclip)
It works. However how do I stop this movie from playing when I go to another frame or page? Thanks in advance.
Stop An Action/movieclip?
hi! i'm new in flash mx actionscripts. i've just got this matrix code from a website and i would like to know how can i stop this code from appearing in other frames or scenes. i'm planning to add this code as an intro of my report in school. i've been looking for answers to my question but still i can't find one. hope you can help me.
ActionScript Code:
_quality = "MEDIUM";
// fade out and stop when _alpha inferior to 35 - no parameters
function fadeOut() {
this._alpha -= 5;
if (this._alpha<45) {
delete this.onEnterFrame;
}
}
// fade out and remove clip when _alpha inferior to 10 - no parameters
function fadeToBlack() {
this._alpha -= 5;
if (this._alpha<10) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
// Create a new clip with a letter in it
// x: _x position ; y: _y position ; size: size of the letter
MovieClip.prototype.createLetter = function(x, y, size) {
// Create and position the new clip
var mc = this.createEmptyMovieClip("letter"+this.dep, this.dep++);
mc._x = x;
mc._y = y;
// Create a new TextField in the clip
mc.createTextField("t", 0, 0, 0, size, size);
// Choose a random letter
var myChar = Math.round(Math.random()*87)+36;
mc.t.text = chr(myChar);
// Create the TextFormat, format the text and embed the font
var tf = new TextFormat();
tf.size = size;
tf.font = "Arial";
tf.selectable = false;
tf.color = "0x00ff00";
mc.t.setTextFormat(tf);
mc.t.embedFonts = true;
// Fade the letter until its _alpha = 35
mc.onEnterFrame = fadeOut;
};
// Create a trail of letters
function createTrail() {
// Create new clip and position it randomly
var clip = this.createEmptyMovieClip("trail"+i, i++);
clip._x = Math.round(random(Stage.width)/10)*10;
clip._y = clip.y=-10;
// Choose a random size for the letters, and set the spacing
var size = random(10)+15;
clip.spacing = size+2;
// onEnterFrame, create a new letter that will wade out.
// if we're at the bottom of the screen, fade out the whole trail
clip.onEnterFrame = function() {
this.y += this.spacing;
this.createLetter(0, this.y, size);
if (this.y>Stage.height) {
this.onEnterFrame = fadeToBlack;
}
};
}
// Create a new trail every 100 milliseconds
setInterval(this, "createTrail", 100);
Stop MovieClip Sound
On my stage, I have a movie clip with the instance name drums1. Within this clip there are two frames with a stop command on each of them. Also on the second frame there is a sound attached and the sync is set to event and loop. I have the following code on the main timeline. I want the sound to turn on and off, but it won't. The movie clip does switch from one and two but the sound doesn't. Suggestions?
Joe
Attach Code
function playDrums(event:KeyboardEvent):void {
if (event.keyCode == 49) {
if (drums1.currentFrame == 1) {
drums1.gotoAndPlay(2);
} else if (drums1.currentFrame == 2) {
drums1.gotoAndStop(1);
drums1.stopAllSounds;
}
}
Stop (no Loop) Movieclip?
im using an animated movie clip for my timeline that i want to animate the first time, and then stop. i do not want it to loop. how do i do this?
thanks
washer
Cant Stop A Movieclip That Has Actionscript
i have in 'Scene 1' a movieclip that is animated in actionscrpt and when i jump to 'Scene 2' everything desapears except this movie clip... i want the movie clip to disapear to... how can i do it?
How To Stop Movieclip Of Gun With Actionscript?
Hi Everyone,
I am fairly new on kirupa.com wich i think is a great resource for the flash/macromedia community, i am a Graphic Designer from The Netherlands and a beginner/intermediate user of Flash MX, at the moment i am working on personal site for animated short film in Flash MX, i've got a gun as the navigation structure that fires bullets when users click on the buttons those small bullets turn into big bullets to load external .swf content into, however i want to do animation of a gunclip sliding into the gun before user can navigate.
Making the animation i've converted part of the gun into a Movieclip and made simple animation of bullets sliding into gun, but when i use the actionscript (stop the animation keeps repeating (loop).
My question : "How do i stop the Movieclip animation from repeating using actionscript (stop; ?)"
Take Care!
DEGEIT
Movieclip Stop Playing
ok, i'm trying to get a movieclip within a movieclip to stop playing when it reaches its last frame.
let me describe my problem:
it should start playing when the user rolls over the movieclip that is containing it(i'll call this mc1, and the movieclip within it mc2). i've put a stop action in mc2's last frame but it won't stop and plays again and again. one thing i should point out is that there is a variable in mc1 that tells the movie whether it's ok to play the movie in reverse when the user rolls over mc1, if this is false, that means that it plays normally(not in reverse). i'm using "play()" to play mc1 when the user rolls over it and this is where i think the problem is; even though the last frame of mc2 has a stop action, it is somehow told to play again?
anyways, this is just a guess, i haven't figured out why or how to fix it. i'm not sure if my explanation was too hard to understand so i'll try to clarify it if anyone wants me to. if anyone can give me a solution, it would be very much appreciated.
-i'll try to upoad a fla asap
Stop (no Loop) Movieclip?
im using an animated movie clip for my timeline that i want to animate the first time, and then stop. i do not want it to loop. how do i do this?
thanks
washer
Cant Stop A Movieclip That Has Actionscript
i have in 'Scene 1' a movieclip that is animated in actionscrpt and when i jump to 'Scene 2' everything desapears except this movie clip... i want the movie clip to disapear to... how can i do it?
How To Stop A Movieclip From Playing?
hi, I have a movieclip that plays continuesly...
and I have a button to stop the clip but the button is inside the different movieclip...
how do I stop the movieclip playing on its first frame?
location of my clip:
_root.mc_playing ---> this is the clip i want to stop on 1st frme.
and
_root.mc_buttons ---> this is my button controls(inside of this I have a stop btn).
thanks in advance.
Stop MovieClip From Looping
well,
I created a MC that fades up.
I place it in the main timeline of scene 1 at, say, frame 60 (the only scene).
I would like the movie clip to fade in and then remain faded up,
however, it keeps looping. Fading up, then fading up again.
I have tried stop();
I have tried end();
I have set rewind = false;
I thought that if you put the stop action at the end of the mc it would stop looping.
What could be causing this?
Stop Sound Of Only One Movieclip
I have several movieclips on the stage that contain FLVS. How do I turn off the sound for all but one of the flvs?
is there a way to turn off the audio for one movieclip on the stage without stopping all sounds?
Simple Question? Rollover Stop
Can someone please help with this very simple question?
Attached is a .fla of what I am trying to do.
Basically theres a movieclip anim inside a movieclip. It moves right to left and I want it to stop when I rollover.
What am I doing wrong??
Very Simple Scroll Bar That Won't Stop Scrolling
hey,
I have made a very simple scroll bar (attached). And it works fine. I stops scrolling where i want it to stop. But, when i export my "info.swf" file, the file that has the scroll bar, and load it into another movie, then my scroll bar scrolls continously. I don't know what i am doing wrong.
Baljinder
|