Sie sind auf Seite 1von 12

Adobe Flash (kurz Flash, ehemals Macromedia Flash) ist

eineproroprietäre integrierte Entwicklungsumgebung zur


Erstellung multimedialer Inhalte, der Flash-Filme. Die
resultierenden Dateien liegen im SWF-Format vor, einem auf
Vektorgrafiken (u.a.) basierenden Grafik- und
Animationsformat. Das Kürzel SWF steht dabei für
Shockwave Flash (nicht für „small web format“, wie
mitunter fälschlich angenommen[1]).

Die mit Adobe Flash erstellten Quelldateien (FLA-Dateien)


werden zum Einsatz auf einem Webserver in SWF-Dateien
kompiliert (übersetzt) und dabei auf Wunsch komprimiert.
Die FLA-Dateien werden nur von den Autoren während der
Entwicklung verwendet und sind veränderbar. Die
kompilierten SWF-Dateien sind für die Anzeige im
Webbrowser gedacht und können in dieser Form nicht mehr
einfach verändert werden.
Um Flash-Dateien betrachten zu können, ist das proprietäre
Abspielprogramm Flash Player erforderlich, das als
Webbrowserplugin eingebunden werden kann.

Aufgrund seiner multimedialen Möglichkeiten werden in


Flash häufig Video- oder Sounddateien eingesetzt. Da diese
Formate meist größere Datenvolumen beanspruchen,
kommen in Flash oft so genannte Preloader zum Einsatz, die
einen Teil oder den ganzen Film zwischenspeichern. Da Flash
ein streamendes Format ist, ist es jedoch möglich, Seiten zu
bauen, die bei kleinen Bandbreiten ohne deutliche
Wartezeiten sofort starten.

Die Skriptsprache PHP enthält das Modul Ming zur


Generierung von Flash-Dateien.

Verschiedene Programme, wie die Präsentationsprogramme


Impress des Office-Pakets OpenOffice.org oder Keynote
bieten die Möglichkeit, Dateien in das SWF-Format zu
exportieren, damit sie in dieser Form leicht über das World
Wide Web verfügbar gemacht werden können.

Adding <OBJECT> and <EMBED> tags manually


It's simple to create the tags required to display a Flash
movie in a browser.

To add OBJECT and EMBED tags manually:


1.Copy the HTML code below and paste it into your HTML.

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-
444553540000"
codebase="http://download.macromedia.com/pub/s
hockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName">

<PARAM NAME=movie VALUE="myFlashMovie.swf">


<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED
href="/support/flash/ts/documents/myFlashMovie.s
wf"
quality=high bgcolor=#FFFFFF WIDTH="550"
HEIGHT="400"
NAME="myMovieName" ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/ge
tflashplayer">
</EMBED>
</OBJECT>

Edit the attributes of the tags for the movie.


• Change the HEIGHT and WIDTH parameters to match
the height and width of the movie dimensions or use
percentage values, if desired.

• Change "moviename.swf" where it appears in the


OBJECT and EMBED tags to the name of movie to be
played.

http://kb2.adobe.com/cps/415/tn_4150.html= Beschreibung
Einsatz für IE oder FF

This document lists the required and optional


attributes of the object and embed tags used
to publish Adobe Flash movies.
For specific usage information for these attributes, refer to
sections of the Using Flash manual devoted to using object
and embed tags (exact headings vary among Flash
versions). Information is also available in "Adobe Flash
OBJECT and EMBED tag syntax" (TechNote tn_4150).

Required attributes
The following attributes are required within the object
and/or embed tags when adding a Flash movie to an HTML
page:

Both object and embed:


• width - Specifies the width of the movie in either pixels
or percentage of browser window.
• height - Specifies the height of the movie in either
pixels or percentage of browser window.

object tag only:


• classid - Identifies the ActiveX control for the browser.
(See example code in TechNote tn_4150 for the correct
value.)

• codebase - Identifies the location of the Flash Player


ActiveX control so that the browser can automatically
download it if it is not already installed. (See example
code in TechNote tn_4150 for the correct value.)

• movie (param) - Specifies the location (URL) of the


movie to be loaded.

embed tag only:


• src - Specifies the location (URL) of the movie to be
loaded.
• pluginspage - Identifies the location of the Flash Player
plug-in so that the user can download it if it is not
already installed. EMBED only. (See example code in
TechNote tn_4150 for the correct value.)

Optional attributes and possible values:


The following attributes are optional when defining the
object and/or embed tags. For object , all attributes are
defined in param tags unless otherwise specified:

• id (attribute for object, object only) - Movie Identifier.


Identifies the Flash movie to the host environment (a
web browser, for example) so that it can be referenced
using a scripting language.
• name (embed only) - Movie name. Identifies the Flash
movie to the host environment (a web browser,
typically) so that it can be referenced using a scripting
language such as JavaScript or VBScript.

• swliveconnect - Possible values: true, false. Specifies


whether the browser should start Java when loading
the Flash Player for the first time. The default value is
false if this attribute is omitted. If you use JavaScript
and Flash on the same page, Java must be running for
the FSCommand to work.

• play - Possible values: true, false. Specifies whether the


movie begins playing immediately on loading in the
browser. The default value is true if this attribute is
omitted.

• loop - Possible values: true, false. Specifies whether


the movie repeats indefinitely or stops when it reaches
the last frame. The default value is true if this attribute
is omitted.

• menu - Possible values: true, false.


• true displays the full menu, allowing the user a
variety of options to enhance or control playback.
• false displays a menu that contains only the
Settings option and the About Flash option.

• quality - Possible values: low, high, autolow, autohigh,


