as question
- Started
- Last post
- 9 Responses
- ********
How do I remove the onRollOver and onRollOut and onRelease states of a movieclip?
I thought it was a simple as:
delete mcName.onRollover
but that does fuck all. Any ideas?
- alloyd0
mc1_btn._enabled = false;
That'll disable the button.Never had the need to remove that...you also may want to try renaming the clips instance name to something else and then renaming it back.
mc1_btn._name = newName;
newName._name = mc1_btn;Not sure if that works tho. Give it a shot, can't hurt.
- joyride0
mcName.enabled = false;
= true to enable again
- ********0
enabled only works on buttons no? I tried it anyway and no joy. These are movie clips.
The name change thing might work but is a bit of a hack. There must be a proper way of removing an interaction from a movie.
- joyride0
no enabled will work on _mc's. Do you have the on (rollOver) AS on the button?
on the rollOver action add:
trace(this)
this.enabled = false;This should disable the mc. if it don't then you've got other problems
you might have a pathing problem
- UndoUndo0
are you calling a function with the mouse event, if so set a variable to be true or false (depending if you want the mc to work) and then check the variable from within the function???
- blaw0
set the onWhatever function to nothing, set useHandCursor to false.
- ********0
Cheers Undo, it wasn't so much wether I wanted the onRelease function to work (I have a variable for that) it was more an aesthetic problem (no pointer once a transition starts).
Turns out it was a conflict with calling the code delete mc.onRollover from within a function called at the end of a tween funciton. It's a big fat arse of a bit of code turning on and off 36 clips at random. But if I trun off the interactions before I start the tween function all is well.
- joyride0
ahhh... yes the flash compiler works from top down. If you clear a function before you run all the code in the function it pretty much stops. Its kinda whack sometimes
- UndoUndo0
cool, sounds like a typical easy friday over there skt!! ;)