BUG: onPress Fullscreen AS2 published as Flash9

Working on a project today, I realized some very strange behavior when going fullscreen in Flash. Everytime I went fullscreen, the player would continue to have a mouse over state until I clicked to activate it again. At first I thought maybe I'm setting a button, sizing it oddly, or something to that effect. However after further investigation, what appeared to actually be happening was the player didn't seem to be registering the system's mouse up event. With that in mind, I knew that the onPress event was my fire starter, and could do a simplified test. However, the odd thing about this behavior is that it only occurred when publishing as Flash 9/AS2. If I published as Flash 8/AS2, it worked like a charm. So this is a heads up to everyone which may prevent some hair pulling.

If you want to test it yourself, just create a simple button called fullscreen_btn and add the following code to your fla (publish as Flash 9/AS2)

fullscreen_btn.onPress = function (p_evt:Object):Void
{
Stage["displayState"] = (Stage["displayState"] != "fullScreen")? "fullScreen" : "normal";
}

One Response to “BUG: onPress Fullscreen AS2 published as Flash9”

  1. Adrian Parr Says:

    Hi Kenny,

    This doesn’t happen if you use onRelease instead.

    Adrian

Leave a Reply