Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Date Date
Qty:
Subtotal
Promotions
Estimated Shipping
VAT
Calculated at checkout
Total
Checkout
Flash Professional Help / 

OBJECT tag syntax | Flash Professional

Adobe Community Help


Products Affected

  • Flash Professional

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

What's covered

  • Introduction
  • Add the OBJECT tag manually
To the top

Introduction

Correctly displaying a SWF file in a browser requires an HTML file. The browser loads the HTML file, and then loads the SWF file that is specified in the HTML code. It's necessary that the HTML page contains an OBJECT tag that specifies the location of the actual Adobe Flash SWF file.

The HTML OBJECT tag directs the browser to load Adobe Flash Player and then use it to play your SWF file.

The Publish command in Flash Professional automatically creates an HTML file that contains the required tags for web browsers to play the published SWF file. There are several different HTML publishing templates you can choose from in the Publish dialog box (File > Publish). See Flash Help for more information about Publish settings (Flash CS5) or Publish settings (Flash CS5.5).

To the top

Add the OBJECT tag manually

The HTML files created by Flash Professional contain only the code required to display your SWF file. To add your SWF file to an HTML page that contains other elements such as text or graphics, paste the following code into the HTML document. Paste this code somewhere inside the BODY tag of the HTML file.

To add the OBJECT tag manually, do the following:

  1. Copy the HTML code below and paste it into your HTML. Place the code in the HTML file in the location where you want the SWF  file to appear in the web page.
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="movie_name" align="middle">
        <param name="movie" value="movie_name.swf"/>
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="movie_name.swf" width="550" height="400">
            <param name="movie" value="movie_name.swf"/>
        <!--<![endif]-->
            <a href="http://www.adobe.com/go/getflash">
                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/>
            </a>
        <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
    </object>
  2. Edit the attributes of the OBJECT tag for your SWF file.
    • Change the HEIGHT and WIDTH parameters to match the height and width of the Stage. To automatically scale the SWF file to consume a specific percentage of the browser window,  enter percentage values for height and width instead.
    • Change all instances of "movie_name.swf" where it appears in the OBJECT tag above to the actual path or URL of your SWF file.  

The SWF file path can be relative to the location of your HTML file or the fully qualified, absolute path of your SWF file. For example:

  • If the SWF file is in the same folder as the HTML file, you only need the filename of the SWF file.
  • If the SWF file is in a subfolder, the path is something like "subfolder_name/movie_name.swf" (without the quotes).
  • If the SWF file isn't in the folder with the HTML file, use "../" for each level up from the folder with the HTML file. (Don't include the quotes in the syntax.) So "../../../separate_folder/movie_name.swf" goes up three levels from the folder with the HTML file before going down into the "separate_folder" to find the SWF file.
  • A fully qualified path is the same thing as a complete URL (that is, http://www.myDomain.com/flash_content/movie_name.swf.)

You can also use the Publish command in Flash to create a basic HTML file containing the OBJECT tag.  Then copy and paste the HTML code within the OBJECT tag into your own HTML file. The, the name of your SWF file is already correctly specified in the HTML code.

The code above is the minimum required to insert a SWF file in your HTML file. There are additional attributes you can specify for these tags to control the details of how Flash Player plays your SWF file. For information, see Flash OBJECT and EMBED tag attributes.

Test your HTML page in all web browsers you want your intended audience to be able to use. 

Note: Dreamweaver, Adobe's HTML authoring tool, can easily embed a SWF file into an HTML document for you. Dreamweaver allows full control of the design of the page that contains the SWF file. For more information, see the Dreamweaver product page.

See Also

  • Integrating Flash content with the HTML environment
  • OBJECT and EMBED tag attributes
  • SWF file ignores stacking order, plays on top of DHTML layers
Keywords: tags; animation; view; object; embed; parameters; attributes; insert; plugin; ActiveX; Publish Settings; publish settings; publish; tn_4150

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement