1 Reply Latest reply on Jul 9, 2008 10:40 AM by darrendb

    Loading AS2 swf's which load additional AS2 swf's into Flex

    darrendb Level 1
      My loaded AS2 swf can not seem to load additional AS2 swf's using loadMovie() or loadMovieNum().

      I have a .mxml file with a mx:Image tag with a source attribute bound to a String variable. I can set this variable to a valid AS2 swf path, and the swf loads as expected.

      However, this AS2 swf contains one or more loadMovie() statements to load additional 'child' swf's into empty movieClips, which fails silently.

      (I'm forced to load several legacy/AS2 projects, I'm trying to avoid migrating these projects to AS3, also trying to avoid embedding the 'child' swf's into a single AS2 swf).

      I've tried both loadMovie and loadMovieNum, I've change the publish settings to both Access Local Files and Access Network Files, I've tried replacing the bound mx:Image tag with a mx:SWFLoader tag, none of these work. I even tried toggling the Flex compiler setting -use-network.

      All other functionality seems to be working in the loaded AS2 swf.

      I've found many posts/articles regarding inter-communication between a Flex AS3 swf and loaded AS2 swf's, but this isn't my problem. I don't need communication, just functionality.

      Thanks in advance for any insight!
        • 1. Re: Loading AS2 swf's which load additional AS2 swf's into Flex
          darrendb Level 1
          OK, once again, walking away from a problem for 5 minutes has proven to be invaluable. I started to think that maybe there was a known issue with loadMovie(). Although I was trying to avoid touching the source code of these AS2 swfs, I decided it would be worthwhile to test replacing the loadMovie() statements with MovieClipLoader.loadClip().

          It works! Although this means all the legacy AS2 files I need to load will have to be revised, this is much less of a task than migrating to AS3 or embedding the child swf's into single movie. I hope at least this will save someone else the frustration of trying to do the same thing.