jQuery doesn't work in chrome with flash embedded.

The code is in question: 27279483

Here's the link to the question.
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_27279483.html

This code is working perfectly fine, as shown in the answers - I used the suggestion by Leakim971.

I have this code in a header.php file used in the whole site project. It works perfect in safari, IE, firefox everywhere.

It works in chrome on every page that doesn't have flash.

On the page with flash, the flash object has an affect on the div somehow - stopping the div from appearing.

Here's the page with the flash code.
 
<?php
$pageOutput="<div id=\"flashContent\">
	<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"970\" height=\"326\" id=\"premiere\" align=\"middle\">
		<param name=\"movie\" value=\"premiere.swf\" />
		<param name=\"quality\" value=\"high\" />
		<param name=\"bgcolor\" value=\"#ffffff\" />
		<param name=\"play\" value=\"true\" />
		<param name=\"loop\" value=\"true\" />
		<param name=\"wmode\" value=\"window\" />
		<param name=\"scale\" value=\"showall\" />
		<param name=\"menu\" value=\"true\" />
		<param name=\"devicefont\" value=\"false\" />
		<param name=\"salign\" value=\"\" />
		<param name=\"allowScriptAccess\" value=\"sameDomain\" />
		<!--[if !IE]>-->
		<object type=\"application/x-shockwave-flash\" data=\"premiere.swf\" width=\"970\" height=\"326\">
			<param name=\"movie\" value=\"premiere.swf\" />
			<param name=\"quality\" value=\"high\" />
			<param name=\"bgcolor\" value=\"#ffffff\" />
			<param name=\"play\" value=\"true\" />
			<param name=\"loop\" value=\"true\" />
			<param name=\"wmode\" value=\"window\" />
			<param name=\"scale\" value=\"showall\" />
			<param name=\"menu\" value=\"true\" />
			<param name=\"devicefont\" value=\"false\" />
			<param name=\"salign\" value=\"\" />
			<param name=\"allowScriptAccess\" value=\"sameDomain\" />
		<!--<![endif]-->
			<a href=\"http://www.adobe.com/go/getflash\">
				<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>";
?>

Open in new window

LVL 1
ImaginxAsked:
Who is Participating?
 
RobOwner (Aidellio)Commented:
I had the same problem and ended up using the swfobject js library to get it working the way i wanted.

hosted on google: https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js

using jquery:


$(function() {
		var flash_movie = 'premiere';
		swfobject.embedSWF(
			flash_movie+'.swf',
			'flashContent',
			'970','326',
			'9',
			'', // expressInstallURL
			{}, //flashvars
			{
				quality: 'high',
				wmode: 'window',
				menu: 'false'
			}, // params
			{}, // attributes
			null // callbackFn
		);
	});

Open in new window

0
 
ImaginxAuthor Commented:
Awesome!

I'll try this out tonight ! Thanks tagit !
0
 
RobOwner (Aidellio)Commented:
no problem :) let me know how it goes
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.