User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,207 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,294 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2554 | Replies: 1
Reply
Join Date: Mar 2005
Posts: 1
Reputation: mcricks is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mcricks mcricks is offline Offline
Newbie Poster

Flash within DHTML

  #1  
Mar 8th, 2005
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Australia
Posts: 19
Reputation: Eddie Traversa is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Eddie Traversa Eddie Traversa is offline Offline
Newbie Poster

Solution Re: Flash within DHTML

  #2  
Jul 11th, 2005
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....

function loadFlash(theurl,width,height) {
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>';
}


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/
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 2:49 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC