943,699 Members | Top Members by Rank

Ad:
Mar 8th, 2005
0

Flash within DHTML

Expand Post »
Does anyone know if it is possible to place a .swf within a dhtml dropdown. For instance, On click drop down and externally load an swf within the dropdown. Any feedback would be great. Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mcricks is offline Offline
1 posts
since Mar 2005
Jul 11th, 2005
0

Re: Flash within DHTML

Quote originally posted by mcricks ...
Does anyone know if it is possible to place a .swf within a dhtml dropdown. For instance, On click drop down and externally load an swf within the dropdown. Any feedback would be great. Thanks
Yeah you would need to create an innerHTML script like so (not sure if the code is going to be scrambled here....

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. function loadFlash(theurl,width,height) {
  2. document.getElementById("divname").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="'+ width + '" height="'+ height + '"><param name="movie" value=" '+ theurl + '" /><param name="quality" value="high" /><param name="SCALE" value="exactfit" /><embed src="'+ theurl + '" width="'+ width + '" height="'+ height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="exactfit" /><\/embed><\/object>';
  3. }


Then call the loadflash function from the onmousedown event in your menus like so

onmousedown="loadFlash('music.swf',80,60)"

I use this method to progressively load music on my DHTML Nirvana site and also load the flash movies.

Eddie Traversa

DHTML Nirvana

http://dhtmlnirvana.com/

Spiritual Blog

http://www.truthrealization.com/
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Eddie Traversa is offline Offline
20 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Javascript generated drop down menu
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: IFRAMES as a buffer





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC