# HG changeset patch
# User veltr
# Date 1351069711 -7200
# Node ID b1c3bf6eca78ed0ee504377e428aba445fe35d3e
# Parent 353b0881a0b96c2443cec368381e97df76f6cdcc
Cleaning and refactoring
diff -r 353b0881a0b9 -r b1c3bf6eca78 assets/player_bab_ldt/bab/URLLoaderLdt.as
--- a/assets/player_bab_ldt/bab/URLLoaderLdt.as Tue Oct 02 18:08:05 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-package tools
-{
- import flash.net.URLLoader;
- import flash.net.URLRequest;
-
- public class URLLoaderLdt extends URLLoader
- {
- private var _url:String;
- private var _preVideo:String;
- private var _prePict:String;
- private var _preExtra:String;
-
- public function URLLoaderLdt(request:URLRequest=null, preVideo:String=null, prePict:String=null, preExtra:String=null)
- {
- if(request!=null){
- _url = request.url;
- _preVideo = preVideo;
- _prePict = prePict;
- _preExtra = preExtra;
- }
- super(request);
- }
- public function get url():String{ return _url; }
- public function get preVideo():String{ return _preVideo; }
- public function get prePict():String{ return _prePict; }
- public function get preExtra():String{ return _preExtra; }
-
- }
-}
\ No newline at end of file
diff -r 353b0881a0b9 -r b1c3bf6eca78 assets/player_bab_ldt/bab/XMLInOut.as
--- a/assets/player_bab_ldt/bab/XMLInOut.as Tue Oct 02 18:08:05 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-package bab
{
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.net.FileReference;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.system.Capabilities;
import player_bab_ldt;
public class XMLInOut
{
private var app:player_bab_ldt;
private var myLdtEdits:XMLList;
private var editsAr:Array = [];
private var titlesAr:Array = [];
private var nbBab:uint = 0;
private var curBab:Number = -1;
private var segAr1:Array;
private var segAr2:Array;
public function XMLInOut(o:player_bab_ldt, urlData:String)
{
app = o;
var urll:URLLoader = new URLLoader(new URLRequest(urlData));
urll.addEventListener(Event.COMPLETE, onloadData);
urll.addEventListener(IOErrorEvent.IO_ERROR, errorLoad);
}
private function errorLoad(e:IOErrorEvent):void{
trace("errorLoad");
//Alert.show("Impossible to load the file") + " " + e.text + "\n" + (e.target as URLLoaderLdt).url, "Error");
}
private function onloadData(e:Event):void{
var ldtXml:XML = new XML(e.currentTarget.data);
// We test if the project is in old iri/ldt format or cinelab format
if(ldtXml.project.length()>0){
// There is a project tag in the xml -> iri/ldt format
myLdtEdits = ldtXml.edits.editing;
loadEditsXML(myLdtEdits);
}
else{
// Else cinelab format
trace("No LDT format, No load");
//Alert.show("No LDT format","No load");
}
}
public function loadEditsXML(xl:XMLList):void{
trace("loadEditsXML l = " + xl.length() + ", nodename = " + xl[0].name().localName);
if(xl!=null && xl.length()>0){
if(xl[0].name().localName=="view"){
//loadEditsXMLCinelab(xl);
trace("No BAB LDT format, No load");
}
else{
//trace(xl.toString());
editsAr = new Array();
titlesAr = new Array();
for each(var editing:XML in xl){
nbBab++;
var inst:XML, curMedia:XMLList, a:Array, content:String;
// First edit's line
var ar1:Array = new Array();
var editList:XMLList = editing.edit.(@id=="edit1").eList.inst;
var mediaList:XMLList = editing.edit.(@id=="edit1").mList.m;
// We adapt the program to the new and old version of content/media place
// new url or text content
// old
for each(inst in editList){
a = inst.@ref.split("|;|");
curMedia = mediaList.(@id==inst.@m);
content = (curMedia.@src.toString()=="" || curMedia.@src==undefined) ? curMedia.content.toString() : curMedia.@src.toString();
//trace("m = " + inst.@m.toString() + ", " + curMedia.@t.toString() + ", " + uint(curMedia.@c) + ", " + curMedia.@src.toString() + ", " + curMedia.content.toString() + ", content=" + content);
if(a[0]=="title"){ a[0]="text"; } // To allow old version
// A video path can be dependant on the user's folder organisation.
// If a user B receives a project from a user A, the video paths will be like
// /users/userA/docs/video/id/id.flv and /users/userB/ldt/id/i d.flv
// So in order ta read the BàB without problems, we match the bàb paths
// with the video paths actually recorded.
// if(curMedia.@t.toString()=="v"){
// content = content.replace(/\\/g,"/");
// var videoName:String = content.substr(content.lastIndexOf("/")+1);
// for(var idCtt:String in Global.arContents){
// if(Global.arContents[idCtt]["path"].substr(Global.arContents[idCtt]["path"].replace(/\\/g,"/").lastIndexOf("/")+1)==videoName){
// content = Global.arContents[idCtt]["path"];
// }
// }
// }
// Now that we got the good video path, we push in the array
ar1.push({idCtt:a[0], idGrp:a[1], idCut:a[2], idView:a[3], crit:a[3], idSeg:a[5], tIn:Number(inst.@begin), tOut:Number(inst.@end), type:curMedia.@t.toString(), v:uint(inst.@v), color:uint(curMedia.@c), content:content, idAuthor:"", author:"", idTitle:"", title:"", date:"", trId:Number(inst.@trId), trIc:Number(inst.@trIc), trOd:Number(inst.@trOd), trOc:Number(inst.@trOc)});
}
// Second edit's line
var ar2:Array = new Array();
editList = editing.edit.(@id=="edit2").eList.inst;
mediaList = editing.edit.(@id=="edit2").mList.m;
for each(inst in editList){
a = inst.@ref.split("|;|");
//trace("m = " + inst.@m.toString() + ", " + edit1Media.(@id==inst.@m.toString()).@t.toString() + ", " + uint(edit1Media.(@id==inst.@m).@c) + ", " + edit1Media.(@id==inst.@m).@src.toString() + ", " + edit1Media.(@id==inst.@m).content.toString());
curMedia = mediaList.(@id==inst.@m);
content = (curMedia.@src.toString()=="" || curMedia.@src==undefined) ? curMedia.content.toString() : curMedia.@src.toString();
if(a[0]=="title"){ a[0]="text"; } // To allow old version
// A video path can be dependant on the user's folder organisation.
// If a user B receives a project from a user A, the video paths will be like
// /users/userA/docs/video/id/id.flv and /users/userB/ldt/id/id.flv
// So in order ta read the BàB without problems, we match the bàb paths
// with the video paths actually recorded.
// if(curMedia.@t.toString()=="v"){
// content = content.replace(/\\/g,"/");
// videoName = content.substr(content.lastIndexOf("/")+1);
// for(idCtt in Global.arContents){
// if(Global.arContents[idCtt]["path"].substr(Global.arContents[idCtt]["path"].replace(/\\/g,"/").lastIndexOf("/")+1)==videoName){
// content = Global.arContents[idCtt]["path"];
// }
// }
// }
// Now that we got the good video path, we push in the array
ar2.push({idCtt:a[0], idGrp:a[1], idCut:a[2], idView:a[3], crit:a[3], idSeg:a[5], tIn:Number(inst.@begin), tOut:Number(inst.@end), type:curMedia.@t.toString(), v:uint(inst.@v), color:uint(curMedia.@c), content:content, idAuthor:"", author:"", idTitle:"", title:"", date:"", trId:Number(inst.@trId), trIc:Number(inst.@trIc), trOd:Number(inst.@trOd), trOc:Number(inst.@trOc)});
}
// And we push a new edit entry with the edit's title and abstract
editsAr.push({id:"bab_1", title:editing.title.toString(), abstract:editing.abstract.toString(), segAr1:ar1, segAr2:ar2, creator:"projectCreator", created:now, contributor:"projectCreator", modified:now});
titlesAr.push(editing.title.toString());
}
if(editsAr.length==0){
editsAr.push({id:"bab_1", title:"Bout à bout 1", abstract:"", segAr1:new Array(), segAr2:new Array(), creator:"projectCreator", created:now, contributor:"projectCreator", modified:now});
titlesAr.push("Bout à bout 1");
}
//setBab(0, true);
}
}
else{
editsAr = [{id:"bab_1", title:"Bout à bout 1", abstract:"", segAr1:new Array(), segAr2:new Array(), creator:"projectCreator", created:now, contributor:"projectCreator", modified:now}];
titlesAr = ["Bout à bout 1"];
//setBab(0, true);
}
app.youCanStart();
}
public function getEditList1():Array{
trace("bab getEditList1");
// For each line, 2 arrays have to be prepared. The first is the edit instructions.
// The second is the media array (type, content -path or text-, background color)
return getEditMediaList(0, 1);
}
private function getEditMediaList(numBab:Number, line:uint):Array{
var a:Array = [];
if(0<=numBab && numBab while the volume management has not been coded
volBtn.visible = skinMc.volumeBar_mc.visible = true;
//
playBtn.addEventListener(MouseEvent.CLICK, playPauseHandler);
pauseBtn.addEventListener(MouseEvent.CLICK, playPauseHandler);
backBtn.addEventListener(MouseEvent.CLICK, backHandler);
forwardBtn.addEventListener(MouseEvent.CLICK, forwardHandler);
volBtn.addEventListener(MouseEvent.MOUSE_DOWN, startVolHandler);
volBar.addEventListener(MouseEvent.MOUSE_DOWN, startVolHandler);
}
//
// Mouse Event handlers
//
private function playPauseHandler(e:MouseEvent=null):void{
dispatchEvent(new EditEvent(EditEvent.EDIT_PLAYPAUSE, curVol));
}
private function backHandler(e:MouseEvent=null):void{
dispatchEvent(new EditEvent(EditEvent.EDIT_BACK, curVol));
}
private function forwardHandler(e:MouseEvent=null):void{
dispatchEvent(new EditEvent(EditEvent.EDIT_FORWARD, curVol));
}
private function startVolHandler(e:MouseEvent=null):void{
//trace("startVolHandler");
volBtn.startDrag(false,new Rectangle(xVol,yVol,50,0));
volBtn.stage.addEventListener(MouseEvent.MOUSE_MOVE,updateSound);
volBtn.stage.addEventListener(MouseEvent.MOUSE_UP, stopVolHandler);
}
private function stopVolHandler(e:MouseEvent=null):void{
volBtn.stopDrag();
volBtn.stage.removeEventListener(MouseEvent.MOUSE_MOVE,updateSound);
volBtn.stage.removeEventListener(MouseEvent.MOUSE_UP, stopVolHandler);
volBtn.buttonMode = true;
// We dispatch the event only at the end
}
private function updateSound(e:MouseEvent=null):void{
//trace("xVol : " + xVol);
//trace("volBtn.x : "+ volBtn.x);
volBar.width = volBtn.x - xVol;
//trace("volBar.width : " + volBar.width);
curVol = (100 / 50) * (volBtn.x - xVol);
dispatchEvent(new EditEvent(EditEvent.EDIT_SOUNDUPDATE, curVol/100));
}
//
// Enable to switch display between play and pause buttons
//
public function set isPlaying(b:Boolean):void{
if(b==true){
playBtn.visible = false;
pauseBtn.visible = true;
}
else if(b==false){
playBtn.visible = true;
pauseBtn.visible = false;
}
}
public function setVolume(vol:Number):void{
volBtn.x = xVol + 50*vol;
volBar.width = volBtn.x - xVol;
//trace("setVolume, vol : " + vol);
dispatchEvent(new EditEvent(EditEvent.EDIT_SOUNDUPDATE, vol));
}
}
}
\ No newline at end of file
diff -r 353b0881a0b9 -r b1c3bf6eca78 assets/player_bab_ldt/bab/player/ExternalPlayer.as
--- a/assets/player_bab_ldt/bab/player/ExternalPlayer.as Tue Oct 02 18:08:05 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-package bab.player
{
import fl.video.VideoEvent;
import flash.display.DisplayObjectContainer;
import flash.display.Loader;
import flash.display.SimpleButton;
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import flash.events.SecurityErrorEvent;
import flash.events.TimerEvent;
import flash.net.URLRequest;
import flash.system.Security;
import flash.text.TextField;
import flash.utils.Timer;
//import mx.controls.Alert;
public class ExternalPlayer extends EventDispatcher
{
private var curParent:DisplayObjectContainer;
private var player:Object;
private var playerYT:Object;
private var playerDM:Object;
private var playBtn:SimpleButton;
private var pauseBtn:SimpleButton;
private var volPlus:SimpleButton;
private var volMinus:SimpleButton;
private var playheadTimer:Timer;
private var urlToLoad:String;
private var sizeUpdated:Boolean = false;
public static function get EXTERNALPLAYER_RATIO():Number{
return 1.6;
}
public function ExternalPlayer(prnt:DisplayObjectContainer, url:String="")
{
Security.allowDomain("*");
Security.allowInsecureDomain("*");
curParent = prnt;
// Simple button Play
var t:TextField = new TextField();
t.text = "PLAY";
t.autoSize = "left";
playBtn = new SimpleButton(t,t,t,t);
playBtn.useHandCursor = playBtn.mouseEnabled = true;
prnt.addChild(playBtn);
// Simple button Pause
var t2:TextField = new TextField();
t2.text = "PAUSE";
t2.autoSize = "left";
pauseBtn = new SimpleButton(t2,t2,t2,t2);
pauseBtn.useHandCursor = pauseBtn.mouseEnabled = true;
prnt.addChild(pauseBtn);
// Simple button Volume +
var t3:TextField = new TextField();
t3.text = "Vol + /";
t3.autoSize = "left";
volPlus = new SimpleButton(t3,t3,t3,t3);
volPlus.useHandCursor = volPlus.mouseEnabled = true;
prnt.addChild(volPlus);
// Simple button Pause
var t4:TextField = new TextField();
t4.text = "Vol -";
t4.autoSize = "left";
volMinus = new SimpleButton(t4,t4,t4,t4);
volMinus.useHandCursor = volMinus.mouseEnabled = true;
prnt.addChild(volMinus);
pauseBtn.x = 50;
volPlus.x = 200;
volMinus.x = 235;
// Play pause listeners
playBtn.addEventListener(MouseEvent.CLICK, onBtnClick);
pauseBtn.addEventListener(MouseEvent.CLICK, onBtnClick);
// Volume listeners
volPlus.addEventListener(MouseEvent.CLICK, onVolClick);
volMinus.addEventListener(MouseEvent.CLICK, onVolClick);
loadVideo(url);
}
//
// Load Players
//
private function loadYTPlayer():void{
// Youtube loader
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadYTCLP);
l.addEventListener(ErrorEvent.ERROR, onError, true);
l.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, true);
l.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, onError, true);
l.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, true);
l.load(new URLRequest("http://www.youtube.com/apiplayer?version=3"));
// The parent will load;
curParent.addChild(l);
}
private function loadDMPlayer():void{
// Dailymotion loader
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadDMCLP);
l.addEventListener(ErrorEvent.ERROR, onError, true);
l.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, true);
l.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, onError, true);
l.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError, true);
l.load(new URLRequest("http://www.dailymotion.com/swf?enableApi=1&chromeless=1"));
// The parent will load;
curParent.addChild(l);
}
//
// OnLoad Players management
//
private function onLoadYTCLP(e:Event):void {
//addChild(loader);
playerYT = e.target.content;
playerYT.addEventListener(ErrorEvent.ERROR, onError);
playerYT.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
playerYT.addEventListener("onReady", onYTPlayerReady);
playerYT.addEventListener("onError", onYTPlayerError);
playerYT.addEventListener("onStateChange", onYTStateChange);
//YTPlayer.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange);
}
private function onLoadDMCLP(e:Event):void {
//addChild(loader);
playerDM = e.target.content;
playerDM.addEventListener(ErrorEvent.ERROR, onError);
playerDM.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
playerDM.addEventListener("onReady", onYTPlayerReady);
playerDM.addEventListener("onError", onYTPlayerError);
playerDM.addEventListener("onStateChange", onYTStateChange);
//YTPlayer.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange);
}
//
// Player event management
//
private function onYTPlayerReady(o:Object):void {
// Event.data contains the event parameter, which is the Player API ID
trace("player ready:" + o.data);
// Once this event has been dispatched by the player, we can use
// cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl
// to load a particular YouTube video.
loadVideo(urlToLoad);
}
private function onYTPlayerError(o:Object):void {
// Event.data contains the event parameter, which is the error code
trace("player error:", o.data);
}
private function onYTStateChange(o:Object):void {
// Event.data contains the event parameter, which is the new player state
trace("player state:" + o.data + (o.data==1) + (o.data=="1"));
// o.data : unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5)
if(o.data==1 || o.data=="1" || o.data==3 || o.data=="3"){
// When the YTplayer enters in play state, it sends 1 or 3.
if(playheadTimer!=null){
playheadTimer.stop();
playheadTimer = null;
}
playheadTimer = new Timer(500, 3600*2);
playheadTimer.addEventListener(TimerEvent.TIMER, onTimer);
playheadTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
playheadTimer.start();
}
else{
// When the YTplayer enters in play state, it sends 1 or 3.
if(playheadTimer!=null){
playheadTimer.stop();
playheadTimer = null;
}
}
// When the video has been loaded, we ask a resize to the manager
if(!sizeUpdated && o.data!=-1 && o.data!="-1"){
dispatchEvent(new VideoEvent(VideoEvent.READY));
}
}
//
// Size matters
//
public function setSize(w:Number, h:Number):void{
if(player!=null){
//trace("setSize " + w + ", " + h);
if(player.setSize) player.setSize(EXTERNALPLAYER_RATIO*Math.max(h,242),Math.max(h,242));
playBtn.y = pauseBtn.y = volPlus.y = volMinus.y = Math.max(h,240) + 10;
}
}
//
// Play/pause mangement
//
private function onBtnClick(e:MouseEvent):void{
if(e.target==playBtn) play();
else if(e.target==pauseBtn) pause();
}
//
// Play/pause mangement
//
public function play():void{
if(player!=null){
player.playVideo();
}
}
public function pause():void{
if(player!=null){
player.pauseVideo();
}
}
//
// Timer management
//
private function onTimer(e:TimerEvent):void{
//trace("onTimer");
if(player!=null){
//trace("onTimer 2 " + player.getCurrentTime());
dispatchEvent(new VideoEvent(VideoEvent.PLAYHEAD_UPDATE, false, false, "playing", player.getCurrentTime()));
}
}
private function onTimerComplete(e:TimerEvent):void{
// nothing to do
}
//
// Visible management
//
public function set visible(b:Boolean):void{
if(player!=null){
player.visible = playBtn.visible = pauseBtn.visible = volMinus.visible = volPlus.visible = b;
if(!b) pause();
}
}
public function get visible():Boolean{
if(player!=null){
return player.visible;
}
return false;
}
//
// Volume management
//
private function onVolClick(e:MouseEvent):void{
if(player!=null){
if(e.target==volPlus) player.setVolume(Math.min(100, player.getVolume()+10));
else if(e.target==volMinus) player.setVolume(Math.max(0, player.getVolume()-10));
}
}
//
// Url management
//
public function loadVideo(url:String):void{
var id:String = "";
if(url!=""&& url.search("youtube")>-1){
if(playerYT!=null){
// A valid youtube url is like : http://www.youtube.com/watch?v=PgEu923nxSE or http://www.youtube.com/v/PgEu923nxSE
// The idea is to get the id from the url. The id is ALWAYS 11 characters.
if(url.search("v=")>-1) id = url.substr(url.search("v=")+2, 11);
else if(url.search("v/")>-1) id = url.substr(url.search("v/")+2, 11);
sizeUpdated = false;
player = playerYT;
if(id!="" && id.length==11) player.loadVideoById(id);
//else Alert.show("Youtube URL must be like\nhttp://www.youtube.com/watch?v=VIDEO_ID", "Attention");
//player.loadVideoById("PgEu923nxSE"); // Stiegler
//player.loadVideoById("7xzU9Qqdqww"); // Kid Cudi - Pursuit Of Happiness ft. Ratatat
}
else{
urlToLoad = url;
loadYTPlayer();
}
}
else if(url!=""&& url.search("dailymotion")>-1){
if(playerDM!=null){
// A valid DM url is like : http://www.dailymotion.com/video/VIDEO_ID
// The idea is to get the id from the url.
if(url.search("video/")>-1) id = url.substr(url.search("video/")+6);
sizeUpdated = false;
player = playerDM;
if(id!="") player.loadVideoById(id);
//else Alert.show("Dailymotion URL must be like\nhttp://www.dailymotion.com/video/VIDEO_ID", "Attention");
//player.loadVideoById("PgEu923nxSE"); // Stiegler
//player.loadVideoById("7xzU9Qqdqww"); // Kid Cudi - Pursuit Of Happiness ft. Ratatat
}
else{
urlToLoad = url;
loadDMPlayer();
}
}
}
//
// Seek management
//
public function goTo(tc:Number, paramPlay:Boolean):void{
if(player!=null){
//player.seekTo(tc, paramPlay);
if(player==playerYT) player.seekTo(tc, true);
else if(player==playerDM) player.seekTo(tc);
}
}
//
// Trying to catch the sandbox errors but does not work...
//
public function onError(er:*):void{
// do nothing
trace("onError " + er);
}
}
}
\ No newline at end of file
diff -r 353b0881a0b9 -r b1c3bf6eca78 assets/player_bab_ldt/bab/player/FLVPlaybackCaptioningLDT.as
--- a/assets/player_bab_ldt/bab/player/FLVPlaybackCaptioningLDT.as Tue Oct 02 18:08:05 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-package bab.player
{
import fl.video.*;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
//import mx.controls.Alert;
import nl.inlet42.data.subtitles.SubTitleData;
import nl.inlet42.data.subtitles.SubtitleParser;
use namespace flvplayback_internal;
public class FLVPlaybackCaptioningLDT extends FLVPlaybackCaptioning
{
public function FLVPlaybackCaptioningLDT()
{
super();
}
public function loadCapXml(capXml:XML):void{
ttm = new TimedTextManager(this);
//trace("ttm 2 = " + ttm);
ttm.xmlLoader = new URLLoader();
ttm.xmlLoader.data = capXml;
//trace("ttm.xmlLoader.data = " + ttm.xmlLoader.data.toString());
ttm.xmlLoadEventHandler(new Event(Event.COMPLETE));
}
//
// Generates a time text xml from a srt file
//
public function loadSrt(urlSrt:String):void{
var urll:URLLoader = new URLLoader(new URLRequest(urlSrt));
urll.addEventListener(Event.COMPLETE, onloadSrt);
urll.addEventListener(IOErrorEvent.IO_ERROR, errorLoadSrt);
}
private function errorLoadSrt(e:IOErrorEvent):void{
//Alert.show("Impossible to load the file " + e.text, "Error");
}
private function onloadSrt(e:Event):void{
var a:Array = SubtitleParser.parseSRT(e.currentTarget.data);
//trace("a = " + a);
var nbSub:uint = a.length;
default xml namespace = new Namespace("http://www.w3.org/2006/10/ttaf1");
var subTtmXml:XML =
;
var divNode:XML = subTtmXml.body.div[0];
for(var i:uint=0;i" + sub.text + "]]>