|
|
|
#1 |
|
Junior Member
Join Date: Oct 2004
Posts: 10
|
Actionscript to bring layer to front
Hi most helpfull
I am using MX 2004. I have several MC clips near each other. I would like to know if you have a tutorial that will show me how to bring the layer to the front on rollOver and move it to an X, Y co-ordinate. Thanks |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
|
A script like this, attached to the movieclip, should do it:
I've attached a sample flash file. It's worth noting that rollOver events and moving the _x _y coordinates often produce strange results. For example, if you move the movie out from under the mouse, then you will immediately get a rollOut event. In this example, I am not moving the movies "back" on a rollOut event, which is something you might want to do, but keeping the above in mind, this can also set up an undersirable oscillation: 1. the mouse moves over the movie, it gets a rollover event. 2. The rollover event handler moves the movie out from under the mouse. the movie gets a rollout event. 3. the rollout event handler moves the movie back under the mouse. the movie gets a rollover event. 4. Repeat from step 2. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2004
Posts: 10
|
Thanks
Found that out the hard way
|
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Mar 2007
Posts: 1
|
masking
I tried that in one of my Dresser games on a symbol under a mask and the mask didn't work once the button was pressed. How come and is their a way to fix that?
PS=I know this board is like 2 years old, but oh well. |
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: Jun 2008
Posts: 2
|
Quote:
Just a little late.. |
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|