Using fscommand

I l @ ve RuBoard

Using fscommand

The preceding exercises taught you how to control various movie Timelines within Flash. The fscommand action allows you to communicate with and control the program that is running your published movie, such as a browser or a stand-alone projector. (For details about publishing movies, see Chapter 16.) In a movie published as a stand-alone projector, for example, you can set an fscommand action's parameters to make the movie fill the screen, to hide and show the menu bar, and to allow graphics to scale (or prevent them from scaling) when viewers resize the movie's window.

To allow graphics to scale in a projector window:

  1. Create a new Flash document.

  2. Select Frame 1, and place some graphics on the Stage.

  3. With Frame 1 selected, access the Actions-Frame panel.

  4. In the Actions Toolbox, open the Actions > Browser/Network category, and drag a copy of fscommand to the Script pane (Figure 15.42).

    Figure 15.42. The fscommand action allows you to communicate with the program that's running Flash Player, such as your browser or a stand-alone projector.

    graphics/15fig42.gif

  5. In the parameters area, from the Commands for Stand-Alone Player pop-up menu, choose allowscale [true/false] .

    Flash enters allowscale in the Command field, enters true (the default value) in the Parameters field, and updates the Script pane (Figure 15.43).

    Figure 15.43. Choose allowscale , and set its parameter to true to make your movie's graphics scale proportionately when viewers resize a projector window.

    graphics/15fig43.gif

  6. From the File menu, choose Publish Settings.

  7. In the Formats tab of the Publish Settings dialog box, check the projector checkbox for the platforms you are working on; leave the Use Default Names box checked, and uncheck all other checkboxes (Figure 15.44).

    Figure 15.44. To create a projector, check the checkbox for your platform in the Formats tab of the Publish Settings dialog box.

    graphics/15fig44.gif

  8. Click the Publish button.

    Flash creates a projector, using the default name and settings, and places it in the same location as the Flash file from which it derives. (To learn more about publishing, see Chapter 16.)

  9. To close the dialog box, click OK or Cancel.

  10. To play the movie, navigate to the projector file on your system, and double-click the projector icon.

    The stand-alone projector opens in a window. When you resize the window, the graphics scale proportionally to fit within the new window (Figure 15.45).

    Figure 15.45. With allowscale set to true , graphics shrink when viewers make the projector window smaller.

    graphics/15fig45.gif

To prevent graphics from scaling in a projector window:

  1. Open the Flash document you created in the preceding exercise, and select Frame 1.

  2. In the Actions-Frame panel, select Line 1 in the Script pane, which contains the fscommand action.

  3. In the parameters area, in the Parameters field, enter false .

    Flash updates the Script pane (Figure 15.46).

    Figure 15.46. Set allowscale to false to keep graphics at a constant size when viewers resize the projector window.

    graphics/15fig46.gif

  4. Repeat steps 6 through 10 of the preceding exercise.

    Now when you resize the projector window, the graphic remains the same size. If you make the window smaller, parts of the graphic may be hidden (Figure 15.47).

    Figure 15.47. With allowscale set to false , graphics remain the same size when viewers make the projector window smaller.

    graphics/15fig47.gif

graphics/01icon02.gif Tip

  • Be aware that creating projectors can trigger any virus-protection software you may have installed.


I l @ ve RuBoard


Macromedia Flash MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Flash MX 2004 for Windows and Macintosh (Visual QuickStart Guides)
ISBN: 0582851165
EAN: 2147483647
Year: 2002
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net