...

View Full Version : insert flash using dom methods



violetleaf
06-12-2003, 09:31 PM
Hi,

I am trying to insert a swf movie using dom methods. The following is what I have. However, the movie does not start loading. Does anyone know how to make the movie load?

var xmlIc=document.createElement('object');
xmlIc.setAttribute('type','application/x-shockwave-flash');
xmlIc.setAttribute('data', '');
xmlIc.data=tagTitle1.firstChild.nodeValue;
xmlIc.setAttribute('width', '');
xmlIc.width="550";
xmlIc.setAttribute('height','');
xmlIc.height="400";

var paramIc=document.createElement('param');
paramIc.setAttribute('name','');
paramIc.name="movie";
paramIc.setAttribute('value','');
paramIc.value=tagTitle1.firstChild.nodeValue;
xmlIc.appendChild(paramIc);
bb.appendChild(xmlIc);
//bb is an HTMLDivElement

thanks

violet

violetleaf
06-12-2003, 10:29 PM
I got it with adding two lines of code.

tt=document.getElementById('interactive');
tt.LoadMovie(0, tagTitle1.firstChild.nodeValue);

yah!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum