Forum Moderators: open
I'm using Adobe Captivate and it creates crisp, clear video unlike some of the free apps I found. The problem is I can't find a way to convert the SWF file to something I can upload to YouTube, and I can't seem to find the right code to embed the video if I upload the SWF file to my website.
I'm embarrassed to post all the different embed stuff I've tried for uploading it to my own site. There doesn't seem to be a way to convert the SWF file to something I can upload to YouTube.
Clearly I'm new to Flash video. I tried some of the suggestions in this forum before posting here but nothing seemed to work.
1) What's the proper structure for my embed code please?
2) Is there a way to convert the SWF file to an MPEG file or whatever other format YouTube supports?
Many thanks for whatever help you all can provide. :)
To display a flash file on your website look into SWF Object:
[code.google.com...]
dc
I don't think Y.T. supports direct .flv upload, or they didn't last time I tried it, earlier this year. When you upload video their system converts it to .flv, but you can't upload it. (?)
SWFObject rocks and is way better than the stock "publish" code, but if you publish directly from Flash it will create an html page for you. It's a bit bloated, use SWFobject.
The "legacy" method, distributed by Flash, is to use the object tag with a nested embed tag for Moz-ish support, but this is invalid code. View source of most pages on the web with Flash.
2) Is there a way to convert the SWF file to an MPEG file or whatever other format YouTube supports?
With the file open in Flash, select File->Export->Export Movie, select .avi or .mov (which is supported by Y.T.) Swish may or may not have the same capability.
[help.youtube.com...]
all I get is a white box that's the dimensions I defined, and a very brief splash graphic within the area the player should be that displays the Captivate logo.
So swfObject is loading and trying to write to the div, but either it's not finding the Flash or the Flash is malfunctioning. Assuming the Flash works when you test it right from Flash, first test it in FireFox, then go to Tools->Error Console and see if there's a JS error.
The concept is pretty basic, you have an ID'ed div with your placeholder image, and the code for SWFobject writes to it, which sounds like you have in place. Without changing the SWFobject library at all, your code should look something like this:
document:
<div id="flash-div"><img src="flash-placeholder.jpg"></div>
in the head of the doc:
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
window.onload = function() {
var myVideo = new SWFObject('images\/header-flash.swf', 'flashObjectID', '780', '134', '9', '#ffffff');
myVideo.addParam("wmode", "transparent");
if (document.getElementById('flash-div')) {
myVideo.write('flash-div');
}
</script>
- myVideo is the video object referenced by the parameters in new SWFObject
- flash-div is the div to write to
- you must attach a behavior to window.onload as a function so all the page elements are loaded before writing to the div - specifically, the div you want to write to. this is why it's in a function (), not just inline JS.
Usually when I get the result you are getting, it's something to do with the path or ID's. Note the escape after images (images\/flash . . . . )
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Flash Video Test</title>
<script type="text/javascript" src="\/videos\/swfobject.js"></script>
<script type="text/javascript">
window.onload = function() {
var myVideo = new SWFObject('\/videos\/October_2008_Giveaway_Drawing.swf', 'flashObjectID', '425', '344', '9', '#ffffff');
myVideo.addParam("wmode", "transparent");
if (document.getElementById('flash-div')) {
myVideo.write('flash-div');
}
</script>
</head>
<body bgcolor="#F5F4F1">
<div id="flash-div"><img src="flash-placeholder.jpg"></div>
</body>
</html>
domain-root/videos/swfobject.js
domain-root/videos/October_2008_Giveaway_Drawing.swf
domain-root/flash-placeholder.jpg
domain-root/thiswebpage.html
But when testing on the local computer, you'll have to remove the leading forward slash:
videos/swfobject.js
videos/October_2008_Giveaway_Drawing.swf
flash-placeholder.jpg
thiswebpage.html
Neither Windows or Mac understands a leading /.