Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders 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
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 practice Flash Professional performance testing

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

  • Creating ActionScript 3.0 components in Flash – Part 8: Keyboard support
  • Setting up a Flash project for local and network playback
  • Flash CS4 Missing Manual excerpts: Video, testing and debugging, optimization, and sound
  • Writing and running functional tests for Flash with Selenium RC
  • Exploring the new 3D features in Flash CS4 Professional
  • Creating ActionScript 3.0 components in Flash – Part 4: Events
  • Creating ActionScript 3.0 components in Flash – Part 3: From prototype to component
  • Creating ActionScript 3.0 components in Flash – Part 5: Styles and skins
  • Creating an accessible animated presentation in Flash
  • Guide for Apple App Store submissions

Flash User Forum

More
04/23/2012 Auto-Save and Auto-Recovery
04/23/2012 Open hyperlinks in new window/tab/pop-up ?
04/21/2012 PNG transparencies glitched
04/01/2010 Workaround for JSFL shape selection bug?

Flash Cookbooks

More
02/13/2012 Randomize an array
02/11/2012 How to create a Facebook fan page with Flash
02/08/2012 Digital Clock
01/18/2012 Recording webcam video & audio in a flv file on local drive

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

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 © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement