Embedding a flash object old SWF markup? Will this work? - html

I am embedding a flash object into my site and when I do I get a message from dreamweaver saying
"This page contains some swf objects that may not work correctly in the most recent versions of Internet Explorer. Dreamweaver cannot convert them to the new SWF markups please delete each of them and insert them again"
I am not aware of any new SWF markups but here is my code to check maybe I am doing something wrong:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="350" height="140" title="Flash Audio Recorder">
<param name="movie" value="AudioRecorder.swf" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="quality" value="high" />
<param name="FlashVars" value="userid=2&settings=myXML/settings.xml" />
<embed src="AudioRecorder.swf" FlashVars="userid=2&settings=myXML/settings.xml" allowScriptAccess="sameDomain" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="350" height="140"></embed>
</object>
</body>
</html>

Try it in a browser - if it works its ok - Dreamweaver is rubbish!

Use SWFObject and you don't have to worry about stuff like that. Makes it all happen in the blink of an eye cross-platform.

Related

Embeded YouTube videos not loading

Our current implementation for YouTube videos use standard <object> from API documentation and is no longer loading correctly.
It shows an empty Object with link to YouTube page.
Created an example using code from documentation and error is reproduce-able.
Anybody know if there's another way to use the embedded code from YouTube?
Example code:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<object width="640" height="390">
<param name="movie"
value="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"
type="application/x-shockwave-flash"
allowscriptaccess="always"
width="640" height="390"></embed>
</object>
</body>
</html>
API Documentation: https://developers.google.com/youtube/player_parameters
You don't need all those thing just do it like this..
<object width="420" height="315"
data="http://www.youtube.com/v/XGSy3_Czz8k">
</object>
OR
<embed width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k">
Most YouTube videos are been embedded in an iframe tag like this:
<iframe src="link_to_video"></iframe>
Use iframe youtube embedded option.
Or you can do it your self on you tube click on share under you tube video and click on embed.Copy and paste code in your html.
Share 2. Embed 3. Copy & Paste
The problem can also be solved, if the video is called over the API url.
https://www.youtube.com/apiplayer?version=3&video_id=oPEJzOTgQCE&enablejsapi=1&playerapiid=ytplayer&rel=0
This can use all the extra parameters and works the exact same way as the other URL.
<object data="https://www.youtube.com/apiplayer?version=3&video_id=oPEJzOTgQCE&enablejsapi=1&playerapiid=ytplayer&rel=0" type="application/x-shockwave-flash" id="flash_236856494" width="312" height="173"><param name="scale" value="showAll"><param name="salign" value="tl"><param name="menu" value="false"><param name="update" value="true"><param name="allowfullscreen" value="true"><param name="wmode" value="opaque"><param name="bgcolor" value="#DADADA"><param name="allowScriptAccess" value="sameDomain"><param name="flashvars" value="youtubeId=oPEJzOTgQCE&autostart=false&suggestedQuality=large"><param name="movie" value="https://www.youtube.com/apiplayer?version=3&video_id=oPEJzOTgQCE&enablejsapi=1&playerapiid=ytplayer&rel=0"></object>

Flash not working on Chrome, FF, Safari, but it is working on IE

I made the huge mistake of getting a template instead of just doing the development my self. Now I've narrowed down the issue- first, I thought it was an issue with the actual flash file. Now I'm realizing it's every time I change the images in the HTML editor which just makes no logical sense to me. This is the code for the flash file:
<body id="page1" onload="new ElementMaxHeight()">
<div id="main">
<!-- header -->
<div id="header">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="download.macromedia.com/pub/shockwave/cabs/flash/…; width="940" height="417"></object><!----> <![endif]-->
</div>
<!-- content -->
<div id="content">
Again, it works great on IE, but nothing else, which is a twist I haven't seen online.
Appreciate any feedback you can offer.
Im sure this answer is here already but i will post a generic code i always use.
Just place the whole block and change related values, swf properties.
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="950" height="377">
<param name="movie" value="myMovie.swf">
<param name="quality" value="high">
<param name="wmode" value="direct" >
<param name="swfversion" value="6.0.65.0">
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf">
<param name="SCALE" value="noborder">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="myMovie.swf" width="950" height="377">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="direct" >
<param name="swfversion" value="6.0.65.0">
<param name="expressinstall" value="Scripts/expressInstall.swf">
<param name="SCALE" value="noborder">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

