[Tweener] onStart and onStartParams Noob Question

Matt Tedeschi matt at qwlproductions.com
Fri Oct 24 12:16:39 PDT 2008


Sorry, but having a little trouble understanding the docs.  New to AS3,
Tweener, and OOP.

I tried to create a function with the following parameters and call it
from an addTween function using 'onStart:myFunction'

function myFunction():void {
this.graphics.lineStyle(2, 0xFF0000, 1, true, "normal", "square",
"miter"); this.graphics.drawRect(0, 0, 55, 55);
}

But no combo I tried works.  The only thing I could get to work is the
following, but I have to repeat this code 40 times at least.  How can I
call the params from a function?

Tweener.addTween(mcThumb1, { y: 284, time: .7, delay: 5, transition:
"easeOut",
            onStart:function() { this.graphics.lineStyle(2, 0xFF0000, 1,
true, "normal", "square", "miter"); this.graphics.drawRect(0,
0, 55, 55); }} );

Thanks in advance.



More information about the Tweener mailing list