Update after stage resize

I’m trying to call a function only **after **the stage is resized.

ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]**var**[/COLOR] stageSizeListener:[COLOR=#0000FF]Object[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]Object[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

stageSizeListener.[COLOR=#0000FF]onResize[/COLOR] = [COLOR=#000000]function[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
doFunctionCOLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]

[COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]addListener[/COLOR]COLOR=#000000[/COLOR];
[/LEFT]
[/FONT]

That calls the function constantly as the stage is resized, but how would I call the function only once after the stage is resize?! I’ve tried ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]if[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000FF]Stage[/COLOR].[COLOR=#0000FF]width[/COLOR] != previousStageWidth[COLOR=#000000])[/COLOR]
[/LEFT]
[/FONT]

but where can I define the variable previousStageWidth?? Arrggggh. Please help before i’m crack my skull open on my desk!