I'm trying to create a dynamic layout for a flex app.
I need a boolean which is dependent upon the overall width of the browser window with which to set states, something along the lines of
if(this.parentApplication.width<950)
{
currentState = "wide"
}else{
currentState = "narrow"
}
However, I can't just state this in the fx:Script tags, so what is the best way to implement this? enterFrame="application1_enterFrameHandler(event)"
works, but I can't help but feel like this is probably unnecessary and horribly computation intensive (and my application runs slow enough as it is, expect a question or two relating to flex efficiencies in the near future).
Thanks
Josh