i had to make a EventListener for TweenMax.fromTo but i am getting error
var myTween:TweenMax = new TweenMax.fromTo(my_mc, 1, {x:0, y:0}, {x:300, y:200,ease:Expo.easeOut});
myTween.addEventListener(Event.COMPLETE,playIntro);
function playIntro (e:TweenEvent):void {
trace("MyTween Finished");
}
1048: Method cannot be used as a constructor.
var myTween:TweenMax = new TweenMax.fromTo(my_mc, 1, {x:0, y:0}, {x:300, y:200,ease:Expo.easeOut});
Another Method Same Error
import com.greensock.*;
import com.greensock.easing.*;
import fl.transitions.TweenEvent;
var myTween:TweenMax = new TweenMax.fromTo(my_mc, 1, {x:0, y:0}, {x:300, y:200,ease:Expo.easeOut,onComplete:myFunction});
function myFunction (onComplete):void {
trace("MyTween Finished");
}
1048: Method cannot be used as a constructor.
var myTween:TweenMax = new TweenMax.fromTo(my_mc, 1, {x:0, y:0}, {x:300, y:200,ease:Expo.easeOut});
Please put on some Suggestion