Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
KTrentLR

Tweens in Different Movieclips w/ same name are conflicting

Recommended Posts

I have three movie clips on the stage.

Inside each movie clip are four objects named "hover1" -- "hover4"

 

Inside each movie Clip is this code.

for (i=1;i<=numberOfQustions;i++){
//setup hover effects
eval("hover"+i).useHandCursor = false;
eval("hover"+i).onRollOver = function (){TweenLite.to(this,.5*tT,{_alpha:50});};
eval("hover"+i).onRollOut = eval("hover"+i).onDragOut = function (){TweenLite.to(this,.5*tT,{_alpha:0});};
}

 

When I mouse between the objects in the same movie clip, everything works perfectly. However, when I quickly move from one movie clip to another, onto a hover with the same name in another movie clip, the "fade out" stops.

 

I tried adding "overwrite" to the tweens (0,1,2,3), but not gave the correct effect.

 

Please help! I don't want to make the names in each MC unique - it defeats what I'm going for, the contents of these movie clips needs to be identical.

 

Thanks!

Link to comment
Share on other sites

If you trace() the target of the tweens, they're unique, right? They should be if they're in different MovieClips because trace() on a MovieClip shows the whole path. If they're unique, I'm just as baffled as you are as to why overwriting is occuring - please post a sample FLA that demonstrates the issue (PLEASE make it as simple as possible with only the code necessary to reproduce the problem)

Link to comment
Share on other sites

Sorry, my bad.

 

Yes, I had simply copied and pasted the movie clips on the stage, and forgot to change the instance names. Once the instance names were unique of each movie clip, everything worked fine.

 

ID-10-T error.. i.e. The problem excited between my chair and keyboard. lol

Link to comment
Share on other sites

Bingo :)

 

Glad to hear it wasn't a problem with the code itself.

 

Happy tweening

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