Example detailed fscommand command usage

Source: Internet
Author: User
command| detailed

Original tutorial, reproduced please indicate the source: Web Teaching Network

The Fscommand command is a command to control an animation player or to open another application, which is controlled by the Flash animation and Flash Player communication. It is not valid to press Ctrl+enter to test the movie or publish the Web page file in the Flash integration environment. The syntax for this command is:

  Fscommand (command,arguments);

of which: command for the order; arguments as parameter;

Here is a detailed explanation of the use of this command. finally provide the download of all the examples, please everyone to understand and study.

  1.fscommand ("fullscreen", arguments)

The specific command here is fullscreen, which indicates whether the full screen, and the parameter arguments can take two values: true (allow full screen) or false (disable full screen), the system defaults to false.

We usually add Fscommand ("fullscreen", true) in the first frame of the animation, and implement the animation in full screen. Ctrl+enter, see the full screen, close the current flash, open just press Ctrl+enter to form the SWF file, double-click Open, this time is full screen!

  2.fscommand ("Allowscale", arguments)

The specific command here is Allowscale, which indicates whether scaling is allowed. Parameter arguments can still take two values: true (allow scaling) or false (no scaling), and the system defaults to TRUE.

We usually add Fscommand ("Allowscale", false) to the first frame of the animation, to control the right-click menu in the Flash Player.

Still press Ctrl+enter, close the current flash, open just press Ctrl+enter to form the SWF file, double-click Open, you can use the mouse.

Resizing the window will reveal that the size of the object is unchanged, regardless of the window size. You can open another SWF without this command, and try again, and you'll see the difference!

  3.fscommand (quit)

This command is generally added to the button to close the current Flash player, or it is played to a frame exit, and we see some of the CD titles that do so.

The usage is very simple, not to say more, directly on the button add:

On (release) {
Fscommand ("Quit");
}

or add Fscommand ("quit") directly to a frame;

  4.fscommand ("ShowMenu", arguments)

The specific command here is ShowMenu, which indicates whether the menu display is allowed. Parameter arguments can still take two values: True (allow display) or false (suppresses display), and the system defaults to TRUE.

Add Fscommand ("ShowMenu", "false") to the first frame of any animation;

Still press Ctrl+enter, close the current flash, open just press ctrl+enter the form of SWF file, double-click Open, you can see the effect

  5.fscommand ("Exec", "applicationname")

Its role is to use FLSH to invoke external applications. The most important thing to call an EXE file is to convert your SWF file to an EXE, or Flash Player. You must put the EXE file you want to call under the Fscommand file in the same directory.

Open an external executable program: the extension. exe can be omitted. Specifically, if an EXE file (assumed to be flash1.exe) and the SWF file itself are in the same directory, type the program file name directly. Such as:

Fscommand ("exec", "FLASH1")

Otherwise, the path should be specified. For example, open IE browser window:

Fscommand ("exec", "C:\\progra~1\\intern~1\\iexplore")

Note the DOS for long file (folder) name processing form.

The following two scenarios can also be written without the path:

1. When the executable program is in the C:\Windows directory, you can not write the path. If you call the Windows Calculator, here are three ways to:

Fscommand ("exec", "C:\\windows\\calc.exe")
Fscommand ("exec", "C:\\windows\\calc")
Fscommand ("Exec", "Calc")

2. Calling DOS commands can also omit the path. The following example opens the edit editor under MS-DOS:

Fscommand ("exec", "edit.com")

If you are familiar with the writing of batch files, you can execute batch files by fscommand->exec command more than once.

  All instances of the source code and demo file download



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.