Hello,
I’m fed up of having to import the tweener class every time I create a tween, so I want to create a global function that I can call which will import them for me, as well as executing a tween.
So something like this:
_global.globalTweener = function(mcToTween,tweenDeets){
[INDENT]import caurina.transitions.Tweener;
import caurina.transitions.properties.ColorShortcuts
import caurina.transitions.properties.DisplayShortcuts;
import caurina.transitions.properties.FilterShortcuts
ColorShortcuts.init();
DisplayShortcuts.init();
FilterShortcuts.init();
Tweener.addTween(mcToTween,{tweenDeets});
[/INDENT]}
globalTweener(grim_mc, '"x:60 _y:60, time:1, transition:"linear"')
The problem I’m having is that I can’t pass the parameters as a string… Do I need to convert it into code first? Is there a way I can do this?
Thanks!
Edit: I know I could pass each parameter individually, but I want to avoid doing this, as the diversity of the tweens I need to do is great, and it would will mean passing about 100,000,000 variables to the tween… okay maybe not that many, but probably about 20 variables which would probably take longer than the inital hassle of importing the class.