tags:

views:

38

answers:

2

I need "loading" animations to import into Flex for a search engine so the person knows something is being searched. I'm not sure how to do this.... Is it through swc files?

+5  A: 

Check out the [Embed] metadata tag.

[Embed(source="assets/Whatever.swf", symbol="Icon")]
public static var Icon:Class;

Which can then be used as an icon for many components that support icons, like buttons, or as the source for an Image component:

<mx:Button icon="{Icon}" />
<mx:Image source="{Icon}" />
Sam
so how do I add that Icon class to a Canvas or something in actionscript?
Adam
@Adam, I added usage examples. You can also use the asset to draw programmatically, but that's more complicated and less common.
Sam
A: 

You may also wanting to consider making flash based indeterminate progress bar skins, so that your loading animations are implemented as part of the flex framework: http://livedocs.adobe.com/flex/3/langref/mx/controls/ProgressBar.html - the adobe explanation is a bit out of date, but it still works: http://www.adobe.com/devnet/flex/articles/flex_skins.html

quoo