[Tweener] Use var to pass tween property?
Jeremy Davis
jwdavis1981 at gmail.com
Tue Jan 19 11:28:45 PST 2010
try changing the whichProp to a uint instead of a String so:
function tweenMe(who:Object, whichProp:uint, howMuch:Number, howLong:Number,
transition:String, delayTime:Number):void
{
Tweener.addTween(who, {whichProp: howMuch, time:howLong,
transition:transition, delay:delayTime});
}; //End tweenMe
On Tue, Jan 19, 2010 at 2:26 PM, Mitch Rosefelt <PixelDroid at thepixelfarm.com
> wrote:
> Hi all:
> Is it possible to pass the property for a tween thru a var?
> For example, here is a general purpose tween function:
>
> function tweenMe(who:Object, whichProp:String, howMuch:Number,
> howLong:Number, transition:String, delayTime:Number):void
> {
> Tweener.addTween(who, {whichProp: howMuch, time:howLong,
> transition:transition, delay:delayTime});
> }; //End tweenMe
>
> which could be invoked with:
>
> tweenMe (timelineMC, "x", timelineScrollAmt, 1.5, "easeInOutQuart", 0 );
>
> which generates this error:
>
> ## [Tweener] Error: The property 'whichProp' doesn't seem to be a normal
> object property of [object MovieClip] or a registered special property.
>
> I've also tried it w/not typing the property, but get the same error.
>
> Thanks much.
> Mitch
>
>
>
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>
>
--
Thanks,
Jeremy Davis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20100119/463705be/attachment.htm>
More information about the Tweener
mailing list