Flash index html file

Flash HTML Code

Before we get started into the nuts and bolts of Macromedia Flash let’s figure out exactly how you insert Flash files (.swf file extension) into your existing HTML files. To follow along with this tutorial you are going to need a flash file, a web page, and some time on your hands. If you think you’ve got all those items assembled then we can begin.

Inserting Flash Into HTML

To insert flash into your HTML files you must use the HTML tag object, which is used to place multimedia items like music, movies, and now Flash files onto web pages. We will assume that the name of your flash file is «example.swf» for this lesson, but you should rename it to the actual name of your flash file.

Embed Flash: Tag

The object tag contains many attributes to modify the way the multimedia is displayed and to describe the type of media to be displayed.

Below is the cookie cutter HTML code you can use to insert a flash file into any HTML page, assuming that both this HTML file and Flash file are in the same directory.

Note: The only pieces you need to change are value and src, which specifies the name and location of your Flash file and height and width, which specify the dimensions of your Flash file.

Читайте также:  Current working dir php

HTML Code:

  

codebase="http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=6,0,40,0"
width="468" height="60"
>
value="example.swf" />


src="http://tizag.com/flashTutorial/example.swf" quality="high" bgcolor="#ffffff"
width="468" height="60"
name="mymoviename" align="" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">




Display:

Macromedia has written a description of this complex bit of HTML Code, so check it out if you like to get into the details.

Macromedia Flash has a feature to automatically generate the necessary HTML Code. To generate the HTML code and Flash file for your project go to the Flash menu File < Publish.

If the flash file is in a different location you could instead type the complete URL of the flash file as we have done in this second example:

HTML Code:

  

codebase="http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab#version=6,0,40,0"
width="468" height="60"
>
value="http://www.tizag.com/pics/example.swf" />


src="http://www.tizag.com/pics/example.swf" quality="high" bgcolor="#ffffff"
width="468" height="60"
name="mymoviename" align="" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">




Display:

Found Something Wrong in this Lesson?

Report a Bug or Comment on This Lesson — Your input is what keeps Tizag improving with time!

Источник

Flash index html file

Publishing Your Flash Website

Now that you have finished and tested your Flash website within the Flash program and you are happy with the finished version, you are ready to publish to the web. However, you will need more than just the finished .swf file. You will also need some HTML files that work with this .swf file on the web. Without these HTML files, you cannot display your Flash movie in the web browser. This is commonly called «wrapping» the .swf file in HTML. So where do you get these HTML files? When you «publish» your movie in Flash, the program will generate these files for you based on certain choices you make in the Publish Settings dialog box. Let’s open your .fla file in Flash and get started.

Once you have your finished website movie open in Flash, go to the Property Inspector and click on the Publish: Settings button to open the Publish Settings dialog box.

Step 1. Format Tab Settings. Click on the Formats tab and you will see a list. We need Flash to generate the first two from this list. The finished MySite.swf file of your Flash website movie and one of the HTML files that will wrap your .swf file. As with most websites, the first webpage that the browser always looks for is the index.html file. So we will name this wrapper file index.html. Put a check in the first two checkboxes and name your files as below.

Flash (.swf) — MySite.swf
HTML (.html) — index.html

If you wish to store your files in a different folder from the one we are using, click on the small folder button to open the Select Publish Destination dialog box and choose a different folder.

Step 2. HTML Tab Settings. Click on the HTML tab. We are publishing for the web, so set the Template drop-down list to Flash Only and check the Detect Flash Version box underneath. We will use the default settings for the rest of this tab. But before we move on, we need to tell Flash to generate a few more files. Click on the Settings button to open the Version Detection Settings dialog box. As stated before, the index.html file is the first file that will be loaded into the browser. This file is coded to check for a Flash Player on the viewer’s computer. If there is a Flash Player, then the next file that will be loaded is the HTML file that will display your .swf file. We will call this second HTML file MySite_content.html. If there is no Flash Player detected, a thrid HTML file will tell your viewer that they need to download the latest version of the Flash Player and display a link button that will take him to the Adobe R — Macromedia R download site. We will call this file MySite_alternate.html. So under the Filenames section, name these files as follows.

Detection File — index.html
Content File — MySite_content.html
Alternate File — MySite_alternate.html

Click OK to return to the Publish Settings dialog box.

Content copyright © 2022 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.

Источник

Follow Design Stacks

Showcase and discover digital art at yex

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

How to Use the index.html File

How to Use the index.html File

I included a default index.html file for authors with either a Flash or ColdFusion background. First, for those in a hurry, the HTML is already written for you; the CaptivatePlayer is embedded into the HTML with the necessary code to make it play in the full screen in the browser. Second, for those incorporating CaptivatePlayer into their own website design, you can copy and paste the code for embedding CaptivatePlayer.

For more details, refer to readme_index.txt, included in the ZIP file you downloaded in the Requirements section. It explains in detail how to customize and use the index.html file.

The CaptivatePlayer Source Files

There are many ways you can use CaptivatePlayer (as an embedded SWF file in HTML or as an EXE file) and it can be confusing understanding all the files included in the ZIP that you downloaded in the Requirements area.

After unzipping the archive, the base level directory has two folders and three files (Figure 10).

Figure 8. The contents of the ZIP file, unzipped

For Flash Developers who need to use the CaptivatePlayer in an existing Rich Internet Application, the necessary files are in the “Flash MX 2004 Install” folder. Included is the MXP, which installs the CaptivatePlayer as a component in the Components Panel. I’ve included the MXI and SWC for Flash Developers who need those instead.

Figure 9. The three files in the Flash MX 2004 Install folder

For Flash Developers who have more specific needs to customize CaptivatePlayer, the “Source Files” folder contains the FLA file, created in Flash MX 2004 and source AS (ActionScript) files. This folder contains everything a Flash Developer needs to customize the design of the CaptivatePlayer, tweak the way it works, add functionality, and/or compile a customized version. A default setup file, used to initialize the CaptivatePlayer, is included in the includes folder.

Figure 10. The files in the Source Files folder

Источник

Оцените статью