PDA

View Full Version : [fmx2004] disabling movieclips?



phyzar
January 14th, 2004, 04:49 AM
hey guys,

im aware of the movieclipinstancename.enable=false;

but i cant seem to get it to work.

I want it to work because i slide in a sound control panel over my content (also in a movieclip) but the mouse still reacts to mouse events of the content under the sound control panel. - eg i have a flash email form, and the icon changes to it...

Any suggestions?
Many many thanks,
JD

Voetsjoeba
January 14th, 2004, 06:33 AM
The anbled property is for buttons, not for movieclips. If you want to disable the event handlers, just use dynamic event handlers and then delete them:



yourMC.onRollOver = function(){
trace("rolling over disabled");
delete this.onRollOver
}

senocular
January 14th, 2004, 06:49 AM
enabled will work for movieclips too when concerning button events - just not things like onEnterFrame and whatnot.

deleting would be a good aproach or even just using an if statement along with the enabled setting.


yourMC.onEnterFrame = function(){
// only work if its enabled
if (this.enabled){
// ...
}
}