0 Replies Latest reply on Apr 18, 2007 9:37 AM by mfkpro

    Trouble with loading external mp3 files

      I apologize for the length of the post. I hope this is clear of what I am trying to explain.

      My problem deals with getting "undefined" when I press a button to load an external mp3 files. The following is what my XML childNode looks like:

      <option phonetic="Soundless, or A" name="aleph" cursive="alephCursive.swf" block="alephBlock.swf" audio="char1.mp3"/>

      Every attribute loads the way I've programmed them, except for the last one "audio".

      The following is what my actionscript looks like loading in these attributes:
      Everything is happening inside the onLoad event for my XML file.

      var xmlContent = this.firstChild.firstChild;
      audioContent = new Array();
      for (var i = 0; i<this.firstChild.firstChild.childNodes.length; i++) {
      nextEntry = xmlContent.childNodes ;
      = [nextEntry.attributes.phonetic, nextEntry.attributes.name, nextEntry.attributes.cursive, extEntry.attributes.block, nextEntry.attributes.audio];

      The code above simply adds each attribute to the audioContent array. Each element traces out correctly.

      The following code is how I am using these attributes:

      for (var i = 0; i<audioLength; i++) {
      audioContainer.attachMovie("container4", "audioItem"+i, i);
      // Create a shortcut reference to the present movie clip
      thisClip = audioContainer["audioItem"+i];

      thisClip.myTxt1.htmlText = audioContent
      thisClip.myTxt2.htmlText = audioContent [1];

      thisClip.cursive_mc = loadThis(assetPath+audioContent
      [2], thisClip.cursive_mc);
      thisClip.block_mc = loadThis(assetPath+audioContent [3], thisClip.block_mc);

      thisClip.speaker_mc.attachMovie("speaker", "speaker_mc", this.getNextHighestDepth());
      thisClip.speaker_mc.speaker_mc.onRollOver = function() {
      thisClip.speaker_mc.speaker_mc.onRollOut = function() {
      thisClip.speaker_mc.speaker_mc.onRelease = function() {

      Loading the text works inside the htmlText. Using a function loadThis to load external swf files works corerctly and even attaching a linked movieclip from my library called "speaker" works correctly.

      The problem comes from pressing the speaker movieclip that the output traces "undefined" instead of the external mp3 file.

      I appreciate any help. Thanks.