NetScamp
03-10-2004, 01:01 PM
I used some code from the Flash MX 2004 Pro help.
I linked an external flv to a video object.
here's the code copied from help
// Create a NetConnection object:
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection:
netConn.connect(null);
// Create a NetStream object and define an onStatus() function:
13. var netStream:NetStream = new NetStream(netConn);
14. netStream.onStatus = function(infoObject) {
15. status.text += "Status (NetStream)" + newline;
16. status.text += "Level: "+infoObject.level + newline;
17. status.text += "Code: "+infoObject.code + newline;
18. };
19. // Attach the NetStream video feed to the Video object:
20. my_video.attachVideo(netStream);
21. // Set the buffer time:
22. netStream.setBufferTime(5);
23. // Being playing the FLV file:
24. netStream.play("videoFile.flv");
it works, but the FLV is 9.3M in size. The FLA is 11.5 M in size.
I generated a size report from the publish settings panel, but it made no sense to me.
Won't this be too huge for anyone without high bandwidth?
It is still downloading 11 meg prior to displaying the vid?
what's better about this than just stuffing the vid into the library?
Thanks,
RjW
I linked an external flv to a video object.
here's the code copied from help
// Create a NetConnection object:
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection:
netConn.connect(null);
// Create a NetStream object and define an onStatus() function:
13. var netStream:NetStream = new NetStream(netConn);
14. netStream.onStatus = function(infoObject) {
15. status.text += "Status (NetStream)" + newline;
16. status.text += "Level: "+infoObject.level + newline;
17. status.text += "Code: "+infoObject.code + newline;
18. };
19. // Attach the NetStream video feed to the Video object:
20. my_video.attachVideo(netStream);
21. // Set the buffer time:
22. netStream.setBufferTime(5);
23. // Being playing the FLV file:
24. netStream.play("videoFile.flv");
it works, but the FLV is 9.3M in size. The FLA is 11.5 M in size.
I generated a size report from the publish settings panel, but it made no sense to me.
Won't this be too huge for anyone without high bandwidth?
It is still downloading 11 meg prior to displaying the vid?
what's better about this than just stuffing the vid into the library?
Thanks,
RjW