3 Replies Latest reply on Apr 6, 2007 1:53 PM by Newsgroup_User

    Loading mp3 dynamically using FlashVars

    xxaimsxx
      I was wondering if anyone knew how to get an mp3 to load dynamically using FlashVars. I know how to do the html coding for the <object> and <embed> tag so that each time I want to change the audio file, I can do that in the html file rather than the flash.

      The thing I'm having problem with is once I create the shared object, I don't know how to get it to reference the html file. I've been looking online for help on this as far as a full on tutorial on how to set up things like that and I just don't get it.
        • 1. Re: Loading mp3 dynamically using FlashVars
          Level 7
          xxaimsxx,

          > I was wondering if anyone knew how to get an mp3 to load
          > dynamically using FlashVars.

          Sure thing.

          > I know how to do the html coding for the <object> and <embed>
          > tag so that each time I want to change the audio file, I can do
          > that in the html file rather than the flash.

          Well, that's how to load an MP3 from FlashVars. ;) Now I'm confused.

          > The thing I'm having problem with is once I create the shared
          > object, I don't know how to get it to reference the html file.

          The SharedObject class, in principle, has nothing to do with FlashVars,
          so I'm not sure what you're asking, here. The SharedObject class gives you
          a way to store information on the user's hard drive -- think if it like the
          Flash equivalent of browser cookies -- while FlashVars is a way to set
          variables in the movie's root from the outside.

          Can you be more specific on how you're trying to combine these?


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Loading mp3 dynamically using FlashVars
            xxaimsxx Level 1
            Hello David-

            This Amy, I was just on your website and you had just emailed me a zip sample file of the FlashVars.

            I was told that I had to create a SharedObject so I thought that's what I had to do. I will look into the flash file this weekend.

            Thanks a lot!
            • 3. Re: Loading mp3 dynamically using FlashVars
              Level 7
              Oh, hi Amy. :)

              Interesting, about the SharedObject advice; that really had me my
              scratching my head. A SharedObject instance would make sense if, for
              example, you let the user choose a background image, audio file, or some
              other custom preference and wanted to give that user the opportunity to save
              the choice for the next visit.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."


              "xxaimsxx" <webforumsuser@macromedia.com> wrote in message
              news:ev69fq$gkb$1@forums.macromedia.com...
              > Hello David-
              >
              > This Amy, I was just on your website and you had just emailed me a zip
              > sample
              > file of the FlashVars.
              >
              > I was told that I had to create a SharedObject so I thought that's what I
              > had
              > to do. I will look into the flash file this weekend.
              >
              > Thanks a lot!
              >