I don’t know how many times I have come a crossed this and I’m sure there is a simple solution to it but it’s just not coming to me. The most simple way I can think of right now uses a variable. If I could do this with out a variable, it would be amazing. Here is how I do it:
stage.addEventListener(Event.ENTER_FRAME, message);
var messageDone:Boolean = false;
function message(event:Event):void
{
... other code ...
if (!messageDone)
{
trace("This message is only played once instead of once every frame");
messageDone = true;
}
}
Also I was wondering if there is an eventHandler that triggers, for example, when the var messageDone == true ? Please, any advice would be much appreciated.:thumb2: