2 Replies Latest reply on Nov 11, 2007 8:04 AM by Deaf Mike

    Actionscript and XML working together

    Deaf Mike Level 1
      http://clerccenter.gallaudet.edu/templates/videotest.html

      hi - please see the above SWF. i created this using multiple scenes. my web guy here wants to be able to use an xml file so if you create 5 different FLV videos, instead of the same one playing over and over like the above, the XML will play the 6 different ones randomly.

      is this possible? anyone out there know how to do this?

      thanks!
        • 1. Re: Actionscript and XML working together
          Greg Dove Level 4
          That's definitely possible..

          If you google for "xml video playlist flv" you'll get a few tutorials covering the basic idea.
          For example:
          http://www.video-animation.com/flash8_016.shtml

          I'd suggest that you browse through a few tutorials, maybe do one that looks good and then figure out specifically what you want done differently for what you need (e.g. because its just random, you don't need to select from a list etc, so some things will be easier).

          Give it a shot and then come back here if you need more help, posting whatever code might be posing a problem.

          Basically you load in the xml nodes, which contain the paths to the flvs, treat them as an array, select a random index, assign that node's flv path to the player, and wait till it's finished playing before choosing the next one... etc.

          • 2. Re: Actionscript and XML working together
            Deaf Mike Level 1
            ok thanks a lot. i'll check out that link and see what happens. or rather, pass it on to the other guy and see if it helps him.