Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Movement With Acceleration [renamed]


Heyo!

Ok, i have this kinda difficult question (i think it is..) :


Let's say i have a button, and a movie, when i click on the button, i want the movie to move to another position with an accelerating effect ! How would i achieve this?


For the putton i have this code:

on (release){
instanceNameOfMovie._y = a value;
}


How can i modify it so that it will move to that value smoothly? i mean with an accelerating effect...




KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 01-24-2004, 09:57 AM


View Complete Forum Thread with Replies

Sponsored Links:

Movement With Acceleration [renamed]
Heyo!

Ok, i have this kinda difficult question (i think it is..) :


Let's say i have a button, and a movie, when i click on the button, i want the movie to move to another position with an accelerating effect ! How would i achieve this?


For the putton i have this code:

on (release){
instanceNameOfMovie._y = a value;
}


How can i modify it so that it will move to that value smoothly? i mean with an accelerating effect...

View Replies !    View Related
[F5] Movement With Acceleration
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
moveSpeed = 7;
_root.maincharacter._y -= moveSpeed;
} else {
moveSpeed = 8;
_root.maincharacter._y += moveSpeed;
}
}

How would I modify this code so that when I press 'UP', the 'maincharacter' starts to accelerate upwards. When the 'UP' is de-pressed it slowly starts to deaccelerate then starts to accelerate downwards. Kind of like the physics of throwing up a ball in the air but more exaggerated. HELP! This has been bugging me forever!

View Replies !    View Related
Acceleration Sound With Car Movement
i am making a car racing game and would like to know if it is possable to have it so thet when you press up and the car sound is accelerating with the car so when you slow down it does to and so on! can the be done? if yes how?

View Replies !    View Related
[F5] Character Movement With Acceleration
onClipEvent (enterFrame) {

moveSpeed = 0;
_root.maincharacter._y += moveSpeed;

}

How would I alter this code so that when the 'maincharacter' falls, starting at moveSpeed = 0, it starts to gain more speed (as time or frames pass, whichever is easier). I would think it would be something like (_root.maincharacter._y += moveSpeed+acceleration*time), but I don't know exactly how to pull it off. Thanks!

View Replies !    View Related
[CS3, AS2] Simple Movement With Acceleration
I'm working on making a platformer in Flash and so far have an okay script for making my character speed up to a maximum walking speed quickly, so the movement isn't jerky. The only problem I have is once the variable of the walking speed gets all the way up, it stays this way. If I press the left or right key again, the movement speed is still at 5 so it's jerky and I really want to find a way to have smooth acceleration when moving in my game. I'm trying to implement a way to check if the key is down, so I can set the speed back to 0 if a key is released, but I'm not really sure how. This is my code so far. I'm not sure if I need variables for my left and right speed, but I thought it might come in handy in the future.


Code:
onClipEvent (load)
{
rightSpeed=0;
leftSpeed=0;
}

onClipEvent (enterFrame)
{
if (Key.isDown(Key.RIGHT))
{
rightSpeed++;
if (rightSpeed > 5)
{
rightSpeed=5;
}
this._x+=rightSpeed;
}

if (Key.isDown(Key.LEFT))
{
leftSpeed++;
if (leftSpeed > 5)
{
leftSpeed=5;
}
this._x-=leftSpeed;
}
}


To rephrase my question, how could I do an event like Key.isUp? I know this doesn't exist, except with key listeners but I can't figure out how to use a listener. If someone could help me that would be great.

Thanks
Ethan

View Replies !    View Related
MovieClip Movement/acceleration
Has anybody ever touched on this?

Move a MovieClip object with, let's say, the spaceBar, and set it to increase the speed of the MovieClip, the faster you press the SpaceBar.

If you ever played Track n Field, you know what I'm talking about.

I've started looking around for the code, but haven't had any luck yet.

View Replies !    View Related
Game - Character Movement Problems [renamed]
Hello.

I thought i would have a go at making a platform game in Flash MX 2004.

However i can't get my charecter move
I have tried so much, however, i'm just stupid!

I am trying to script my movie clip so that:

When the key 'E' is pressed the charecter moves right.
When the key 'Q' is pressed the charecter moves left.

When the key 'W' is pressed the charecter jumps.
When the key 'S' is pressed the charecter crouches (either changses to crouching movie clip or squashes current movie script if this is possible.).

When the key 'D' is pressed the charecter moves right while crouched.
When the key 'A' is pressed the charecter moves left while crouched.


I have a charecter that is a movie clip. This is what i want to move.
When the charecter jumps or is in the air i want my charecter to fall down until it reaches a movie clip with the instance name of 'platform'
When the charecter crouches i either want it to change movieclip or sqaush the current movie clip.

The charecter must alwaysbe touching a platform unless if it is jumping


Please can someone help me?

My File
This is what i have. I have removed the actionscript that i had because it didn't work Please can someone tell me what i should put, or even better alter the file for me

Thank You

View Replies !    View Related
Questions About Random Character Movement And Hit Detection For Game [renamed]
Hey every one i was thinking of making a new game where there are rebel smiley men( because i love smileys) and you just kill them and get as high a score as you can.

What i need to know is how i can make them have random movement.
Not just normal random movment but when it decides to walk up it will change to a different frame within the rebel and make it face the direction of its movment.

i also ened to know if when a mc moves into a invisable barrier or the rebels sight that it will try and kill the mc.

Thanks in advance

View Replies !    View Related
Acceleration
How would I go about having a little ball movie clip of mine move around the screen (arrow keys) with acceleration. Like, it speeds up the longer you hold it down and then slowly comes to a stop when you let go.

Thanks.

View Replies !    View Related
Acceleration
Is there a way to add accleration to this code. Basically it makes the object go up with mouseDown and down if mouseUp.

function eF(e:Event):void {
character.y += speed2;}
function mD(e:MouseEvent):void {speed2 = -2.7;}
function mU(e:MouseEvent):void {speed2 = 4.7;}

View Replies !    View Related
Acceleration?
Okay, i have this right now for movement on a shark MC i made:


ActionScript Code:
onClipEvent(enterFrame) {    if(key.isDown(key.RIGHT) and this._x < 400 ) {        this._x +=10;        this.gotoAndStop(1);    }    else if(key.isDown(key.RIGHT) and this._x >= 400) {        this._x = 50;    }    if(key.isDown(key.LEFT) and this._x > 0) {        this._x -= 10;        this.gotoAndStop(2);            }    else if(key.isDown(key.LEFT) and this._x <= 0) {        this._x = 350;            }    if(key.isDown(key.UP) and this._y > 20) {        this._y -= 10;    }                if(key.isDown(Key.DOWN) and this._y < 380) {        this._y +=10;    }    }



how could i go about altering that, so that it would speed up/slow down gradually, opposed to just moving full speed right away? so that it looks more like a fish swimming in water...

View Replies !    View Related
Acceleration?
Okay, i have this right now for movement on a shark MC i made:


ActionScript Code:
onClipEvent(enterFrame) {    if(key.isDown(key.RIGHT) and this._x < 400 ) {        this._x +=10;        this.gotoAndStop(1);    }    else if(key.isDown(key.RIGHT) and this._x >= 400) {        this._x = 50;    }    if(key.isDown(key.LEFT) and this._x > 0) {        this._x -= 10;        this.gotoAndStop(2);            }    else if(key.isDown(key.LEFT) and this._x <= 0) {        this._x = 350;            }    if(key.isDown(key.UP) and this._y > 20) {        this._y -= 10;    }                if(key.isDown(Key.DOWN) and this._y < 380) {        this._y +=10;    }    }



how could i go about altering that, so that it would speed up/slow down gradually, opposed to just moving full speed right away? so that it looks more like a fish swimming in water...

View Replies !    View Related
Velocity And Acceleration...
Does anyone know where i can find good tutorials or open source for acceleration and velocity?i checked flashkit for them and couldn't find any.

View Replies !    View Related
Script With Acceleration?
Hi, what I would like is a small script so that when you roll over a button it tells a movie clip to start rotating, but it would be nice if it started off slow and speeded up over a few seconds, then on roll off slowed down again to a halt. any hewlp would be appreciated...

Cheers,
C

View Replies !    View Related
Acceleration Script
Hi,

I have the below script that moves an object, and slows it as it reaches it's target, but I can't manage to modify it to accelerate. Basically, I want it to do the exact opposite of what it does now. Can anyone help?


onClipEvent (load) {
function deccel (finalY) {
distance = finalY-_y;
_y += distance/4;
}

}
onClipEvent (enterFrame) {

this.deccel(400);

}



Thanks

Barry

View Replies !    View Related
Acceleration Plug-in
Hi,
Does anybody has heard about a plug-in wich accelerate flash movies (I suppose in standalone player) by allowing flash to use open GL acceleration ...some one told me about it but can't find any more infos ...thanks

View Replies !    View Related
3D Acceleration For Flash
I couldn't find a forum that was concerned with features in Flash, so forgive me if this is a bad place.

Has anyone ever wondered why Flash doesn't use optional 3D acceleration support that is in nearly every home user's video card these days? I know flash is supposed to be fast, but, crazy enough, most stuff I see these days is ok on a 700mhz and best on a 1.5ghz. It's just shapes, after all, like any 3d game. Cards have been doing 3D in a window since the Voodoo Banshee 5 years ago. Can anyone find reason why this wouldn't work? I mean, if every user has this triangle pumping processor in their computer (even a low end one) shouldn't we be able to access it?

View Replies !    View Related
Acceleration Script?
does any of u know how to make a text move faster with acceleration script, NOT by make the tween shorter in the main timeline and NOT by changing the frame per second value?

e.g i need to make a tween go faster without decreasing the frame, because if i do that it will looks like lagging.
urgent!!

View Replies !    View Related
Acceleration/deceleration
Hey i was wondering if someone can help me.

i have a Movie clip that i want to come across the stage, and stop at a certain point. i understand its just a standard tweening. but i wanted to use actionscript and add a acceleration/decceration effect to it. therefore having total control of where the MC is going, but still maintaining the accel/deceleration effect.

help would be greatly appreciated.
i am not that actionscript savvy, so can you please explain pretty much everything.

thanks. pdg95

View Replies !    View Related
Calculate Acceleration
Hi I'm looking for a formula to calculate the rate of Acceleration from given coordinates

Say i have a car travelling 50 metres in 40 seconds

At the start, the car is at 4.5 metres

10 seconds of the way (1 quarter of the way) the car is 5.5 metres

20 seconds of the way (1 half of the way) the car is 9 metres

30 seconds of the way (3 quarters of the way) the car is 25 metres

40 seconds of the way (at the end) the car is 55.5 metres


is there a way i can calculate the inbetween segments, for example what distance the car would be at 15 seconds?

any help appreciated. Thanks

View Replies !    View Related
[F8]caclulating Acceleration
I'm working on a game, and I have a onClipEvent() function that detects keys pressed, and then sends direction data to a function that moves the character, and detects collisions. I had a really bad way of computing it in the onClipEvent() function that basically involved having a ton of variables and if() statements declaring and figuring out whether or not the character is moving, or starting to move, and changing the characters .speed value accordingly. as i quickly learned this was a ridiculous tax on the system and killed performance.

so.. what i was wondering is like how would be my most efficient way of calculating and executing acceleration, and decelleration of character (which would be basically starting to walk slowly and then speed up, and then having a little bit of leway, or slide, when you let go of the key)

(im still rather new to all of this stuff and any help would be greatly appreciated ^^; hope its not a REALLY dumb question i did read a lot of tutorials)

View Replies !    View Related
Acceleration And Easing
Hello everyone...I need your help and my brain is fried.

I have this navigation with arrows on both sides of the container. When the user mouses over the box it detects the position of the mouse and the arrows move up and down. Here are the problems.

1. The arrows are not going the direction of the mouse (i.e. when mouse is down the arrows are going up, vice versa. It should be the opposite)

