1 Reply Latest reply on Jul 19, 2007 3:11 PM by Newsgroup_User

    Using XML Array to Control Flash Movie

    shurleynova
      This is a new challenge and I keep getting stuck.

      What I have is an array of (x,y) coordinates, display intervals, and a loop back to continue going through the array until a set amount of time has passed. I have an ASP.Net application that generates the array for me based on my input. What I want to know is how to attach this information to a movie clip.

      I have a movie clip that I want to appear at various intervals then vanish only to appear at another location after a set time until all the coordinates have been displayed and then end. I am new to alot of this using external files to control flash stuff any hints clues or ideas, or is this even possible with flash?
        • 1. Re: Using XML Array to Control Flash Movie
          Level 7
          Hi shurleynova,

          Flash files, by themselves, have nothing in them. The ability to
          control them externally must be enabled and attached from within the
          Flash file itself. The easiest way to do this is by using the
          ExternalInterface class and add internal callbacks:

          function moveMyStuff(x,y) {
          //so some movement
          }
          ExternalInterface.addCallback('moveMyStuff',this.moveMyStuff);

          In the containing HTML code, you would embed your SWF with an ID of some
          sort and you would use this ID to issue commands from JavaScript:

          document.myFlashObj.moveMyStuff(20,20);

          If you don't have access to actually create or alter ActionScript or
          produce your own SWFs, I'm afraid you're out of luck.

          Regards,
          Patrick

          shurleynova wrote:
          > This is a new challenge and I keep getting stuck.
          >
          > What I have is an array of (x,y) coordinates, display intervals, and a loop
          > back to continue going through the array until a set amount of time has passed.
          > I have an ASP.Net application that generates the array for me based on my
          > input. What I want to know is how to attach this information to a movie clip.
          >
          > I have a movie clip that I want to appear at various intervals then vanish
          > only to appear at another location after a set time until all the coordinates
          > have been displayed and then end. I am new to alot of this using external
          > files to control flash stuff any hints clues or ideas, or is this even possible
          > with flash?
          >

          --
          http://www.baynewmedia.com
          Faster, easier, better...ActionScript development taken to new heights.
          Download the BNMAPI today. You'll wonder how you ever did without it!
          Available for ActionScript 2.0/3.0.