Hello everyone,
Im new here and got a probably a noobie question but can't handle it myself so here is it;
import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;
var mc:myMC = new myMC();
addChild(mc);
mc.x = -200;
mc.y = stage.stageHeight/2;
var tl:TimelineMax = new TimelineMax({paused:true,yoyo:true});
tl.append(TweenMax.to(mc,2,{x:stage.stageWidth+200,onComplete:geriSar}));
function geriSar()
{
tl.reversed = ! tl.reversed;
tl.resume();
}
function Basla()
{
tl.play();
}
baslat.addEventListener(MouseEvent.CLICK, animasyonBaslat);
function animasyonBaslat(e:MouseEvent)
{
Basla();
}
durdur.addEventListener(MouseEvent.CLICK, animasyonDurdur);
function animasyonDurdur(e:MouseEvent)
{
tl.pause();
}
yeniden.addEventListener(MouseEvent.CLICK, animasyonYenidenBaslat);
function animasyonYenidenBaslat(e:MouseEvent)
{
tl.restart();
}
I'm having trouble with this last MouseEvent. tl.restart doesnt work there and i don't get it why ?
Thx for advise.
Also i check other post's about this but didn't see soo