troubleshooting Question

stop and start flash movie in div

Avatar of offtoday
offtoday asked on
Web Languages and StandardsJavaScriptAdobe Flash
2 Comments1 Solution3357 ViewsLast Modified:
I have a swf playing in a div tag.  Using show/hide div I can successfully show/hide the div/swf, but the sound doesn't stop when the div (and movie) is hidden. Using the code suggested in another post I was able to stop the the swf, but I can't seem to start or show the div/swf again.

<script type="text/javascript">
function stopFlash(){
Change "DIV_ID" to the id of the div containing the flash movie.
When you want the movie to stop, simply run the function "stopFlash();"

to "reopen" or "restart" the Div/swf I tried the following:
<script type="text/javascript">
function startFlash(){
   document.getElementById('DIV_ID').style.display='';  -- I also tried 'block'

then from simple start text buttons I ran the function "startFlash();" or "stopFlash()";
stopFlash works, but startFlash doesn't

Any ideas?


page examples are at:
(to start the video click "welcome from the president" to close click yellow "close" button.   You'll see that close hides the swf but doesn't stop it.
swf starts automatically and can be stopped using the "stop" button (barely visible top left corner of screen) but can not be restarted using the "start" button.  Also barely visible top left corner of screen.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros