Mark Topper
Mark Topper

Reputation: 239

AS3, Flash - Disable all buttons? Except one?

Is it possible somehow to make a function which will disable all buttons? And like make grey alpha overlay over the whole flash file?

But only one movie clip should not be overlayed, and one button should not be disabled.

Can this be done some easy way, or do I have to make a code to disable all single button?

Upvotes: 2

Views: 341

Answers (1)

Billy
Billy

Reputation: 886

  1. Create an overlay movie clip that would intercept the clicks.
  2. addChild(overlay) the overlay.
  3. addChild(button) the button you want over the overlay.

addChild moves whatever object to the topmost tier of the movie clip you are adding it to. So passing the gray overlay to addChild last draws it over all your objects on the screen. Then calling it with the button you want as a parameter makes it show up over the gray overlay since it is the last object you passed addChild().

Upvotes: 1

Related Questions