Flash full screen code

web front end thirteen thousand three hundred and eighty-three 13 years ago (2011-11-30)

fscommand ("fullscreen", "true");// Full screen

fscommand("allowscale", "false");// Size fixed size

fscommand("showmenu", "false");// Masking context menu

FLASH Middle close button code:

on (release) {

getURL ("javascript:close()");

}

Many people have seen this effect: after the CD is put into the CD drive, the CD automatically runs, followed by an opening animation made by Flash. The animation is played in full screen, and the right click is invalid. After the animation is played, the "Close" button appears. Click this button to close the full screen animation.

In fact, the effects mentioned above, such as full screen playback and canceling the right-click menu, depend on the Fscommand command. The Fscommand command is mainly used to control the Flash movie player, but it can also be used to open other applications. The Fscommand command is only valid when the Flash movie player is running (. swf and. exe). During the Flash production process, press "Ctrl+Enter" to preview the animation, and when the animation is published as a web file, this command cannot play its function.

The syntax used by the Fscommand directive is: Fscommand ("command", "arguments")
Command is the related command of the command, and arguments is the parameter of the command.

Now let's talk about how to use the Fscommand command to realize full screen playback, cancel the right-click menu during Flash playback, and close Flash animation.

1. Play Flash in full screen

"Fullscreen" means full screen. By default, Flash animation is not played in full screen (false). If you want to play the animation in full screen, you must set the Fullscreen command to True and write it as:
  
Fscommand ("Fullscreen","True");
As required, we can write it to frames, buttons, and MC (Movie Clip).

2. Cancel right-click menu

The Showmenu command is used to set whether the shortcut menu of the Flash animation player is displayed (true) or not (false). That is, the menu that pops up when you right-click the mouse is true by default. If you want to cancel the pop-up menu, you must set it as follows in the first frame:
  
Fscommand ("showmenu","false");
3. Close Animation

The quit command is used to close the. swf and. exe files of the player. The command has no parameters and is written as:
  
fscommand ("quit");
If you want a button to close the flash animation to appear at the end of the flash animation, you can follow the steps below.

Execute "New Symbol" under "Insert" (or press Ctrl+F8), select Button in the pop-up window, then make a simple button, go back to the scene, select the last frame, drag the button just created from "Library" to the scene, because the button is displayed at the end of the animation.

Write the following code to the button, and then press the button to close the flash animation.

  
on (release)
  {
  fscommand ("quit");  
  }