2. The arrows are not slowing down and stopping when the get the button the user is hovering over.

Any help, modifications, hammers to take to the monitor, would be very much appreciated. Here is the AS I have...


Code:
vx = 0;
a = 3.0;
af = 0.8;

this.onEnterFrame = function(){

if(_root._ymouse >= Stage.height /2){
vx -= a;
}
if(_root._ymouse <= Stage.height /2){
vx += a;
}

arrows._y += vx;
vx *= af;

if(arrows._y <= 21.9){
arrows._y = 21.9;
}else if(arrows._y >= 244.9){
arrows._y = 244.9;
}
}
Here's a link to the Flash so you can see it as well: http://www.thebigshow.com/flash/navHome3.swf

Big thanks ahead of time. Also, if you have suggestions of other code I could use I am more than willing to accept!

View Replies !    View Related
Wheel Acceleration
Hi Wizards! I have a simple problem with the Fla im working on.
I tried to imitate a car wheel in flash. but I am experiencing weird behaviour with my fla.

When i hit the left key, it must run clockwise and should accelerate first before reaching the top speed. Same goes to the right key, the wheel will go counterclockwise. But the weird thing is, it doesnt run smoothly as expected. it will tick first once to the left or right before accelerating to full speed. I need to remove this tick. I need to run it smoothly.

please download my fla with this link...

http://www.esnips.com/doc/dc921363-e...74/prototype02

or

Accelerated wheel: by Lionheart

part of the code goes like this:

import mx.transitions.Tween;
import mx.transitions.easing.*;
engine =new Object(); //engine as the listener
engine.onKeyDown = engine_gas; //start engine
engine.onKeyUp = engine_brake; //brake

Key.addListener(engine);
stop();
//================================================== ============================================

function engine_gas() { //start the engine...
if (Key.getCode() == Key.LEFT) {
backcw.stop();
MC_backwheel._rotation -= ((inertia-MC_backwheel._rotation)/10);
inertia += 5;
if(inertia > 1000) {
inertia = 1000;
}
}//goin left

if (Key.getCode() == Key.RIGHT) {
backcw.stop();
MC_backwheel._rotation += ((inertia-MC_backwheel._rotation)/10);
inertia += 5;
if(inertia > 1000) {
inertia = 1000;
}
}//goin right

}

//================================================== ============================================

function engine_brake() { //step in brake...
if (Key.getCode() == Key.LEFT) {
_root.hhh = MC_backwheel._rotation
if (MC_backwheel._rotation < 0) {//code to avoid swinging the wheel to the opposite direction
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation+inertia),Number(MC_backw heel._rotation),2,true);
}
else {
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation)+inertia,Number(MC_backw heel._rotation),2,true);
}
backcc.FPS = 40;
inertia = 0;
}
if (Key.getCode() == Key.RIGHT) {
_root.hhh = MC_backwheel._rotation
if (MC_backwheel._rotation < 0) {//code to avoid swinging the wheel to the opposite direction
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation),Number(MC_backwheel._ro tation)+inertia,2,true);
}
else {
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation),Number(MC_backwheel._ro tation)+inertia,2,true);
}
backcc.FPS = 40;
inertia = 0;
}
}




I hope you could lend me a hand with this. thank you very much in advance!

View Replies !    View Related
Acceleration/deceleration
Hey i was wondering if someone can help me.

i have a Movie clip that i want to come across the stage, and stop at a certain point. i understand its just a standard tweening. but i wanted to use actionscript and add a acceleration/decceration effect to it. therefore having total control of where the MC is going, but still maintaining the accel/deceleration effect.

help would be greatly appreciated.
i am not that actionscript savvy, so can you please explain pretty much everything.

thanks. pdg95

View Replies !    View Related
Acceleration Sound
Hi Not sure if this has been answered but im in a bit of a pickle...

I have a game and need to add a sfx for accelerating but dont have a clue where to start.

Anyone out there feeling kind today could help me out please

View Replies !    View Related
3D & HW Acceleration... Any News?
Hi everyone.

