2 Replies Latest reply on Dec 10, 2006 1:51 PM by buabco

    WHY ONLY AVM1???

    buabco Level 1

      I've been trying all day to acheive this and was unable to do it, so I hope someone knows the answer for this. I have a swf file I want to load into my ActionScript class and I need to be able to load this movie so I can actually use it as a movie clip (play, stop, gotoAndPlay, gotoAndStop, set parameters, etc...). I've been trying to use the Loader class but it always fetch me a AVM1 Movie, so there is nothing I can do with it.

      The thing is.... I thought that the problem was that the particular swf movie I'm trying to load was compiled with flash 8, so I was thinking, OK it actually is an AVM1 movie, so it's natural to get this. That's why I downloaded the flash 9 preview and tryed again.

      And OH Surprise, the loaderInfo tells me ITS OK, you've got a Action Script 3 Movie, version 9, but the Loader class keeps giving me a AVM1 movie that I can't convert to a MovieClip Class.... now... the Documentation says something like "For player 8 or older you get an AVM1 movie", I thought it was a typo, but I guess it's not.

      So here I am, still with the problem.... how do I get this swf into a MovieClip class?
        • 1. WHY ONLY AVM1???
          herbalHermit Level 1
          I'm sure you've figured it out by now, but for anyone else wondering here is how to do it.

          private var clsSWF:Class;
          private var objSWF:MovieClip;

          private function AppInit():void {
          objSWF = MovieClip(new clsSWF());
          • 2. Re: WHY ONLY AVM1???
            buabco Level 1
            It was even more simple, I simply picked up and old movieclip and compiled in the flash 9 preview.

            I didn't notice that the flash player setup the compiler to use flash8 instead of 9. I change the setting and worked fine.

            This code you posted though... can it be use to convert AVM1 to AVM2 on runtime? I've already use this to duplicate movieclips but I haven't tried for AVM conversion :)