Hi all,
just started using the GTween library (I used Tweener before) and I really like the idea of having event listeners instead of callbacks.
I’m having a weird problem though, I think I must be missing something. I’ve imported the packages like so
[AS]import com.gskinner.geom.;
import com.gskinner.motion.; [/AS]
but then if I try to type something as a GTween I get an error
[AS]
var fadeLoader:GTween = new GTween(_preloader , 0.5 , {alpha:0});
fadeLoader.addEventListener(Event.COMPLETE , function(e:Event):void{trace(‘done’)});[/AS]
gives the error
[AS]
1061: Call to a possibly undefined method addEventListener through a reference with static type com.gskinner.motion:GTween.[/AS]
Am I missing something here? I’m looking at an example on gskinner.com and I can’t see any obvious differences
[AS]
var myTween:GTween = new GTween(mySprite, 2, {x:200});
myTween.addEventListener(Event.COMPLETE, handleTweenComplete);[/AS]
any help much appreciated!