Javascript: toggling between a jpeg and a flash movie

Is it possible to toggle between a jpeg and a flash movie with javascript? PLease take a look at this page and let me know how to do it ... if it's possible.
http://dijitalrealm.com/toggleFlash.html

I suppose this could be facilitated by exporting from flash with certain settings, so I'm putting this in the flash zone as well.

Thanks,

John
LVL 1
John CarneyReliability Business Tools Analyst IIAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

quincydudeCommented:
like this?
<html> 
<head> 
<script type="text/javascript"> 
function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
  {alert(alerttxt);return false;}
else {return true;}
}
}
 
function validate_form(thisform)
{
with (thisform)
{
if (validate_email(email,"Not a valid e-mail address!")==false)
  {email.focus();return false;}
}
}
</script> 
<script type="text/javascript"> 
function mouseOver()
{
document.getElementById("div1").style.display = "none";
document.getElementById("div2").style.display = "block";
}
function mouseOut()
{
document.getElementById("div2").style.display = "none";
document.getElementById("div1").style.display = "block";
}
</script> 
<style> 
.textBox{width:200px; line-height:16px}
body{margin:40px; font-family: Gill Sans MT; font-size:14px;
}
</style> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> 
 
<body> 
 
<div id="div1" style="position:absolute;top:50px;left:20px;width:200px;height;200px;" onmouseover="mouseOver();" onmouseout="mouseOut();"> 
<a href="http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_24156408.html" target="_blank"> 
  <img border="2" alt="Visit W3Schools!" 
 
src="http://dijitalrealm.com/images/beach3.jpg" name="x"
 
 
/> 
  </a>
</div>
<div id="div2" style="display:none;position:absolute;top:50px;left:20px;width:200px;height;200px;" onmouseover="mouseOver();" onmouseout="mouseOut();" >
<object width="200" height="200"> 
<param name="movie" value="http://dijitalrealm.com/flash1.swf"> 
<embed src="http://dijitalrealm.com/flash1.swf" width="200" height="200"> 
</embed> 
</object> 
</div>
 
 
 
</body> 
</html> 

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
John CarneyReliability Business Tools Analyst IIAuthor Commented:
Fantastic!  I love it when the answer is so simple and intuitive.

Thanks, quincydude.

- John
0
John CarneyReliability Business Tools Analyst IIAuthor Commented:
Great answer!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.