FORUMS: list search recent posts

Using the Tween Class in Flash 8

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rob Stemm
Using the Tween Class in Flash 8
on Dec 29, 2005 at 2:20:03 am

I have some questions about using the tween class in flash 8. Basically I've set up a box movie clip and two combo boxes so the user can alter the properties of the tweening. This is based off of Lee Brimlow's tweening exercise on http://www.gotoandlearn.com

my problem is that the tween class doesn't recognize a string variable that is being set by two combo boxes. (myObject_list and myEasing_list) When the user releases myButton the String variable finalEasing has the string (myObject_list.value+"."+myEasing_list.value) or lets say Strong.easeIn in one case. When I trace this the everything looks correct, but the box that is supposed to tween doesn't react to the new tween properties.

do I need to do an eval(finalEasing) to get the tween to understand func parameter to be Strong.easeIn

Any help would be much appreciated

Thanks!
Rob

Below is my Actionscript

==============================================
import mx.transitions.Tween;
import mx.transitions.easing.*;

var finalEasing:String;

myButton.onRelease = function () {
finalEasing = (myObject_list.value+"."+myEasing_list.value);
trace ("final Easing String = "+finalEasing);

if (box._xscale < (150)) {
grow(box);
} else {
shrink(box);
}
}

function grow(who) {
var tw:Tween = new Tween(who,"_xscale",finalEasing,100,400,1,true);
var tw2:Tween = new Tween(who,"_yscale",finalEasing,100,400,1,true);
}

function shrink(who) {
var tw:Tween = new Tween(who,"_xscale",finalEasing,400,100,1,true);
var tw2:Tween = new Tween(who,"_yscale",finalEasing,400,100,1,true);
}

======================


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]