SWF flash animation doesn't work correctly - html

At my page is a flash animation - under the logo. The problem is, that the animation doesn't works correctly - is slow, the images in the animation are blurred etc. If I play the animation in Elmedia Player, there it works nice, but on the website not.
I included the animation into the page this way:
<div>
<object type="application/x-shockwave-flash" data="/images/intro.swf" width="986" height="110">
<param name="movie" value="/images/intro.swf" />
</object>
</div>
Where could be the issue / how could I this issue fix?
Thank you in advance.

When I try your page in two different browsers I get an error with the GMap2. Maybe this is stopping your flash being embedded?
var map = new GMap2(document.getElementById("map_canvas"));

Your embed code is apparently not working. For compatibility with all major browsers and generally hassle-free embedding of Flash movies in HTML pages, I really recommend SWFObject.
It has a handy generator GUI that sets up all the code for you and all you have to do is copy+paste.

Related

.SWF Object Shrinking in IE 8

I am having an issue in WordPress. I've embedded a .swf as an object, but in IE 8 it shows really small. I've attached a screenshot of the IE issue. It's that really small picture on the left. To see a working version, check out the page here on another browser.
I would love to disregard this issue, but unfortunately our company runs on IE so I need to fix this.
This is all created in WordPress. The .swf is hosted externally. Here is the code:
<object width="680px" height="300px">
<param name="movie" value="http://www.pplweb.com/ppl-generation/~/media/PPLWeb/Generation/Media/PPL%20Susquehanna/nuclear.swf">
<embed src="http://www.pplweb.com/ppl-generation/~/media/PPLWeb/Generation/Media/PPL%20Susquehanna/nuclear.swf" width="100" height="100">
</embed>
</object>
Embed it using SWFObject, it's the most reliable way to insert SWF files. WordPress already comes bundled with it, so you just need wp_enqueue_script('swfobject');, and then use the script embedding accordingly.
Or you can use a plugin: wordpress.org/plugins/search.php?q=swfobject.

flash not rendering in Internet Explorer

Hi have the following flash object placed in HTML, flash seems to be rendering good in Firefox, Chrome, Safari but not in any version of IE!!!
Can someone please let me know whats wrong in this object, or what I miss specially for IE!!
Thanks in advance,
Tanmay
Use SWFObject for embedding Flash elements, it will solve all your cross-browser issues.
I believe you need the movie param. This works for me:
<!doctype html>
<object data="http://jquery.thewikies.com/swfobject/fireworks.swf" width="440" height="550" name="demoLaunch" id="demoLaunch" type="application/x-shockwave-flash">
<param value="true" name="democonnect">
<param value="always" name="allowscriptaccess">
<param value="transparent" name="wmode">
<param value="demo1=1&demo2=3&demo3=12&demo4=19" name="flashvars">
<param name="movie" value="http://jquery.thewikies.com/swfobject/fireworks.swf">
</object>
It is better to rely on Javascript to control no flash fallbacks in addition to cross-browser JS for this purpose. I would recommend jquery swfobject.
Have you tried validating your HTML and CSS? You almost certainly have a coding error in there somewhere and that will help you find it. http://validator.w3.org/
Actually, the problem here is that you're using W3C valid HTML, which IE has a tendency not to get along with. To get IE to embed flash content you need to use embed, which does exactly the same thing as object but is not part of the W3C standard.
The syntax for the embed tag is as follows:
<embed src="somefilename.swf" width="550" height="400"></embed>
This is often just placed inside of the object tag, so that both options are on the page (don't worry, it won't be rendered twice in browsers that understand the object tag you already have).
A common way to get around using non-standard HTML is to do the embed with Javascript, which writes non-standard HTML code to the browser but not until after the page is rendered. This allows the page to pass the W3C HTML validator, and still work cross-platform. The best javascript library for doing this is generally SWFObject, which lets you just include the flash content once and will write html out for whatever browser the user is viewing your content in.

Is there a standard copy-paste way to safely put a SWF in a web-page?

While embedding a SWF in HTML is not too hard, there are a few subtleties for different browsers, detecting if Flash is installed, etc.
For enabling AJAX, there are standard chunks of code you can use to save the hassle of coping with all cases... is their a similar 'reference implementation' to embed a SWF which covers all the bases?
Is there a standard? Sadly no. The desirable points of a Flash embedding method are:
modern browser compatible
IE compatible
ancient browser compatible
standards-compliant
supporting streamed Flash (play before the whole file is downloaded) in IE
Don't Repeat Yourself
allow fallback content
no JavaScript reliance
but there is no one bunch of markup that satisfies all these points. Point 6 is impossible to achieve fully but some solutions fail worse than others.
About the simplest markup you can get away with is the version outlined in the classic Flash Satay article:
<object type="application/x-shockwave-flash" data="file.swf" width="x" height="y">
<param name="movie" value="file.swf" />
(Non-Flash content here)
</object>
The ALA article complains that this version won't prompt the user to download Flash if it isn't installed; personally I see this as a plus point. But it still fails on points 3 and 5. Point 5 may or may not matter: if your Flash file is a simple application, media player or loader stub it doesn't matter at all, but if it's a big animation it can be unfortunate.
Maybe point 3 doesn't matter any more; no-one's really using Netscape 4 or IE4 these days. But if it does to you, you need the old-school embed tag. This is also supported by modern browsers so that means you can use the ActiveX method for the outer object, so you get streaming in IE:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="x" height="y">
<param name="movie" value="file.swf" />
<embed type="application/x-shockwave-flash" src="file.swf" width="x" height="y" />
</object>
This is the ‘traditional’ method of embedding Flash. It fails on points 4 and 7 and is slightly worse on point 6.
The third approach, used by libraries such as SWFObject is to use JavaScript to choose the best way to instantiate Flash on the current browser. This can hit the all the above points except, naturally, 8. Some libraries offer ways to mitigate that by also including static object markup, trading point 8 for point 6.
Apple (Link for example)
Content that your plug-ins will view
needs to be embedded within HTML. Most
browsers do this with an EMBED tag,
but others require the OBJECT tag. For
maximum compatibility, you can tune
your page to support both.
Adobe (Link for example)
The OBJECT tag is used by Internet
Explorer on Windows and the EMBED is
used by Netscape Navigator (Macintosh
and Windows) and Internet Explorer
(Macintosh) to direct the browser to
load the Macromedia Flash Player.
Internet Explorer on Windows uses an
ActiveX control to play Macromedia
Flash content while all other browser
and platform combinations use the
Netscape plugin technology to play
Macromedia Flash content. This
explains the need for two tags.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/
shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550"
HEIGHT="400"
id="myMovieName">
<PARAM NAME=movie VALUE="myFlashMovie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED href="/support/flash/ts/documents/myFlashMovie.swf"
quality=high
bgcolor=#FFFFFF
WIDTH="550"
HEIGHT="400"
NAME="myMovieName"
ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
Many implementations of Flash embedding seem to be based on SWFObject. Is this the kind of thing you are looking for? Edit: project is hosted here now
I would recommend SWF Object compared to all the other options because it produces Standards Compliant html and is really easy to setup.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<div id="myvideo"></div>
<script type="text/javascript">
var params = { allowScriptAccess: "always" };
var atts = { id: "myplayerid1" };
swfobject.embedSWF("http://www.youtube.com/v/gRvUpoTT-Bo&hl=pt-br&fs=1&enablejsapi=1&playerapiid=myplayerid1&version=3", "myvideo", "425", "344", "8", null, null, params, atts);
</script>
This might be the easy way ..use js fiddle to test any code ... that helped me a lot to try many things

HTML: Why does embedded audio sometimes fail to play?

