Adobe Animate CC (formerly Flash Professional CC) and Flex® can be used together in a variety of ways, including creating custom graphics and components in Animate for use in Flex®. The following tutorials demonstrate several of the ways Animate® and Flex® can be used together.
Note: (Animate CC only) The Design View workflow between Animate and Flash Builder is deprecated. On initiating this workflow from Flash Builder 4.6, an exception is thrown in Animate.
In order to enable these Animate/Flash Builder workflows, ensure that the following conditions are true:
Both Flash CS5 and Flash Builder 4 are installed.
To launch a FLA file from Flash Builder, your project must be assigned the Animate project nature in the Package Explorer panel.
For more information about assigning project natures in Flash Builder, see Flash Builder Help.
To launch a FLA file Flash Builder, your project must have a FLA file assigned to be used for testing and debugging in the Animate CC properties of the project.
From the Flash Builder development perspective, choose Run > Test Movie or Run > Debug Movie. Note that each menu item has a Animate icon next to it. Once the SWF window or debug session is closed, focus will return to Flash Builder unless there are compiler errors in frame scripts inside the FLA file associated with the project. Information about all errors is sent to the Errors panel in Flash Builder.
From the Flash Builder development perspective, choose Project > Publish Movie. Note the Animate icon next to the menu command.
In Adobe Animate, you can create content for use as components in Adobe® Flex® applications. This content can include both visual elements and Adobe® ActionScript® 3.0 code.
Creating components in Animate for use in Flex allows you to take advantage of the flexible graphic design capabilities of Animate while still utilizing the capabilities of Flex.
In order to create Flex components in Animate, you must install the Flex Component Kit for Animate. You install the component kit using Adobe Extension Manager. Some versions of the component kit may not support all features of Adobe Animate, so be sure to download the latest version of the component kit from www.adobe.com/go/flex_ck_en.
For more information about using Flex and Animate together, refer to the Flex documentation on the Adobe web site at www.adobe.com/go/learn_flexresources_en.
Be sure you have Adobe Extension Manager installed. To download Extension Manager, visit the Extension Manager download page at www.adobe.com/go/extension_manager_dl_en.
By default, Extension Manager is installed with the Adobe Creative Suite applications.
Before converting the movie clip to a Flex component, be sure that it meets the following requirements for compatibility with Flex:
The frame rate of the FLA file should be 24 fps and should match the frame rate of any Flex projects that will make use of the component.
The registration point should be located at the 0, 0 point in the movie clip.
note: To ensure that all content in the movie clip has a registration point of 0, 0, click the Edit Multiple Frames button at the bottom of the Timeline, select all frames in the movie clip timeline, select all of your content in all the frames, and move it to 0, 0 in the Property inspector.
Select the movie clip in the Library panel and choose Commands > Convert Symbol to Flex Component.
Animate converts the movie clip to a Flex component, changes its icon to a Flex icon in the Library, and imports the FlexComponentBase class compiled clip to the Library. Animate embeds the FlexComponentBase into the Flex component SCW file created in the next step.
Note the progress messages displayed in the Output panel while Animate converts the movie clip.
Copy the SWC file from Animate and paste it into the bin folder of your Flex project.
Add the SWC file to library path of your Flex project. For more information, see the Flex Builder documentation at www.adobe.com/go/learn_flexresources_en.
If you are writing ActionScript 3.0 code to be used in Flex, you can place metadata in the code to embed external files in any published SWF that includes the ActionScript code. Usually, these [Embed] metadata declarations are used to embed image files, fonts, individual symbols, or other SWF files into the SWF.
Remember that metadata is “data about data.” You add metadata to ActionScript on the line immediately preceding the line of code that the metadata applies to. The compiler then takes the metadata into account when compiling the line of code that follows it.
For example, to embed an image called button_up.png that is stored in the directory one level above the ActionScript file, you would use the following ActionScript:
private var buttonUpImage:Class;
The [Embed] metadata tag tells the compiler to embed the file named button_up.png in the SWF file and that the file should be associated with the variable named buttonUpImage.
For more information about embedding assets with metadata in Flex, see Embedding Assets in the Flex 3 Developer Guide at www.adobe.com/go/learn_flexresources_en.
If you use a feature that requires the Flex SDK, such as [Embed] metadata, at compile time Animate prompts you to add the Flex.SWC file to the Library path of your FLA file. The Flex.SWC file contains compiled classes needed to support Flex metadata. Click Update Library Path in the dialog box to add Flex.SWC to the Library path. You can also add the Flex.SWC file to the Library path in the ActionScript publish settings later.
The following resources provide additional information and examples about integrating Animate with Flash Builder: