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.

Gallery

IMG_8547 IMG_3568_grey IMG_6093 IMG_3192 IMG_6091 Untitled_Panorama64 IMG_6813 IMG_3950 IMG_0273 Untitled_Panorama10 Untitled_Panorama86 IMG_7561

Latest Comments

Latest Article

Categories

del.icio.us