Question
Newb: Does this seem correct?
Hi. I'm relatively new to FLV and streaming but I'm coming up
to speed quickly (I think). I have a Flash app with two buttons.
When the user clicks a button, an FLV movie plays inside an
FLVPlayback component. It currently works and I'm using Flash Pro 8
to do this. Anyway, the code that I use to do all this is below. My
first question is: are the first two lines establishing a net
connection even necessary? When I eliminate them it still appears
to play. If it is not correct - is there better code that I should
be using? I'm using Influxis as my Flash Media host and the package
provided me calls for 384 kbps bandwidth. Also, the FLV files are
16 and 12 mb each. When the user clicks a button, it takes about 2
seconds for the video to begin playing. Does that seem about right?
Thanks very much for the advise.
var nc:NetConnection = new NetConnection(); var ns:NetStream;
nc.connect("rtmp://xxxxxxxx.rtmphost.com/VideoPlayer");
my1_btn.onRelease = function (){
myPlayer.contentPath = "rtmp://xxxxxxxx.rtmphost.com/VideoPlayer/_definst_/JSDemo142";
}
my2_btn.onRelease = function (){
myPlayer.contentPath = "rtmp://xxxxxxxx.rtmphost.com/VideoPlayer/_definst_/s42";
}
var nc:NetConnection = new NetConnection(); var ns:NetStream;
nc.connect("rtmp://xxxxxxxx.rtmphost.com/VideoPlayer");
my1_btn.onRelease = function (){
myPlayer.contentPath = "rtmp://xxxxxxxx.rtmphost.com/VideoPlayer/_definst_/JSDemo142";
}
my2_btn.onRelease = function (){
myPlayer.contentPath = "rtmp://xxxxxxxx.rtmphost.com/VideoPlayer/_definst_/s42";
}
