Link to home
Start Free TrialLog in
Avatar of Josh Fialkoff
Josh FialkoffFlag for United States of America

asked on

swf swap

Hi,
I am looking for a way to change Flash files when a user clicks on a link.
This is for a portfolio site. All of the SWF movies are the same size and go in the same position.
I would like to do this without reloading the page.
Can you offer a JavaScript (or other) solution?
Thanks,
Josh
Avatar of quincydude
quincydude
Flag of Hong Kong image

Is your swf embedded in a object tag?
If yes you can set the object with an id and get the object at runtime by

var myobject = document.getElementByid('myFlashObj')


and you can set the HTML of the object using

myobject.innerHTML
Avatar of Josh Fialkoff

ASKER

Thanks Dude!

This is the code for the Flash, so I believe so.

Here is a URL for the page: http://019d900.netsolhost.com/Wordpress/

-Josh

<div style="text-align: center; width:360px; height:250px; line-height:250px; margin-left: auto; background: #58585a;"><div id="swf4e5f1">This movie requires Flash Player 9</div></div>
 
<script type="text/javascript">
	swfobject.embedSWF("/Wordpress/wp-content/uploads/SampleSlides/home_slides.swf", "swf4e5f1", "360", "250", "9.0.0", "", {}, {wmode: "window", menu: "false", quality: "high", bgcolor: "#58585a"}, {});
</script>
			<li id="text-333168321" class="widget widget_text">						<div class="textwidget"><?php wp_swfobject_echo("/wp-content/uploads/SampleSlides/home_slides.swf", "360", "250"); ?></div>
		</li>
</div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Josh Fialkoff
Josh Fialkoff
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This works well, but it does load a movie when the page loads.

How can I accomplish this?

Thanks!

-Josh
That piece of code looks fine.
Can you clarify your issue as I cannot understand what problem are you talking about.
The page was not loading a flash movie on load, but that is now working. The issue is resolved. Thanks!