.tmp_3BDB3FA335DF0242D9C06B29864DDEB3_LFC-$13.lzx
<canvas height="500" layout="axis: y; spacing: 2" debug="true">
<debug y="70" height="${this.parent.height - 55}"/>
<dataset name="input">
<article><actor>Leonardo DiCaprio</actor> and <writer>Christopher Nolan</writer>'s "Inception" is anything but a sleeper…</article>
</dataset>
<text name="ascdata" datapath="input:/article/" cdata="$path{'text()'}" multiline="true" width="400" height="30" fgcolor="0x00cc00"/>
<text name="astext" datapath="input:/article/" text="$path{'text()'}" multiline="true" width="400" height="30" fgcolor="0x0066cc"/>
<switch>
<when property="$as3">
<passthrough>
import flash.events.*;
import flash.net.*;
import flash.utils.*;
</passthrough>
</when>
</switch>
<attribute name="_nc" value="null
"/>
<attribute name="_nsPlay" value="null
"/>
<view id="playVideo" bgcolor="black" width="320" height="240">
<attribute name="__LZvideo" value="null
"/>
<passthrough when="$as3">
import flash.media.*;
import flash.net.NetConnection;
import flash.net.NetStream;
</passthrough>
<handler name="oninit">
var mc = new Video(this.width, this.height);
this.sprite.addChild(mc);
this.__LZvideo = mc;
this.applySizeToVid();
this.parent.connect();
</handler>
<method name="applySizeToVid">
if (this.__LZvideo == null) {
return;
}
var vid = this._getflashvideo();
vid.width = this.width;
vid.height = this.height;
</method>
<method name="_getflashvideo">
//Debug.write("_getflashvideo()");
return this.__LZvideo;
</method>
<method name="attachVideo" args="video">
Debug.write("attachVideo __LZvideo :: ", __LZvideo);
if (this.__LZvideo == null) {
return;
}
var vid = this._getflashvideo();
vid.attachNetStream(video);
</method>
</view>
<method name="connect">
var defaultURL = "rtmp://54.249.226.151:1935/closermeetings/air";
var userID = "dooseok.yoo@access-company.com";
var tokenID = "55b8bd3b8d77e427e94e53fde7a3a67c114ef1";
this._nc = new NetConnection();
this._nc.connect(defaultURL, userID, tokenID, "live");
Debug.info("Connect !!!!!!! :::", this._nc);
this._nc.addEventListener(NetStatusEvent.NET_STATUS, _onStatus);
</method>
<method name="_onStatus" args="stats">
if ($debug) {
Debug.write("_onStatus", this, "_onStatus", stats.info.code);
}
switch (stats.info.code) {
case "NetConnection.Connect.Success":
this.playBroadCast();
break;
case "NetConnection.Connect.Closed":
break;
default:
break;
}
</method>
<method name="playBroadCast">
this._nsPlay = new NetStream(this._nc);
Debug.write("playBroadCast :::: ", this._nsPlay);
//this._nsPlay.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus2);
Debug.write("playBroadCast :::: ", playVideo);
playVideo.attachVideo(this._nsPlay);
this._nsPlay.play("98341b49c12d471d912f065b6aec6ed1", -1);
</method>
<method name="onNetStatus2" args="evt">
if ($debug) {
Debug.write("onNetStatus2", this, "_onStatus", evt.info.code);
}
</method>
</canvas>
Cross References
Named Instances