Sorry, I know this is probably a noob question, but has there been any news regarding true 3D support (like including shockwave 3D ) or hardware acceleration support in the current (9) or upcoming flash releases? If not, is there any way to manually add HW acceleration using actionscript3? Searched the forums here pretty well and couldn't find any answer. I would think with Vista/WPF coming this would be a top proirity. Thanks in advance for any help.

Adrian Brown

View Replies !    View Related
Help With Acceleration Script
I am kind of toying with different things in Flash trying to get aquainted with coding and what not.I want to get to the point of making some simple games. I am having trouble coming up with something to make a ball accelerate. Here is what I have to just make the ball move and jump around.

onClipEvent(load){
var moveSpeed = 15;
var jumpPower = 30;
var grav = 4;
var ysp = 0;
var jump = false;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT) && _x<550-_width/2){

_xscale = 122;
_x += moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(Key.isDown(Key.LEFT) && _x>_width/2){

_xscale = -122;
_x -= moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(jump==false){
gotoAndStop(1);
}
if(Key.isDown(Key.UP) && jump==false){
gotoAndStop(3);
jump = true;
ysp = 0;
ground = _y;
}
if(jump==true){
_y = _y - jumpPower + ysp;
ysp += grav;
if(_y>ground){
_root.bounce_sound.start();
ysp = 0;
gotoAndStop(1);
_y = ground;
jump = false;
}
}
}

That works just fine, but its real bland. I need it to be able to accelerate when I hold down the button and deccelerate once I let go.

View Replies !    View Related
Help With Acceleration Script
I am kind of toying with different things in Flash trying to get aquainted with coding and what not.I want to get to the point of making some simple games. I am having trouble coming up with something to make a ball accelerate. Here is what I have to just make the ball move and jump around.

onClipEvent(load){
var moveSpeed = 15;
var jumpPower = 30;
var grav = 4;
var ysp = 0;
var jump = false;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT) && _x<550-_width/2){

_xscale = 122;
_x += moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(Key.isDown(Key.LEFT) && _x>_width/2){

_xscale = -122;
_x -= moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(jump==false){
gotoAndStop(1);
}
if(Key.isDown(Key.UP) && jump==false){
gotoAndStop(3);
jump = true;
ysp = 0;
ground = _y;
}
if(jump==true){
_y = _y - jumpPower + ysp;
ysp += grav;
if(_y>ground){
_root.bounce_sound.start();
ysp = 0;
gotoAndStop(1);
_y = ground;
jump = false;
}
}
}

That works just fine, but its real bland. I need it to be able to accelerate when I hold down the button and deccelerate once I let go.

View Replies !    View Related
Animating (de)acceleration
How do i make an object speed up and/or slow down to simulate acceleration and deceleration?

View Replies !    View Related
[FP] Hardware Acceleration
&nbsp;
Does anyone know which Flash Player version introduced the new "Enable hardware acceleration" option on the player settings panel?

I'm running the latest FP9 Update 3 beta and have just noticed the hardware acceleration option on the settings panel. I guess it is probably a new feature for update 3.

View Replies !    View Related
Acceleration/deceleration And Actionscript
hi, thanks to be there!

I need to make a move with a piece:

circle a x=30 y= 300

must going to: x 30 y=0

I need to use actionscript...

Must accelerate during the move and decelerate when it's came to the target...

HOW?

Thanks!

Ben

View Replies !    View Related
Acceleration | Answer This & End The Misery
!!BY ANSWERING THIS QUESTION YOU WILL BE REWARDED WITH GOOD HEALTH AND A MORE REWARDING LIFE!!

Please could somebody show me a SIMPLE scripted tween with acceleration (fadeIn). I worked out how to decellerate (fadeOut)


Code:
onClipEvent (load) {
target = 100;
speed = 10;
}
onClipEvent (enterFrame) {
this._x += (target-this._x)/speed;
}


But for the life of me I cannot work out acceleration. I would love somebody to post a simple (like the example above) script to solve this problem of mine.

Thankyou on anticipation of the misery ending.

Frank

p.s. I am aware of Robert Penners easing equations but i would like it nice and simple so i can understand whats going on.

View Replies !    View Related
Car Acceleration, Hit Test The Works.
hiya i need an fla with a movie clip. nothing fancy of and object/car/block which can be moved like car using the arrow keys. and also a hit test block.

It can be very basic i can edit the fla to suit my needs.

Ive searched for hour and found many half working, swf only and dead links with car/accelration posts.

Please anyone! HELP!

cheers

View Replies !    View Related
Actionscript Transitions With Acceleration
this is a fine example of the effect im looking at making, i think the way the main stage changes shape and size for each section with the nice and smooth deceleration towards the end of its journey. A link to a tutorial would be great or even a few pointers to get me started in the right direction…

Thanks in advance

View Replies !    View Related
Applying Acceleration To Movieclip
I am trying to add acceleration to a movieclip called Ground. I have written this code

package {
import flash.display.Stage;
import flash.display.Sprite;
import flash.ui.*;
import flash.events.*;

public class Ground extends Sprite{
private var xVel:Number = 0;
private var xAcc:Number = -0.25;

public function Accelerate()
{
init();
}

private function init():void
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, go);
}

private function go(event:KeyboardEvent):void
{
if(event.keyCode == Keyboard.UP){
xVel += xAcc;
}
}
}
}

The movieclip loads fine and i get no errors, but when the up button is pressed nothing happens. Can anyone help?

View Replies !    View Related
Variable Grow, Acceleration
Hi
how to make acceleration in flash for some object.
My main problem is that I dont know how to keep variable growing by some coefficient.
I maked some code that should grow and it only repeats the same number


Here is one of my many code tries.

View Replies !    View Related
Reallistic Acceleration And Bounce
I want to give movieclips behavior like balls on a pool/snooker table.


1 circular object collides with another and the other goes off and bounces according to how hard it was hit.

AND when the 1 ist circular object is hit by the other it will bounce off depending on what angle it was collided at.

what is the best way to go about this.

View Replies !    View Related
Object Animation/acceleration
So Im just beginning to get into graphics and animation in AS3 and have some questions regarding my first example. I have a red ball that I move to the right of the screen. It had constant speed but then I decided to experiment with acceleration and that's where I need some input. As the balls begins to move faster and faster the image gets distorted and when it gets to a very high speed it looks like there are two balls moving along side each other (horizontally even).

Here is Main.as (I'm using Flex):


ActionScript Code:
import animation.*;

import mx.controls.Alert;
import mx.core.UIComponent;

public var firstAnimation:FirstAnimation;

public function initApplication():void
{
    // create a new sprite object
    firstAnimation = new FirstAnimation();
   
    // need to create a UI wrapper to be able to add the sprite to the canvas
    var uiWrapper:UIComponent = new UIComponent();
    uiWrapper.addChild(firstAnimation);
   
    // add the child
    animationStage.addChild(uiWrapper);
}

public function onRestartClickHandler():void
{
    firstAnimation.restart();
}

Here is the animation class I use:


ActionScript Code:
package animation
{
    import flash.display.Sprite;
    import flash.events.Event;
    import mx.controls.Alert;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
   
    public class FirstAnimation extends Sprite
    {
        private var ball:Sprite;
       
        public function FirstAnimation()
        {
            init();
        }
       
        private function init():void
        {
            graphics.beginFill(0xff0000);
            graphics.drawEllipse(100, 100, 100, 100);
            graphics.endFill();
            this.x = 100;
            this.y = 100;
           
            this.addEventListener(Event.ENTER_FRAME, onEnterFrameHandler);       
        }
       
        public function restart():void
        {
            this.x = 100;
        }
       
        private function onEnterFrameHandler(event:Event):void
        {
            this.x += this.x * 0.05;
        }
    }
}

any thoughts are much appreciated!

View Replies !    View Related
Motion - Acceleration Over X Steps
hi i need some help on a simple motion routine, i did build this way back in time but forgot all about it.

what im looking for, is a way to move one or more mc's to x point in an acceleration pattern (incrementing speed), but the vital thing here is, the mc's must reach their goal within x amount of steps, so if i have 10 mc's with 10 random goto points on stage, then each mc's should move towards their points in an incrementing speed and ALL reach their targets at the same time.

i remember something about pre calculating the acceleration factor vs. steps towards the distance length and then increasing the speed with the acceleration factor so the mc's would actually stopping on the spot, i also remember using aTan2 i think .. ?..

any ideas ?

ps. when you get older you DO forget about math, im the proof hehe.

View Replies !    View Related
Applying Acceleration To Movieclip
I am trying to add acceleration to a movieclip called Ground. I have written this code

package {
import flash.display.Stage;
import flash.display.Sprite;
import flash.ui.*;
import flash.events.*;

public class Ground extends Sprite{
private var xVel:Number = 0;
private var xAcc:Number = -0.25;

public function Accelerate()
{
init();
}

private function init():void
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, go);
}

private function go(event:KeyboardEvent):void
{
if(event.keyCode == Keyboard.UP){
xVel += xAcc;
}
}
}
}

