Flex VideoDisplay tag
hi all,
is there anyway using videodisplay tag play mulit flv files?
i have to using netstream here code show below:
<?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
<mx:panel x="10" y="10" width="640" height="540" layout="absolute" title="try">
<mx:canvas id="videobox1" x="10" y="29" width="160" height="120"/>
</mx:panel>
<mx:script>
<![cdata[
import flash.media.video;
import flash.net.*;
private var videourl:string = "upload/12sec.flv";
private var nc:netconnection = new netconnection();
nc.connect(null);
var stream:netstream = new netstream(connection);
//stream.publish(false);
var myvideo:video = new video(360, 240);
myvideo.attachnetstream(stream);
stream.play(videourl);
videobox1.addchild(myvideo);
]]>
</mx:script>
</mx:application>
i try sample code in document of flex2 search keyword of "working video", looks no working in flex builer2 alwasy showing error message while using connect(null) message "1120: access of undefined property nc".
anyway there way play multi flv file or flv file + image play them 1 1 in teh video object?
is there anyway using videodisplay tag play mulit flv files?
i have to using netstream here code show below:
<?xml version="1.0" encoding="utf-8"?>
<mx:application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
<mx:panel x="10" y="10" width="640" height="540" layout="absolute" title="try">
<mx:canvas id="videobox1" x="10" y="29" width="160" height="120"/>
</mx:panel>
<mx:script>
<![cdata[
import flash.media.video;
import flash.net.*;
private var videourl:string = "upload/12sec.flv";
private var nc:netconnection = new netconnection();
nc.connect(null);
var stream:netstream = new netstream(connection);
//stream.publish(false);
var myvideo:video = new video(360, 240);
myvideo.attachnetstream(stream);
stream.play(videourl);
videobox1.addchild(myvideo);
]]>
</mx:script>
</mx:application>
i try sample code in document of flex2 search keyword of "working video", looks no working in flex builer2 alwasy showing error message while using connect(null) message "1120: access of undefined property nc".
anyway there way play multi flv file or flv file + image play them 1 1 in teh video object?
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment