A Complete Guide to Web Design

(やまだぃちぅ) #1
Flash 363

Interactivity

Flash

Web Design in a Nutshell, eMatter Edition

options follow. Note that technologies change quickly and Macromedia revises
their tagging instructions from time to time. Consult the Macromedia support pages
online for updates.


The tag


The standard tag is as follows:


<EMBED SRC="path/file.swf" WIDTH=x HEIGHT=x
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>

Thewidthandheightvalues are mandatory and specify the dimensions of the
image or movie in pixels. Note that you can also specify the dimensions in
percentages (corresponding to the percentage of the browser window the movie
fills). Thepluginspageattribute provides a URL to the page where the user can
download the Flash player if it is not found on the user’s computer (use the exact
URL shown in the above code). It is a recommended attribute, but not mandatory.


Netscape 2.0 does not support the<embed>tag within a table cell. It
is supported properly only in NN3.0+ and IE3.0+, so use caution
when formatting Flash content with tables.

There are a number of Flash-specific attributes that can be added within the


tag:

NAME=text
This assigns a name to the movie, which is necessary if it is going to be called
from a JavaScript or within a form.


QUALITY=low|autolow|autohigh|high
This attribute controls the anti-aliasing quality.autolow(the default) starts the
animation at normal quality (aliased) and switches to high quality (anti-
aliased) if the user’s computer is fast enough. Conversely,autohighstarts the
animation in high quality mode and reverts to normal quality if the computer
is too slow.highanti-aliases the animation regardless of computer speed.
lowuses normal display quality (recommended for animations that must
display quickly).


LOOP=true|false
Specifies whether the movie plays in a continuous loop. The default istrue.


PLAY=true|false
Ifplayis set totrue, the movie will begin playing automatically. A setting of
false requires the user to initiate the movie. The default istrue.


BGCOLOR=rrggbb
Use this setting to override the background color of the Flash movie, for
instance, to make it match the background color of a web page. The value is
a hexadecimal RGB value (see Chapter 5,HTML Overview, for an explanation
of specifying RGB colors in HTML).

Free download pdf