best.
• low favors playback speed over appearance and
never uses anti-aliasing.
• autolow emphasizes speed at first but improves
appearance whenever possible. Playback begins
with anti-aliasing turned off. If the Flash Player
detects that the processor can handle it, anti-
aliasing is turned on.

• autohigh emphasizes playback speed and


appearance equally at first but sacrifices
appearance for playback speed if necessary.
Playback begins with anti-aliasing turned on. If the
actual frame rate drops below the specified frame
rate, anti-aliasing is turned off to improve
playback speed. Use this setting to emulate the
View > Antialias setting in Flash.

• medium applies some anti-aliasing and does not


smooth bitmaps. It produces a better quality than
the Low setting, but lower quality than the High
setting.

• high favors appearance over playback speed and


always applies anti-aliasing. If the movie does not
contain animation, bitmaps are smoothed; if the
movie has animation, bitmaps are not smoothed.

• best provides the best display quality and does not


consider playback speed. All output is anti-aliased
and all bitmaps are smoothed.

• scale - Possible values: showall, noborder, exactfit.


• default (Show all) makes the entire movie visible
in the specified area without distortion, while
maintaining the original aspect ratio of the movie.
Borders may appear on two sides of the movie.
• noorder scales the movie to fill the specified area,
without distortion but possibly with some
cropping, while maintaining the original aspect
ratio of the movie.

• exactfit makes the entire movie visible in the


specified area without trying to preserve the
original aspect ratio. Distortion may occur.

• align (attribute for Object) - Possible values: l, t, r, b.


• Default centers the movie in the browser window
and crops edges if the browser window is smaller
than the movie.

• l (left), r (right), t (top), and b (bottom) align the


movie along the corresponding edge of the
browser window and crop the remaining three
sides as needed.

• salign - Possible values: l, t, r, b, tl, tr, bl, br.


• l, r, t, and b align the movie along the left, right,
top or bottom edge, respectively, of the browser
window and crop the remaining three sides as
needed.

• tl and tr align the movie to the top left and top


right corner, respectively, of the browser window
and crop the bottom and remaining right or left
side as needed.

• bl and br align the movie to the bottom left and


bottom right corner, respectively, of the browser
window and crop the top and remaining right or
left side as needed.
• wmode - Possible values: window, opaque, transparent.
Sets the Window Mode property of the Flash movie for
transparency, layering, and positioning in the browser.

• window - movie plays in its own rectangular


window on a web page.
• opaque - the movie hides everything on the page
behind it.
• transparent - the background of the HTML page
shows through all transparent portions of the
movie, this may slow animation performance.

• bgcolor - [ hexadecimal RGB value] in the format


#RRGGBB . Specifies the background color of the
movie. Use this attribute to override the background
color setting specified in the Flash file. This attribute
does not affect the background color of the HTML page.

• base - . or [base directory] or [URL]. Specifies the base


directory or URL used to resolve all relative path
statements in the Flash Player movie. This attribute is
helpful when your Flash Player movies are kept in a
different directory from your other files.

• flashvars - Possible values: variable to pass to Flash


Player. Requires Macromedia Flash Player 6 or later.
• Used to send root level variables to the movie. The
format of the string is a set of name=value
combinations separated by '&'.

• Browsers will support string sizes of up to 64KB


(65535 bytes) in length.

• For more information on FlashVars, please refer to


"Using FlashVars to pass variables to a SWF"
(TechNote tn_16417).

Note: Values in brackets and italics indicate that the


developer chooses the value.

Active Content JavaScript

Note: As of April 2008, Microsoft has removed all Active


Content requirements from Internet Explorer. The
information in this technote is supplied for historical
reference to the period from April 2006 to April 2008. For
details on Microsoft's deprecation of Active Content, see
MSDN. For details of Adobe's Active Content workarounds
see the Adobe Active Content Developer Center.

When you publish a Flash document with HTML using the


"Flash Only" or "Flash HTTPS" HTML templates in Flash CS3
Professional, a JavaScript file linked to the HTML file, named
AC_RunActiveContent.js will automatically be created. This
file will need to remain with the HTML file for the JavaScript-
based active content embedding. For more information on
active content, please visit the Active Content Developer
Center.

Note: For Flash 8, the inclusion of JavaScript-based active


content embedding is possible through the Flash Active
Content Update Extension.

A JavaScript function called AC_FL_RunContent() is used to


dynamically generate the necessary object and embed tags
necessary for the browser to display your Flash movie. This
function is defined within AC_RunActiveContent.js and called
in the location of your HTML file where you wish your Flash
movie to be displayed. Example:
<script >

if (AC_FL_RunContent == 0)

{
alert("This page requires
AC_RunActiveContent.js.");

else

AC_FL_RunContent(

'codebase',

'http://download.macromedia.com/pub/shockwave
/cabs/flash/swflash.cab#version=9,0,0,0',

'width',

'550',

'height',

'400',

'src',

'myFlashMovie',

'quality',

'high',

'pluginspage',
'http://www.macromedia.com/go/getflashplayer',

'align',

'middle',

'play',

'true',

'loop',

'true',

'scale',

'showall',

'wmode',

'window',

'devicefont',

'false',

'id',

'ACTest',

'bgcolor',

'#ffffff',

'name',
'myFlashMovie',

'menu',

'true',

'allowScriptAccess',

'sameDomain',

'movie',

'myFlashMovie',

'salign',

'' );

//end AC code

</script>

The parameters of the AC_FL_RunContent function are


name-value pairs that relate to the attributes or parameters
defined within the object and embed tags. The
AC_FL_RunContent function will automatically distinguish
between recognized attributes that need to be placed in the
object and embed tags and those needing to be in param
tags. Any name-value arguments you add to the
AC_FL_RunContent call, if not recognized, will default to
param tags and embed attributes.