Friday, December 28, 2012

Actionscript 3.0 demo: Add a button to toggle full screen in flash



Below is the example to add a button in Flash CS6 using ActionScript 3.0.
1) Open Adobe Flash CS6 File->New->ActionScript 3.0
2) File-> import to stage with background image in layer 1.
3) add button .under user interface in component too, change the button label to "toggle full screen", and name the instance as "btn_fullscreen"
5) Press F9 to input the following actionscritpt

6) Export or test flash, done.

flash output, remember to put allowfullscreen="true" in embed code

<object>
<embed allowfullscreen="true" allownetworking="internal" allowscriptaccess="never" height="400" src="http://swf.site40.net/flashdemo/togglefull.swf" width="550"></embed>
</object>


video:

No comments:

Post a Comment