I need to put a Flash Video on my website, embedded in one of the existing html pages.
When my developer puts together a Flash Video in Flash CS4 or CS5 using ActionScript 3, the video does not play - t just keeps buffering (showing a striped appearance on the seek bar) and will not play unless I refresh the browser.
I've tried copying the code from the html page that came with the set of swf and flv files and that doesn't work either.
Just inserting the swf file into the web page like we used to do in CS3 and earlier does not wor.
I noticed that now with ActionScript 3 there is no ACRunActiveContent.js file.
Videos created using CS3 and ActionScript 2 seem to work just fine on web pages.
Wonder what i can do to use CS4 and CS5 videos and have them play on html pages?
Any ideas anyone?
Hi Esdebon - I don't think your solution would resolve the issue.
In Flash CS4 (or CS5) when one publishes, you are asked if you want to create an html page in addition to your swf file. That html file (containing the Flash video) should play the video correctly if uploaded to the server - and as you can see in the link below, it does not play...
www.fotorealty.ca/realestatephotography/realestatevideo-cs4.html - this is the original html file published by CS4 (actionscript 3) along with the swf and as you will see, the video does not play.
Note: the flv file is also on the server and plays ok when published with Flash CS3 (actionscript 2) as here: www.fotorealty.ca/realestatephotography/realestatevideos.htm - the same flv file has been used in both cases.
Actually - I think I discovered why the original html file does not work.
Flash published the absolute path of the flv file as it is on our hard drive as the path - it should actually be the relative path (as in pointing to the flv file in the same folder as the html file).
However, this still does not address why it is so complicated to embed a video into a web page - surely one should not have to resort to coding and swf objects to put a video in a web page?
CS3 makes the whole thing so easy compared to later versions.
...and here is a web page with the code from the original html page copied and pasted into the head and body sections exactly as it appeared in the Flash-generated html page...
www.fotorealty.ca/realestatephotography/test.htm
We can see that once again, the player interface shows with the striped bar streaming but no video(?)
Now I republished the video and again copied the code into another test page:
www.fotorealty.ca/realestatephotography/test2.htm
This time, the video does play, but only after buffering/downloading the entire video.
Once again, this is very different from Flash CS3 where the video started streaming instantly with no delay.
Both links return file not found.
Please post and test valid links and we'll take a look.
We can see that once again, the player interface shows with the striped bar streaming but no video(?)
Most common cause of this... swf loads but cannot find and load the .flv... usually because of a bad path to the .flv, missing file, or incorrect file name.
This time, the video does play, but only after buffering/downloading the entire video
Most common cause of this... the video file was compressed using H.264 (mp4) compression and the MOOV ATOM is placed at the very end of the video file rather than the front, preventing progressive downloading of the file. Redo the video so the index file is at the very beginning. More info:
http://renaun.com/blog/code/qtindexswapper/
http://www.youtube.com/watch?v=8c8oqNX4b3k
Adninjastrator
Hi All,
I 'm sorry but I had to remove the links from my site because it was
(a) getting a bit confusing, and more importantly,
(b) I found the solution to the whole issue - it was my lack of knowledge that was the cause!
Creating a Flash Video swf in CS5 (or even CS4) with ActionScript 3 requires the video to be embedded in the web page a bit differently than we were used to with CS3 and AS2.
As "esdebon" correctly pointed out in the original reply, it needs to be embedded using swfObject. It was just that the article he recommended was so confusing to this newb and only later I figured out how easy it was using Dreamweaver (or even MS Frontpage!)
Once that was done, the video(s) worked perfectly - have a look at the correctly embedded video file at www.fotorealty.ca/realestatephotographersvancouver/realestatevideos.ht m
Thanks for all your help and support guys - I really appreciate it!
Pesi
Just to clarify:
Creating a Flash Video swf in CS5 (or even CS4) with ActionScript 3 requires the video to be embedded in the web page a bit differently than we were used to with CS3 and AS2.
While the newer versions of Flash do use a different method (using swfobject) when "Publishing" a Flash .swf, it is NOT required to do so. In fact neither swfobject nor ACRun... are required to display Flash of any version (AS1, 2, or 3) on a Web page. The simple single object method will work just fine:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf">
<param name="SomeOtherParam" value="ParamValue">
</object>
Both ACRun and swfobject are "Flash Detection" methods used to display some alternative content if Flash is not detected... they are NOT needed to simply display the Flash .swf.
However, you can't use half ACRun code and half swfobject code....it must be either one or the other... and either would display AS3 players just fine.... as would the single object method.
Best wishes,
Adninjastrator
Yes, Flash detection and compatibility
this code don't work in all the browsers:
<object data="path_to_file/file.swf" type="application/x-shockwave-flash" width="insert_width_of_movie" height="insert_height_of_movie">
<param name="movie" value="path_to_file/file.swf">
<param name="SomeOtherParam" value="ParamValue">
</object>
Works fine in any of the modern browsers (I should have said).
Hey, don't get me wrong! I use and highly recommend swfobject!... it's just not "required" to display Flash with AS3.
After all, there is only so much that javascript can do to enhance "compatability". Either the browser will play Flash or it won't.The javascript is not playing the Flash, the Flash browser pluggin is.
Best wishes,
Adninjastrator
North America
Europe, Middle East and Africa
Asia Pacific