ActionScript 2.0 :: Reverse An Easing Function?
Jun 9, 2008How do you get it to play backwards - so that it bounces in reverse?
View 2 RepliesHow do you get it to play backwards - so that it bounces in reverse?
View 2 RepliesI have an xml sheet that has a number of values - one of them contains the type of easing that I would like to apply to a movie clip.
Code:
<settings loop="false">
<section duration="5">
<image startX="-120" endX="0" startY="-80" endY="0" startAlpha="100" endAlpha="100" duration="6" easing="Elastic.easeOut" delay="0" startScale="90" endScale="100">images/9_properties_l.jpg</image>
[Code] .....
I've tried type casting as "function" as well and it doesn't seem to be working. Any ideas?
I have built a scroll bar that targets a movieClip on level0, i want to make it have a ease function. Can anyone help or direct my in the right way?
[Code]...
i have this function that moves my mc under a mask, when it gets to the higher than the mask its text changes then moves to a position lower then the mask and scrolls back up to its origional position with the updated text. the problem is i need help making it ease instead of just moving with "this._y -=6"
my code:
Code:
function newProject(g, d, l, c, t) {
dtext.onEnterFrame = function() {[code].....
Is is possible to pass easing function as variable in AS3?g.
TweenLite.to(mcDelimiter, resizeTween, { x:(stageWidthHalf-(initStageWidthHalf-mcDelimiteri_X)), ease:Elastic.easeOut } );
TweenLite.to(mcBody, resizeTween, { x:(stageWidthHalf-(initStageWidthHalf-mcBody_X)),
[code].....
I've been trying to find an easing generator that supports bounce but have found none. I want to create an easing function that starts as a easeInSine (or quad) and ends as en easeOutBounce (imagine dropping an object on the ground). I've already thought of splitting up the tween in two. Just realised that the easeOutBounce actually starts a little bit like easeInSine but I would like to enhance that part to make a steeper curve.
View 4 RepliesI am working on a display that starts with a centered logo and menu. When one of the menu items is clicked I move the logo and menu to the left side and show a datagrid on the right. Is there a way to use an easing function to make this change look better?
View 1 RepliesOk so I found this nice code over at Prototype. Its a function for Aligning to stage on Resize. [URL] It works really nice on its own but I was hoping to add some tweened easing as an additional optional parameter. (I posted there twice asking for help to no avail =( So I am asking here at Kirupa. What I wish to add is - implementing and adding an "easing" function as part of the current function. Something generalized to be called only if desired and the ability to set the ease type, duration, maybe prop etc.. (or whatever needed to make it work)
I have tried all kinds of things and below is as close as I can come (at least the only thing I can do to get the thing to move, although as you will see it works backwards and I can only get it to work using stage.width, stage.height, however I have tried newX oldX and all kinds of other things and cant seem to get things to move.
[Code]...
Is the number in a function representing the speed (in case of easing) equal to a certain amount of frames?
View 10 RepliesSo I have this mc: this.slidingMenu it's a mc of a ring shaped menu, which turn around when 2 button get clicked. When the button on the right, mc goes forward until stop(), when the button on the left mc goes reverse until the stop(). In the first case i use gotoanplay, and everything goes fine. For the second I use prevFrame, like this:
[Code]....
im trying to create this custom menu a bit more efficiently. As written, it operates fine glitch free. However, id like to incorporate some easing into the movement of each movie clip.
[code]...
how to incorporate tween classes and then easing?
I'm working on this "game" and I currently have a ball that increases in speed as you hold down the arrow key. What I am now trying to accomplish is I want the ball to ease to a stop when the user let's go of the keyboard key (onKeyUp). Here's the File. <---Link
Here is my code so far:
var speed = 10;
ball_mc.onEnterFrame = function (){
if(Key.isDown(Key.RIGHT)){
this._x += speed += 1;
} if(Key.isDown(Key.UP)){
[Code] .....
So once you let go of the Keyboard Key I want the ball to slow down to a stop.
I've built a code to cyclically move a scene on the bottom of my stage; I've done this to make a slowing-and-stop-easing effect at anytime the command will arrive. The entire scene mc is _x long something like 6000 px. The whole code goes in this way:
1) importing on the stage (with attachMovie) a mc with this code inside:
onClipEvent(enterFrame) {
_parent._parent.fondo_mc._x -= countermovement;
if (_parent._parent.fondo_mc._x <= -5800) {[code].....
The code goes right, but I need to improve it.Now there is just a variable, I tought to use two vars to implement the whole code in a setInterval, but maybe it's unuseful, and actually I can't use it in the right way.
Second issue: actually when slowAndStop function is called the scene slow too fast, if I take it to 15 it slow better but the scene is running too fast...
The best would be that the scene slow down and stop following: A) a temporal variable (and I can try to implement it with setInterval, that for istance is a cycle)
B) an indipendent moving variable, so that on one side I set the speed, on the other side I set the slow-and-stop in a matter of time with countermovement.I also tried to use a second variable:
var counter:Number = 15;
// set the _x increment
var countermovement:Number = counter/2;
but the scene slow and goes backward a bit
I'm familiar with how to ease something in using motion math. Easing out would not be that bad either. But how would I script something easing in half way, then easing out the second half? It would start slow, gradually move faster, then slow to a stop at the end. - almost like a sine wave I guess?
View 1 RepliesIn a game I'm working on, I'm using the ColorTransform class to the turn the 'enemies' red as they fall off the screen after they've been hit by one of the player's 'missles' with the following [code]...
Can I somehow undo the ColorTransform to an enemy once it has been applied, or does he have to stay monochromatic thereafter?
I use this code i found on this forum. i want to control an MC to act like a buttopn, on roll over it plays the movieclip forward, on Rollout it plays the movieclip backwards.
This script works ok, but on when reversing it feels slow and often it doesent reverse to the start of frame 1 in the MC.... It is very sensitive to quick mouse over and out. The quirky reverse is possible because i use prevFrame...is there another thing i can use?
[Code]...
Basically I have just created an animated button using frame labels, and was wondering if there is any way to reverse the timeline.
Currently my code looks like this:
Code:
btnHome.addEventListener(MouseEvent.ROLL_OVER, btnHomeOn);
btnHome.addEventListener(MouseEvent.ROLL_OUT, btnHomeOff);
function btnHomeOn(event:MouseEvent):void {
[code]....
The way it's coded here, if the user removes the mouse from the above the button the timeline continues from homeOff.What I want is for the timeline to reverse from its current position instead of just playing forwards from a fixed point.
I have a quick question for any flash smartypantses out there....I'm looking for the most efficient way to do this weird thing...
I'm trying to create 6 menu buttons (all text) that when you click one, a submenu drops down (more lines of text - that fade in individually).
[Code]....
What I'm having trouble with is figuring out how to get this submenu to "close back up" (animation) when someone clicks one of the other main menus (Colors or Locations, in this example.)
How can I get it to perform this animation BEFORE it navigates to the next menu section?
is it possible to play a movie clip (or simply, main timeline) in reverse order e.g. suppose, there is a movie clip, few frames in that, of course it will play from first frame to end frame, and also, i want them to play from end frame to first frame.
View 8 RepliesI apologize for being a newbie. I have been trying to figure out how to reverse an EKG movieclip to go from right to left instead of the direction it is currently moving:
View 16 RepliesI have to play an flv in reverse but don't know how. I tried embedding the entire flv inside a MC but the result was not pretty.
View 2 RepliesI'm using the following ActionScript for my Flash preloader, what this does is have the preloader bar fill from the top to the bottom.
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void{
var total:Number = this.stage.loaderInfo.bytesTotal;
[Code].....
How would I alter this so that instead, it starts off full and then decreases in size down to zero (downwards)?
I can't able to reverse properly.
Code is
var angle:Number = 0;
var radius:Number = 100 + Math.floor(Math.random() * 101);
// Random object generation
var button:Number = 0;
[code].....
how I reverse through frames.I can certanly have a loop that calls prevframe.But, what I want is to know when I have reached a certain frame.The only way I can think of how to do this is to know the exact number of frames, and then use a loop that loops the exact number of frames I need.
View 3 Replieshow would i use reverse Sin, Cos and Tan in flash so i could do SOA-CAH-TOA?
View 2 RepliesIts been a while since I last posted but I was hoping someone would be able to help me asap. I am so nearly there but something is not quite right. I have alot of faith in this forum so I'm hoping someone out there can help! Here we go:
I have various movie clips within movie clips, these all work fine. Within one of the MC's, i have a button with instance name "left" and one called "right". These are used to cycle through my work (this is for my portfolio). The right button works fine, just plays the timeline of the MC using frame labels. I built my site last year but its going through a complete overhaul on the structure and coding side cos quite simply, its a mess Last year, i placed this code ON the "left" button itself:
[Code]...
How can i play a mc in reverse using as3? i know hwo to do it in as2 but not sure about as3
View 9 Replieshow can i reverse the frames.what i mean is if for example u have a motion tween of a circle sliding to the right.what should i write in the last frame of the motion tween so the circle will go back..._current frame--?
View 9 Repliesnot really that handy with scripting, was wondering if someone knows how to add some easing to this. Right now i gave an mc that rolls out and back, but i would like there to be a bit of ease in ease out on it if possible.on the mc that you rollover is this
on(rollOver) {
this.forwards=true;
this.backwards=false;
[code]......
How can I add bounce easing to a classic tween in FlashCS4 ?
View 1 Replies