I am experiencing some strange behavior of embedded audio (wav file) on HTML page.
I've got a page https://server.com/listen-to-sound, and a Wav file embedded in it via <EMBED/> tag, like this:
<embed src='https://server.com/path-to-sound' hidden="true" autostart="true" />
The page https://server.com/listen-to-sound is opened in IE 6 SP3 on machine#1 - the sound is played in the headphones.
The same page is opened on another machine(#2), with exactly same IE 6 SP3 version, privacy and proxy settings - there's no sound.
Totally, from 6 machines the sound is played on 2 and not played on 4. From these 4 machines, when the page https://server.com/listen-to-sound is opened in Opera, the sound is played.
I've triple-checked headphone connections, volume settings and other possible hardware and software driver issues: the problem is definitely in IE settings.
I've also checked https://server.com/path.to.sound URL - the 4 machnies that do not play sound fail to open this link, failing with an error like "Failed to download page".
Cleaning IE caches, temporary internet files, SSL certificate caches did not solve the problem either.
Googling gave me nothing special but old Flash trick to use <OBJECT> tag and <EMBED> tag to be written in Object's comments.
What have I missed? Have you experienced similar or related problems? How were they solved?
Do you have any suggestions on where the trick is? Do you know some IE "features" that might affect execution(playing, showing) of embedded objects?
I think the main reason is acting different on each computer/browser you're using is because it is a non-standard tag.
Getting media to play inside a web page has always been a bit of a pain. You may try something like this:
<object type="audio/x-wav" data="data/test.wav" width="200" height="20">
<param name="src" value="data/test.wav">
<param name="autoplay" value="false">
<param name="autoStart" value="0">
alt : test.wav
</object>
The above was taken from this site explaining how to use the object tag.
I have not found the solution, but I can confirm that the likely problem is the https:. I have found that windows media player does not play files with a full url/src leading to https. However, quicktime will. So, computers with quicktime will successfully play the file back while those with only WMP will fail.
One "solution" is to link to the http: (non-secure) version of the file.
I could'nt find any informations on this, but have you tried playing sound from Javascript ? I don't know if it's a viable workaround for you but this might be a solution.
You can find different ways to do it here: http://www.phon.ucl.ac.uk/home/mark/audio/play.htm
Hope that will help you.
In regard to your comment to jamesh, I would advise to provide instead a link to the audio file: some computers (mine at work) have no sound, not everybody is using IE, embed isn't part of HTML (it is a hack supported by various browsers, it isn't defined in HTML 4.01 Transitional DTD for example) and chances are the visiting browser have no plug-in to play your sound.
As your tests show, it is prone to problems...
At worst, provide a <NOEMBED> tag to supply the said link. Or nest various methods, like <object>. At least, Flash is supported by nearly all browsers.
Somewhere along the way, browsers changed operations like using flash and playing audio. I have tried java, html embeded code none is exact.. the only thing i noticed is if you make a link on another page to the page that suppose to play the music it will work every time. but many times it wont play if you take and put your music page url in url box.. the link is reliable to the music page.. Don't know why?
I have been working for a while on it. and of course there the difference between all the various browsers. The embedded code embed src='https://server.com/path-to-sound' hidden="true" autostart="true" />you showed before should work as long a sound file is there and if placed as first line after body statement.

HTML over flash without stopping interaction with flash

I have a html div layered on top of an interactive flash movie, but when the mouse moves over the div, it can't interact with the flash (the view changes as the mouse moves or is clicked). Is there a way to have the flash recieve the mouse movements and clicks but leaving the html visible?
I can't modify the flash SWF file.
Edit: To make it clearer, this is an layer of information sitting on top of Google Street View (flash), the trouble is that I can't move the street view around where the layer overlaps.
Try something like this:
<object>
<param name="wmode" value="transparent" />
<embed src="example.swf" wmode="transparent"></embed>
</object>
The main things to note are the <param /> tag with the transparent attribute, and the wmode="transparent" in the embed tag. You'll also need to run the following javascript code to make this work across all browsers:
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}
This code should be run when the document is loaded. The site I got this code from claims that it must be run from an external file in order to work (although I haven't tested that).
I got this answer from here, where you can get more detail and a working example:
http://www.cssplay.co.uk/menus/flyout_flash.html
I believe the short answer is: No.
Sorry.
However, If you had complete control over how the Flash object is authored - you might be able to expose a public API to the javascript - allowing it to "manually" forward live mouse-coordinate, and mouse-button information into the flash, as you operate the mouse on top of the HTML overlay.
It might be worth checking, if Google's street-view Flash object exposes a public javascript API that might allow you to take some control of the flash - based on mouse-events picked up by your HTML overlay.
Expect the skies to fall, if you try this. :-)
should be aware that wmode=transparent will kill use of scroll wheel in firefox. this is true even in FP10