ActionScript 2.0 :: Stop Movie Clip Going Off The Page

Mar 11, 2010

so im basically in the very early stages of building my very own version of space invaders i have made the gun emplacement go from left to right suing the arrow keys on the keyboard but when they reach one side they continue off the screen ive been looking at different things to fix this but nothing is sinking in my original code i made for the gun was

MjtGun.onEnterFrame = function() {
if(Key.isDown(Key.LEFT)) this._x -=5;
else if(Key.isDown(Key.RIGHT)) this._x += 5;
}

stop it from continuing off screen?

View 2 Replies


Similar Posts:


Stop A Movie Clip From Looping And Move To Another Frame/movie Clip?

Jun 30, 2009

it isn't such a big problem bur for a beginner like me it is.I have a movie clip called "Lion_beginning_mc", inside of it I have 3 Key Frames and Inside each and one of them I have different shapes.For example:Key Frame number 01 - DogKey Frame number 02 - CatKey Frame number 03 - MouseI want to move this movie clip "Lion Beginning_mc" form Key frame number 1 to Key frame number 20.I want the Dog,Cat and a mouse to change between each other only once while moving from Key Frame number 1 to 20.And then when the movie clip "Lion Beginning_mc" reaches his goal another movie clip or a frame (with a shape) will start.

View 5 Replies

ActionScript 3.0 :: Gallery Page With A Bunch Of Page Numbers - Click On A Page Number, The Over Script Should Stop Until Go To Another Page?

Jan 26, 2009

i'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,

