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
|
$("#upBan").uploadify({
'uploader' : 'files/uploadify/uploadify.swf',
'script' : 'files/uploadify/uploadify.php',
'cancelImg' : 'images/cancel.png',
'folder' : 'uploads/banieres',
'queueID' : 'fileQueue',
'scriptData' : {'name':'112315.png'},
'auto' : true,
'multi' : false,
'onComplete' : function(e,q, f) {
fichier=f.name;
if(f.type!='.swf') {
$("#baniere").css("background-image", "url(uploads/banieres/"+fichier+")")
.html('');
} else if (f.type=='.swf') {
hBan=parseInt($("#tban").val());
htmlswf ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="1000" height="'+hBan+'" id="actu" align="middle">';
htmlswf +='<param name="allowScriptAccess" value="sameDomain" />';
htmlswf +='<param name="allowFullScreen" value="false" />';
htmlswf +='<param name="movie" value="uploads/banieres/'+fichier+'" />';
htmlswf +='<param name="quality" value="high" />';
htmlswf +='<param name="wmode" value="transparent" />';
htmlswf +='</object>';
htmlswf +='<script type="text/javascript">';
htmlswf +='var so = new SWFObject("uploads/banieres/'+fichier+'", "flashban", "1000", "'+hBan+'", "10", "#ffffff");';
htmlswf +='so.useExpressInstall(\'files/exprins.swf\');';
htmlswf +='so.addParam("wmode", "transparent");';
htmlswf +='so.write("baniere");';
htmlswf +="<\/script>";
htmlswf +="<div style=\"position:relative;\">Coucou</div>";
$("#baniere").css("background-image", "none");
$("#baniere").html(htmlswf);
}
$("#imgload").val(fichier);
}
}); |
Partager