Welcome to WebmasterWorld Guest from 54.167.116.62

Forum Moderators: open

Message Too Old, No Replies

Flash Video File and Flash SWF Linked To Work

Why won't swf work without other file

     

Fortune Hunter

12:51 am on Jun 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had a Windows movie file from my videographer. I converted it into Flash (.flv format) using the Flash Video Encoder for CS3. However it was too big and I wanted it in an SWF file anyway. As you know you can't use the video encoder for CS3 to convert from .wmv format into .swf. Rather according to what I got from Adobe's web site you must first use the video encoder to put it in .flv format and then use Flash to import it and re-export it as a .swf format. I re-encoded it, but this time I used the cropping feature and cropped it down to the size I needed. The second file worked fine as well. So far so good.

According to Adobe I should be able to use Flash to import the flv file and re-export it as a .swf format, which I was able to do with a little work. Now here is where it gets weird. The .swf file will only play and work in a page or in a folder as long as the .flv version it was created from is also present. It doesn't have to be installed in the page, it just has to be present in the same directory as the .swf file.

If I delete the .flv file out of the directory the .swf version of the file will no longer work. It won't work when it is inserted into the site or even if you just double click it and try and look at with Flash Player on the desktop. If I put the .flv file back .swf will work again. My question is that these are totally different formats, why does the .flv version of the file need to be in the same directory for the .swf version to work? This is driving me crazy, if anyone has any ideas why these two files are linked I would appreciate it.

rocknbil

6:55 pm on Jun 13, 2008 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I've never tried this approach, but I would venture to guess that it's because a .swf is not a video player in itself, and when you do a "convert" it's just creating a basic video player on-the-fly. Most flash video players require an embedded .flv or and external .flv to import into the .swf to play it.

That is, for whatever reason, it's still a "linked" .flv and not actually embedded in the .swf. If you want to do it this way, you can just open a new .fla, import the video, drop it in the timeline, and set controls to play. This is not the greatest approach because it needs to load the whole thing (including the entire video.) It's the external linking that allows it to stream.

Fortune Hunter

10:07 pm on Jun 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That is, for whatever reason, it's still a "linked" .flv and not actually embedded in the .swf.

You are dead on, that is exactly what happened. After I made the initial post I kept screwing around with the file and discovered that what you said is totally correct. When I imported it and then re-exported it the .swf file was created, but the .swf didn't actually have any content so to speak in it. It somehow still needed the .flv file to read from.

I am not a Flash developer so I don't really understand all of this, but once I used another third party application that said it would convert .flv into .swf files to actually convert the file it worked. The third party tool somehow pulled the content out of the .flv file and/or converted it into the .swf file, it also made it about half the size of the .flv file without any quality loss on the video, which was a bonus I wasn't expecting. In case anyone is having the same problem the software I found is called SWF & FLV Toolbox 3.5 by Eltima Software Company. It cost about 39 bucks or so.

I guess I can chalk this up to another hard won lesson in doing video for the web.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month