3 Replies Latest reply on Sep 27, 2006 6:02 AM by Rothrock

    Swap symbol with actionscript

    artdoggy Level 1
      This will probably seem like a really dumb question but is there anyway to do something like the swap symbol functionality in Flash but using actionscript to accomplish this?

      I can think of 10 ways I could really use this to do somethings very quickly and easily.
        • 1. Re: Swap symbol with actionscript
          ravich9
          document.swapElement ( name )

          name A string that specifies the name of the library item to use.
          • 2. Re: Swap symbol with actionscript
            artdoggy Level 1
            Thanks for pointing outthe swap element command. I didn't know about that. Can't get it to work though.

            Tried
            on (release) {
            document.swapElement('red_square');

            }

            Does it not work in an object script?
            • 3. Re: Swap symbol with actionscript
              Rothrock Level 5
              I'm guessing document.swapElement() is JSFL not Actionscript. AFAIK there is no document class in Actionscript.

              I don't think there is such a thing in Actionscript. But it isn't too hard. All you have to do is

              removeMovieClip or set the _visible property to false for what you are trying to get rid of

              attachMovieClip, duplicateMovieClip, or set the _visible property to true for what you are trying to show.

              Doesn't seem to difficult to me. If you are worried about event handlers, location, etc. Just put the two things in the same movieclip and just switch between different frames.

              There are so many easy tricks to make this work.