|
-
FLV to Web using Flash Max2004
I have Flash Max2004 and I want to upload a FLV file to web. The FLV file is a huge one(104MB). How Do I proceed? Please help me figure out a solution. Thanks in advance
-
 Originally Posted by Arup
I have Flash Max2004 and I want to upload a FLV file to web. The FLV file is a huge one(104MB). How Do I proceed? Please help me figure out a solution. Thanks in advance
You have to have a hosted site somewhere where you can ftp your file onto the server. If the server is a Microsoft based server running IIS, you will also need to ensure that the server has the correct mime type added to its list of file types to serve (it's relatively painless to do but if it's not your server, the server admin will have to do it for you). If your hosted off of a LAMP system, then you just need to upload the file. Some hosts have anonymous ftp that can be accessed through your browser (by using ftp://ftp.whateverhost.com) rather than using an ftp client application to transfer. If you don't have an ftp client, go here to find one.
104Mb is a large file so you will want to set the playback up as a progressive download rather than an embedded clip (otherwise your swf file would also be huge). The easiest way to do this is to use the Media Components in Flash MX 2004 Professional. You'll need the Media Display component and the Media Controller component.
In the first frame of your movie, you will need to create a net connection object to establish a continuous connection to the server and then a net stream object to flow the FLV's data stream through the connection object.
A good introduction to get started can be found at:
http://www.actionscript4designers.co...mponents2.html
(scroll down to the dynamic FLV section of that page because the first part talks about embedded FLV files - you don't want to do that).
Here's a bit from that site to get you started:
Code:
// streaming an FLV through a local video object
// provides mechanism for playing external FLVs
var my_nc = new NetConnection();
// open local connection
my_nc.connect(null);
// we've established a connection; this controls the stream
var step2_ns = new NetStream(my_nc);
// can perform error checking
step2_ns.onStatus = function (infoObject) {
if(infoObject.level.toLowerCase() == "error") {
// your own error handling code here
trace(infoObject.code);
}
}
// attach the NetStream instance with the video object
step2_video.attachVideo(step2_ns);
// start the stream
step2_ns.play("step2.flv");
Note that the URL above is a tutorial and continues on a subsequent page with more information that will help you. Playing FLVs from a server and being able to controll them isn't as straight forward as one might think. Take some time to get acquainted with the process involved so that it doesn't seem daunting. If you are new to ActionScript (or scripting in general), then you might want to print out that tutorial and review it along with other resources to "get the hang of it".
Good luck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|