Using Caurina Tweener in AS2
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
- Open Flash and create Flash File 2.0
- On the First key frame, take Rectangle Tool(R), and draw this on stage or you can also take a button of your choice.
- Convert it to Movie Clip by pressing F8 by selecting it.
- Give it a instance name fullscreen_button.
Now our designing section complete.
Step-2: Using Caurina Tweener
- Select first keyframe and press F9 to view Action panel.
- 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!

June 9th, 2010 at 5:35 pm
Good! What a very good document! A particular idea:Should you atart exercising . pix, it becomes easiler to follow!