As far as I can tell, the first tutorial documenting this actionscripting feature of MX 2004 on the web.
http://www.designcon...sing/index.html
never submitted a tute here, before. Let me know if I should redo it in the template format.
Thanks,
d.
Undocumented tweening and easing in Flash MX 2004
...
&nsbp;
#2
Posted 17 April 2004 - 11:17 AM
thanks
for the new ideas
------
for the new ideas
------
-- --- - -- ---- - -- ---- -- ---- --- - -- ---
My site: Freelance webdesign
My site: Freelance webdesign
#3
Posted 15 May 2004 - 09:59 PM
Many thanks for a most useful tutorial. From it I've generated a routine that expands or shrinks a movieclip (typically an image).
I'm new to Flash via Director/Lingo and I'm missing the ease with which Lingo routines can be generalised and applied, with parameters, to multiple objects in Director.
Grateful for pointers on efficent ways to generalise routines like the one below in AS using MX2004Pro to avoid having to paste the whole thing into each MC to which it applies.
I'm also not entirely sure why the new transition is assigned to a variable or whether or not the multiple variables that result might generate memory issues in multiple applications.
Here is the code, in case it helps someone else:
// changes size of a MC in MX2004
// using undocumented transition code derived from
// http://www.designcon...sing/index.html
// to generate a dynamic resize rather than a jump
onClipEvent (load) {
s0 = 4;
t0 = 0.8;
w0 = this._width;
h0 = this._height;
w1 = w0*s0;
h1 = h0*s0;
ease0=mx.transitions.easing.Strong.easeOut;
}
on (rollOver) {
this.Tween_x = new mx.transitions.Tween(this, "_width", ease0, w0, w1, t0, true);
this.Tween_y = new mx.transitions.Tween(this, "_height", ease0, h0, h1, t0, true);
}
on (rollOut) {
this.Tween_x = new mx.transitions.Tween(this, "_width", ease0, w1, w0, t0, true);
this.Tween_y = new mx.transitions.Tween(this, "_height", ease0, h1, h0, t0, true);
}
I'm new to Flash via Director/Lingo and I'm missing the ease with which Lingo routines can be generalised and applied, with parameters, to multiple objects in Director.
Grateful for pointers on efficent ways to generalise routines like the one below in AS using MX2004Pro to avoid having to paste the whole thing into each MC to which it applies.
I'm also not entirely sure why the new transition is assigned to a variable or whether or not the multiple variables that result might generate memory issues in multiple applications.
Here is the code, in case it helps someone else:
// changes size of a MC in MX2004
// using undocumented transition code derived from
// http://www.designcon...sing/index.html
// to generate a dynamic resize rather than a jump
onClipEvent (load) {
s0 = 4;
t0 = 0.8;
w0 = this._width;
h0 = this._height;
w1 = w0*s0;
h1 = h0*s0;
ease0=mx.transitions.easing.Strong.easeOut;
}
on (rollOver) {
this.Tween_x = new mx.transitions.Tween(this, "_width", ease0, w0, w1, t0, true);
this.Tween_y = new mx.transitions.Tween(this, "_height", ease0, h0, h1, t0, true);
}
on (rollOut) {
this.Tween_x = new mx.transitions.Tween(this, "_width", ease0, w1, w0, t0, true);
this.Tween_y = new mx.transitions.Tween(this, "_height", ease0, h1, h0, t0, true);
}
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users