flash.htm 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Flash动画属性</TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. <style type="text/css">
  6. body, a, table, div, span, td, th, input, select{font:9pt;font-family: "宋体", Verdana, Arial, Helvetica, sans-serif;}
  7. body {padding:5px}
  8. </style>
  9. <script language="JavaScript" src="dialog.js"></script>
  10. <script language="JavaScript">
  11. // 图片来源单先点击事件
  12. function RadioClick(what){
  13. if (what=="url"){
  14. d_checkfromfile.checked=false;
  15. d_fromurl.disabled=false;
  16. d_checkfromurl.checked=true;
  17. d_file.myform.uploadfile.disabled=true;
  18. }else{
  19. d_checkfromurl.checked=false;
  20. d_file.myform.uploadfile.disabled=false;
  21. d_checkfromfile.checked=true;
  22. d_fromurl.disabled=true;
  23. }
  24. }
  25. // 上传帧调入完成时执行
  26. function UploadLoaded(){
  27. // 初始radio
  28. RadioClick('file');
  29. }
  30. // 上传错误
  31. function UploadError(sErrDesc){
  32. AbleItems();
  33. RadioClick('file');
  34. divProcessing.style.display="none";
  35. try {
  36. BaseAlert(d_file.myform.uploadfile,sErrDesc);
  37. }
  38. catch(e){}
  39. }
  40. // 文件上传完成时执行,带入上传文件名
  41. function UploadSaved(sFileName){
  42. d_fromurl.value=GetHttpUrl(config.StyleUploadDir+"/"+sFileName);
  43. ReturnValue();
  44. }
  45. // 本窗口返回值
  46. function ReturnValue(){
  47. var sFromUrl = d_fromurl.value;
  48. var sWidth = d_width.value;
  49. var sHeight = d_height.value;
  50. var sHTML = "<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
  51. if (sWidth!="") sHTML+=" width="+sWidth;
  52. if (sHeight!="") sHTML+=" height="+sHeight;
  53. sHTML+="><PARAM NAME=movie VALUE='"+sFromUrl+"'><PARAM NAME=quality VALUE=high><embed src='"+sFromUrl+"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'";
  54. if (sWidth!="") sHTML+=" width="+sWidth;
  55. if (sHeight!="") sHTML+=" height="+sHeight;
  56. sHTML+=">"+sFromUrl+"</embed></OBJECT>";
  57. dialogArguments.insertHTML(sHTML);
  58. window.returnValue = null;
  59. window.close();
  60. }
  61. // 点确定时执行
  62. function ok(){
  63. // 数字型输入的有效性
  64. d_width.value=ToInt(d_width.value);
  65. d_height.value=ToInt(d_height.value);
  66. if (d_checkfromurl.checked){
  67. // 返回值
  68. ReturnValue();
  69. }else{
  70. // 上传文件判断
  71. if (!d_file.CheckUploadForm()) return false;
  72. // 使各输入框无效
  73. DisableItems();
  74. // 显示正在上传图片
  75. divProcessing.style.display="";
  76. // 上传表单提交
  77. d_file.myform.submit();
  78. }
  79. }
  80. // 使所有输入框无效
  81. function DisableItems(){
  82. d_checkfromfile.disabled=true;
  83. d_checkfromurl.disabled=true;
  84. d_fromurl.disabled=true;
  85. d_width.disabled=true;
  86. d_height.disabled=true;
  87. Ok.disabled=true;
  88. }
  89. // 使所有输入框有效
  90. function AbleItems(){
  91. d_checkfromfile.disabled=false;
  92. d_checkfromurl.disabled=false;
  93. d_fromurl.disabled=false;
  94. d_width.disabled=false;
  95. d_height.disabled=false;
  96. Ok.disabled=false;
  97. }
  98. </script>
  99. </HEAD>
  100. <BODY bgColor=menu>
  101. <table border=0 cellpadding=0 cellspacing=0>
  102. <tr>
  103. <td>
  104. <fieldset>
  105. <legend>Flash来源</legend>
  106. <table border=0 cellpadding=0 cellspacing=0>
  107. <tr><td colspan=9 height=5></td></tr>
  108. <tr>
  109. <td width=7></td>
  110. <td width=54 align=right onclick="RadioClick('file')"><input type=radio id="d_checkfromfile" value="1" onclick="RadioClick('file')">上传:</td>
  111. <td width=5></td>
  112. <td colspan=5>
  113. <Script Language=JavaScript>
  114. document.write('<iframe id=d_file frameborder=0 src="../upload.jsp?type=flash&style=' + config.StyleName + '" width="100%" height="22" scrolling=no></iframe>');
  115. </Script>
  116. </td>
  117. <td width=7></td>
  118. </tr>
  119. <tr><td colspan=9 height=5></td></tr>
  120. <tr>
  121. <td width=7></td>
  122. <td width=54 align=right onclick="RadioClick('url')"><input type=radio id="d_checkfromurl" value="1" onclick="RadioClick('url')">网络:</td>
  123. <td width=5></td>
  124. <td colspan=5><input type=text id="d_fromurl" style="width:243px" size=30 value="http://"></td>
  125. <td width=7></td>
  126. </tr>
  127. <tr><td colspan=9 height=5></td></tr>
  128. </table>
  129. </fieldset>
  130. </td>
  131. </tr>
  132. <tr><td height=5></td></tr>
  133. <tr>
  134. <td>
  135. <fieldset>
  136. <legend>显示效果</legend>
  137. <table border=0 cellpadding=0 cellspacing=0>
  138. <tr><td colspan=9 height=5></td></tr>
  139. <tr>
  140. <td width=7></td>
  141. <td noWrap>显示宽度:</td>
  142. <td width=5></td>
  143. <td><input type=text id=d_width size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
  144. <td width=40></td>
  145. <td noWrap>显示高度:</td>
  146. <td width=5></td>
  147. <td><input type=text id=d_height size=10 value="" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=4></td>
  148. <td width=7></td>
  149. </tr>
  150. <tr><td colspan=9 height=5></td></tr>
  151. </table>
  152. </fieldset>
  153. </td>
  154. </tr>
  155. <tr><td height=5></td></tr>
  156. <tr><td align=right><input type=submit value=' 确定 ' id=Ok onclick="ok()">&nbsp;&nbsp;<input type=button value=' 取消 ' onclick="window.close();"></td></tr>
  157. </table>
  158. <div id=divProcessing style="width:200px;height:30px;position:absolute;left:70px;top:50px;display:none">
  159. <table border=0 cellpadding=0 cellspacing=1 bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor=#3A6EA5><marquee align="middle" behavior="alternate" scrollamount="5"><font color=#FFFFFF>...文件上传中...请等待...</font></marquee></td></tr></table>
  160. </div>
  161. </body>
  162. </html>