Skip to main content
Participant
October 20, 2006
Question

temporarily disabling a movieclip for hittest

  • October 20, 2006
  • 2 replies
  • 370 views
Hi

I want to temporarily disable a movieclip,
so hittest won't return a true.

The example:
I have 4 answers (movieclips)
that can be dropped on 4 questions (movieclips)
but I want the questions to appear one after the other

If I first place all 4 questions and make all but the first invisble
The invisible movieclips still retrun a true on hittest

How can I disable this?

Thank you
This topic has been closed for replies.

2 replies

GentleGAuthor
Participant
October 20, 2006
Thanks for the reply Tim

No this didn't work
It would only allow me to disable 'the answers being dragged'
Not the 'questions not to be hittest=true'

I think I'll just use an extra counter with an if statement

Thansk again

Cheers
Participating Frequently
October 20, 2006
Will setting the "enabled" property to false do what you want?

question_mc.enabled = false;

I know this disables the "button-like" features of the movieclip but I'm not sure that it will disable the hittest feature.


Tim
Participating Frequently
October 20, 2006
Never mind, just tried it and it doesn't work. I think your best bet would be to move them off the visible stage until they are needed.

question_mc._visible = false;
question_mc._x = -1000; // Moves it off the stage.

Then when you want them to be active, place them back onto the stage:

question_mc._visible = true;
question_mc._x = 50;


You don't have to set the _visible property to false, I just do that so there is not a chance that the movieclip gets rendered onto the screen for a split second before it gets moved off. It avoids any chance of the information just flashing on the screen.

Tim