Dynamic Resize Flash Application Container / Flash Stage ( without external JavaScript )

[Update: Add complete Flash Builder project source files. ]
If you have dynamic content within your Flash application or you have several states or „pages“ implemented, which all have different content, it might be helpful to resize your flash aplication container within the html- context. For this it’s not enough to resize the application from within the flash application. You also have to resize the surrounding html container. This is the object tag for Mozilla browsers or the embed tag, if the client uses the Internet Explorer.

In each case you have to use the ExternalInterface. You call it from the flash application with parameters for the new height and width value of the flash container. On the other side you have to define an javascript function which do the resize operation with these values.

Here is an AS3 class which already includes the JavaScript part. Soyou don’t have to define an extra JS function. So you just have to import the AS3 class into your project and your ready to resize you application from Flash.


IMG_3605_grey IMG_4404 IMG_6091 IMG_6093 IMG_3950 Untitled_Panorama10 Untitled_Panorama11 Untitled_Panorama15 Untitled_Panorama64 IMG_0273 img_0407 IMG_6813

Latest Comments

Latest Article