View Full Version : How Do These Buttons Work !!!!???
ajr901
07 Jun 2008, 12:52 PM
Go TO:http://www.discovermoneymerge.com/demo
and on the left you will see a video in flash and on the right of the video you will see three buttons. What i want to know is how the web developers to that site make it so that when click on the three buttons to the right, the flash video changes and the rest of the page doesn't reload with it. Only the flash video changes and nothing else. I also know that the buttons are just images and that some how they are assigned some code that when you rollover them it makes to button interactive and it switches to a different image that makes it appear highlighted.
WebNola
07 Jun 2008, 01:06 PM
Here's your clue:
"
onclick="displayMovie('step1');"
Here's your answer:
Found in http://www.discovermoneymerge.com/js/main.js
function displayMovie( id ) {
if ( id == "step1" ) {
document.getElementById("movie").innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="550" height="400" vspace="0" hspace="0"> <param name="wmode" value="transparent"> <param name="movie" value="http://bitcast-a.bitgravity.com/u1st/Replicated/news3_web003_VP6_384K.swf"><param name="play" value="true"><param name="loop" value="false"><param name="quality" value="High"><param name="_cx" value="5080"><param name="_cy" value="5080"><param name="src" value="http://bitcast-a.bitgravity.com/u1st/Replicated/news3_web003_VP6_384K.swf"><param name="WMode" value="Window"><param name="Menu" value="true"><param name="Scale" value="ShowAll"><param name="DeviceFont" value="false"><param name="EmbedMovie" value="false"><param name="SeamlessTabbing" value="true"><param name="Profile" value="false"><param name="ProfilePort" value="0"><param name="AllowNetworking" value="all"><param name="AllowFullScreen" value="false"><embed wmode="transparent" width="550" height="400" src="http://bitcast-a.bitgravity.com/u1st/Replicated/news3_web003_VP6_384K.swf" play="true" loop="false" quality="High" WMode="Window" Menu="true" Scale="ShowAll" DeviceFont="false" EmbedMovie="false" SeamlessTabbing="true" Profile="false" ProfilePort="0" AllowNetworking="all" AllowFullScreen="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></object>';
} else if ( id == "step2" ) {
document.getElementById("movie").innerHTML = '<embed wmode="transparent" loop="false" width="550" height="400" quality="high" allowScriptAccess="sameDomain"' + ' allowfullscreen="true" src="player/flvplayer.swf" flashvars="&file=http://bitcast-a.bitgravity.com/u1st/Replicated/UFF_15min.flv&autostart=true"' + ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>';
}
}
This is typical AJAX.
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.