Simply, I’m gonna using caurina tweener available at http://tweener.googlecode.com/files/tweener_1_33_74_as2.zip on how to create toggle fullscreen button.

Step-1: Design a Button

  1. Open Flash and create Flash File 2.0
  2. On the First key frame, take Rectangle Tool(R), and draw this on stage or you can also take a button of your choice.
  3. Convert it to Movie Clip by pressing F8 by selecting it.
  4. Give it a instance name fullscreen_button.

Now our designing section complete.

Step-2: Using Caurina Tweener

  1. Select first keyframe and press F9 to view Action panel.
  2. write

import caurina. transitions.tweener {

// Main Function called fullScreenSetup
var fullScreenSetup:Function = function () {
// Uses Caurina Tweener To Give a RollOver Effect
base.fullscreen_button.onRollOver = function () {
Tweener.addTween(this, {_alpha:50, time: 1, transition:”easeOutExpo”});
}
// Reset’s the animation when roll out.
base.fullscreen_button.onRollOut = function () {
Tweener.addTween( this, {_alpha:100, time: 1, transition:”easeOutExpo”});
}
// When pressed, it runs an if statement.
base.fullscreen_button.onRelease = function () {
// If the stage is normal, fullscreen is activated. If not nothing happens.
if (Stage["displayState"] == “normal”) {
Stage["displayState"] = “fullScreen”;
} else {
Stage["displayState"] = “normal”;
}
}
}

//to initiate this function

fullScreenSetup();

Finish, Enjoy!