I fixed it myself...I was staring at the code too long so after a long break I came up with this to be able to get through the cue_points array...
//
                        var count:Number = 0;
                        for each (var cue:XML in xmlData..step.training.cuein){
                                //
                                trace("cue --> "+cue+" count: "+count);
                                //
                                cue_points[count].splice(1,1,cue);
                                count++;
                        }

It works for my situation.

Thanks.

On Aug 28, 2008, at 5:28 AM, Kenneth Kawamoto wrote:

If you post your XML as well that'll help, but this:

cue_points[cue].splice(1,1,cueIn);

...looks dodgy to me. "cue" needs to be an uint for this to work but it's an XML, also you set "cueIn = cue" ???

Kenneth Kawamoto
http://www.materiaprima.co.uk/

noentourage wrote:
Hey flashcoders...
I'm parsing an xml doc and building an array then later trying to stuff a
value in to each object
in the array at the second part of each object.
[code]
//at the top of my class I have the variable for the cue_points array
// create array with text prompts and a dummy value
  for each (var prmpt:XML in xmlData.prompt) {
      //this works fine
      cue_points.push([prmpt.text,2]);
  }
// now add cue points to the previously created array
  for each (var cue:XML in xmlData..step.training.cuein){
      var cueIn = cue;
      //following line returns the correct values from the xml nodes
      trace("cueIn --> "+cueIn);
//the following line does not splice in the "cueIn" value to the
previously created
      // array.
      cue_points[cue].splice(1,1,cueIn);
  }
[/code]
I'm trying to first push the text prompts into the array and build it with
to values in the one object so that
I can later come in and splice in new values to go along with the prompt
text.
I've tried to trace this out and can't seem to find the issue and can't find
anyone else that has done this.
So since it's new AS3 code I figured that maybe someone would have a tip.
Thanks!
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to