start an swf with javascript in dreamweaver

Drassyswew

New Member
What I'm trying to do is when the user enters the Konami Code upon visiting my site, a sound will play along with an SWF. At the moment, I am able to get the sound to play, but I'm having trouble making my SWF play. I turned off the Autoplay for the SWF. Is there a way to start the SWF when the user enters the Konami code?\[code\]<script type="text/javascript" src="https://raw.github.com/snaptortoise/konami-js/master/konami.js"></script><script type="text/javascript">var success = function(){ document.getElementById('mp3').play(); document.getElementById('top.swf').Play();}var konami = new Konami(success);</script><audio src="http://stackoverflow.com/questions/15476929/sound/sound.mp3" id="mp3" preload="auto"></audio>\[/code\]
 
Back
Top