5 Replies Latest reply on Jul 3, 2008 7:44 PM by thedenmaster

    Flash>"undefined" error in MP3 PLayer

    thedenmaster
      Hello to all and thanks for checking this out...

      This is regarding a swf MP3 player I am trying place on my site.

      http://www.denmasterstudios.com/portfolio.html

      I preview the swf file in flash player on local drive = works fine
      I preview the swf file in dreamweaver cs3 9.0 in the local files browser window using the "preview in ie explorer" function = works fine

      I preview the swf file in dw in the local files browser window using the "open with flash player" funtion = blank white screen

      Once I load the swf file into a DW html doc and attempt a preview locally or online, the following occurs:
      Player loads on page, but does not play any songs.
      A "undefined - undefined" appears where the song title and artist name should be.

      During the previews in flash player, this does not occur, only when the file is inserted into an HTML in DW and attempted to be played.

      Here is the xml code:

      <?xml version="1.0" encoding="UTF-8"?>
      <songs>
      <song url="britney.mp3" artist="Denmaster" track="Britney Style" />
      </songs>

      Here is the action script code:

      class Song
      {
      public var earl:String;
      public var artist:String;
      public var track:String;

      public function Song(e:String, a:String, t:String)
      {
      earl = e;
      artist = a;
      track = t;
      }
      }

      Any good eyes out there see anything?

      Thanks for your help all!
        • 1. Re: Flash&gt;&quot;undefined&quot; error in MP3 PLayer
          Level 7
          How are you loading the xml file?


          --
          Dan Smith > adobe community expert
          Flash Helps > http://www.smithmediafusion.com/blog/?cat=11
          http://www.dsmith.tv

          "thedenmaster" <webforumsuser@macromedia.com> wrote in message
          news:g4h2it$r34$1@forums.macromedia.com...
          > Hello to all and thanks for checking this out...
          >
          > This is regarding a swf MP3 player I am trying place on my site.
          >
          > http://www.denmasterstudios.com/portfolio.html
          >
          > I preview the swf file in flash player on local drive = works fine
          > I preview the swf file in dreamweaver cs3 9.0 in the local files browser
          > window with flash player = works fine
          >
          > Once I load the swf file into a DW html doc and attempt a preview locally
          > or
          > online, the following occurs:
          > Player loads on page, but does not play any songs.
          > A "undefined - undefined" appears where the song title and artist name
          > should
          > be.
          >
          > During the previews in flash player, this does not occur, only when the
          > file
          > is inserted into an HTML in DW and attempted to be played.
          >
          > Here is the xml code:
          >
          > <?xml version="1.0" encoding="UTF-8"?>
          > <songs>
          > <song url="britney.mp3" artist="Denmaster" track="Britney Style" />
          > </songs>
          >
          > Here is the action script code:
          >
          > class Song
          > {
          > public var earl:String;
          > public var artist:String;
          > public var track:String;
          >
          > public function Song(e:String, a:String, t:String)
          > {
          > earl = e;
          > artist = a;
          > track = t;
          > }
          > }
          >
          > Any good eyes out there see anything?
          >
          > Thanks for your help all!
          >
          >


          • 2. Re: Flash&gt;&quot;undefined&quot; error in MP3 PLayer
            thedenmaster Level 1
            the swf file is "mp3Player_flashcs.swf" which I load into dw on my html page. I am using the "insert>flash" command from the toolbar.

            the xml file is "songs.xml" and I'm not really loading it. Do I need to add a command? With my other flash objects, they have all loaded their xml files on their own and I only needed to edit them to get them working the way I wanted to. (I purchased them from sites) This one was supposed to work the same way and seems to, only not when I load it into DW.

            from my research I'm trying to figure out if this is some AS3 versus AS2 or AS1 issue...but I'm a newbie and not sure...

            open to any ideas and thanks again for the reply!
            • 3. Re: Flash&gt;&quot;undefined&quot; error in MP3 PLayer
              Level 7
              The reason why it says "undefined" is because it cannot find the data to
              populate. That means that your xml data is not getting to the swf. This
              can happen for a number of reasons. Make sure the xml file is on the server
              and the path that to the xml file in the actionscript is correct.


              --
              Dan Smith > adobe community expert
              Flash Helps > http://www.smithmediafusion.com/blog/?cat=11
              http://www.dsmith.tv

              "thedenmaster" <webforumsuser@macromedia.com> wrote in message
              news:g4h3t8$sgg$1@forums.macromedia.com...
              > the swf file is "mp3Player_flashcs.swf" which I load into dw on my html
              > page. I
              > am using the "insert>flash" command from the toolbar.
              >
              > the xml file is "songs.xml" and I'm not really loading it. Do I need to
              > add a
              > command? With my other flash objects, they have all loaded their xml
              > files on
              > their own and I only needed to edit them to get them working the way I
              > wanted
              > to. (I purchased them from sites) This one was supposed to work the same
              > way
              > and seems to, only not when I load it into DW.
              >
              > from my research I'm trying to figure out if this is some AS3 versus AS2
              > or
              > AS1 issue...but I'm a newbie and not sure...
              >
              > open to any ideas and thanks again for the reply!
              >


              • 4. Re: Flash&gt;&quot;undefined&quot; error in MP3 PLayer
                thedenmaster Level 1
                Why does the information get tot he swf file if I perview it from Windows Explorer or Internet Explorer, but not if I attempt a preview from looking at it in dw in the "local files" window....

                Note that the swf works fine when I use it from a windows enviroment, just not anytime in the dw enviroment or when I put it on the server thru the dw program.

                This leads me to believe that dw is doing something to the file, but not the code or it is causing the xml to load incorrectly...

                make sense? any suggestions on another type of html program aside from dw that I could test it out in?

                still open to any suggestions..thanks all..
                • 5. Re: Flash&gt;&quot;undefined&quot; error in MP3 PLayer
                  thedenmaster Level 1
                  Okay, not sure why BUT...

                  Works fine if I copy all files and put them in the top level of the directory. I had them in a "mp3player" directory with the html of the page. For some reason, dw likes to have the xml files in the top level.

                  oh well. thanks all. any good sites explaining ways to organize site files correctly?

                  best, and thanks again.