function over(event:MouseEvent):void {
this.gotoAndPlay(30);}
function out(event:MouseEvent):void {[code].....

View 0 Replies

ActionScript 3.0 :: Symbol Movie Clip Plays In Loop Despite Stop() In Clip?

Jun 14, 2010

I am importing a movie clip as a symbol from a SWF using Embed to a AS3 program and, after attaching the movie clip to the stage, the movie clip keeps repeating. Before you ask I have indeed creating a script layer and put a "stop()" on the last frame. In fact the swf containing the symbol works perfectly fine when executed on its own or in Flashdevelop (my choosen IDE). Its only when imported does the clip keep repeating.Here is the code:

Code:
package {
import flash.display.*;

[code]......

View 2 Replies

ActionScript 3.0 :: Stop A Single Movie Clip In Flash And Other Movie Clips Still Looping?

Nov 22, 2010

how to stop a single movie clip in flash and other movie clips still looping. I tried stop(); and myclipname.stop(); both are not working. I attached a simple file,

View 0 Replies

ActionScript 2.0 :: Stop All Movie Clips Inside A Movie Clip\/

Feb 24, 2006

Is there a way to do stop/pause all the movie clips inside a Big movie clip? I wanna control the movie clips as well with a slider. Yes i can control the Big movie clip yet i couldn't control those movie clips lie inside that Big movie clip.

View 9 Replies

Flv Movie Player Scales Along With Page - Stop Scaling?

Mar 29, 2010

I have a website which im designing exclusively in flash. The project size is 1000x500. The video which im using is 320x150. On the stage ive set the player to 320x150. The stage size is 1000x500 (thats the size and span of the website). When the page works from the internet. It expands to fill the screen of the viewing computer. Which is what i want anyway since Ive set my publish settings to get this. But the video player gets scaled along with the page that scales to occupy the viewing screen. So when the player becomes a little larger than its orginal size the video looks low quality. Is there a way that the player alone could be set to maintain its orginal size of 320x150 and not scale because this is causing the video to get distorted and pixellated ?

View 1 Replies

Flashvars To Stop Movie Reloading On Page Refresh

May 13, 2011

I have a flash banner on every page in my site. I want it to continue playing rather than reloading when users change pages. Ive read that this can be achieved using flashvars.

I have this on frame 1 of my fla file now:
var mySharedObject:SharedObject = SharedObject.getLocal("displayCookie");
if(mySharedObject.data.displayed == true){
gotoAndPlay(currentFrame);
trace("cookie found");
[Code] ....

But I don't know how to give the currentFrame the value it had at the time the page was refreshed. How do I put that in there?

View 2 Replies

Movie Clip Won't Stop()

Apr 9, 2009

I have a movie clip starting in scene 1, frame mc_text In its own time line, mc_text contains a classic tween of mc_text2 which fades in text going from alpha 0% to alpha 100% I tried an action: stop(); within mc_text ( on last frame, a keyframe)And I entered an instance name for mc_text: inst_text, which I stopped with a keyframe in scene one inst_text.stop();My shape tween stops, however - that clip keeps on looping no matter if I make it a motion or classic tween.

View 1 Replies

ActionScript 3.0 :: Stop A Movie Clip?

Jan 25, 2010

I've got timer below and after sometime he calls function credits. [code]...

...but I don't know how to stop that movie clip. I tried to put stop(); at the end of the movie clip but it messes up the whole fla.

How do I stop the movie clip. The end has label "theEnd"

View 1 Replies

ActionScript 3.0 :: Can't Stop Movie Clip

Mar 16, 2010

My ActionScript is calling a movie clip to the stage but the movie clip is looping and I don't want it to. I have put the "stop();" code into the movie clip. Is there another piece of code needed in AS3 or could it be another problem?

View 3 Replies

Can't Stop Movie Clip From Cycling

Apr 10, 2010

I have a movie clip in frame 1 of a scene. The movie clip continues to cycle. I've tried everything I can think of but I can't get it to stop. where to put the script and what it should say?

Flash CS4, ActionScript 3

View 4 Replies

ActionScript 3.0 :: How To Stop A Movie Clip?

Dec 14, 2008

I have used Flash CS3 for a while, and just upgraded to CS4...This is where i am either missing something, or just not looking in the right place.. I have a basic stage...4 graphics in the clip ( converted to graphic symbols ), each on their own layer..Each layer is using a motion tween.

What i would like to find out how to do is that when the clip gets to the end, to just stop. At the moment, when i upload the .SWF file to a webpage, its running in a loop, continuous....I used to do this in CS3 by adding a " stop() " command on the last keyframe....How do i now get the movie to stop in CS4?? I am at a lost, even after trawling the internet for hours today...

View 2 Replies

ActionScript 3.0 :: How To Stop Movie Clip

Jan 25, 2010

I've got timer below and after sometime he calls function credits...

Quote:
var wait:Timer = new Timer(3000);
wait.addEventListener(TimerEvent.TIMER, credits);
//Start the timer
wait.start();

[Code]...

View 6 Replies

ActionScript 2.0 :: Stop A Movie Clip?

Jun 9, 2010

If i have a movie clip with a button in it and another movie in that...so say a ball that bounces and when you click it it pops and a movie clip that is looping behind it (numbers, score) stops... I want the score movie clip that's hidden behind it looping to stop as the ball is squashed... what is the .as? the code i have on the frame at the moment is

this.pop_mov.onPress = function() {
pop_mov.gotoAndPlay("pop");
}

can't i make it stop another movie clip as it is clicked also?

View 8 Replies

Movie Clip Won't Stop In Flash CS4?

Jun 9, 2009

okay this is really getting me mad and i don't know if anyone esle is having this problem. i have made a movie clip in flash CS4 and it keeps repeating. now i know what you are going to say "just use 'stop();' in the actions to make it stop" but for some reason that isn't working. what in the h-e-double hockey sticks is going on here

View 1 Replies

ActionScript 3.0 :: How To Stop A Movie Clip

Jan 25, 2010

I've got timer below and after sometime he calls function credits...

var wait:Timer = new Timer(3000);
wait.addEventListener(TimerEvent.TIMER, credits);
//Start the timer
wait.start();

where he says to my movie clip creditLine to start.

View 2 Replies

ActionScript 3.0 :: Movie Clip As Intro Page?

May 10, 2010

I have a movie clip that I uploaded as an .flv (so I could have the sound) as something on the timeline. I set up a button below the video to skip to the website (or welcomePage)However, I cannot get the button to work for some reason. Below is my script, am I missing something? Also, for whatever reason, now my movie clip does not autoload when it did before...I also do realize that I could probably condense the timeline, but I am just working teaching myself, so bare with me.
 
stop();
home_btn.addEventListener(MouseEvent.CLICK, welcomePage);resume_btn.addEventListener(MouseEvent.CLICK, resumePage);reel_btn.addEventListener(MouseEvent.CLICK, reelPage);photos_btn.addEventListener(MouseEvent.CLICK, [code]....

View 3 Replies

ActionScript 2.0 :: Movie Clip Slow To Stop?

May 21, 2009

I have a movie on the stage called wheel_mc that I want to slow down and stop using action script rather than use easing on the tween in the movie. It has 200 frames and when it gets to frame 100 it starts to slow down and by the time its reached frame 200 its completely stopped.

View 10 Replies

ActionScript 3.0 :: Stop Nested Movie Clip?

Dec 16, 2009

How to stop a nested movie clip. I have a movie clip (instance name: Driver) and within that is a wheel that spins (instance name: myMovieClip). I want that on frame 40 of the main timeline for the wheel to stop spinning. In an actions layer on frame 40,[code]...

View 2 Replies

ActionScript 3.0 :: Stop Movie Clip On Another Frame?

Jan 4, 2010

i have a scrolling image gallery which is a movie clip on one frame and i want it to stop when i navigate to the other frames how can i do this.

View 3 Replies

Stop A Moving Movie Clip Via A Button?

Nov 11, 2010

I am making something like a slot machine and the main number (a movieclip placed in separate layer) moves vertically continuously.I made a button and how do I make the main number movie clip stop moving after pressing the button?Our office has Flash CS3 and all the actionscripts are manually written.

View 1 Replies

ActionScript 1/2 :: Stop Action In Movie Clip?

May 21, 2010

I have a simple movie clip that animates some text and a divider bar. The clip loops which is normal, I want to add a stop action to stop the loop.I have three layers; text, divider_bar, and actions. On the actions layer I placed stop();  on the last frame. This stops the movie clip just fine. But if I rewind and play it again the movie clips stays on the last frame and wont restart. I'm using Action script 2 and have even tried using as 3 with out any luck.

View 3 Replies

Professional :: Why Won't Movie Clip Stop Playing

Feb 21, 2011

I am trying to make a shooting game and I am using the Pistol as a movieclip but it just won't stop playing!

View 1 Replies

Professional :: Movie Clip Start And Stop?

Sep 19, 2011

I am new to AS3 and am trying to work out how to stop a movie clip from playing on mouse click. At the moment I have created a movieclip which plays when the user clicks it, but I now want to be able to stop the movieclip if the user clicks on it again. At the moment I have the following code:
 
stop();bigTree_mc.addEventListener(MouseEvent.CLICK, onClickplayAnimation);
function onClickplayAnimation(event:MouseEvent):void {  bigTree_mc.play(); }
 
The tree animation plays fine, but i want to be able to stop it if the user clicks it again.

View 2 Replies

ActionScript 3.0 :: Stop A Particular Movie Clip On Particular Frame?

Nov 6, 2009

I know this is very simple bt I dnt know how to do in AS3.

I have to stop a movie clip named handle on a perticular frame. I am using _root.handle.stop();

View 1 Replies

ActionScript 2.0 :: Stop Movie Clip After Playing Once?

Aug 9, 2010

This is probably an easy question, but I fairly new at this. How do you let a movie clip play once then stop it on its last frame? I've noticed that you can't use AS on a movie clip frame like you can in the parent timeline. That's what I was trying to do.

EDIT:I figured it out. I just wasn't setting the parameters. I'm going to have a hard time with AS3 LOL

View 0 Replies

ActionScript 3.0 :: Stop And Play Throughout A Movie Clip?

Nov 21, 2010

I would like a certain part of a movie clip to play dependant on the button pressed. And to be honest I am a massive newb when it comes to flash[code]...

This is what I have at the moment and it isn't working, I know this is wrong but i cannot think how to write it the way AS3 would understand it. The Idea is that I would like the Movie clip to play dependant on what button was pressed. So if number one button was pressed it would play frames 1-10 of the movie clip, (and then loop), and if number two button was pressed it would play frames 1-20 of the movie clip ( and then loop). And so on for about 15 different buttons.

View 1 Replies

Flash 10 :: Stop Movie Clip Within Button?

Apr 6, 2011

I have a feeling this is a very simple thing to do, but I just can't seem to find an answer by simply googling it.

I have no other actionscript in this whole .fla file except a stop();

I have a button, inside the button I have a movie clip at the OVER location.

That movie clip simply plays 10 frames, and at the last frame I set the action stop();

All I want it to do is stop these 10 frames from looping, while the scene keeps doing what it does. Instead, as soon as the 10th frame inside that movie clip plays, it stops the whole scene.

View 0 Replies

ActionScript 3.0 :: Stop A Movie Clip's Child?

Jun 20, 2011

I am designing a site which has a movieclip, say parent_mc, and inside that movieclip there is a movieclip child_mc which has a 10sec animation. In the document class I have created an instance of parent_mc and added it to the display list [code]...

Now this adds makes the child movie clip play over and over so I want to stop it right at the beginning, and add eventlisteners to play it. But how can I stop it in the beginning?

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved