ActionScript 2.0 :: Set Movement Speed On Any Particular Movement?

Oct 2, 2002

I have a Mogli (Junglebook-like) Character that i got to move with the arrow keys on the keyboard.

I want the character to jump (so for example , he must while moving to the right of the "gamearea" , you must be able to hit a key (say for example the "control" key ) and then the character must jump ( go up ) and as soon as the key is released he must obviously come down.

And also how do one set movement speed on any particular movement.

View 12 Replies


Similar Posts:


ActionScript 3.0 :: Movement - Click A New Key The Speed Increases

Feb 15, 2009

I have made it so you can move with the arrow keys and that works out great. But, every time you click a new key the speed increases for some reason which i do not want. I want it to go in the direction with the same speed.

[Code]...

View 3 Replies

ActionScript 1/2 :: Constant Speed Movement Of Object?

Apr 20, 2009

I am trying to get an object to track my mouse on press and i am using a tween. However, the nature of the tween is such that the time taken for the object would move would always be constant despite the distance.
 
I would like to make the object travel at a constant speed regardless of the distance. Is it correct for me to use a tween? If not what should I be using?The code for my tween is as follows.
 
map_mc.tracker_mc._x = map_mc._xmouse;map_mc.tracker_mc._y = map_mc._ymouse;startx = map_mc.crosshair_mc._x;endx = map_mc.tracker_mc._x;starty = map_mc.crosshair_mc._y;endy = map_mc.tracker_mc._y;
trackTweenx = new Tween(map_mc.crosshair_mc, "_x", Regular.easeIn, startx, endx, spd, true);trackTweeny = new Tween(map_mc.crosshair_mc, "_y", Regular.easeIn, starty, endy, spd, true);
 
map_mc.tracker_mc is the mouse cursor that would appear when onPress while the map_mc.crosshair_mc is the object that would track my cursor's movements.

View 1 Replies

ActionScript 3.0 :: Create That Effect - Keep Movement Speed?

Oct 2, 2010

I have been trying to find a way to make an object that is being dragged keep the speed and angle of the dragging movement, I have been trying some physics libraries but I want to know the basics to create that effect,

View 3 Replies

ActionScript 2.0 :: MC Movement At Constant Speed Without Tween?

Apr 18, 2010

I am trying to write a script to move a ball MC smoothly across the stage, without using tweens. I have thus far been successful, but there is one problem: the way I have it set up, speed increases with distance! I need the speed to remain constant. I understand why, but I can't figure out what approach to take to make the speed constant.

ActionScript Code:
var speed = 100;
var newx, newy, distx, disty, speedt;[code].....

View 2 Replies

ActionScript 2.0 :: Variables According To Mouse Movement Speed?

May 16, 2005

Can I stablish variables according to the speed the mouse move from spot A to spot B?

View 1 Replies

ActionScript 3.0 :: Set Random Movement / Rotation And Speed With Array

May 10, 2008

I have a rock movieclip that is in an array and a timed function that places an instance of the rock on the stage every 5 seconds. So every 5 seconds a rock is placed onto the stage. What I want is when a rock is placed onto the stage it rotates either clockwise or anticlockwise. So every 5 seconds a rock appears and it will rotate either clockwise or anitclockwise. I also want the rocks to rotate at a random speed. So every time a rock appears its rotation speed will be different. I also need the rocks to move in a random direction. So every time a rock appears it will travel in a different direction to the previous rock.

View 5 Replies

ActionScript 2.0 :: Controlling Speed/movement With Inside A Loop?

Jul 26, 2007

I am currently working on a Flash application in which I have several vertical bars that go across the window, and when one of the bars is clicked on, the others move to either the left or the right to create space to the right of the selected bar for a large image.[URL].. I have already written enough of the script to get the bars to move to where they should be when they are clicked on, but they do it instantly--there is no show of movement between point 1 and point 2 (this being the starting and ending x coordinates for each movieclip).

If you're wondering about any of my number values, they are the way they are because the document is 800 wide, it has 5 vertical bars within it, each of them 30 wide, and the bars are 5 pixels apart when placed next to each other. Anyways, here's the script I am currently working with:

[Code]...

With this code, all the speed variable does is determine the length of the pause before the bar goes from its original x coordinate to its final x coordinate. I have tried to replace the line that reads "clip3_mc._x += speed;" with several variations ("clip3_mc._x ++;" , "clip_mc._x = clip_mc._x + 15"), but I don't think that's the issue.

View 1 Replies

ActionScript 2.0 :: Detect The Speed Of The Movement Of A Dragged Object?

Aug 30, 2004

I use something like this code to detect the speed of the movement of a dragged object

PHP Code:

if (!go) {
this["position_"+i] = this._y;
 i++;[code]....

This way I can find in what direction the mouse vertically has moved and at what speed. The problem is that every once in a while the speed will be in the opposite direction. What do people use to detect the direction of the movement of the mouse?

View 2 Replies

ActionScript 2.0 :: Circular Movement To Linear Movement - Carousel To Conveyer Belt?

Jul 9, 2010

I've been playing with carousel code, and was wondering how to change it from circular animation (carousel) to left/right linear (conveyer belt) style animation, how to change the mover code and 't.angle = i * ((Math.PI*2)/numOfItems);'

[Code]....

View 1 Replies

ActionScript 3.0 :: Configure The Speed Of Movement Tween By Pixel Per Period?

Oct 15, 2010

is there any Class available to set the speed of the movement tween by pixel per cetain period?because, if using the standart Tween function, the speed is set by the lenght per certain period.later on if i want to adjust the original and finish state, the speed of the movement became different because the period is the same, but the lenght is chaged.

View 3 Replies

ActionScript 2.0 :: How To Control Multiple Clips Mass Speed Movement

Jun 2, 2004

How to get mass speed movement like in this intro site. [URL]. How to control the multiple clip mass speed movement....using actionscript.

View 12 Replies

ActionScript 2.0 :: Animate Movement Of Cylinder Going Non Stop Up And Down And With Possibility To Change Speed

Apr 8, 2009

I tried with AS2 to animate the movement of a cylinder going non stop up and down and with possibility to change speed. I managed the sliding down and the acceleration of the cylinder but it does not recognize the limit where it has to stop and make the movement backwards to starting position.[code]

View 1 Replies

ActionScript 2.0 :: Flowing Mc Movement Opposite Of Mouse Movement

Feb 12, 2003

I have a mc (fStrip) which looks like a piece of filmstrip with thumbnail images in it. I want this mc to move when the users mouse is positioned over it, but I only want it to move only along it's x-axis and in a direction opposite that of the mouse. And I want it to move or flow smoothly.

I've been trying to figure this out (see my lame attempt below) but without much luck.

onClipEvent (mouseMove) {
buffer=20 //movement buffer
mousePos=_root.fStrip._xmouse //store mouse position
if (mymouse!=_root.fStrip._xmouse){ //if the mouse has moved

[Code].....

View 3 Replies

ActionScript 2.0 :: Ants Movement (based On Snow Movement)?

Jun 22, 2004

I wish to get the effect of ants scuttering across the screen or up a tree, I have not decided which direction yet. I started with the tutorial code for the snow effect from kirupa, and changed it around to fit the little vector ant I created. The way I have it now looks pretty good, but the movement is a little too fluid. They obviously move in sinusoidal paths bc the code tells them to. I have about 20 copies of the main obj, and they're all a little different in size and specs (speed, transparency, etc) but what I was wondering was if there is any way I can change the code to make it a little more hectic, or erratic, not so fluid. If there is no way of doing so, it looks pretty good right now. If there is, however, I think it could look awesome. here's the code I'm using for the object.

onClipEvent (load) {
//stage
movieWidth = 850;
movieHeight = 50;

[code]....

View 5 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 :: Random Movement AND Random Speed?

Dec 15, 2004

So I got this from the tut on this site and it's works great.I can't figure out though how to make the speed random as well as the movent. I want all my little clips to move at random speeds in adition to direction.

[Code]...

View 4 Replies

Movement Across The Page?

Nov 11, 2009

I have a project in flash. The most simple part of the animation renders horribly. I am trying to get the animation of the year 2009 in letters that occupy most of the 500x500px screen to go from left to right. No extra movement. no twisting. nothing special. just sliding left to right. I tried making the file a bitmap, vector art, creating the actual image in flash. Everything comes in with lines through them in some places that come and go away as the image progresses through the screen. It also looks like the image stumbles a little but then keeps going, if you are really lucky, you'll be able to see a few lines running through the letters, but they dissapear right away. The is nothing interfering with the timeline, I have tried setting the fps rate from 12 to 30 to 60 to 120. It gets better but does not eliminate the problem. I tried reducing the image size down to small letter less then 1/5 of the screen, but still the problem persists. I really need the letters to be large on the screen and flow across smoothly. I also tried importing the file as a whole 2009, tried importing numbers seperatly 2, 0, 0, 9 and have them float, i tried making an object in flash that is not a number - but just a rectangle, it has the same problem.I also tried animating it in different ways - creating a starting keyframe and the last keyframe and creating a motion tween between them (the normal regular way). I tried placing a few keyframes in the middle and linking them all. I tried creating keyframes for every frame within the animation, which actually made it run the smoothest.
 
The file I included has just the 2 moving across the page at 120 fps, with a keyframe in every frame of the animation. I am starting to think that the rendering in not the issue of flash but rather of the lcd screen's refresh rate, video card and ram, as well as other mechanical factors. However the not-so-technical-clients need to be satisfied .

[Code]...

View 3 Replies

ActionScript 2.0 :: Movement Using _x And _y?

Feb 17, 2003

following codes are for making a "circle" move along all four edgesof the screen...but some codes are missing..please add some more codes so that my circle(MC) finish its journey..1..go right..2 go down..3 go left and finally go up...to where it first started...

onClipEvent (load) {
this._x = 10;
this._y = 10;

[Code].....

View 1 Replies

IDE :: 3D-movement On Mouseover?

Aug 19, 2009

How to do the movement like at the following site [URL]

View 7 Replies

Rotate With Mouse Movement?

Jul 15, 2009

I'm trying to make a dummy from a circular menu that reacts (rotate) to mouse movement, I uploaded a fla example, different colors, size, etc, but essentially the same in

function; but for now I'm freezed how to do somethings, I'm not a programer or actionscripter, but I want to learn.Currently using CS3 and AS2, downloading the FLA example may help.

Ok, in the "fla", you will see a circle who rotates versus mouse movement (I would like to make a delay rotation for a smooth feelling when mouse is moving, those like "_x += (_xmouse/5)" but with rotation. Other thing I would like to do,is... that the movement stops progressively a few degrees before the mouse reach de cian angles(a1,a2), and then, the circles doesn't move if the mouse is moving under those angles, like a... an inactive area(U1), and if it could work with instances.

View 1 Replies

Posible To Try To Simulate A Movement Of Car

Apr 26, 2010

i have a lateral and a backside pic of a car (i have Attached), and i would like to know if it is posible to try to simulate a movement of the car, turning until to see its back side.

View 3 Replies

ActionScript 1/2 :: Limit The Movement Of Mc?

Jun 14, 2010

i have a movie clip moving randomly...but i would like to put a limit or boundary on its movement... the problem is...the bondary is a round area and i don't know how to calculate the area...
 
is it possible to make a script that says...while inside this certain object, they will move randomly...
 
as of now this is my code:

[Code].....

View 15 Replies

ActionScript 3.0 :: Y Direction In Movement?

Feb 11, 2012

I posted a thread last week and I get a code that give me possibility to move circle in the stage and when it got to the end of the stage it turn around and change it's way. but the code was only for X direction but I want to use it in Y direction too, to move the circle diagonal. I put the code down here. me to add Y position guide me how to add.

ActionScript Code:
var circles:Array = new Array();
var quantity:int = 2;

[code]....

View 2 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

ActionScript 2.0 :: Resizing Instead Of Movement In Phy. Tut?

Feb 11, 2004

I read the actionscript tutorial on how to make a elastic type animation and I have a question (duh!). Is there a way to resize and move instead of just being able to move the stuff. I want a box that slides to a new area but also gets bigger and I am not very good with math or very great with as. I have also attached the file I am working with.

View 2 Replies

ActionScript 2.0 :: How To Random 'y' Movement

May 8, 2003

i've applied the following script to a movieclip to change its 'y' coordinate randomly at run time and it works fine but i'm also trying to control the maximum 'top' and maximum bottom 'y' movement for which the value should be: top = 40 and bottom = 400. so it only displays randomly between 40 to 400 'y' coordinate. could you tell me how can i implement this in the following script?

onClipEvent (enterFrame) {
_x -= 4;
if (_x<=-2247) {

[code]....

View 3 Replies

ActionScript 2.0 :: Detecting End Of Movement?

Nov 21, 2007

I have an mc that moves into position after a button is pressed. I would like a seperate mc start playing after the moving mc stops.how this can be achieved? I have attached a sample .fla file that has the parts that are needed.The file was over the allowed limit so I have uploaded it here:I would like the mc 'red' start playing after the mc 'longBar' stops moving. The mc 'longBar' starts moving after the gray square button is pressed.

View 2 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 3.0 :: Formula For 3D Movement?

Nov 7, 2011

I've been trying to look this up but not had any luck so far. I'm trying to make a simple pseudo-3D app, but I'm stuck on how to pull off the movement. If I have an object with x,y,z coordinates, and its movement speed, pitch, and yaw, what formula would I use for movement? So for example, if the object is at 0,0,0, moves 6 units per frame, and has pitch 30 degrees and yaw 15 degrees, what will be its coordinates next frame?

View 1 Replies







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