News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

FLASH FULL SCREEN MODE

Started by ganeshbala, May 21, 2009, 09:05 PM

Previous topic - Next topic

ganeshbala

FLASH FULL SCREEN MODE

Your flash presentation should come in full screen .. Just try this method..

Try this code..

<param name="allowFullScreen" value="true" />

The first thing to do is create a button and add the following code to it:

   1.
      on(press){
   2.
        toggleFullScreen();
   3.
      }



The code for the function toggleFullScreen and a resize listener are placed on the main stage.

Quote1.
      //Don't scale the movie when the stage size changes
   2.
      Stage.scaleMode="noScale";
   3.
      //Align the stage to the top left
   4.
      Stage.align = "TL";
   5.
      //Function to toggle between fullscreen and normal size
   6.
      //the toggle fullscreen button calls this function when pressed
   7.
      function toggleFullScreen(){
   8.
        //if normal size, go to fullscreen, else go to normal size
   9.
        if(Stage["displayState"]=="normal"){
  10.
          Stage["displayState"]="fullScreen";
  11.
        }else{
  12.
          Stage["displayState"]="normal";
  13.
        }
  14.
      }
  15.
      //Create a listener for each time the Stage is resized
  16.
      var resizeListener:Object = new Object();
  17.
      //Called each time the stage is resized
  18.
      resizeListener.onResize = function () {
  19.
        //Move the button to the center of the screen
  20.
        toggleFullScreenButton._x=Stage.width/2;
  21.
        toggleFullScreenButton._y=Stage.height/2;
  22.
      }
  23.
      //Add the listener to Stage
  24.
      Stage.addListener(resizeListener);

Sudhakar

Hi ganeshbala,

This is an real informative post.

Thanks for this excellent share.
  8)