views:

23

answers:

2

Hello, I'm looking to make a library that can be either merged into a swf at compile time or loaded into a swf at runtime. The way I understand it, .swc files are generally merged into a swf at compile time, and .swf files are generally loaded into a swf at runtime. Is there a way I can have one file that can do both?

A: 

What are you trying to do? What is the "library" supposed to do or provide? If it's an animation, you can drop it in the IDE and have it compiled in (as opposed to loaded at runtime). If it's code, it's nonsensical to load it at runtime.

Virgil Disgr4ce
It's an animation that's only supposed to be loaded if the user reaches a certain point in the main swf. It's used in multiple projects. In some it needs to be compiled in, and in others it needs to be loaded at runtime.
Anonymous1
A: 

You could try using authortime shared libraries.
Basically you would have an FLA that has the shared animation in a MovieClip. You could build this clip separately as a SWF and use that for any files that need to load it at runtime.

Then, in any other projects that need the clip to be compiled in, you'll create a new MovieClip in that project and link it to the shared clip in the other FLA.
In the Symbol Properties, hit Browse at the bottom in the Source section and navigate to the FLA and then the shared clip. Tick 'Always update before publish'.

Now, if you make changes to shared clip, you'll recompile the SWF that gets loaded, and recompile any of the other projects that use that shared asset. They should automatically import the newest version when they get built.

Cadin
This isn't a bad solution, but ideally I'd also like flex applications to be able to use it too.
Anonymous1