Jump to content
Search Community

Not Tween after added new movieclip

aaronyeo22 test
Moderator Tag

Recommended Posts

Please help me look at the code. if i add one more movieclip in flash IDe this line of code not able to tween it.

 

sea.appendMultiple(TweenMax.allFrom(aaa, .5, {alpha:0,scaleX:0,scaleY:0,rotationY:35,ease:Back.easeOut},0.03),-1 );

i have no idea how to solve it.

 

var aaa:Array = new Array (motors.m1,motors.m2,motors.m3,motors.m4,motors.m5,
					  motors.m6,motors.m7,motors.m8,motors.m9,motors.m10,
					  motors.m11,motors.m12,motors.m13,motors.m14,motors.m15,
					  motors.m16,motors.m17,motors.m18,motors.m19,motors.m20,
					  motors.m21,motors.m22,motors.m23,motors.m24,motors.m25,
					  motors.m26,motors.m27,motors.m28,motors.m29,motors.m30,
					  motors.m31,motors.m32,motors.m33,motors.m34,motors.m35,
					  motors.m36,motors.m37,motors.m38,motors.m39,motors.m40,
					  motors.m41,motors.m42,motors.m43,motors.m44,motors.m45,
					  motors.m46,motors.m47,motors.m48,motors.m49,motors.m50,
					  motors.m51,motors.m52,motors.m53,motors.m54,motors.m55,
					  motors.m56,motors.m57,motors.m58,motors.m59,motors.m60,
					  motors.m61,motors.m62,motors.m63,motors.m64,motors.m65,
					  motors.m66,motors.m67,motors.m68,motors.m69,motors.m70,
					  motors.m71,motors.m72,motors.m73,motors.m74,motors.m75,
					  motors.m76,motors.m77,motors.m78,motors.m79,motors.m80,
					  motors.m81,motors.m82,motors.m83,motors.m84,motors.m85,
					  motors.m86,motors.m87,motors.m88,motors.m89,motors.m90,
					  motors.m91,motors.m92,motors.m93,motors.m94,motors.m95,
					  motors.m96,motors.m97,motors.m98,motors.m99,motors.m100);
var sea:TimelineMax = new TimelineMax();

sea.appendMultiple([new TweenLite(lorry_a, 1, {alpha:0}),
		      new TweenLite(lorry, 1, {alpha:0}),
                             new TweenLite(comp_a, 1, {alpha:0}),
		      new TweenLite(comp, 1, {alpha:0}),
                             new TweenLite(he_a, 1, {alpha:0}),
		      new TweenLite(mach, 1, {alpha:0}),
		      new TweenLite(ac_a,1,{alpha:0}),
		      new TweenLite(auc, 1, {alpha:0})],
                       -1,
                       TweenAlign.START,
                       0.1);
sea.append(TweenMax.to(motor_a,1,{x:500}))

sea.append(TweenMax.to(motor,1,{x:500}),-1)
sea.append(TweenMax.to(bike,1,{x:530}),-1)

sea.append(TweenMax.to(motor_a,1,{alpha:0}),-.3)
sea.append(TweenMax.to(motor,1,{alpha:0,ease:Elastic.easeOut}),-1)
sea.append(TweenMax.to(bike,1,{alpha:0}),-1.5)

sea.appendMultiple(TweenMax.allFrom(aaa, .5, {alpha:0,scaleX:0,scaleY:0,rotationY:35,ease:Back.easeOut},0.03),-1 );
sea.append(TweenMax.to(qwe,1,{alpha:0}),-1)
sea.append(TweenMax.to(learn,1,{alpha:1}))


sea.stop();

motor_a.addEventListener(MouseEvent.CLICK,abc);

learn.addEventListener(MouseEvent.CLICK,goTo);

function abc(e:MouseEvent):void{

sea.play();
}

function goTo(e:MouseEvent):void{

sea.reverse();
}

 

thanks

 

 

regard

 

aaron

Link to comment
Share on other sites

There must be something else going on in your file. TweenLite/Max/TimelineLite/Max don't care how many MovieClips you have on the stage. They don't impose some arbitrary limitation like that. I'd need to see your FLA to troubleshoot it effectively, so feel free to post it if you cannot figure out the problem on your own. Also, why are you appending the first tweens with negative start times (so they're positioned in the TimelineMax before its starting time of 0)?

Link to comment
Share on other sites

just little tip if you want to save yourself the trouble of typing the name of every item into your array you can build the array like so:

 

 

var aaa:Array = new Array();

for(var count:int = 1; count	aaa.push(motors["m" + count]);
}

Link to comment
Share on other sites

i prefer not to get large email attachments.

 

use a service like https://www.yousendit.com/

 

I would strongly suggest that you take your current file and strip it down to what you believe is the core suspect.

 

remove all code except :

var aaa:Array = new Array (motors.m1,motors.m2,motors.m3,motors.m4,motors.m5,
                   motors.m6,motors.m7,motors.m8,motors.m9,motors.m10,
                   motors.m11,motors.m12,motors.m13,motors.m14,motors.m15,
                   motors.m16,motors.m17,motors.m18,motors.m19,motors.m20,
                   motors.m21,motors.m22,motors.m23,motors.m24,motors.m25,
                   motors.m26,motors.m27,motors.m28,motors.m29,motors.m30,
                   motors.m31,motors.m32,motors.m33,motors.m34,motors.m35,
                   motors.m36,motors.m37,motors.m38,motors.m39,motors.m40,
                   motors.m41,motors.m42,motors.m43,motors.m44,motors.m45,
                   motors.m46,motors.m47,motors.m48,motors.m49,motors.m50,
                   motors.m51,motors.m52,motors.m53,motors.m54,motors.m55,
                   motors.m56,motors.m57,motors.m58,motors.m59,motors.m60,
                   motors.m61,motors.m62,motors.m63,motors.m64,motors.m65,
                   motors.m66,motors.m67,motors.m68,motors.m69,motors.m70,
                   motors.m71,motors.m72,motors.m73,motors.m74,motors.m75,
                   motors.m76,motors.m77,motors.m78,motors.m79,motors.m80,
                   motors.m81,motors.m82,motors.m83,motors.m84,motors.m85,
                   motors.m86,motors.m87,motors.m88,motors.m89,motors.m90,
                   motors.m91,motors.m92,motors.m93,motors.m94,motors.m95,
                   motors.m96,motors.m97,motors.m98,motors.m99,motors.m100);
var sea:TimelineMax = new TimelineMax();

sea.appendMultiple(TweenMax.allFrom(aaa, .5, {alpha:0,scaleX:0,scaleY:0,rotationY:35,ease:Back.easeOut},0.03),-1 );

 

of course leave the import statements.

 

Remove everything but the motors movie from the stage.

 

once you have that small file built and working, add more Movie Clips to motors.

 

You will see that adding more Movie Clips is not a problem for TimelineMax.

 

If you see a problem at this stage then it will be very easy for us to pinpoint the issue.

 

If you don't see a problem start adding code and symbols back into this file and test regularly. You will surely find the problem.

 

Carl

Link to comment
Share on other sites

hi carl schooff

 

thanks of your recommendation.

 

 

var aaa:Array = new Array (motors.m1,motors.m2,motors.m3,motors.m4,motors.m5,

motors.m6,motors.m7,motors.m8,motors.m9,motors.m10,

motors.m11,motors.m12,motors.m13,motors.m14,motors.m15,

motors.m16,motors.m17,motors.m18,motors.m19,motors.m20,

motors.m21,motors.m22,motors.m23,motors.m24,motors.m25,

motors.m26,motors.m27,motors.m28,motors.m29,motors.m30,

motors.m31,motors.m32,motors.m33,motors.m34,motors.m35,

motors.m36,motors.m37,motors.m38,motors.m39,motors.m40,

motors.m41,motors.m42,motors.m43,motors.m44,motors.m45,

motors.m46,motors.m47,motors.m48,motors.m49,motors.m50,

motors.m51,motors.m52,motors.m53,motors.m54,motors.m55,

motors.m56,motors.m57,motors.m58,motors.m59,motors.m60,

motors.m61,motors.m62,motors.m63,motors.m64,motors.m65,

motors.m66,motors.m67,motors.m68,motors.m69,motors.m70,

motors.m71,motors.m72,motors.m73,motors.m74,motors.m75,

motors.m76,motors.m77,motors.m78,motors.m79,motors.m80,

motors.m81,motors.m82,motors.m83,motors.m84,motors.m85,

motors.m86,motors.m87,motors.m88,motors.m89,motors.m90,

motors.m91,motors.m92,motors.m93,motors.m94,motors.m95,

motors.m96,motors.m97,motors.m98,motors.m99,motors.m100);

var sea:TimelineMax = new TimelineMax();

 

sea.appendMultiple(TweenMax.allFrom(aaa, .5, {alpha:0,scaleX:0,scaleY:0,rotationY:35,ease:Back.easeOut},0.03),-1 );

 

 

I try to run the above code (workable) and slowly plugin the other code and movieclips and everything works fine.

 

Actually i have no idea what is going on, not matter how thanks.

 

regard

 

aaron

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...