The movieclip loads fine and i get no errors, but when the up button is pressed nothing happens. Can anyone help?

View Replies !    View Related
H264 Hardware Acceleration
Hi,

I need to know if it is possible to take advantage of hardware acceleration for H264 playback. I know that it is possible to use "hardware acceleration for fullscreen scaling" for H264 encoded videos. It is not clear whether hardware is used for fullscreen scaling or decoding of video (or both)

All I need is to use hardware decoder of video cards (purevideo or avivo) in non-fullscreen mode.

Thanks in advance

View Replies !    View Related
Hardware Acceleration Detection
I was wondering if there is a way to find out if flash is using hardware acceleration when my page loads, using JS. I found one article, but it did not work for me.

Thanks,

View Replies !    View Related
Acceleration Script Problem
hello everyone,

I'm making a navigation bar that uses a basic acceleration script that gets attached to the movieclip that is being animated. Only problem is, after the first bar moves up, i want it to disappear then the next one move up and so on. Here is an example:
EXAMPLE

here's the FLA to take a look at the script and how it's working:
FLA DOWNLOAD

I tried using the script in a way that didn't attach to the movieclip but it didn't work for some reason! Any help would be appreciated!

Thanks for your time

Gavin

View Replies !    View Related
FMS3 SSL Acceleration- Need Documentation
I've read all the avaliable documentation and came up empty handed. I am trying to get FMS 3 to function through an SSL accelerator(proxy). It is an F5 BIG-IP_HA appliance. I previously had the server/ssl accelerator running an install of Breeze/Connect for a few years.

All I need is 3 bits of info.

1.What rtmp style string do I need to make the client and server understand how the traffic will flow?

2. How does the traffic flow(I assume return stream is SSL on 1935)

3. What special settings need to be applied if any to make FMS 3 work with a hardware SSL proxy.

The picture is actually fairly simple, 4 steps:
FMS server has 2 IPs 10.1.1.13, 10.1.1.14(now we are just using 10.1.1.13)
The proxy externally operates on 72.x.x.213 and 72.x.x.214 (just using 213 for this case)
The proxy operates on 10.1.2.22 for its internal ip.

1. Client requests stream on port 443 to (proxy)server 72.x.x.213(ssl encrypted)
2. Proxy takes request on 443 and forwards it to FMS3 server 10.1.1.13 on port 80(no ssl encryption)
3. FMS3 server replys on 1935 back to proxy server(unencrypted stream)
4. Proxy server changes it to an ssl encrypted stream and sends it back to client on port (1935) from 72.x.x.13

Sounds simple, but they only tell you how the stream gets to the server in a diagram, nothing more. You must know how to configure the return stream on 1935 or 443 and how to configure the rtmp in the flv so the client/server talks properly. I can do all the F5 configuration just fine, but I need someone at adobe to fill in some blanks for me.





These docs are supposed to have all the info I need. But they barely even touch in any detail on how to configure FMS3 for hardware acceleration. And of course Abobe wants buko bucks for support.

http://livedocs.adobe.com/flashmediaserver/3.0/docs/flashmediaserver_config_admin.pdf

http://livedocs.adobe.com/flashmediaserver/3.0/docs/flashmediaserver_install.pdf



























Edited: 05/05/2008 at 12:49:37 PM by CybrGuy

View Replies !    View Related
TCP Acceleration For FMS Streaming Solutions
I was told that certain TCP Acceleration solutions are capable of making streaming video via FMS3 better, ie clearer and more up to date pictures. Does anyone has any information on this? I have tried to contact Internap regarding if their solutions are able to assist me in this but I have not recieved their reply on this for over a week.

View Replies !    View Related
Text Scrolling Acceleration
I did my text scroller according to this tutorial http://www.kirupa.com/developer/mx/dynamic_scroller.htm

Is it possible to accelerate the text movement while being scrolling?
I mean from fastest move to slow down until it stops.

Thanks for help.

View Replies !    View Related
Finally, Hardware Acceleration?
I'm not necessarily encouraging it, but I've got some interest in the latest beta version of the Flash player. (Here's the link to download the browser plug-in.) The press release (again, link) mentions some neat stuff:
A strengthened connection to JS through the ExternalInterface API
Vector graphics acceleration for multi-core machines
"Hardware scaling" in full-screen mode, "for improved video performance and quality"

What, pray tell, does "hardware scaling" mean? It sounds like it could be a feature limited to video in full-screen mode. But do you think it could pave the way for hardware acceleration?

View Replies !    View Related
Applying Acceleration Movieclip
I am trying to add acceleration to a movieclip called Ground. I have written this code

package {
import flash.display.Stage;
import flash.display.Sprite;
import flash.ui.*;
import flash.events.*;

public class Ground extends Sprite{
private var xVel:Number = 0;
private var xAcc:Number = -0.25;

public function Accelerate()
{
init();
}

private function init():void
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, go);
}

private function go(event:KeyboardEvent):void
{
if(event.keyCode == Keyboard.UP){
xVel += xAcc;
}
}
}
}

The movieclip loads fine and i get no errors, but when the up button is pressed nothing happens. Can anyone help?

View Replies !    View Related
Scaling A MC With Acceleration/deceleration
hello all,

I'm having trouble altering some code that was designed to move a MC from one x-coordinate to a new x-coordinate, with acceleration/deceleration. the alterations i'm trying to make are to take an existing MC, a simple box, and change its size by scaling, while still maintaining the acceleration/deceleration as the MC changes it's size. so far, the MC changes its size with the easing in/out, but i can't get the proper size to happen with the variables i'm passing to the function. here's what I have...

----In the first frame of Main:

function scaleTo(x, y) {
whitebox.newX = x;
whitebox.newY = y;
}

-----On the MC (in Main) named whitebox:

onClipEvent(load) {
var d = 2;
var speedX = 0;
var speedY = 0;
var newX = _xscale;
var newY = _yscale;
}

onClipEvent(enterFrame) {
speedX = (_xscale-newX)/d;
speedY = (_yscale-newY)/d;
_xscale = speedX;
_yscale = speedY;
}

-----On a Button (in Main) to trigger the action of the scaling:

on (press){
scaleTo(500, 300);
}

So that's what I have. Three seperate pieces of code. Are there any gurus out there that think they can crank out a simple modification that would make this MC scale to the proper x and y values set by the Button? any help would be much appreciated!!

Thanks everyone....
M14

View Replies !    View Related
Acceleration For A Racing Game
Hi there, anyone can tell me how to do a car movement, in a graph(the car). Its top view.The graph its a car, this car have to have acceleration when pressing UP arrow, reverse speed with DOWN arrow, and make curves pressing with UP or DOWN arrow the RIGHT or LEFT key.
Thanks

marcelozep

View Replies !    View Related
Acceleration By Pressing 2 Keys
iŽd like to accelerate a movieclip by alternately pressing two different keys. anyone of you can give me some tipps how to handle this?

cheers
max

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved