views:

55

answers:

2

Hello,

I have been using the evt.updateAfterEvent() whenever a mouse is clicked.

Is it possible to call an update on the entire stage to remove any pixels which are no longer being used?

Thanks

~ Kyle.

A: 

You could possibly try dispatching an Event.RESIZE with the bubbling set to true, depends what the situation is really.

Karl Freeman
A: 

As far as I know there isn't a updateAfterEvent() method of the Event class. This might help though:

The stage is a display object (sort of) just like anything else. You can do stage.addEventListener(Event.ENTER_FRAME, handlerFunction); to do any cleanup of display objects no longer needed or anything else you want to accomplish every frame.

You can also manually dispatch an defined or arbitrary event after you handle your mouse click like this.

stage.dispatchEvent(new Event(Event.CHANGE));

or this

stage.dispatchEvent(new Event("arbitraryEvent"));

and then listen for it anywhere else.

You don't have control at the pixel level however.

Brandon Cook