Given the potential utility of cupoints in general the supplied
documentation seems umm....lite.
To import cuepoint information from an XML file structured as:
<listitem title="Introduction" name="unit1_320_20.flv" start="0" len="-1"
thumb="chap1.jpg">
<qPoint qName="q1_1" qTime=":44" qText="Caption to show first."/>
<qPoint qName="q1_2" qTime="1:15" qText="This text shows up at 1:15 et."/>
<qPoint qName="q1_3" qTime="1:45" qText="This played last"/>
</listtime>
Cuepoints can be created by:
var xmlPlaylist = new XML(); //setup a variable to hold the XML
xmlPlaylist.ignoreWhite = true;
xmlPlaylist.load( "playlist.xml" ); //load the XML file
xmlPlaylist.onLoad = function( status ) {
//trace("loading xml");
if ( !status )
trace( status );
var entries = this.childNodes[0];
for ( var i = 0; i < entries.childNodes.length; i++ ) {
var entry = entries.childNodes[i];
for ( var q = 0; q < entry.childNodes.length; q++ ) {
//trace ("entry.childNodes[q] = " +
entry.childNodes[q].attributes.qName);
MakeCue( entry.childNodes[q].attributes.qTime,
entry.childNodes[q].attributes.qName,
entry.childNodes[q].attributes.qText);
}
var entry = entries.childNodes[i];
} //end xmlPlaylist.onload
function MakeCue(myTime:Number, myName:String, myParam:Object){
if (myTime <> undefined) {
//trace("myTime = " + myTime + "myName" + myName + "myParam = " +
myParam);
my_FLVPlybk.addASCuePoint(1, myName, myParam);
}
}
Except that documentation does not provide an example usage of the parameter
nor an example of converting conventional time notation (hh:mm:ss:ms) into
Number. Imagine the ass we could kick if it did!
I'd very much appreciate any direction in these documentary holes by anyone
able to address.
thx,
--steve...
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders