Publishing Generator Templates


You've been publishing Generator templates all along, but now it's time to take a look at how you can modify the publish settings.

When you selected Generator on the Formats tab of the Publish Settings dialog box, a new tab for Generator settings should have appeared. The Generator tab has several settings that you can modify. You also can make some Generator-specific modifications on the HTML tab.

There are a number of changes you can make to the settings on the Generator tab of the Publish Settings dialog box. Word to the wise, however: If you choose to have Flash generate your HTML for you, any parameters that are set in the HTML tab override the parameters set in the Generator tab of the Publish Settings dialog box. Specifically, the Dimensions and Background settings are impacted. You can change the following settings:

  • Dimensions. You can set the width and height for your published template in pixels. Why you would want to do this, I don't know. Setting width and height in pixels does not retain the aspect ratio of the movie. In fact, you can get some very odd behaviors. If your Flash movie has a size of 550x400 pixels (the default) and you set the pixels on the Generator tab to 225x200, do you get your entire movie reduced to 225x200 pixels? No. What you do get is a 200x200 pixel segment of your movie. Just to make it even more amusing, if you have your height and width on the HTML tab set to Match Movie (in this case, 550x400 pixels), your 200x200 pixel chunk expands to fill 550x400 pixels. Keep yourself happy and sane ”use Match Movie.

  • Background. Theoretically, you can override the background color that you originally set for your Flash file. This does work, but only if the background is not passed in as a parameter to the HTML. The color passed in as a parameter in the HTML supersedes any other settings. When you test internally in Flash, you see the color you set on the Generator tab. However, go out and take a look at the HTML page that's created. The color of the background is, in fact, passed in as a parameter to the OBJECT and EMBED tags, and it's the color you originally set as the background of the Generator template. You'll have to edit that out.

  • Frame Rate. This controls how quickly your movie plays (in frames per second).

  • Load Order. For slower connections, you can specify the order in which you would like the layers in the first frame to load. Your options are Bottom Up and Top Down.

  • Data Encoding. You can set the encoding system for Generator to use when reading data sources. This should be the same for all data sources and is necessary when you are creating templates and data sources on one operating system and deploying them on another.

  • Create External Font Files. This pulls all the font information out of the Generator template and creates separate files containing the fonts. This can dramatically reduce the size of the Generator template file.

  • External Media. This enables you to specify the name of another Generator template that has symbols that you want to use in this template.

  • Parameters. This enables you to enter name/value pairs for testing. This setting is usually only used during development to test variables .

Whenever you publish a Generator template, you should also publish the SWF (Flash Player) file. However, if you have Flash create your HTML file, you can get a little surprise when you publish. If you accept all the default settings on both the Generator and HTML tabs, every time you publish your movie, the HTML that is generated embeds the Flash Player (SWF) file instead of the Generator template (SWT). You can get around this in a couple of ways:

  • You can edit the HTML file and change the .swf extension to .swt. You need to do this for both the EMBED and OBJECT tags. Be forewarned; if you leave HTML checked on the Formats tab, a new HTML file is created every time you publish your movie and you'll have to edit the HTML file again.

    Note

    Netscape plug-ins make use of the EMBED tag for embedded media, and Internet Explorer uses the OBJECT tag.To make sure that your Flash movie is visible in both browsers, use both tags.


  • On the HTML tab, the very first setting you can change is the template you want Flash to use when publishing your movie. Four of the templates are Generator specific and require Generator Enterprise or Developer Edition to be installed on the server.

    • Generator Ad Any Banner. This uses JavaScript and VBScript to detect the Flash plug-in. It also embeds the SWT file.

    • Generator Image Output. This uses the IMG tag to display an image returned from a Generator template.

    • Generator Only (default). This uses OBJECT and EMBED tags to display a Flash movie returned from a Generator template.

    • Generator QuickTime. This uses an EMBED tag to display a QuickTime movie returned from a Generator template.

  • If you don't need your file to be generated on demand, you can choose to publish the Flash Player (SWF) file to the server rather than to the Generator template ” in that you would want the embedded file to be an SWF file.



Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

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