Adobe

Rendering and exporting for Flash Professional and Flash Player


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

  • Export a composition as an XFL file to Flash Professional
  • Render and export a composition as a SWF file
  • Render and export a composition as an FLV or F4V file

You can render and export movies from After Effects as movies that can play in Adobe Flash Player. SWF files play natively in Flash Player, whereas an FLV or F4V file must be contained in (or linked to from) a SWF file to play in Flash Player. You can also export compositions to Flash Professional as XFL files.

This video from the After Effects CS5: Learn By Video series provides an overview of exporting to the various formats for Flash Professional and Flash Player, and demonstrates the use and common issues with each.

XFL

XFL files are representations of compositions that can be opened in Flash CS4 Professional or later. XFL files are essentially the XML equivalent of FLA files.

SWF

SWF files are small files that play in Flash Player. They are often used to deliver animated vector graphics (such as cartoons), audio, and other data types over the Internet. SWF files also allow viewer interaction, such as clicking to follow a web link, control animation, or provide input to a rich internet application (RIA). SWF files are the output created from FLA files.

FLV and F4V

FLV and F4V files contain only pixel-based (rasterized) video, not vector graphics, and they aren’t interactive. FLA files can contain and refer to FLV and F4V files, which are then embedded or linked in SWF files that play in Flash Player.

    To the top

    Export a composition as an XFL file to Flash Professional

    You can export a composition from After Effects to the XFL format for further modification and use in Flash CS4 Professional or later. For example, you can use ActionScript in Flash Professional to add interactive animation to each of the layers from an After Effects composition.

    When you export a composition as an XFL file, After Effects attempts to export individual layers and keyframes, preserving as much information for direct use in Flash Professional as it can. If After Effects can’t export an element of a composition as unrendered data in an XFL file, the element is either ignored or rendered into a PNG or FLV item, depending on whether you choose to ignore unsupported features.

    For a video tutorial on exporting to XFL format, go to the Adobe website.

    About XFL files

    XFL files are essentially the XML equivalent of FLA files. An XFL file is a compressed archive folder that contains a Library folder and an XML document (DOMDocument.xml) that describes the FLA file. The Library folder contains the assets referred to by the XML file. When you open an XFL file in Flash Professional, it extracts these items from the XFL file and uses them to build a FLA document. You save the document from Flash Professional as a new FLA file; you do not change the XFL file with Flash Professional.

    If you want to examine or manually edit the contents of an XFL file, you can open the compressed archive file in the same manner as any other .zip file. Changing the filename extension to .zip is not necessary, but it may make extracting the files for this manual examination more convenient.

    This video from the After Effects CS5: Learn By Video series demonstrates export to XFL.

    Exporting a composition to XFL format

    1. To export the selected composition as an XFL file, choose File > Export > Adobe Flash Professional (XFL).

    2. In the Adobe Flash Professional (XFL) Settings dialog box, choose what After Effects will do with layers with unsupported features:

      Ignore
      Layers with unsupported features are not included in the XFL output.

      Rasterize To
      Layers with unsupported features are rasterized. This means that the layers are rendered to a bitmap format (an FLV file or a sequence of PNG images). Vectors are not preserved. This preserves the appearance of the layer when the XFL file is used in Flash Professional. When rasterizing to a PNG sequence, identical adjacent frames are rasterized only once, to a single PNG file that is referenced multiple times.

    3. (Optional) Click the Format Options button and modify the settings used for creating PNG sequences or FLV files.

      If you click Format Options when FLV is chosen in the Format menu, the export settings dialog box opens. Though you can modify such items as the bit rate, in general you won’t need to change many settings in this dialog box. Changes that you make in this dialog box persist and are used for subsequent export operations, so be careful about what you change.

      If you make a change to the format options that you would like to undo, click the Reset To Defaults button in the Adobe Flash Professional (XFL) Settings dialog box.

    4. In the Export As Adobe Flash Professional (XFL) dialog box, choose a location for the output files.

    As the composition is being processed, a dialog box shows the progress of the export operation.

    When After Effects creates an XFL file, it also saves a report ([XFLfile_name] report.html) to the same folder as the XFL file. The report indicates the following:

    • whether layers with unsupported features were rasterized or ignored

    • whether each source item was rasterized (“rendered”) or passed through (“linked”)

    • whether each layer was rasterized (“rendered”) or converted to a native Flash object

    Working in Flash Professional with a FLA document created from an XFL file

    The Library panel in Flash Professional is similar to the Project panel in After Effects. When Flash Professional creates a FLA document from an XFL file, it creates symbols, folders, and video clips and organizes them in the Library panel. Each item in the Library panel has a unique name—even if they are based on items with identical names in After Effects—so that these items can be manipulated using ActionScript. This requirement for unique naming causes After Effects to append underscore characters and numerals to many names when creating the XFL file.

    When Flash Professional builds a FLA document from an XFL file that includes FLV files, the FLV files are embedded in the timeline in Flash. Often, a more efficient way to construct a FLA document is to move the video files to an external location referenced by the SWF file to stream the video. You can unembed FLV files as appropriate within Flash Professional, by deleting the video and importing it again using the FLVPlayback component.

    Note: In After Effects, the composition’s timeline begins at frame 0. In Flash Professional, the timeline begins at frame 1. This difference causes the After Effects composition timeline and the corresponding Flash timeline to appear to be offset from one another by one frame.

    In After Effects, a composition can have pixel aspect ratios other than 1.0 (square pixels). Flash Professional only supports a pixel aspect ratio of 1.0. When a composition is exported to XFL format, the FLA document is a square-pixel document with a different number of pixels so that the appearance of the document in Flash Professional matches the appearance of the composition in After Effects. Scale values in the XFL file preserve the appearance of the layers.

    How features and data are preserved when exporting a composition to XFL format

    When a composition is exported as an XFL file, After Effects goes through multiple stages, attempting at each stage to export the maximum amount of information from layers and their source files.

    If the composition uses PNG, JPEG, and FLV files as the sources for its layers, these source files are included in the XFL output (passed through) unless the layers use features that force After Effects to transcode the source files or rasterize the layers for export to XFL.
    Note: Transcoding is the conversion of a source file from one format to another format, such as from GIF to PNG. Rasterizing is the conversion of a layer to a bitmap image, incorporating all of the model information—such as vectors and keyframes—into a flattened, pixel-based image for each frame.

    Stage 1: Source files are passed through unchanged, if possible.

    For a layer’s source file to be passed through to the XFL file, the layer must meet these requirements:

    • The layer has a source footage item, and that footage item uses a PNG or JPEG sequence or FLV file as its source. (The layer is not a text layer, camera layer, light layer, or shape layer.)

    • The source footage item’s frame rate matches the composition’s frame rate.

    • The layer’s source is not trimmed.

    • The layer does not extend before the first frame or after the last frame of the composition work area.

    • The layer has no properties other than Position, Anchor Point, Opacity, Scale, and Rotation. Because effects add properties to layers, this requirement also means that the layer has no effects applied.

    • The layer does not have motion blur, frame blending, or time-remapping applied.

    • The layer does not have a track matte.

    • There is no adjustment layer above the layer.

    • Layers above do not use blending modes other than Normal.

    • The layer does not have the Preserve Transparency option set, nor does any layer above it.

    • The layer is not a 3D layer.

    Stage 2: Remaining source files are converted to PNG sequences or FLV files, if possible.

    If the only reason that a layer’s source file can’t be passed through to the XFL file is that it doesn’t use a PNG sequence, JPEG sequence, or FLV file as its source, then the layer’s source is transcoded or rasterized to a PNG sequence or FLV file, which is included in the XFL file. In this case, the layer’s Position, Opacity, Scale, and Rotation keyframes are preserved and converted to keyframes in the XFL output. If multiple layers use the same source in After Effects and meet all of the other pass-through requirements listed above, they will also share a common source in the document created in Flash Professional. Precompositions can be rasterized as source items.

    The XFL file created from a composition preserves the animation information for the layers in the composition. Keyframes for the Position, Opacity, Scale, and Rotation properties are converted to keyframes in Flash Professional, with one keyframe per frame for each animated property. Only 2D Position (x and y) keyframes and 2D (z) Rotation keyframes are converted.

    In After Effects, the Anchor Point property can be animated, but the transformation point in Flash Professional can’t be animated. In Flash Professional, the transformation point is located at the top-left corner of the symbol. Keyframe animations of transform properties (including Anchor Point) in After Effects are converted to animations based around the transformation center in the exported XFL file.

    Stage 3: Remaining layers are rasterized as individual layers, if possible.

    If a layer doesn’t meet the requirements for its source file to be passed through, transcoded, or rasterized as a source item, then the layer itself must be rasterized as a layer. Rasterizing a layer means that all of its keyframe information is lost—all of the information is contained in the rasterized image frames themselves.

    To be rasterized as an individual layer, a layer must meet these requirements:

    • The layer is either based on a video footage item (including a solid) or is a shape layer or text layer. (The layer is not a camera layer, light layer, or audio-only layer.)

    • There is no adjustment layer above the layer.

    • Layers above do not use blending modes other than Normal.

    • The layer does not have a track matte.

    • The layer does not have the Preserve Transparency option set, nor does any layer above it.

    • The layer is not a 3D layer.

    Stage 4: Remaining layers are rendered and rasterized together in bins.

    If a layer doesn’t meet the requirements for rasterization to an individual layer, then it is rendered and rasterized together with other layers in a group (bin). Bins of layers that are rasterized together are generally 3D layers, layers that are composited together with blending modes, track mattes, and layers affected by an adjustment layer.

    Limitations of exporting a composition to XFL format

    When Flash Professional opens an XFL file, it must load all of the assets into memory. After Effects warns you when you export a composition for which the assets will consume more than 580 MB. Similarly, After Effects warns you if the amount of time that an XFL file will take to open in Flash Professional is very large because the number of frames in a PNG sequence is greater than 1,050. You can still export a composition to XFL format if it exceeds these limits, but you may not be able to open the XFL file with Flash Professional.

    To prevent the long load times related to sequences with a large number of PNG files, consider pre-rendering layers based on PNG sequences to FLV format.

    After Effects relies on the embedded version of the Adobe Media Encoder to create FLV files. The Adobe Media Encoder can’t create FLV files with pixel dimensions greater than 1920x1080.

    When you export a composition to the XFL format from a 32-bpc project, the rendering of colors with values under 0 and over 1 does not produce results that preserve the appearance of the composition in After Effects. You should only work in an 8-bpc or 16-bpc project when creating a composition that you intend to export to Flash Professional in XFL format.

    Audio is not exported to the XFL file.

    To the top

    Render and export a composition as a SWF file

    SWF files are small files that play in Flash Player. They are often used to deliver animated vector graphics (such as cartoons), audio, and other data types over the Internet. SWF files also allow viewer interaction, such as clicking to follow a web link, control animation, or provide input to a rich internet application (RIA). SWF files are the output created from FLA files.

    While rendering and exporting a movie to a SWF file, After Effects maintains vector graphics as vector objects as much as possible. However, raster images, blending modes, motion blur, some effects, and the contents of nested compositions cannot be represented as vectors in the SWF file and are rasterized.

    You can choose to ignore these unsupported items so that the SWF file includes only the After Effects features that can be converted into native SWF elements, or you can choose to rasterize frames that contain unsupported features and add them to the SWF file as JPEG-compressed bitmap images, which may reduce the efficiency of the SWF file.

    Audio is encoded in MP3 format and added to the SWF file as an audio stream.

    When After Effects creates a SWF file, it also saves a report ([SWFfile_name]R.htm) to the same folder as the SWF file. The report also contains a link to the SWF file so that you can preview the output using the Flash Player plug-in. Open the report in a browser to view the SWF file and see which items in the composition are unsupported.

    The exported SWF file includes each unchanged item in the After Effects composition once, and then references it for each use. If a layer is used in multiple frames, each use refers to the same object, even if the layer’s transform properties (such as Position) are animated. However, if the content of the layer changes—for example, if a mask on the layer is animated or if the source footage item for the layer is video—a new object is created for each frame in which the layer is visible. If multiple layers in the composition share the same source footage item, the source is added once and is then referenced for every additional layer that shares the source. If the source is an Illustrator file, a SWF movie clip is created and referenced. Text characters are added as vectors once and then referenced on all subsequent frames, unless you choose Fill Over Stroke from the Fill And Stroke options menu; in that case, the characters are added as vectors on every frame.

    Note: If color management is enabled for the project, then colors are converted from the working color space of the project to the sRGB IEC61966-2.1 color space for output. This output color space is appropriate for movies shown in a web browser. (See Color management.)
    1. Select the composition you want to export, and then choose File > Export > Adobe Flash Player (SWF).
    2. Enter a filename (making sure to include the .swf extension) and location, and then click Save.
    3. Specify options as appropriate, and then click OK.

    Chris Jackson provides tips for rendering and exporting SWF files from After Effects in an excerpt from his book Flash + After Effects on the Focal Press website.

    SWF export settings

    JPEG Quality
    Specifies the quality of rasterized images. The higher the quality, the larger the file. (If you select Rasterize for Unsupported Features, the JPEG Quality setting is used for all JPEG-compressed bitmap images exported to the SWF file, including bitmap images generated from composition frames or Adobe Illustrator files.)

    Unsupported Features
    Specifies whether to rasterize features that SWF format doesn’t support. Choose Ignore to exclude unsupported features, or choose Rasterize to render all frames that contain unsupported features as JPEG-compressed bitmap images and include them in the SWF file. If you choose Rasterize, the SWF exporter rasterizes source files for each layer in the composition (except layers that use Illustrator files or solids as the source footage) and nested compositions with Collapse Transformations enabled.

    Audio Bit Rate
    The bit rate of the exported audio. Choose Auto to get the lowest bit rate available for the specified Sample Rate and Channels settings. Higher bit rates increase file size. Audio in a SWF file is in MP3 format.

    Loop Continuously
    Specifies that the exported SWF file loops continuously during playback. If you plan to specify looping by writing HTML code to control Flash Player, deselect Loop Continuously.

    Prevent Editing
    Creates a SWF file that can’t be modified by applications such as Flash Professional.

    Include Object Names
    Includes layer, mask, and effect names in the file, for use as input to ActionScript programs. Selecting this option increases file size. Rasterized objects are not named.

    Each mask is exported as a separate SWF object, the name of which is the layer name followed by the mask name. If all masks use Difference mode, all masks are exported as one SWF object, and the name is the layer name. Each text character is exported as a separate SWF object.

    Flatten Illustrator Artwork
    Splits all overlapping objects into non-overlapping pieces. When you select this option, you don’t need to convert Illustrator text to outlines before exporting. (This option supports source files from Illustrator 9.0 or later.)

    Flattening Illustrator artwork has advantages and disadvantages. When you flatten Illustrator artwork, text is exported to SWF format properly, so you don’t need to convert text to outlines. Overlapping objects are removed, so composited layers appear the same in both After Effects and the SWF file. End caps, joins, and transparency groups are exported properly, and artwork outside crop marks, which is not visible in the SWF file, is not included. However, SWF files don’t necessarily become smaller. In addition, the flattening process may introduce unsupported objects that are then ignored or rasterized, and white fringes may appear around some objects. The process can be slow, memory-intensive, and possibly ineffective for complex Illustrator artwork.

    Include Layer Marker Web Links
    Makes layer markers behave as web links. The Include Layer Marker Web Links option adds web links and a Get URL action to the SWF file by using information from layer markers. This option also adds a frame label to each SWF frame that has a layer marker. You can specify how the browser opens the web link with standard target commands (for example, _blank). (See Web links, chapter links, cue points, and markers.)

    Target commands for web links in a SWF file

    _blank
    Loads the web link into a new browser window.

    _parent
    Loads the web link into the parent frame of the frame in which the current file is playing.

    _self
    Loads the web link into the current frame.

    _top
    Loads the web link into the top frame in the current window.

    _level0
    Loads another SWF file into level 0. The current file typically plays at level 0; another file loaded into level 0 usually replaces the current file. The URL must refer to another SWF file.

    _level1
    Loads another SWF file into level 1 if the URL refers to another SWF file.

    Supported features for SWF format export

    Layers
    After Effects text layers are exported to SWF format as vector graphics. The following layer types and layer switches aren’t supported: track mattes, 3D layers, 3D cameras, 3D lights, adjustment layers, shape layers, Preserve Transparency, Collapse Transformations, and motion blur. The Fill Over Stroke character option and the Blur animator property aren’t supported, and only Normal blending mode is supported. Nested compositions aren’t supported and are rasterized.

    Masks
    Only masks with Add mask mode or Difference mask mode are supported; multiple masks in a layer must use the same mask mode. If Add mode is specified, partial opacity and the Inverted option are also supported. Mask feather is not supported. The result of overlapping masks with Add mode and partial opacity may appear differently in the SWF file than in After Effects. (See Mask modes.)

    Effects
    Path Text, Audio Waveform, and Audio Spectrum are supported for output to SWF format.

    All Path Text options are supported, except the following: Composite On Original, Fill Over Stroke, and Difference mode.

    Lines drawn by the Audio Spectrum and Audio Waveform effects are converted to vectors. The following unsupported features are ignored: Outside Color (only Inside Color is used), Softness, and Composite On Original. In addition, only uniformly thick lines are included in the SWF file. For example, if you select the Use Polar Path option in Audio Spectrum, lines become thicker farther from the center in After Effects, but in the SWF file the lines remain at the same thickness.

    The waveforms may increase the SWF file size, so decrease the Displayed Samples value in the Audio Waveform effect or the Frequency Bands value in the Audio Spectrum effect, or decrease the frame rate to make the SWF file smaller.

    Resolution
    SWF files are always created at full resolution (size of composition); JPEG-compressed bitmap images are rendered at full resolution.

    Adobe Illustrator files
    Only stroked paths and filled paths in CMYK or RGB color spaces are supported.

    Layers that have Illustrator source files are converted to corresponding SWF items if the layer does not contain masks or have Collapse Transformations enabled. Illustrator layers that contain masks or have Collapse Transformations enabled are rasterized. The SWF file maintains the Illustrator crop marks. Artwork outside the crop marks is included in the SWF file even though it’s not visible, thereby increasing the file size.

    The SWF export report lists information for unsupported features in Illustrator files for the first frame in which the Illustrator file is visible. Unsupported features are ignored or rasterized (depending on whether you’ve selected Ignore or Rasterize Unsupported Features) on all frames in which the footage is visible.

    To the top

    Render and export a composition as an FLV or F4V file

    FLV and F4V files contain only pixel-based (rasterized) video, not vector graphics, and they aren’t interactive.

    The FLV and F4V formats are container formats, each of which is associated with a set of video and audio formats. FLV files generally contain video data that is encoded using the On2 VP6 video codec and audio data encoded using an MP3 audio codec. F4V files generally contain video data that is encoded using an H.264 video codec and the AAC audio codec.
    Note: After Effects CS4 and earlier also provided the option to encode video data in FLV files using the Sorenson Spark video codec.

    You can play a movie in an FLV or F4V container file in many different ways, including the following:

    • Import the file into the Flash Professional authoring application and publish the video in a SWF file.

    • Play the movie in the Adobe Media Player (AMP).

    • Preview the movie using Adobe Bridge.

    After Effects markers can be included as cue points in an output FLV or F4V file. To transfer keyframes or global property values into the Flash Professional authoring application from After Effects, run the Convert Selected Properties To Markers.jsx script before rendering and exporting an FLV or F4V file.

    You render and export a movie to the FLV or F4V container format using the render queue, just as you do with other formats. (See Render and export a movie using the render queue.)

    To include the alpha channel in the FLV output, use the On2 VP6 codec and select Encode Alpha Channel in the Video tab of the export settings dialog box. After Effects premultiplies channels with black when encoding transparency in FLV files. (See Alpha channel interpretation: premultiplied or straight.)

    When you render and export a composition to the F4V or FLV format from a 32-bpc project, the rendering of colors with values under 0 and over 1 does not produce results that preserve the appearance of the composition in After Effects. To avoid unexpected results, you can work in an 8-bpc or 16-bpc project when creating a composition that you intend to render and export to F4V or FLV format. Alternatively, you can work in a 32-bpc project, render and export the composition to another format, and then convert the output file to F4V or FLV.

    Online resources about FLV and F4V formats

    This video from the After Effects CS5: Learn By Video series demonstrates export to FLV and F4V formats.

    Jan Ozer provides technical details and tips in “Encoding options for H.264 video” on the Adobe Developer Connection website for encoding video using the H.264 video codec.

    Kush Amerasinghe provides an overview of H.264 and F4V in “H.264 for the rest of us“ on the Adobe Developer Connection website.

    Robert Reinhardt provides information about video for Flash Player in some sample chapters from his book Video with Adobe Flash CS4 Professional Studio Techniques on the Peachpit website. In the "Compression primer" chapter, he explains in detail the advantages and disadvantages of the On2 VP6 and H.264 video codecs.

    More information about FLV and F4V formats—including the F4V specification—is available on the Adobe Developer Connection website.

    Fabio Sonnati provides recommendations for settings for H.264 (F4V) movies for mobile devices on the Adobe Developer Connection website.

    More Help topics

    Working with Flash and After Effects

    Basics of rendering and exporting

    Encoding and compression options for movies

    Legal Notices   |   Online Privacy Policy