Can we change the stage size during runtime?
I need to change the size of the stage dynamically during the runtime when the swf receives a flashvar from the html page. Can this be done?
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.
If you resize the
<object>/<embed>elements in your HTML, that will resize the stage of the SWF.The content of the SWF however will scale unless you specify that there will be no scaling within AS3:
It is also important to note when working with scalable SWFs that by default, the exported stage dimensions will always sit centred within the resized area, e.g.
I find it easier when everything is measured from the top-left of the resized area, which can be done by adding this as well: