PDA

View Full Version : XML cue points not working past 100 seconds


ladyb314
11-16-2006, 02:57 PM
I have a flash video that I am adding captions to by way of an external xml file with start times for the cuepoints.

Example of my XML file:
<?xml version="1.0" encoding="UTF-8"?>
<captions>
<caption start="13.32">text here</caption>
<caption start="23.29">text here</caption>
<caption start="28.15">text here</caption>
<caption start="33.26">text here</caption>
<caption start="36.08">text here</caption>
<caption start="41.06">text here</caption>
<caption start="45.29">text here</caption>
<caption start="51.06">text here</caption>
<caption start="86.14">text here</caption>
<caption start="93.06">text here</caption>
<caption start="109.03">text here</caption>
</captions>

My code that brings in the captions into an array:
// --------------XML Array for Captions ----------
var captions:Array;
var captionsXML:XML = new XML();
captionsXML.ignoreWhite = true;
captionsXML.onLoad = function():Void {
captions = this.firstChild.childNodes;
for (var i:Number = 0; i<captions.length; i++) {
myVid.addASCuePoint(captions[i].attributes.start, captions[i].firstChild.nodeValue);
}
};

myVid.addEventListener("cuePoint", onCuePoint);

// --------------Display Captions ----------
function onCuePoint(evntObj:Object):Void {
txtCaption.text = evntObj.info.name;
}

And when the viewer clicks the video they want to view I load the appropriate caption file like this xmlCaptions.load("assets/captions.xml");

If I stop my xml at this line <caption start="93.06">text here</caption> the captions show up beautifully.

If I continue and add the next line <caption start="109.03">text here</caption> or any line that has a caption starting past 99 seconds, nothing shows up in my captions of my movie.

Is there something that I have to do differently once I get past 99 seconds of time? If someone could help it would be greatly appreciated. I needed this job done YESTERDAY!!! AAAAAAAHHHHH!! :eek: