I'm having problems when using sounds within a component. The
component contains code that attaches and starts a sound, this
works as expected when the component SWF is run on its own.
However, when I export the SWC file and install the component
into another FLA, either attachSound or start fails. If I copy and
export the sounds within the main .FLA (still attaching and
starting from within the component) everything works fine.
I've traced the Sound object before calling attachSound and
start and it exists so there must be some kind of export problem
with the sound file itself. My component MovieClip exports the
sounds in frame 1 so they should be pulled into the SWC.
Is this a Flash bug or am I confused as to how sound
exporting works ? Any help would be very much appreciated.
The problem also exists when I try and programatically access
MCs from the components library using attachMovie, so I'm now a lot
clearer as to what is happening. attachMovie is accessing the
library of the main FLA as the SWC has no library of its own.
So the question now is, can I embed the assets of my
component within the SWC and access them using attachMovie from
within the component AS code ? As a workaround I could import the
components assets into the library of the main FLA but ideally I
want the component to be completely self contained.