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
Printable View
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
A script like this, attached to the movieclip, should do it:
code:
on(rollOver)
{
this.swapDepths(1000);
this._x = 200;
this._y = 200;
}
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.
Found that out the hard way
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.
Put the mask and the object being masked inside of its own MC and call that mc to the front.Quote:
Originally Posted by x66x66
Just a little late..