オリンパスってトコがまた良い。
タグ:電脳コイル
<?xml version="1.0" encoding="UTF-8" ?>
<FlvVideos>
<Flv url="xxx/xxx.flv" title="dog" thumb="xxx/xxx.png">
<cuepoint time="0.5" name="cue1" type="actionscript" >
<description>What is that?</description>
</cuepoint>
<cuepoint time="3" name="cue2" type="actionscript" >
<description>I'm a dog. Who are you?</description>
</cuepoint>
</Flv>
<Flv url="xxxx/xxx.flv" title="girl" thumb="xxx/xxx.png">
<cuepoint time="1" name="cue1" type="actionscript" >
<description>run and run and..</description>
</cuepoint>
<cuepoint time="2.8" name="cue2" type="actionscript" >
<description>..dna nur dna nur</description>
</cuepoint>
</Flv>
</FlvVideos>
<?xml version="1.0" encoding="UTF-8"?>
<Flv>
<CuePoint time="1.5" name="What is that?" />
<CuePoint time="3" name="I am a dog. Who are you?" />
</Flv>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="hs.send()">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
import mx.events.CuePointEvent;
import mx.controls.videoClasses.CuePointManager;
[Bindable]
private var cueList:XMLList = new XMLList();
[Bindable]
private var myArr:Array;
private function resultHandler(e:ResultEvent):void{
cueList =e.result.CuePoint;
var myArr:Array = new Array();
for (var i:uint; i<cueList.length(); i++){
myArr.push({name:cueList.@name[i], time:cueList.@time[i]});
}
myArr.forEach(traceArr);
vd.cuePoints = myArr;
vd.source="xxx/xxx.flv";
}
private function traceArr(element:*, index:Number, arr:Array):void{
trace(element.name + element.time);
}
private function cpHandler(e:CuePointEvent):void{
txt.text = e.cuePointName ;
}
]]>
</mx:Script>
<mx:HTTPService id="hs" url="xxx/xxx.xml" result="resultHandler(event)" resultFormat="e4x"/>
<mx:VideoDisplay id="vd" cuePointManagerClass="mx.controls.videoClasses.CuePointManager"
cuePoint="cpHandler(event)"/>
<mx:Text text="" x="10" y="203" width="205" height="62" fontSize="18" color="#000000" fontWeight="bold" id="txt"/>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Style source="assets/dr.css" />
<mx:Script>
<![CDATA[
import mx.events.*;
import flash.filesystem.File;
[Bindable]
private var dir:File;
private function init():void{
dir = File.userDirectory;
}
private function selectHandler(e:File):void{
if(!e || e.isDirectory)
return;
var file:File = File.desktopDirectory.resolvePath(e.nativePath);
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ);
var txt:String = stream.readUTFBytes(stream.bytesAvailable);
var list:XML = new XML(txt);
dg.dataProvider = list.A;
}
]]>
</mx:Script>
<mx:FileSystemTree x="10" y="10" height="95%" width="185" id="lite" directory="{dir}"
showIcons="true" showHidden="false"
fileChoose="selectHandler(event.file)" />
<mx:DataGrid id="dg" y="10" height="95%" right="5" left="200"/>
</mx:WindowedApplication>
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 |