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
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Promotions
Estimated shipping
Tax
Calculated at checkout
Total
Review and Checkout
Adobe Developer Connection / Flash Developer Center /

Preventing publishing problems in Flash

by Tommi West

Tommi West
  • tommiland.com

Content

  • Remember to export the HTML wrapper file that contains object code
  • Choosing the wrong version of ActionScript
  • Overwriting SWF files with other SWF files using the same name
  • Using absolute paths to external classes, libraries, and files
  • Where to go from here

Created

16 January 2012

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
best practiceFlash Professionalperformancetesting
Was this helpful?
Yes   No

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

 
Thanks for your feedback.

Requirements

Prerequisite knowledge

Previous experience working with Flash Professional is recommended. Refer to Avoiding common authoring mistakes to find links to other articles in this series.

User level

All

Required products

  • Flash Professional (Download trial)

This article contains recommendations you can follow to avoid issues that may occur when compiling and publishing your SWF files from Adobe Flash Professional. For example, always check the ActionScript version you are targeting in the Publish Settings dialog box before you publish any SWF files. Also, be aware of any external or linked files and take care to maintain the project structure to avoid broken paths.

Remember to export the HTML wrapper file that contains object code

The Publish Settings dialog box includes the option to generate associated files as the SWF file is published. You can choose to publish SWC files as well as creating an HTML wrapper, GIF image, JPEG image, PNG image, Windows projector, or a Mac projector.

The HTML Wrapper file is especially handy because it contains the object code needed to display the SWF file in a browser. Unless you are planning to insert the SWF file in an existing HTML page, you'll usually want to create the HTML wrapper file whenever you are publishing a SWF file that will be uploaded online as part of a website.

Of course you can also use Dreamweaver to insert your SWF and FLV files into HTML pages, but if the entire page is comprised of the Flash movie, it makes sense to let Flash generate the HTML page for you.

Choose File > Publish Settings to open the Publish Settings dialog box. In the column on the left side, select the HTML Wrapper option (see Figure 1).

Figure 1. Select the HTML Wrapper option in the Publish Settings.
Figure 1. Select the HTML Wrapper option in the Publish Settings.

Choosing the wrong version of ActionScript

When you first create a new file in Flash, the New Document dialog box enables you to choose between an ActionScript 3 and an ActionScript 2 file. Take care to select the version of ActionScript that matches the code you'll be adding to your project. Never combine ActionScript 2 and ActionScript 3 in the same FLA file.

Additionally, when you choose File > Publish Settings, there's a menu at the top to choose the ActionScript version used when compiling the SWF file during the publishing process.

If you choose a version of ActionScript that does not match the code, it's likely that the project will break. The two languages behave differently and Flash Player cannot process ActionScript 2 and ActionScript 3 code simultaneously.

If a published project is not behaving as expected, double-check the version of ActionScript in the Publish Settings to verify the correct version is selected.

Overwriting SWF files with other SWF files using the same name

When you publish SWF files, they are automatically generated in the same folder as the master FLA file, and they use the same file name as the FLA file (with a SWF extension). Since there can only be one FLA file with a specific name in a folder at one time, this usually prevents the possibility of accidentally overwriting an existing SWF file. This is true with the exception of previous iterations of the same FLA file; if you publish a SWF file after already publishing it, the newest version of the file overwrites the older version.

However, be cautious about how you name files and how you move files between folders. For instance, if you have two projects in different folders and the FLA file names are the same, and then later you replace one FLA file with another (different project with the same name), you can inadvertently overwrite Project A's SWF file with Project B's SWF file, if you swap the FLA files and then publish the second project.

It's a best practice to save periodic backups of all your FLA files, so that you can easily revert to an earlier version if necessary.

Using absolute paths to external classes, libraries, and files

Never use absolute paths to link a Flash project to external files, such as Runtime Shared Libraries, AS class files, and rich media (digital video and audio files). An absolute path will include the folder structure of your personal computer. Absolute paths will break if other developers open the project using their machines.

Always use relative paths to link to external project assets. Relative links are portable, so you can share projects with team members and not worry that the paths may break.

To learn more, read the section on Absolute paths in the Flash Professional online documentation.

Where to go from here

Find out more about publishing SWF files by reading the following sections of the Flash Professional online documentation:

  • Publish settings for Flash Professional
  • HTML publishing templates
  • Publishing Flash documents

Refer to Avoiding common authoring mistakes to find links to other articles in this series.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Flash glossary: Guide layers
  • Writing and running functional tests for Flash with Selenium RC
  • Flash glossary: Frame script
  • Flash glossary: Frame label
  • Five demos of Flash CS4 Professional
  • Working with the Project panel in Flash Professional CS5.5
  • Understanding ActionScript 3 debugging in Flash
  • Code in Flex, test in Flash
  • Optimizing Flash performance
  • Optimizing performance for mobile AIR applications

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