I am trying to figure out how to remove a dynamic text field from the stage that plays captions over an .flv from an XML file. I would like to find out how to remove the field before a second .flv video, containing embedded cuepoints streams through same component. The text field is also displaying the embedded cuepoints in the second .flv vids. Is it possible to remove a text field, either using removeListener or removeASCuePoint?
I'd really appreciate some feedback, as this has been boggling my mind for some time. Thank you.
Here is the code I am using before invoking second .flv:
captionsXML.load("captions.xml");
Vid.addEventListener("cuePoint", onCuePoint);
var cuePt:Object = new Object();
cuePt.time = 8.41;
cuePt.name = "";
cuePt.type = "actionscript";
Vid.addASCuePoint(cuePt);
function onCuePoint(evntObj:Object):Void {
txtCaption.text = evntObj.info.name;
if(evntObj.info.time == "8.41"){
txtCaption.close();
}
}
Vid.addEventListener("cuePoint", onCuePoint);