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 the ActionScript event handler.
The version of ActionScript is 3.0.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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