Tag Archive: flash


here, I have made easy way to setup full screen through AS3

1. First of all you need to create new flash file.

2. Now you need to open component panel to drag button object in stage to save in libary

3. After component panel open , you have to drag button object into stage

4. I hope you will see button on your libary panel. If yes then remove button from the stage. Now draw some shape in stage. here, I have draw rectangles.

5. Hum… ok now run our emply application  ” ctrl+Enter “. I think you will get your design what you draw in the stage.

Now you need to paste these following codes in action script panel.

import fl.controls.Button;

var fullScreenButton:Button = new Button();
fullScreenButton.label = “Full Screen”;
addChild(fullScreenButton);

fullScreenButton.addEventListener(MouseEvent.CLICK, fullScreenButtonHandler);
function fullScreenButtonHandler(event:MouseEvent)
{
stage.displayState = StageDisplayState.FULL_SCREEN;
}

Now we need to make publish setting . Please click on File > Publish Setting >

6. Choose HTML Tab and select “Flash Only – Allow Full Screen” for  Template Option. and click on “Publish” button.

7. Now we need to edit some html code stuff . After you publish you flash automatically create html file. in your fla file location. Now open it and find the parameter “allowFullScreen” and set true to it’s value. Save it and see in your browser and click on button to make full screen

finished 🙂 🙂

Advertisements

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
ns.play(“papervision.flv”);
function asyncErrorHandler(event:AsyncErrorEvent):void
{
// Null
}
var vid:Video = new Video();
vid.attachNetStream(ns);
addChild(vid);

Above code is simple to understand . Here you need flv file with name of paperVision.