How to Change the Output Size of HTML Files in Flash

After creating your Flash animation, you will still need to embed an HTML page in order to view it in a web browser. The Flash program is capable of generating the HTML code and embedding your Flash animation on it. You can change the size of that file to fit your specifications.

Instructions

  1. The Flash and HTML Code

    • 1

      Insert the code below into your HTML file:

      <object width="550" height="400">
      <param name="movie" value="ehow.swf">
      <embed src="ehow.swf" width="550" height="400">
      </embed>
      </object>

      This is the minimum needed to embed a Flash movie in an HTML file.

    • 2

      Ensure that the Flash file "ehow.swf" is in the same folder as your HTML file, otherwise a broken icon will appear on your web browser.

    • 3

      For the HTML section, Go to "File," then "Publish Settings" and "HTML."

    • 4

      Change your HTML file attributes starting with the template.

    • 5

      Change the dimensions of your page either in percent, pixels or to match movie.

    • 6

      The "Percent" and "Pixels" options allow you to change both the width and height of your page accordingly.

    • 7

      Select the "HTML alignment" drop-down and align your page accordingly.

    • 8

      Select the "Flash Alignment" drop-down list and specify the horizontal and vertical alignment of your Flash animation to your HTML page.

    Using Javascript in Conjunction with Flash

    • 9

      On the title of your HTML file enable Javascript as follows:
      <script language = "Javascript">

    • 10

      Create a function and a variable specifying the URL that will load the HTML page.

    • 11

      Specify the page variable (URL), title of the page and a list of properties.

    • 12

      Under the list of properties, specify the width and height of your HTML file.

    • 13

      Assuming we have the Flash button created that will take us to the URL "ehow.com," create the function as follows:
      <script language = "Javascript">
      Function ehow(page){
      Openwin = this.open
      (page, "ehow.com", menubar=no, width=500,height=300");
      }
      </script>

      Save the HTML file.

    • 14

      To make the Javascript function call, upload the two files into your server and fire up the Flash file.

    • 15

      Click on the "Flash" button and it will pop up an HTML page with the specifications above.

Tips & Warnings

  • Because of Flash security settings, the Javascript function call can only be made from a web server and not locally even during testing.

Related Searches:

References

Resources

Comments

You May Also Like

Related Ads

Featured