• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Hour 24. Publishing Your Creation > Task: Customize a Template

Task: Customize a Template

In this task we improve upon one of the built-in templates by removing the natural padding around your Flash movie.

First, identify exactly where the “Configuration” folder is on your system. There's one folder called Configuration that's adjacent to your installed version of Flash MX. There's a ReadMe file in that folder that tells you where to find the Configuration folder. (For example, on my Windows XP system it's located in C:\Documents and Settings\Phillip\Application Data\Macromedia\Flash MX\Configuration\)

Now create a movie that includes an animation of a clip instance of a box moving from the top-left corner of the Stage to the bottom-left corner. Use the Align panel's To Stage option to align the box to the edge of the Stage in both keyframes.

Select File, Publish Settings and choose both HTML and Flash. From the HTML tab, select the Template “Flash Only”. Click OK.

Press Ctrl+F12 to do a Publish Preview. Notice that the square doesn't actually reach the left edge of your browser.

Close the browser. Save the movie then close Flash. Find the folder called HTML inside your Configuration folder. Inside this folder, copy and paste the file “Default.html”.

Rename the copied file “myDefault.html” and then open it in a text editor such as Notepad.

Change the very first line from $TTFlash Only (Default) to read $TTNo Padding. This will change the template name to No Padding. Just make sure you retain the first three characters.

Change the part in the ninth line from <BODY bgcolor="$BG"> to read <BODY bgcolor="$BG" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">. This changes all the margins to 0 pixels wide.

Save and close this file. Restart Flash and open the movie you created earlier this task.

Select File, Publish Settings. From the Template drop-down list in the HTML tab select the template we just created: “No Padding”. Click OK.

Press Ctrl+F12 and you should see a preview—this time, with no padding around the movie.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint