Jump to content
Search Community

timeLineMax not playing ...

steasy test
Moderator Tag

Recommended Posts

Hey all !

 

i'am new on the board and i have a problem with one of my class.

i ams using timelinemax in couple classes and they work properly.

 

in the following one, the tweening effects dont play, have a look and let me know ...

 

 

tks in advance !

 

btw i love greensock, tks greensock's father !

 

package
{
import com.greensock.*;
import com.greensock.easing.*;

import flash.display.MovieClip;
import flash.events.MouseEvent;

public class Retrospect extends MovieClip
{
	private var bgTv:bgtv = new bgtv();
	private var exiRetro:exit = new exit();
	private var aig1:aiguille1 = new aiguille1();
	private var aig2:aiguille2 = new aiguille2();
	private var montre:clock = new clock();
	private var retroTitre:titreRetro = new titreRetro();
	private var bgRetro:fondVideoRetro = new fondVideoRetro();

	public function Retrospect():void
	{
		exiRetro.x = exiRetro.y = 10;
		exiRetro.buttonMode = true;
		aig1.x = aig2.x = 170;
		aig1.y = aig2.y = 352;
		montre.x = 170;
		montre.y = 900;
		retroTitre.x = 400;
		retroTitre.y = -50;
		bgRetro.x = 560;
		bgRetro.y = 360;

		addChild(bgTv);
		addChild(exiRetro);
		addChild(retroTitre);
		addChild(montre);
		addChild(aig1);
		addChild(aig2);
		addChild(bgRetro);

		var timelineRetrospective:TimelineMax = new TimelineMax();
		timelineRetrospective.append(new TweenLite(retroTitre, .25, {y:65}));
		timelineRetrospective.append(new TweenLite(montre, .25, {y:330}));
		timelineRetrospective.append(new TweenLite(aig1, .25, {rotation:360}));
		timelineRetrospective.append(new TweenLite(aig2, .25, {rotation:360}));


		exiRetro.addEventListener(MouseEvent.MOUSE_OVER, exiRetroOver);
		exiRetro.addEventListener(MouseEvent.MOUSE_OUT, exiRetroOut);
		exiRetro.addEventListener(MouseEvent.CLICK, exiRetroClick);
	}

	private function exiRetroClick(me:MouseEvent):void
	{
		removeChild(bgTv);
		removeChild(aig1);
		removeChild(aig2);
		removeChild(montre);
		removeChild(retroTitre);
		removeChild(bgRetro);
		removeChild(exiRetro);
	}

	private function exiRetroOver(me:MouseEvent):void
	{
		exiRetro.gotoAndStop(2);
	}

	private function exiRetroOut(me:MouseEvent):void
	{
		exiRetro.gotoAndStop(1);
	}
}
}

Link to comment
Share on other sites

hmmm, nothing jumps out at me.

 

did it ever work?

 

can you trace the duration of the timeline?

 

trace(timelineRetrospective.duration)

 

or force it to play with?

 

timelineRetrospective.restart()

 

If you aren't getting errors, it is very strange.

 

can you simplify it down to 1 tween and see if it works? perhaps have less external dependencies?

 

I don't know if there is a conflict with the external classes.

 

very strange.

 

make the durations of the tweens longer or set the timeScale to .5 maybe you are just missing it. its only a second long. don't know.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...