I have a flash widget (kind of player). I need to dynamically change height of the widget according to the data i am loading in runtime via json. I want to do the resize in actionscript event handler.
The version of AS is ActionScript 3.0
I have a flash widget (kind of player). I need to dynamically change height of the widget according to the data i am loading in runtime via json. I want to do the resize in actionscript event handler.
The version of AS is ActionScript 3.0
How about trying stage.stageHeight. But i think it is a readonly property. Need to try out.
the size of the flash is determined by the embedding that you give it. inside of flash you can read the stage.stageHeight and stage.stageWidth properties to find what these are.
if you have your stage resize mode to "noscale" then you expand your flash area just by placing something off of screen (though obviously it wont be displayed) this can then be calculated by using the height and width properties of the main instance and then passing it to a javascript command via externalinterface, which can then update the size of your flash in the html view.
here are some links you might find useful: livedocs: scalemode, livedocs: align, browsercanvas: (js in actionscript), pure javascript example