1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
function centrageFlashContour (type,flashwidth,flashheight)
{
var flash = document.createElement("DIV");
flash.style.position = "absolute";
flash.style.width = flashwidth+"px";
flash.style.height = flashheight+"px";
flash.style.zIndex = 1;
if( type == 1 ) //en haut à gauche
{
flash.style.left = 200+"px";
flash.style.top = 100+"px";
}
if( type == 2 ) //en haut à droite
{
flash.style.right = 200+"px";
flash.style.top = 100+"px";
}
if( type == 3 ) //en bas à droite
{
flash.style.right = 200+"px";
flash.style.bottom = 100+"px";
}
if( type == 4 ) //en bas à gauche
{
flash.style.left = 200+"px";
flash.style.bottom = 100+"px";
}
flash.style.backgroundColor = "yellow";
document.body.appendChild(flash);
var baliseObject = document.createElement("object");
baliseObject.setAttribute("type","application/x-shockwave-flash");
baliseObject.setAttribute("data","blclock.swf");
baliseObject.setAttribute("width","200");
baliseObject.setAttribute("height","200");
flash.appendChild(baliseObject);
var baliseParam1 = document.createElement("param");
baliseParam1.setAttribute("name","movie");
baliseParam1.setAttribute("value","blclock.swf");
baliseObject.appendChild(baliseParam1);
var baliseParam2 = document.createElement("param");
baliseParam2.setAttribute("name","wmode");
baliseParam2.setAttribute("value","transparent");
baliseObject.appendChild(baliseParam2);
var baliseParam3 = document.createElement("param");
baliseParam3.setAttribute("name","quality");
baliseParam3.setAttribute("value","high");
baliseObject.appendChild(baliseParam3);
} |
Partager