"Allow" Button for flash content cannot be clicked in Mac Chrome

I'm using Mac Chrome 8.0.552.237
It seems like whenever I embed flash content in html and open it in chrome when my flash content requests camera access and i need to click "allow" button in the dialog it never recognizes the click. It works fine in firefox. I just simply can't understand why it wont work in chrome. I use swfobject, and i used http://www.bobbyvandersluis.com/swfobject/generator/index.html to make the html code just to make sure i wasn't making any mistakes.
any ideas what I could be doing that causes it to not let me click allow?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("MyFlashContent", "10.1.0", "expressInstall.swf");
</script>
</head>
<body>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="480" height="800" id="MyFlashContent" align="middle">
<param name="movie" value="MyFlashContent.swf" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="MyFlashContent.swf" width="480" height="800" align="middle">
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
EDIT:
Since it seems like the issue might actually be with my actionscrip code, i'll post how i attached the camera.
var youCam:Camera = Camera.getCamera();
you_cam.attachCamera(youCam);
as you can see I have it attached about as simple as it can get, I actually have this right at the top of my code to place the camera on the stage. This works fine when i test it, and it works fine in firefox.
I have no idea why, but because of the large size of the swf canvas, i learned in chrome i had to click the resize corner of the browser and make the window small and then bring it back to the regular size then it would work. no idea why, but this was only hapening in chrome. i fixed the issue by making the overall size of my swf smaller.
Try setting the css display property to 'inline-block'
I had a similar problem. I was using a swf webcam plugin and, on Chrome 21 only, it was not allowing users to click allow. I ended up fixing it by changing it's css 'display' from 'block' to 'inline-block'.
Hope it helps.
I've had an issue like this before, but it wasn't the browser nor the embedding, it was the example code for enabling the webcam (I think this code even came from the Adobe live docs ffs). The issue was that the camera polling already started, before the allow button was pushed. The polling (some augmented reality experiment) was so heavy, that the allow button only registered the click every 1 in 10 times or so. By putting of the camera polling till after the status-event returned with camera.muted == false, I solved my problem.
Maybe it's worth a try. Cheers, EP
Edit: Code example for the handler
var youCam:Camera = Camera.getCamera();
youCam.addEventListener(StatusEvent.STATUS, handleCameraStatus);
...
private function handleCameraStatus(e:StatusEvent):void {
if (e.code == "Camera.Unmuted") {
you_cam.attachCamera(youCam);
} else if (e.code == "Camera.Muted") {
// display message so the user might try again.
}
}

validation errors when validating a page that has a flash object

I use the following doctype in a page that has a flash object,
html code
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="379" height="180">
<param name="movie" value="Flash/header.swf" />
<param name="quality" value="high" />
<embed src="Flash/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="379" height="180"></embed>
</object>
When I try to validate the page Im displayed with the following errors,
there is no attribute "src"
there is no attribute "quality"
there is no attribute "pluginspage"
there is no attribute "type"
there is no attribute "width"
there is no attribute "height"
there is no attribute "type"
Could some one please advice me with some information on how to embed a flash object[.swf] in a page with no validation errors?
Try this. It will work.
<!--[if !IE]> -->
<object type="application/x-shockwave-flash" data="Flash/header.swf" width="379" height="180">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="379" height="180">
<param name="movie" value="Flash/header.swf" />
<!-->
</object>
<!-- <![endif]-->
embed is a old element invented by Netscape and never was standardized. Search google for dozens of valid ways to embed flash: http://www.google.de/search?q=embed+flash+valid

Providing alternative images if Adobe Flash isn't available

Are there any ways providing an alternate GIF/PNG image, in case the user has no Adobe Flash installed and/or deactivated.
I’ve found recommendations, like the following from W3C, which determine via JavaScript the existence of Adobe Flash on the client: W3C Providing alternative images
Honestly, I would prefer a non JS technique. I’m thinking of some XHTML tag, equivalent to <noscript>. (like <noobject> if the object (in our case Flash) can’t be displayed/loaded).
The reason for needing this separation is the following:
The bank I’m working for will preferably display their banners in Flash format. In case it isn’t possible a simple image should be shown.
In the past it was solved very likely in the way mentioned before. We’re currently working on a design refresh and that’s where I stumbled upon this piece of code which makes me wonder if it’s really the most elegant and compatible way of doing so.
Another idea that strikes me: Is it actually possible to load Flash-objects in a JavaScript disabled environment?
Actually having flash installed but javascript turned off is a valid scenario. This should work across most browsers:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600" id="flashContent">
<param name="movie" value="flash.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="flash.swf" width="800" height="600">
<!--<![endif]-->
<img src="(...)" alt="Put your alternate content here" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
I use the following code for graceful degradation. It works well.
<!--[if !IE]> -->
<object type="application/x-shockwave-flash" data="flash.swf" width="500" height="100">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="500" height="100">
<param name="movie" value="flash.swf" />
<!--><!--dgx-->
<param name="loop" value="false">
<param name="menu" value="false">
<param name="quality" value="high">
<img src="flash_replacement.png" width="500" height="100" alt="No Flash">
</object>
<!-- <![endif]-->
I don't know why you want to avoid javascript, it is the best solution when dealing with Flash.
using the SWFObjects Library (the best known so far for the matter) you can do this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> My Home Page </title>
<meta name="viewport" content="width=780">
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<div id="splashintro">
<img src="splash_noflash.png" />
</div>
<script type="text/javascript">
var so = new SWFObject("csplash.swf", "my_intro", "300", "240", "8", "#338899");
so.write("splashintro");
</script>
</body>
</html>
what the script does is replace the splashintro div with the flash file, if the browser does not support Flash, then does nothing and the splash_noflash.png will be shown.
P.S. With this technique you are ready for the iPhone, instead of showing the blue cube, it will show the image :)
I find using inline styling to do the trick.
For example:
<div style="background-image: url('...');">
<object>
/* Embedded Flash */
</object>
</div>
We can provide an alternate GIF/PNG image, in case the user has no Adobe Flash installed and/or deactivated.
<object id="flashcontent classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550px" height="400px">
<param name="movie" value="mymovie.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="mymovie.swf" width="550px" height="400px">
<!--<![endif]-->
<p>
Fallback or 'alternate' content goes here.
This content will only be visible if the SWF fails to load.
</p>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
And also add this...
<script type="text/javascript">
swfobject.registerObject("flashcontent", "9", "/path/to/expressinstall.swf");
</script>
I have written an easy way to do this in CSS - no extra JavaScript at all.
Name your ID/Class where your Flash movie resides and use a background image. Wrap your Flash movie within that div.
For example:
<div ID="MyFlashMovie"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600" id="flashContent">
<param name="movie" value="flashMovie.swf" />... etc., etc.</object>
</div> etc.
Then in your CSS:
#MyFlashMovie {
background: url("alternateGraphic.png");
background-repeat: no-repeat;
height: XXpx;
width: XXpx;
}
When the Flash isn't available, say on the iphone/pad, the graphic will display. The only drawback with this, that I have found, is that if your Flash movie uses a transparent background, you will see the alt graphic through the transitions. Just make a solid color within the Flash movie as your lowest layer (make sure it's the same bg color as the website) and it will look fine.
~GreaseJunkie