PDA

View Full Version : AS2 · Stage.width listener



FNfG
April 13th, 2009, 12:42 PM
Line 1 Frame 1:


function screenRes (){

if(Stage.width <= 1280){

trace("Stage.width is less than or equal to variable 2");

}
}

var listenerTwo:Object = new Object ();
Stage.addListener(listenerTwo);

listenerTwo.onResize = screenRes;

screenRes();


I am trying to trace the results of my listener when the browser is resized...no avail. Are you able to see what I am doing wrong?

FNfG
April 13th, 2009, 03:14 PM
I am trying to trace the results of my listener when the browser is resized...no avail. Are you able to see what I am doing wrong?

I closed Flash, reopened it and *boom now she works...

:disco: