Friday, March 26, 2010

Animate on Mouseover on lower layer.

So, I had a problem animating a movie clip on mouseover which was solved here: http://forums.adobe.com/thread/496745?tstart=0 Now the problem I'm having is that I want to movie some of those clips to a lower layer so that they animate behind an object on the top layer.

If I put the same code on that bottom layer as in the top layer,

leaf.addEventListener(MouseEvent.ROLL_OVER,doStartAnim); Animate on Mouseover on lower layer.

As far as having actionscript in your file, you can usually manage with just one layer dedicated to it.?It sounds like you are trying to place it on the layer where the content is, which is not necessary, and can make things a little hard to manage... keeping your code in one place makes it easier to deal with.

When you assign event listeners to objects, those objects have to exist in the same frame (not layer) as that code, otherwise you will get errors like the one regarding leaf5....?you could also get that error if leaf5 does not have its instance name assigned.

As far as cutting out half the code... event lsteners work with event handler functions, so if you remove the handler the listener will not have any impact, except possibly to generate an error message.

Animate on Mouseover on lower layer.

Foiled by a missing instance name. I do'nt know why I missed that. That's exactly what it was. Thanks!

You're welcome

No comments:

Post a Comment