ActionScript 2.0 :: Play To And Stop (character Movement MC)?

Jul 16, 2004

I have a MC which is a lady that raises her arms up and down. From the main timeline i want to tell that "ladyMC" (also sitting on the main timeline) to play to and stop on specific frames. I have tried it two different ways but am obviously missing something. The first way i tried just using an if/else and getting the current frame #.

Code:
if(lady._currentframe < 22){
lady.play();

[code]....

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Collision - Character Shall Stop Movement If He Hits A Geometry

Aug 7, 2008

am pretty new to Kirupa and Flash. I have a little problem, concerning a character hitting a wall. What i have: a char that can jump and move around by the arrow keys. What i need: character shall stop movement if he hits a geometry. But being able to start movement again, besides through the geometry. I'd like to reach this with gskinners CheckForCollision class. Have a look here: [URl] But i didnt manage my code to get it work. So maybe you could leak me some information on how to get this done. Heres my code so far:

[Code]...

edit admits: so far i have a character mc called "player" and one called "level". i would apply the code to the player, and it would be cool to have the possibility to check collision of the player with multiple MCs, not only the level.

View 2 Replies

ActionScript 3.0 :: Character Animation - When I Press Left Or Right Key - Draw Each Frame That Makes Character Movement?

Sep 24, 2010

I have a 9 frames image of a character.In other language generally i used to make character animation by looping the array consisting of different frames and drawing each frame when pressing key.What i want to do is when i press left or right key, i want to draw each frame that makes character movement and update x coordinates of frames, and it will appear as character is moving.

View 4 Replies

ActionScript 3.0 :: 2D Character Movement With Camera Movement

Jun 10, 2011

how to get the camera to move with a character? At the minute he just moves off screen when i press right rather than the camera following him.

View 3 Replies

ActionScript 2.0 :: 8-way Character Movement?

Mar 14, 2011

Right now I have all the animations for each direction in a movieclip within one movieclip.However, when I use the arrow keys to move the walking animations don't playWhen I stop, the appropriate animations play, however. Here is my code:

Code:
onClipEvent (load) {
facing = 1;

[code]....

View 1 Replies

ActionScript 2.0 :: Character Movement Flash Mx?

Jun 11, 2005

i have made the movie clips for my character walking in 4 different directions but i have no idea how to make it so when the up arrow key is pressed, for instance, the movie clip of my character walking up is played.

View 7 Replies

ActionScript 2.0 :: Character Movement Script

Dec 17, 2011

my movement script looks like thisActionScript2.0)

[Code]....

View 1 Replies

ActionScript 2.0 :: Drunk Moving Character To Be Able To Catch Character And Play A Scene From Within The Drunk Characters Movie Clip

Jan 13, 2004

I would like my character to move as if he was drunk I am unsure how to do that I am using the keyboard for his movement. I also have a character that moves at random I would like the drunk moving character to be able to catch this character and play a scene from within the drunk characters movie clip but I want this character to try and escape the idea is the drunk character gets points for how long he is able to hang on to this character

View 2 Replies

ActionScript 2.0 :: Bar - Play And Stop Button To Play And Stop Frames In A Flash Movie

Dec 1, 2004

give me the actionscript for a bar that has a play and stop button to play and stop frames in a flash movie. i would be gratefull if you could as i am really stuck

View 2 Replies

ActionScript 2.0 :: Character Movement Script For A Game?

Apr 15, 2010

I'm sorry if this is the wrong section. But I'm looking for help with my actionscript coding. I'm fairly new to Flash. I've only scripted some simple websites so far and this is the first time I try to make a flash game. I started yesterday but I'm already having problems with my script.

I have a scene with 2 layers: one with my character and one with the bounds (ground, ceiling and walls).

Inside my character movie clip, I have this: Which is basically a bunch of frames labeled and with the action to stop();. Each one containing another movie clip with the respective animations. So the idea was, when I press "A", jump to "walk left". And it kinda worked, but I have some problems and I'm not really sure how to solve them.

[Code]...

View 2 Replies

ActionScript 3.0 :: Making Iphone App Character Movement?

Aug 24, 2010

1. Character Movement: as you know the iPhone/iPod touch doesnt have any sort of keypad and so when creating a game that has character movements onscreen buttons need to be used. My question is this; how exactly do i make it so that when the player taps/holds down a button (is the same as mouse clicking it) my character moves.
 
2. adding a physics style fall: once i have created this movement using on screen buttons i now need to create a jump, so what i need is something so that when the player clicks the "jump" button the sprite moves up a certain amount and then stops moving up and falls down.

View 2 Replies

ActionScript 3.0 :: Character Movement And Shoot Not Working?

Nov 8, 2009

I'm doing a simple game where you move the character using the arrow keys and shoot using the Mouse. The character rotates based on the Mouse angle. I have two problems: when I move the character, he moves once, then stops then moves again as normal. My other problem is that when I click over a MovieClip, the bullet goes to the wrong angle.My moving function:

Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyHandler);
function keyHandler(event:KeyboardEvent):void {

[code]....

View 2 Replies

ActionScript 3.0 :: Floor Not Recognised By Character Movement?

Feb 8, 2010

I am designing a character to move right and left but the character is not recognising the floor movieclip and is falling straight threw the floor.I have attached a zip file with the flash document sample and associated Actionscript file.

View 2 Replies

ActionScript 2.0 :: Restricting Game Character's Movement?

Aug 9, 2010

1. How do I prevent my scuba diver from leaving the screen? As when i hold either up, down, left or right long enough he will leave the stage entirely.2. How can I make my sharks enter the screen at random rather than having them enter from the same position each time? Here is my code:

(FOR MY SCUBA)
onClipEvent (load) {
xspeed = 10;

[code].....

View 3 Replies

ActionScript 3.0 :: Flash Character Random Movement?

Feb 24, 2011

I want to make my character moves randomly that is character will base on random numbers(for example generate 4 random numbers) and character's favorite(for example fast food, west food, Chinese food) to move. The character will move randomly with 4 direction that is move up, move down, move right and move left(any speed will do). Should i have four function with four movement.

View 1 Replies

ActionScript 2.0 :: Character Movement Though Rotating Round Surface?

Feb 10, 2008

i want a character to move on a globe. the movement of the character is shown though not by shifting the positions of the caharcter but by the rotation of the surface of the globe. buttons are used to move leftward and rightward.

Also, there are three layers of the globe to show depth. how would i script it so that the layers of the globe rotate at different speed?

i've uploaded a zipped of a fla file.

View 3 Replies

ActionScript 3.0 :: Character And Background - Creating Illusion Of Movement

Mar 12, 2009

Right basically I have a character and a background. The background scrolls as you press left or right on keyboard to create the illusion of movement. I want the character to flip when you change from holding down left to right and vice versa, but when I do the following code it doubles the size of the character once and then it stays. It flips fine but in the transformed fat size.

Here's the code:
var mySpeed:Number = 10;
function keyIsDown(evt:KeyboardEvent):void{
if(evt.keyCode==Keyboard.RIGHT){
walkingPlane_mc.x+=mySpeed;
greyCharacter_mc.scaleX=-1;
[Code] .....

View 4 Replies

ActionScript 3.0 :: Running Movement Of The Character And The Second Frame Is On Standing Position

Dec 20, 2010

RIGHTNOW, Im doing my game development but I have problem based on my game control.this is my question..
 
I have two frames. the first frame is on running movement of the character and the second frame is on standing position.This two frames has only one kind of character,but I seperated the two movement in two frames witch are running and standing positon.my problem is how can I do the mouseEvent,if onclick the character will continue on running and if on release the character will do is to standing position.

View 2 Replies

ActionScript 3.0 :: Codes They Are Using A VerticalChange Variable For The Time-based Character Movement?

Jun 2, 2009

sample codes. In those codes they are using a verticalChange variable for the time-based character movement.But I can't figure out how this code works and why we needthose calculations - char.dy*timeDiff + timeDiff*gravity?So here is the code:

Code:
// assume character pulled down by gravity
var verticalChange:Number = char.dy*timeDiff + timeDiff*gravity;

[code]....

View 4 Replies

ActionScript 2.0 :: Movement - How To Stop The MC

Oct 14, 2003

I'm doing a tut to learn animation through AS, but can't figure out how to stop the MC

[Code]....

View 14 Replies

Professional :: Character Amimation- Stop(); Not Working?

Apr 2, 2011

I am trying to write code for my char animation. in the scene I have 4 layers: character, sky, ground and actions. all are to symbols(except actions of course) .For my character symbol(movieclip) I have one still frame as default, 2 walk cycles, and a jump. all done on a timeline. the main problem im having is that it doesnt stop, as it is supposed to, on the first default frame.

i put stop(); in the first frame of the movieclip and wanted to do my code in the actions layers in my scene but this stubborn character will not stop and I dont know what to do.....

View 3 Replies

AS3 :: Flash - Stop Character From Moving Through Walls?

Oct 9, 2011

I want to stop the movieclips movement when it hits a wall (another movieclip). The example below works, but after the collision the movieclip 'blocks' all movement to the left...

For now the example with the leftArrow key;

variables to check the key, if it's hitting the walls and if it's moving or not:

var leftArrow:Boolean;
var speed:int = 10;
var hitting:Boolean;

[Code]....

View 2 Replies

ActionScript 2.0 :: Stop Playable Character From Moving

Jun 6, 2011

I am trying to limit the area in which the character (mcMain) can move I want to be able to keep it in an area (mcBuilding) I also have another area (inwhich the character is not supposed to get to) (mcBackground). (Also I want to be able to to make a dynamic text box that starts at 100 then decreases by 5 when the enemy (mcEnemy) hits mcBuilding and also that it gets removed)

View 1 Replies

ActionScript 2.0 :: Stop Movement Needed!

Aug 19, 2005

i need that the word stop moving when i make a rollover on it and in the rollout make the word continue with the falling, the fla file its attached

View 4 Replies

ActionScript 2.0 :: Stop This Movement At A _x Postiiton?

Oct 12, 2005

I have a movie clip that is moving dynamically with this code.

Code:
onClipEvent(enterFrame) {
speed = -5;
this._x += speed;
}

how to stop this movement at a _x postiiton.

View 4 Replies

ActionScript 2.0 :: Scripted Movement How To Stop ?

Mar 29, 2006

so i have a MC called "pala" and a button called "nappi" .. i have the following script in the first frame of the movie and everything works how it should, but how do i get the "pala" stop moving when it reaches the property -307 ?[code]

View 5 Replies

ActionScript 2.0 :: X-axis Movement And Stop?

Jun 12, 2006

I'm working on a website and I have a movieclip that I want to move, but it would be easier to have actionscript control the movement. I need it to slide up along the y-axis for a certain amount of pixels and then stop, preferably even being able to set how long it'll take to go from point a to point b. does anyone know the script for this?

View 10 Replies

ActionScript 2.0 :: Stop The Movement At A Particular Location?

Jul 20, 2003

In moving with actionscript, how do you stop the movement at a particular location?

View 1 Replies

ActionScript 3.0 :: Get Main Timeline To Stop In The Beginning On Button Press To Play And At The End Stop Again?

Feb 1, 2008

I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly.

The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either.Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3.

View 9 Replies

ActionScript 3.0 :: Stop The Movement Of A MC At Original Position?

Apr 21, 2010

I have a movieclip instance named "ground" i have it set up so that the ground moves constantly to the left as a scrolling BG. what I want is that when the user presses the "space" button, the ground moves down then back up in a a parabolic path. and it does. but I want the movieclip to stop moving vertically(make dy equal to zero) when it returns to its original y position. how can this be achieved?

Code:
package{
import flash.display.*;

[code].....

View 2 Replies







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