0 Replies Latest reply on Jul 29, 2007 9:02 PM by emadsen

    AS3 FLV CUEPOINTS - ARGGH!

    emadsen
      I'm pulling out what hair I have left. Any help would be greatly appreciated.

      I am dynamically creating cuepoints on an flvPlayback video. The cuepoints are defined in an xml file like so...

      <presentation>
      <videofile src="./myflv.flv" />
      <cuepoints>
      <cuepoint>
      <id>c1</id>
      <time>0</time>
      <type>navigation</type>
      <label>Overview</label>
      <title>Overview</title>
      </cuepoint>
      <cuepoint>
      <id>c1t1</id>
      <time>3</time>
      <type>event</type>
      </cuepoint>
      <cuepoint>
      <id>c1t2</id>
      <time>5</time>
      <type>event</type>
      </cuepoint>
      <cuepoint>
      <id>c1t3</id>
      <time>9</time>
      <type>event</type>
      </cuepoint>
      <cuepoint>
      <id>c1t4</id>
      <time>13</time>
      <type>event</type>
      </cuepoint>
      </cuepoints>
      </presentation>

      The cuepoints with type values of event are the ones being created as actionscript cuepoints and the navigation type nodes are simply being created as items in a combobox.

      var cueChildren:XMLList = xmlInput.cuepoints.children();
      for each (var cuepointElem:XML in cueChildren) {
      if(cuepointElem.type == 'navigation'){
      cboChapter.addItem({id:cuepointElem.id ,label:cuepointElem.label, title:cuepointElem.title, time:cuepointElem.time});
      }else{
      var cuePt = new Object();
      cuePt.time = cuepointElem.time;
      cuePt.name = cuepointElem.id;
      viPlayback.addASCuePoint(cuePt);
      }
      }

      perhaps this is less of a cuepoint problem and more of a as3 problem - which I am just now learning for the first time. it appears the new cuePt object I am creating for each iteration of the loop is creating a new cuepoint but they are all inheriting the properties of the last one created. follow?

      what am i doing wrong?