I have a bunch of Flash movies done in Flash 9 / AS3. These
are pretty basic animations, with very simple timeline scripts at
the top level - basically just stop() and some trace statements. I
also have labels set at various points. All of these animations are
designed for basic gotoAndPlay(label) then stop() operations.
These swfs are compiled without any custom classes...
strictly simple code on the root timeline, as I said, stop() and
I load this stuff up in my more complex Flex app via a
SWFloader. Once the load is complete, I assign SWFloader.content to
a variable typed as movieclip. Everything loads. My trace
statements trace through Flex. My stop() actions work. However, the
gotoAndPlay(label) commands do not work, Flex always reports that
the movie is on Frame 0, it claims the movie has 0 totalFrames,
etc. It can't see any labels or any other details of the file.
I've looked at the docs and the list archives, but can't seem
to get this going. Is there anything special which needs to be done
in Flash 9, besides exporting as Flash 9 / AS3? Any other
suggestions or examples?
I should note that this problem really only occurs if the
animation SWF is @embedded. Looking at the loaderInfo.URL is
telling me the main movie's URL, which I suppose is fine, but I
still don't seem to be able to communicate with it. Accessing the
movie as an external file, without embedding, it works correctly.
Is there some special difference in how you handle an @embedded SWF
compared to one linked via a relative path?
What I'm looking for are the steps to use an @embedded
FP9/AS3 SWF while retaining the ability to access its properties,
and do basic gotoAndPlay("labelName") calls, as I've tried a lot of
different ways and haven't been successful yet. Runtime access
seems to work just fine. Once embedded, it no longer works
correctly as it seems the reference and probably class type of the
movie has changed. Any pointers?