FMX04 Built-in Easing Equations
There are already all sorts of classes that can be used within Flash MX 2004 Pro. And it comes with Robert Penner's equations built in.
Create any MovieClip instance and paste the following code on it:
ActionScript Code: onClipEvent (load) { start = this._y; change = 200; duration = 30; t = 0;}onClipEvent (enterFrame) { t++; if (t <= duration) this._y = mx.transitions.easing.Bounce.easeOut(t, start, change, duration);}
These are the built in easing functions: mx.transitions.easing.Bounce.easeOut(); mx.transitions.easing.Bounce.easeIn(); mx.transitions.easing.Bounce.easeInOut();
mx.transitions.easing.Strong.easeOut(); mx.transitions.easing.Strong.easeIn(); mx.transitions.easing.Strong.easeInOut();
mx.transitions.easing.Back.easeOut(); mx.transitions.easing.Back.easeIn(); mx.transitions.easing.Back.easeInOut();
mx.transitions.easing.Elastic.easeOut(); mx.transitions.easing.Elastic.easeIn(); mx.transitions.easing.Elastic.easeInOut();
mx.transitions.easing.None.easeNone();
mx.transitions.easing.Regular.easeOut(); mx.transitions.easing.Regular.easeIn(); mx.transitions.easing.Regular.easeInOut();
You can view all of the classes at: C:Program FilesMacromediaFlash MX 2004enFirst RunClasses
Ultrashock Forums > Flash > Flash Professional
Posted on: 2003-09-19
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Where Can I Get Easing Equations?
Can someone tell me where I can get easing equations from?
Just about all the exmaples where something is eased in using Actionscript has a 'jumpy and jagged' ending tot he animations.
Is there a way of minimising this?
My gues was that better easing equations would do the trick.
Any help would be appreciated.
Thanks.
Jam
Easing Equations...
Hi
I have a png sequence imported into flash.
there is no easing in the original animated sequence.
What I 'd like to do is to go to different points in that movie with easing out.
ie using easing equations to go to different frames on the timeline.
Is this possible? (timeline tweening using easing equations)
Any suggestions on how to do this?
Easing Equations
Hi
I have a png sequence imported into flash.
there is no easing in the original animated sequence.
What I 'd like to do is to go to different points in that movie with easing out.
what i have is a movie clip of a rotating compass needle in perspective. in this frame by frame sequence, the needle makes a 360 deg rotation. every frame of this movie has a stop action, so it doesnt play automaticly. outside of this clip i have buttons which i want to use to direct the needle to stop at different angles. (i.e if user presses "north west" button play next frame until you reach frame 40).
that works good but of course with no easing, so it stops very crudely. i just wanted to know if its possible to dynamicly create the easing on such an image sequence. in other words - controling the frame playback speed.
Is this possible? (timeline tweening using easing equations)
Any suggestions on how to do this?
Easing Equations...
Any chance someone could point me in the direction of a tutorial, or a thread, or even a .fla, that has somewhat of an in-depth view of the equations for the different types of easing. I searched through truckloads of pages, but haven't quite found what I'm looking for.
Not just the Easing class, and not a component, but the actual algebraic equations for the different types of easing?
I'd be much appreciative.
Thank you kindly,
iLan
Where Can I Get Easing Equations?
Can someone tell me where I can get easing equations from?
Just about all the exmaples where something is eased in using Actionscript has a 'jumpy and jagged' ending tot he animations.
Is there a way of minimising this?
My gues was that better easing equations would do the trick.
Any help would be appreciated.
Thanks.
Jam
Using 'easing Equations'
Well. Ive been looking into this business of using friction to create some action based movement. And rob penners version seems to be the simplest while providing alot of control.
What I would like to know is how I could possible make the movement on both y and x axis so that things can move diagonally not just left to right or up or down. I actually havnt tried to make it move up or down. i have just goten it to move left to right. hehehe.
I looked in the thread where i got this information but i couldnt find anything about getting things to move diagonally.
the thread im talking about: easing equations for dynamic tweening
heres my A.S:
on the first frame ->
Code:
// circular easing in/out - acceleration until halfway, then deceleration
Math.easeInOutCirc = function(t, b, c, d) {
if (t<d/2) {
return -c/2*(Math.sqrt(1-4*t*t/(d*d))-1)+b;
}
return c/2*(Math.sqrt(1-4*(t-d)*(t-d)/(d*d))+1)+b;
};
on a movie clip ->
Code:
onClipEvent (load) {
start = this._x;
change = this._y;
duration = 18;
t = 0;
}
onClipEvent (enterFrame) {
t++;
if (t<=duration) {
this._x = Math.easeInOutCirc(t, start, change, duration);
}
}
So how would I go about creating diagonal movement???
HOpe someone can help.
thanx in advance.
Elastic And Easing Equations
Does anyone have at hand or any links to the easing and elastic equations used in flash.
I've been messing around in excel for hours but i'm not having any luck. Any help will be greatly appreciated.
Thanks
Easing/elastic Equations
i am looking for some easing or elastic equations
the ones i have arent really elastic
and the mx transitions classes arent that customizable
something elasticy would be desired
anyone know of any?
Quick Tip - Where Are My Easing Equations?
Tutorials on TweenLite or TweenMax often rely on the easing functions that come with the Flash CS3 IDE. These functions are contained in the package fl.motion.easing. All classes under the package name fl are specific to Flash CS3 and are not available in the free Flex 3 SDK. If you use the Flex 3 SDK you have to import your easing functions from the package mx.effects.easing. So any time you see an import statement like this
import fl.motion.easing.*;
you should be able to replace it with
import mx.effects.easing.*;
and get the same functionality.
Quick Tip - Where Are My Easing Equations?
Tutorials on TweenLite or TweenMax often rely on the easing functions that come with the Flash CS3 IDE. These functions are contained in the package fl.motion.easing. All classes under the package name fl are specific to Flash CS3 and are not available in the free Flex 3 SDK. If you use the Flex 3 SDK you have to import your easing functions from the package mx.effects.easing. So any time you see an import statement like this
import fl.motion.easing.*;
you should be able to replace it with
import mx.effects.easing.*;
and get the same functionality.
About TweenMax And Easing Equations
Hi guys, im a former user of FuseKit, for the time being as i like more the performance of TweenMax over Fusekit, but i got used to the flexibility of Penner Easing Equations, is there a way to use them on TweenMax?
I tried fl.motion.easing.* seems to have all of the penner equations Expo, Sine, etc.
So, is there a way to use them with TweenMax?
maybe im not writting the syntax correctly i dont know here is my piece of practice code
Code:
import gs.*;
import mx.transitions.easing.*;
import fl.motion.easing.*;
function moveSq() {
TweenMax.to(sqr,.5,{_x:random(550), _y:random(400), ease:Bounce.easeOut});
}
myint = setInterval(moveSq, 1000);
this code above works just fine, but is there a way to replace Bounce.easeOut by "easeInOutElastic" or something along the line?
Thank you for reading, hoping to get any feedback from you guys
Nosh
Filters And Easing Equations
I got some great filter Classes from http://www.flash-fmp.de/ and now I'm trying to implement them
I got my dropShadow filter workin great with this script:
ActionScript Code:
_root.box_mc.onRollOver = function() {
tween1 = new Tween(_root.box_mc, "DropShadow_alpha", Regular.easeOut, 0, 1, .5, true);
};
_root.box_mc.onRollOut = function() {
tween1 = new Tween(_root.box_mc, "DropShadow_alpha", Regular.easeOut, _root.box_mc.DropShadow_alpha, 0, .5, true);
};
Now I want to do a displacementMap but I can't get it workin. Here's what I got:
ActionScript Code:
_root.box_mc.onRollOver = function() {
tween1 = new Tween(_root.box_mc, "DisplacementMap_scaleX", Regular.easeOut, 0, 1, .5, true);
};
_root.box_mc.onRollOut = function() {
tween1 = new Tween(_root.box_mc, "DisplacementMap_scaleX", Regular.easeOut, _root.box_mc.DisplacementMap_scaleX, 0, .5, true);
};
What am I doing wrong? (been struggling for hours)
Calling all Shockers!!!!
AS3 - Quick Tip - Where Are My Easing Equations?
Tutorials on TweenLite or TweenMax often rely on the easing functions that come with the Flash CS3 IDE. These functions are contained in the package fl.motion.easing. All classes under the package name fl are specific to Flash CS3 and are not available in the free Flex 3 SDK. If you use the Flex 3 SDK you have to import your easing functions from the package mx.effects.easing. So any time you see an import statement like this
import fl.motion.easing.*;
you should be able to replace it with
import mx.effects.easing.*;
and get the same functionality.
Help With Easing Equations For Timeline
So here's my situation. I have a mc that has several still images of a tool rotating 360 degrees in consecutive frames on the mc's timeline (frames 1-35). What I want to do is play through those images using Penner's easing equations, so that I get nice slow gradual deceleration from say the first frame to the last frame. Is this possible? I would post some code, but I honestly don't even know where to start. Thanks for the help!
Easing Equations For Dynamic Tweening
Virtually the only dynamic ease-tweening you ever see in Actionscript is the ubiquitous "exponential ease-out." You know, the Zeno's paradox, go halfway every time, Barney's menu method:
distance = finalX - _x;
_x += distance / 2;
It's wonderfully simple and easy to code, but it lacks flexibility. You can choose your destination, but you can't specify, "I want to get there in 40 frames." Also, easing *in* with the same method is not so easy.
There are many mathematical approaches to calculating an eased tween. I've derived some easing equations using three different curves: quadratic, sinusoidal, and exponential (as well as a trivial linear equation). Each of the three curves has its own particular "style" of easing; it's quite fun to compare their aesthetics.
All of the equations allow you to specify the beginning value, the change in the value, the duration of the tween, and the current time. Note that the equations will work for both frame-based and time-based animation. That is, duration and current time can be either frames or seconds/milliseconds.
Here are the quadratic easing equations. I'll post the other two sets soon.
Code:
// simple linear tweening - no acceleration
// t: current time, b: beginning value, c: change in value, d: duration
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
}
///////////// QUADRATIC EASING ////////////////////////
//// Robert Penner - Sept. 2001 - robertpenner.com ////
// quadratic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be frames or seconds/milliseconds
Math.easeInQuad = function (t, b, c, d) {
return c*t*t/(d*d) + b;
}
// quadratic easing out - decelerating to zero velocity
Math.easeOutQuad = function (t, b, c, d) {
return -c*t*t/(d*d) + 2*c*t/d + b;
}
// quadratic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuad = function (t, b, c, d) {
if (t < d/2) return 2*c*t*t/(d*d) + b;
var ts = t - d/2;
return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b;
}
Right now, the equations are all set at "maximum easing", analogous to an easing setting of 100% in Flash's Frame panel. It is fairly simple to adapt the equations so you can specify an easing percentage. Personally, I almost always use 100% manual easing within Flash.
I've built an entire tweening engine in Branden Hall's ACK around these equations and an enterFrame listener. I'll get a decent demo together and post it soon.
~
Robert Penner
Vancouver, Canada
http://www.robertpenner.com
~
Button Setting Var, Easing Equations
hello. this what im trying to achieve:
using robpenners easing equations i am trying to have
a mc (instance name: gray) move to a specified _x
position on a button release.
//code in my first frame:
// quadratic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuad = function (t, b, c, d) {
if (t < d/2) return 2*c*t*t/(d*d) + b;
var ts = t - d/2;
return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b;
}
//button code:
on (rollOver) {
_root.gray:start = getProperty(_root.gray, _x);
_root.gray.go = "1";
_root.gray.t = "0";
}
on (rollOut) {
_root.gray:start = getProperty(_root.gray, _x);
_root.gray.go = "0";
_root.gray.t = "0";
}
//code on my mc, gray:
onClipEvent (load) {
start = this._x;
end = 450; // where mc will end movement
change = end - start;
duration = 100;
t = 0;
}
onClipEvent (enterFrame) {
if ((t<=duration) and (go == 1)) {
t++;
this._x = Math.easeInOutQuad(t, start, change, duration);
} else if ((t<=duration) and (go == 0)) {
t++;
this._x = Math.easeInOutQuad(t, start, change, duration);
}
}
this works except for when i rollOut, gray starts moving,
but not back to where it started, it keeps moving onward.
my next attempt was with the release (which is what i really want to use)
//the code on my button:
on (release) {
_root.gray:start = getProperty(_root.gray, _x);
_root.gray.go = "1";
_root.gray.t = "0";
}
// the code on my mc, gray:
onClipEvent (load) {
start = this._x;
end = 450; // where mc will end movement
change = end - start;
duration = 10;
t = 0;
}
onClipEvent (enterFrame) {
if (go == 1) {
t++;
this._x = Math.easeInOutQuad(t, start, change, duration);
}
}
what happens: gray moves to its end position but then
it suddenly returns to where it started and keeps
moving past the start and off the screen.
Any ideas how i can make gray move to my _x using
this button release easing script?
thanks
d
Easing Equations For Dynamic Tweening
Virtually the only dynamic ease-tweening you ever see in Actionscript is the ubiquitous "exponential ease-out." You know, the Zeno's paradox, go halfway every time, Barney's menu method:
distance = finalX - _x;
_x += distance / 2;
It's wonderfully simple and easy to code, but it lacks flexibility. You can choose your destination, but you can't specify, "I want to get there in 40 frames." Also, easing *in* with the same method is not so easy.
There are many mathematical approaches to calculating an eased tween. I've derived some easing equations using three different curves: quadratic, sinusoidal, and exponential (as well as a trivial linear equation). Each of the three curves has its own particular "style" of easing; it's quite fun to compare their aesthetics.
All of the equations allow you to specify the beginning value, the change in the value, the duration of the tween, and the current time. Note that the equations will work for both frame-based and time-based animation. That is, duration and current time can be either frames or seconds/milliseconds.
Here are the quadratic easing equations. I'll post the other two sets soon.
Code:
// simple linear tweening - no acceleration
// t: current time, b: beginning value, c: change in value, d: duration
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
}
///////////// QUADRATIC EASING ////////////////////////
//// Robert Penner - Sept. 2001 - robertpenner.com ////
// quadratic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be frames or seconds/milliseconds
Math.easeInQuad = function (t, b, c, d) {
return c*t*t/(d*d) + b;
}
// quadratic easing out - decelerating to zero velocity
Math.easeOutQuad = function (t, b, c, d) {
return -c*t*t/(d*d) + 2*c*t/d + b;
}
// quadratic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuad = function (t, b, c, d) {
if (t < d/2) return 2*c*t*t/(d*d) + b;
var ts = t - d/2;
return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b;
}
Right now, the equations are all set at "maximum easing", analogous to an easing setting of 100% in Flash's Frame panel. It is fairly simple to adapt the equations so you can specify an easing percentage. Personally, I almost always use 100% manual easing within Flash.
I've built an entire tweening engine in Branden Hall's ACK around these equations and an enterFrame listener. I'll get a decent demo together and post it soon.
~
Robert Penner
Vancouver, Canada
http://www.robertpenner.com
~
Robert Penner Easing Equations How Do I Use Them
Hey,
I am just wandering how do i use the equations I downloaded from robertpenner.com.
when ever i try even working out of the book i get error messages like
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 350: There is no method with the name 'easeOutBounce'.
return(Math.easeOutBounce(t * 2 - d, 0, c, d) * 0.500000 + c * 0.500000 + b);
Why does it say there is no method with the name bounceEaseOut
Can someone tell me who i can use these in my flash movies. I tried everything out of his book and i still get it wrong.
Thanks nugget
Robert Penner Easing Equations How Do I Use Them
Hey,
I am just wandering how do i use the equations I downloaded from robertpenner.com.
when ever i try even working out of the book i get error messages like
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 350: There is no method with the name 'easeOutBounce'.
return(Math.easeOutBounce(t * 2 - d, 0, c, d) * 0.500000 + c * 0.500000 + b);
Why does it say there is no method with the name bounceEaseOut
Can someone tell me who i can use these in my flash movies. I tried everything out of his book and i still get it wrong.
Thanks nugget
Easing Equations For Dynamic Tweening
Virtually the only dynamic ease-tweening you ever see in Actionscript is the ubiquitous "exponential ease-out." You know, the Zeno's paradox, go halfway every time, Barney's menu method:
distance = finalX - _x;
_x += distance / 2;
It's wonderfully simple and easy to code, but it lacks flexibility. You can choose your destination, but you can't specify, "I want to get there in 40 frames." Also, easing *in* with the same method is not so easy.
There are many mathematical approaches to calculating an eased tween. I've derived some easing equations using three different curves: quadratic, sinusoidal, and exponential (as well as a trivial linear equation). Each of the three curves has its own particular "style" of easing; it's quite fun to compare their aesthetics.
All of the equations allow you to specify the beginning value, the change in the value, the duration of the tween, and the current time. Note that the equations will work for both frame-based and time-based animation. That is, duration and current time can be either frames or seconds/milliseconds.
Here are the quadratic easing equations. I'll post the other two sets soon.
Code:
// simple linear tweening - no acceleration
// t: current time, b: beginning value, c: change in value, d: duration
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
}
///////////// QUADRATIC EASING ////////////////////////
//// Robert Penner - Sept. 2001 - robertpenner.com ////
// quadratic easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in value, d: duration
// t and d can be frames or seconds/milliseconds
Math.easeInQuad = function (t, b, c, d) {
return c*t*t/(d*d) + b;
}
// quadratic easing out - decelerating to zero velocity
Math.easeOutQuad = function (t, b, c, d) {
return -c*t*t/(d*d) + 2*c*t/d + b;
}
// quadratic easing in/out - acceleration until halfway, then deceleration
Math.easeInOutQuad = function (t, b, c, d) {
if (t < d/2) return 2*c*t*t/(d*d) + b;
var ts = t - d/2;
return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b;
}
Right now, the equations are all set at "maximum easing", analogous to an easing setting of 100% in Flash's Frame panel. It is fairly simple to adapt the equations so you can specify an easing percentage. Personally, I almost always use 100% manual easing within Flash.
I've built an entire tweening engine in Branden Hall's ACK around these equations and an enterFrame listener. I'll get a decent demo together and post it soon.
~
Robert Penner
Vancouver, Canada
http://www.robertpenner.com
~
Robert Penner Easing Equations
I'm not really an actionscript wizard, so I could use a little help here.
I want to use the quadratic easing in/out equation, but I'm not really sure how to apply it in flash. I am using it to move a movieclip, so if anyone could provide me with a description on how to do this, I'd be grateful.
thanks in advance.
Take Me To The Promised Land....Penner's Easing Equations....
I found this code and don't know how to make it work. Could you guide me? What do I have to do to make this function...i.e. where does this code go, and how do I trigger it with a button?
Thanks.
///////////// EXPONENTIAL EASING: 2^t /////////////////
// exponential easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in position, d: duration
Math.easeInExpo = function (t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
};
// exponential easing out - decelerating to zero velocity
Math.easeOutExpo = function (t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
};
// exponential easing in/out - accelerating until halfway, then decelerating
Math.easeInOutExpo = function (t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
};
Take Me To The Promised Land....Penner's Easing Equations....
I found this code and don't know how to make it work. Could you guide me? What do I have to do to make this function...i.e. where does this code go, and how do I trigger it with a button?
Thanks.
///////////// EXPONENTIAL EASING: 2^t /////////////////
// exponential easing in - accelerating from zero velocity
// t: current time, b: beginning value, c: change in position, d: duration
Math.easeInExpo = function (t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
};
// exponential easing out - decelerating to zero velocity
Math.easeOutExpo = function (t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
};
// exponential easing in/out - accelerating until halfway, then decelerating
Math.easeInOutExpo = function (t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
};
Using Penner Easing Equations; Curving Motion?
hiya,
i would like to to know how i would proceed if i wanted to move a movieclip via actionscript from a to b by the help of the easing equations by mr penner, and modify the path the mc is traveling, so i would move my mc not in a straight line from a to b, but in a slight curve. :?:
i did search the net, but couldn't come up with anything helpful. or maybe i just didn't realise what would be helpful for me.
any ideas are greatly appreciated.
i know math is my weak side :? , but i'm confident i could follow your advice.
cheers,
dual
Ause Movie W/ Easing Equations And Sound - In Sync
hi there,
i'm creating a lengthy movie that i'm using the robert penner easing equations for to do a lot of the animation (at least i'd like to).
the animation needs to be synched with a streaming audio track, because there needs to be a pause/continue/stop set of controls.
my concern is, normal stop() and play() functions don't apply (maybe im assuming?) to the easing equation animations. so if i used these to pause, the audio would pause but the easing equation would only stop when that particular set of animations reached it's completion.
my question is whether or not i can pause the script based animation in sync with the streaming audio, so that i can continue it in sync; and what the best means about going about this would be. or, if it's even feasible to think along these lines.
thanks much in advance!
tom
Pause Movie W/ Easing Equations And Sound - In Sync On Playback?
hi there,
i'm creating a lengthy movie that i'm using the robert penner easing equations for to do a lot of the animation (at least i'd like to).
the animation needs to be synched with a streaming audio track, because there needs to be a pause/continue/stop set of controls.
my concern is, normal stop() and play() functions don't apply (maybe im assuming?) to the easing equation animations. so if i used these to pause, the audio would pause but the easing equation would only stop when that particular set of animations reached it's completion.
my question is whether or not i can pause the script based animation in sync with the streaming audio, so that i can continue it in sync; and what the best means about going about this would be. or, if it's even feasible to think along these lines.
thanks much in advance!
tom
Pause Movie W/ Easing Equations And Sound - In Sync On Playback?
hi there,
i'm creating a lengthy movie that i'm using the robert penner easing equations for to do a lot of the animation (at least i'd like to).
the animation needs to be synched with a streaming audio track, because there needs to be a pause/continue/stop set of controls.
my concern is, normal stop() and play() functions don't apply (maybe im assuming?) to the easing equation animations. so if i used these to pause, the audio would pause but the easing equation would only stop when that particular set of animations reached it's completion.
my question is whether or not i can pause the script based animation in sync with the streaming audio, so that i can continue it in sync; and what the best means about going about this would be. or, if it's even feasible to think along these lines.
thanks much in advance!
tom
Built-in Tweens - Flash's Easing Equation
I've been wondering for a while about the mathematical properties of Flash's built-in easing. I thought it was probably cubic, because a lot of animation programs use cubic splines for their easing. Either that or quadratic.
Turns out Flash has quadratic easing (x^2). Here's a fun science experiment you can try at home. Create a movieclip and tween it on the timeline from _x of 0 to 100, from frames 1 to 11. Put a trace code on the movieclip:
onClipEvent (enterFrame) {
trace(_x);
}
Your output:
1
4
9
16
25
36
49
63.95
80.95
99.95
-----------
x = t*t
=]
~
Robert Penner
Vancouver, Canada
http://www.robertpenner.com
~
[FMX04/AS2.0]Customizing FMX04 Components (label)
Hello, I'm trying to find a clear and concise book or online referece that can assist me in customizing the components that come with FMX04.
Namely the label component. I know how to change the "halo" theme in general to get the buttons and text boxes to change color, but beyond that I am at a lost.
I have tried Macromedia, searched here/Flash Kit/google, but nothing that I can learn from. Live Docs has a feedback part where someone posted some code and while I can cut and paste it, I'm not completely sure how it all worked.
And if I can't figure it out then its just not as fun.
Any help would be greatly appreciated. Focusing on the label component, but any and all are welcome!
Thanks.
SWF Built In AS2 Loaded Into SWF Built In AS3
Noob question: I have a SWF that is built using AS2 that is loaded into a SWF built in AS3. I just need to pass a variable from the AS2 SWF to the main timeline of the AS3 SWF. If BOTH were built in AS3, my path would be this:
ActionScript Code:
MovieClip(parent.parent.parent.parent).whatworkimage = "tm_larrydaisy_large.jpg";
But tracing this path from the AS2 SWF gives me an undefined. I tried changing the "parent" references to "_parent" and removing the "MovieClip" reference but to no avail.
What would be the equivalent path from the AS2 SWF to talk to the AS3 SWF?
Thanks.
Equations Help
Hi
I want to make a project where flash solves equations. like 3x + 2x = 2 - 16
Is there any easy way to do this or is there a tuturial. And is it possible for flash to show the work when it solves the problem.
Example
http://www.hostsrv.com/webmab/app1/M...atics&s3=basic
Thanks
Equations?
Okay so I want to make flash be able to solve equations like 2x-3+4 = 3x-2. I would also like to know if flash can plot equations on a coordinate plane like this y = 2x + 3.
: pirate::rabbi t::ev il:
_____________________________________
i like to over use smilies
As 2 Equations
does anyone know a tutorial about writing equations in AS 2. I'm not sure what the format is.
Penner's Equations
Is there anything that explains Robert Penner's equations a little more in-depth? I look at that code and I'm simply lost.
I don't know when or where to plug those numbers in to get a desired effect. How do I put these actions on buttons? For example, the bounce effect in his AS2 zip. Or the quadratic easing.
Yeah, I know. I'm way lost. But everyone's been there. I'm sure there are many that wish to know more.
If I need to be more specific, here are two effects I'd like:
1. A simple left-to-right motion of a movieclip with a bounce effect when it hits the end point. Not plain ol' elasticity, but Penner's bounce effect.
2. _x, _y, _xscale and _yscale changes on a movieclip to simulate a zoom.
Equations In Flash
Hi,
I am a graduate student at Chalmers University of Tech. in Gothenburg, Sweden and I have an idea of making our mathematical presentations more clear with the aid of flash. For instance it would be neat if one could make the equations change form and insert or remove symbols in a flash animation. Does anybody know if this is possible? Is it easy to write equations in flash?
Thank you
Joakim
Equations In Flash
Hi,
I am a graduate student at Chalmers University of Tech. in Gothenburg, Sweden and I have an idea of making our mathematical presentations more clear with the aid of flash. For instance it would be neat if one could make the equations change form and insert or remove symbols in a flash animation. Does anybody know if this is possible? Is it easy to write equations in flash?
Thank you
Joakim
3D Rendering (equations)
hi guys ...
i need to create something like http://www.houseof3d.com/pete/applets/graph/graph.html ...
where do i start...
thx
Repulsion Equations
Hi
I'm having a little trouble with repulsion equations
I can get things working well with circles as the repulsion is the same in every direction from the object being repulsed (ie. it's just basically from 1 point)
The problem is when I have an irregular shaped object like say a rectangle, this is where my maths starts to let me down
I have been using equations basically similar to this
PHP Code:
homeX = this._x;
homeY = this._y;
FORCE = 2000;
this.onEnterFrame = keepMoving;
function keepMoving(){
homeY+=(Math.random()*3)-1.5;
homeX+=(Math.random()*3)-1.5;
xDif = _root._xmouse-this._x;
yDif = _root._ymouse-this._y;*/
distance = Math.sqrt(xDif*xDif+yDif*yDif);
tempX = this._x-(FORCE/distance)*(xDif/distance);
tempY = this._y-(FORCE/distance)*(yDif/distance);
this._x = (homeX-this._x)/2+tempX;
this._y = (homeY-this._y)/2+tempY;
}
But I can't seem to work it out for an irregular object
I have looked at equations similar to this http://www.krazydad.com/bestiary/bestiary_clumping.html but can't seem to adapt it
Any help would be appreciated
Cheers
Andy
Complicated Equations
Hey,
I'm trying to make a thing where, a person could type in an equation and I could then evaluate it. Understand? Is there any way to make flash like evalute a string? You understand my dilema... Pos if your confused.
Friction Equations?
I have a billiard ball system, whic detects collisions between balls and modifies their x and y velocities accordingly.
I have included a friction variable and I have a very basic system for applying the force of friction for each iteration of movement:
ActionScript Code:
private static var FRICTION:Number = 0.94;......public function move() : Void{ mc._x += vx; mc._y += vy; vx *= FRICTION; vy *= FRICTION;}
This works to a reasonable level of satisfaction, but it doesn't quite feel right. The balls seem to take just a little too long to stop when they've slowed down to a very small velocity. I've tried tweaking the friction constasnt, but I still can't get sometthing that feels exactly right.
Can anyone enlighten me on a more effective method to account for friction when moving balls across a given surface?
Repulsion Equations
Hi
I'm having a little trouble with repulsion equations
I can get things working well with circles as the repulsion is the same in every direction from the object being repulsed (ie. it's just basically from 1 point)
The problem is when I have an irregular shaped object like say a rectangle, this is where my maths starts to let me down
I have been using equations basically similar to this
PHP Code:
homeX = this._x;
homeY = this._y;
FORCE = 2000;
this.onEnterFrame = keepMoving;
function keepMoving(){
homeY+=(Math.random()*3)-1.5;
homeX+=(Math.random()*3)-1.5;
xDif = _root._xmouse-this._x;
yDif = _root._ymouse-this._y;*/
distance = Math.sqrt(xDif*xDif+yDif*yDif);
tempX = this._x-(FORCE/distance)*(xDif/distance);
tempY = this._y-(FORCE/distance)*(yDif/distance);
this._x = (homeX-this._x)/2+tempX;
this._y = (homeY-this._y)/2+tempY;
}
But I can't seem to work it out for an irregular object
I have looked at equations similar to this http://www.krazydad.com/bestiary/bestiary_clumping.html but can't seem to adapt it
Any help would be appreciated
Cheers
Andy
Complicated Equations
Hey,
I'm trying to make a thing where, a person could type in an equation and I could then evaluate it. Understand? Is there any way to make flash like evalute a string? You understand my dilema... Pos if your confused.
Evaluating Equations In Flash 5
So I have a math-related movie (a slope-field program, if you wanted to know) in which the user inputs an equation. Then, when they click a button, the movie goes through and evaluates the equation for x's and y's. It basically says:
for(y=ymin;y<=ymax;y=y+(ymax-ymin)/40) {
for(x=xmin;x<=xmax;x=x+(xmax-xmin)/40) {
//then, in here, i need it to evaluate the equation they put in. so they might've put in "5*Y + X". I need the movie to put the values of x and y into that string that they input and give me an answer (the answer to this particular one when x=1 and y=1 would be 6, for example).
}
}
i thought of using eval(equation); but that didn't work. can anyone help me?
thanks
justin
(www.justinhaaheim.com)
How Do I Use Robert Penner's Equations?
Can someone tell me how I use Robert Penner's equations?
What I want to do is move objects using Actionscript.
I want to have the objects move with accelerations and decelerations.
With the help of this website, I have gone a fair amount towards what I want to achieve. But... I'm kind scratching my head. Penner's code seems confusing and I'm not sure how I can use them.
Any help/pointers would be appreciated.
I've already got the following code (assigned to a movie object) that I can use to do most of what I want:
/* **********************
onClipEvent(load)
{
_x = 0;
_y = 0;
speed = 10;
speedx = speed;
speedy = speed;
}
onClipEvent(mouseDown)
{
targetx = _root._xmouse;
targety = _root._ymouse;
}
onClipEvent(enterFrame)
{
_x += (targetx - _x)/speedx;
_y += (targety - _y)/speedy;
}
********************** */
Thanks.
OM
Trouble Using Variables In Equations
Flash 5. I am trying to make a seamless translation option for my web site. By pressing a language toggle button, a variable called "language" is to be set to 0 if english or 1 if french. In all of my movies depicting projects, I have set up each image to span 2 frames, the first with english and the secind with french text. What actionscript should I use to tell flash to stop if language=0 or to go to the next frame and stop if language = 1. I have tried this about 10 different ways but my syntax must be wrong because it never works! I have also tried a variation where I use gotoAndStop currentframe + language (which means it should stay put if the language value is 0), but this didn't work either.
Thanks for any help or pointers to a good tutorial.
Cheers.
How Do You Get Math Equations Into Flash
Does anyone know the best way to get math equations into flash 2004 mx pro? does flash have an option built in for this, I was always able to add equations to Word easy by using mathtype or equation editor but am stuck on how to do in a flash movie, appreciate any help
|