zinemaker2007无法直接打开index.swf的解决方法

[复制链接]
查看1868 | 回复2 | 2010-1-19 20:54:23 | 显示全部楼层 |阅读模式
来自古树boog 谢谢古树
  1. onEnterFrame = function ()
  2. {
  3. LB = getBytesLoaded();
  4. TB = getBytesTotal();
  5. PC = LB / TB * 100;
  6. loaderbar.setbar(PC);
  7. if (_root.online)
  8. {
  9. if (TB > 4 && PC == 100 && pagesInfoLoaded && pageflipLoaded && xplusLoaded)
  10. {
  11. if (X_Plus || debug_mode == "true")
  12. {
  13. var _loc22 = function ()
  14. {
  15. var _loc2 = _root.createTextField("debug_txt", 18999, 50, 150, 300, 400);
  16. _loc2.background = true;
  17. _loc2.border = true;
  18. _loc2.wordWrap = true;
  19. _loc2.text = "";
  20. };
  21. var sendDataBuffer = function ()
  22. {
  23. fscommand("readline", "root_data_buffer_str");
  24. _root.debug_txt.text = _root.debug_txt.text + "获取离线数据……\n\n";
  25. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  26. var send_lv = new LoadVars();
  27. var _loc2 = _root.createEmptyMovieClip("root_data_buffer_mc", 10011);
  28. _loc2.onEnterFrame = function ()
  29. {
  30. if (_root.root_data_buffer_str != "[eof]")
  31. {
  32. if (_root.root_data_buffer_str != "")
  33. {
  34. send_lv.sendAndLoad(_root.root_data_buffer_str + "&selfflag=" + selfflag + "&FBState=offlineexe&ranstr=" + ranStr(32), send_lv, "post");
  35. _root.debug_txt.text = _root.debug_txt.text + ("获取到并发送离线数据:\n" + _root.root_data_buffer_str + "&selfflag=" + selfflag + "&FBState=offlineexe" + "\n\n");
  36. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  37. _root.root_data_buffer_mc.removeMovieClip();
  38. } // end if
  39. }
  40. else
  41. {
  42. _root.debug_txt.text = _root.debug_txt.text + "无离线数据~\n\n";
  43. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  44. _root.root_data_buffer_mc.removeMovieClip();
  45. } // end else if
  46. };
  47. send_lv.onData = function (data_str)
  48. {
  49. if (data_str == undefined || data_str != "ok")
  50. {
  51. _root.debug_txt.text = _root.debug_txt.text + ("发送失败,保存离线数据:\n" + _root.root_data_buffer_str + "\n\n");
  52. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  53. getURL("FSCommand:writeline", _root.root_data_buffer_str);
  54. _root.root_data_buffer_str = "";
  55. }
  56. else
  57. {
  58. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",离线数据提交成功!\n\n");
  59. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  60. _root.root_data_buffer_str = "";
  61. sendDataBuffer();
  62. } // end else if
  63. };
  64. };
  65. if (debug_mode == "true")
  66. {
  67. _loc22();
  68. } // end if
  69. System.security.allowDomain("*");
  70. System.security.allowInsecureDomain("*");
  71. var FBState = function ()
  72. {
  73. if (_root.online)
  74. {
  75. return ("onlineswf");
  76. }
  77. else
  78. {
  79. return ("onlineexe");
  80. } // end else if
  81. };
  82. var ad_url_str = "http://xp-adms.xplus.com.cn/ads_policy_new.php?per=";
  83. var con_str = ".";
  84. _root.zine_str = zine || "zine";
  85. _root.magname_str = magname || "zine";
  86. var uid_str = uid || "";
  87. var guid_str = guid || "";
  88. var _loc13 = g_diskID || "";
  89. var _loc12 = g_macAddr || "";
  90. var _loc24 = g_systemDir || "C:/WINDOWS/system32";
  91. if (_loc13 == "" && _loc12 == "")
  92. {
  93. var cpuid_str = "";
  94. }
  95. else
  96. {
  97. var cpuid_str = _loc13 + "||" + _loc12;
  98. } // end else if
  99. _root.debug_txt.text = _root.debug_txt.text + ("硬盘ID:" + _loc13 + "\n网卡地址:" + _loc12 + "\n\n");
  100. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  101. _root.magidno_str = magidno || "";
  102. var ver_str = ver || "";
  103. var site = site || "";
  104. var selfflag = selfflag || "maga";
  105. if (__registered == 1)
  106. {
  107. selfflag = "xplus";
  108. } // end if
  109. var ranStr = function (length_num)
  110. {
  111. var _loc2 = "";
  112. for (var _loc1 = 0; _loc1 < length_num; ++_loc1)
  113. {
  114. _loc2 = _loc2 + String((Math.random() * 36).toString(36));
  115. } // end of for
  116. return (_loc2);
  117. };
  118. var checkOfflineAd = function ()
  119. {
  120. _root.debug_txt.text = _root.debug_txt.text + "○检查离线广告:\n\n";
  121. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  122. var _loc3 = true;
  123. for (var _loc2 = 0; _loc2 < _root.pagesXML.childNodes.length; ++_loc2)
  124. {
  125. if (_root.pagesXML.childNodes[_loc2].attributes.AdFile.length > 1)
  126. {
  127. _root.debug_txt.text = _root.debug_txt.text + ("○发现离线广告: \n○跨页:" + _loc2 + "\n○AdFile:" + _root.pagesXML.childNodes[_loc2].attributes.AdFile + "\n○AdId:" + _root.pagesXML.childNodes[_loc2].attributes.AdId + "\n\n");
  128. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  129. _loc3 = false;
  130. ad_id_array[_loc2] = new Array("", _root.pagesXML.childNodes[_loc2].attributes.AdFile, _root.pagesXML.childNodes[_loc2].attributes.AdId, _loc2);
  131. } // end if
  132. } // end of for
  133. if (_loc3)
  134. {
  135. _root.debug_txt.text = _root.debug_txt.text + "○未发现离线广告,播放默认包死广告。 \n\n";
  136. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  137. ad_id_array[3] = new Array("", "xplus_ad.swf", "default", "3");
  138. } // end if
  139. };
  140. var _loc23;
  141. var ad_files_array = new Array();
  142. var ad_id_array = new Array();
  143. var loadAdData = function ()
  144. {
  145. var _loc3 = ad_url_str + zine_str + con_str + magname_str + con_str + uid_str + con_str + guid_str + con_str + cpuid_str + con_str + magidno_str + con_str + ver_str;
  146. _root.debug_txt.text = _root.debug_txt.text + ("请求广告数据: " + _loc3 + "&selfflag=" + selfflag + "\n\n");
  147. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  148. var _loc2 = new LoadVars();
  149. _loc2.sendAndLoad(_loc3 + "&selfflag=" + selfflag + "&ranstr=" + ranStr(32), _loc2, "post");
  150. _loc2.onHTTPStatus = function (http_num)
  151. {
  152. if (http_num != 200)
  153. {
  154. } // end if
  155. };
  156. _loc2.onData = function (data_str)
  157. {
  158. if (data_str != undefined)
  159. {
  160. if (data_str != "-1")
  161. {
  162. _root.debug_txt.text = _root.debug_txt.text + ("收到广告数据: " + data_str + "\n\n");
  163. dataToArray(data_str);
  164. arrayToObject();
  165. checkAd(_root.page);
  166. preLoadAd();
  167. }
  168. else
  169. {
  170. _root.debug_txt.text = _root.debug_txt.text + "收到广告数据:-1\n不飘广告,不检查离线广告。\n\n";
  171. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  172. } // end else if
  173. }
  174. else
  175. {
  176. _root.debug_txt.text = _root.debug_txt.text + "未收到广告数据!\n尝试检查离线广告。\n\n";
  177. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  178. checkOfflineAd();
  179. } // end else if
  180. };
  181. };
  182. if (!_root.online)
  183. {
  184. _root.debug_txt.text = _root.debug_txt.text + ("☆当前不在线,读取 " + _root.g_systemDir + "/xu.txt:\n\n");
  185. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  186. var _loc14 = new LoadVars();
  187. _loc14.load(_root.g_systemDir + "/xu.txt");
  188. _loc14.onData = function (xu_str)
  189. {
  190. if (xu_str != undefined)
  191. {
  192. _root.debug_txt.text = _root.debug_txt.text + "☆xu.txt 存在!\n\n";
  193. var _loc3 = xu_str.split("&");
  194. for (var _loc2 = 0; _loc2 < _loc3.length; ++_loc2)
  195. {
  196. if (_loc3[_loc2].indexOf("uid") == 0)
  197. {
  198. uid_str = _loc3[_loc2].slice(4);
  199. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到uid: " + uid_str + "\n");
  200. continue;
  201. } // end if
  202. if (_loc3[_loc2].indexOf("guid") == 0)
  203. {
  204. guid_str = _loc3[_loc2].slice(5);
  205. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到guid: " + guid_str + "\n");
  206. continue;
  207. } // end if
  208. if (_loc3[_loc2].indexOf("cpuid") == 0)
  209. {
  210. cpuid_str = _loc3[_loc2].slice(6);
  211. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到cpuid: " + cpuid_str + "\n");
  212. continue;
  213. } // end if
  214. if (_loc3[_loc2].indexOf("ver") == 0)
  215. {
  216. ver_str = _loc3[_loc2].slice(4);
  217. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到ver: " + ver_str + "\n");
  218. } // end if
  219. } // end of for
  220. _root.debug_txt.text = _root.debug_txt.text + "☆xu.txt 读取完毕!\n\n";
  221. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  222. loadAdData();
  223. }
  224. else
  225. {
  226. _root.debug_txt.text = _root.debug_txt.text + "☆xu.txt 不存在!\n\n";
  227. loadAdData();
  228. } // end else if
  229. };
  230. _root.debug_txt.text = _root.debug_txt.text + ("打开离线数据文件:\n" + g_systemDir + "\\subbuffer.sl\n\n");
  231. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  232. getURL("FSCommand:open", g_systemDir + "\\subbuffer.sl");
  233. sendDataBuffer();
  234. }
  235. else
  236. {
  237. _root.debug_txt.text = _root.debug_txt.text + "☆当前在线,不读取cpuid!\n\n";
  238. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  239. loadAdData();
  240. } // end else if
  241. var root_page = 0;
  242. _root.onPageFlip = function (state, page)
  243. {
  244. if (state == 0)
  245. {
  246. if (root_page != page)
  247. {
  248. checkAd(page);
  249. sendTimes(root_page);
  250. } // end if
  251. }
  252. else if (state == 2 && page == 0 || state == 1 && page == _root.maxpage)
  253. {
  254. removeAd(0);
  255. sendTimes(_root.page);
  256. }
  257. else
  258. {
  259. root_page = _root.page;
  260. } // end else if
  261. };
  262. _root.postButton = function (name_str)
  263. {
  264. var _loc2 = new LoadVars();
  265. var data_buffer_str = "http://xp-adms.xplus.com.cn/online_paper_button_click.php?uid=" + uid_str + "&guid=" + guid_str + "&cpuid=" + cpuid_str + "&magidno=" + magidno_str + "&mag_name=" + magname_str + "&ver=" + ver_str + "&site=" + site + "&pno=" + _root.page / 2 + "&btn=" + name_str;
  266. _loc2.sendAndLoad(data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32), _loc2, "post");
  267. _root.debug_txt.text = _root.debug_txt.text + ("发送按钮点击数据\n" + data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "\n\n");
  268. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  269. _loc2.onData = function (data_str)
  270. {
  271. if (data_str == undefined || data_str != "ok")
  272. {
  273. _root.debug_txt.text = _root.debug_txt.text + ("按钮数据提交失败,保存地址:\n" + data_buffer_str + "\n\n");
  274. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  275. getURL("FSCommand:writeline", data_buffer_str);
  276. }
  277. else
  278. {
  279. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",按钮数据提交成功!\n\n");
  280. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  281. } // end else if
  282. };
  283. };
  284. var dataToArray = function (data_str)
  285. {
  286. ad_files_array = data_str.split("#");
  287. if (ad_files_array[ad_files_array.length - 1].length < 3)
  288. {
  289. ad_files_array.pop();
  290. } // end if
  291. };
  292. var arrayToObject = function ()
  293. {
  294. for (var _loc1 = 0; _loc1 < ad_files_array.length; ++_loc1)
  295. {
  296. var _loc2 = ad_files_array[_loc1].split("|")[0].slice(ad_files_array[_loc1].lastIndexOf("/") + 1);
  297. var _loc3 = ad_files_array[_loc1].split("|")[0].slice(0, ad_files_array[_loc1].lastIndexOf("/") + 1);
  298. ad_id_array[Number(_loc2)] = new Array();
  299. ad_id_array[Number(_loc2)][0] = _loc3;
  300. ad_id_array[Number(_loc2)][1] = ad_files_array[_loc1].split("|")[2];
  301. ad_id_array[Number(_loc2)][2] = ad_files_array[_loc1].split("|")[1];
  302. ad_id_array[Number(_loc2)][3] = _loc2;
  303. } // end of for
  304. };
  305. var preload_id = 0;
  306. var preLoadAd = function ()
  307. {
  308. var preload_mc = _root.createEmptyMovieClip("preload_mc", 19999);
  309. preload_mc._lockroot = true;
  310. preload_mc._y = 5000;
  311. preload_mc._visible = false;
  312. var _loc4 = new Sound(preload_mc);
  313. _loc4.setVolume(0);
  314. var preload_mcl = new MovieClipLoader();
  315. var _loc3 = new Object();
  316. _loc3.onLoadComplete = function (target_mc)
  317. {
  318. _root.debug_txt.text = _root.debug_txt.text + "预加载完毕.\n\n";
  319. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  320. if (preload_id == ad_id_array.length)
  321. {
  322. _root.debug_txt.text = _root.debug_txt.text + "全部预加载完毕.\n\n";
  323. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  324. preload_mc.removeMovieClip();
  325. } // end if
  326. for (var _loc2 = preload_id; _loc2 < ad_id_array.length; ++_loc2)
  327. {
  328. if (ad_id_array[_loc2] != undefined)
  329. {
  330. preload_mcl.loadClip(ad_id_array[_loc2][0] + ad_id_array[_loc2][1], preload_mc);
  331. _root.debug_txt.text = _root.debug_txt.text + ("预加载广告" + _loc2 + ":" + ad_id_array[_loc2][0] + ad_id_array[_loc2][1] + "\n");
  332. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  333. preload_id = _loc2 + 1;
  334. break;
  335. } // end if
  336. } // end of for
  337. };
  338. preload_mcl.addListener(_loc3);
  339. for (var _loc2 = preload_id; _loc2 < ad_id_array.length; ++_loc2)
  340. {
  341. if (ad_id_array[_loc2] != undefined)
  342. {
  343. preload_mcl.loadClip(ad_id_array[_loc2][0] + ad_id_array[_loc2][1], preload_mc);
  344. _root.debug_txt.text = _root.debug_txt.text + ("预加载广告" + _loc2 + ":" + ad_id_array[_loc2][0] + ad_id_array[_loc2][1] + "\n");
  345. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  346. preload_id = _loc2 + 1;
  347. break;
  348. } // end if
  349. } // end of for
  350. };
  351. _root.closeWin = function (null_str)
  352. {
  353. if (null_str != "null")
  354. {
  355. _root.debug_txt.text = _root.debug_txt.text + "一秒时间到,执行关闭。\n";
  356. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  357. } // end if
  358. fscommand("quit");
  359. clearInterval(_root.closeInterval);
  360. };
  361. _root.sendTimes = function (page_num, flag_str)
  362. {
  363. if (flag_str == "close")
  364. {
  365. if (_root.online)
  366. {
  367. _root.debug_txt.text = _root.debug_txt.text + "一秒钟后关闭杂志!\n\n";
  368. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  369. _root.closeInterval = setInterval(_root.closeWin, 1000);
  370. }
  371. else
  372. {
  373. fscommand("hide");
  374. } // end if
  375. } // end else if
  376. var _loc2 = new LoadVars();
  377. var data_buffer_str = "http://xp-adms.xplus.com.cn/online_paper_page_read.php?uid=" + uid_str + "&guid=" + guid_str + "&cpuid=" + cpuid_str + "&magidno=" + magidno_str + "&mag_name=" + magname_str + "&ver=" + ver_str + "&site=" + site + "&pno=" + page_num / 2 + "&pt=" + _root.g_pageTimeArray[page_num];
  378. _loc2.sendAndLoad(data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32), _loc2, "post");
  379. _root.debug_txt.text = _root.debug_txt.text + ("发送页面浏览时间\n" + data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "\n\n");
  380. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  381. _root.g_pageTimeArray[page_num] = 0;
  382. _loc2.onData = function (data_str)
  383. {
  384. if (data_str == undefined || data_str != "ok")
  385. {
  386. _root.debug_txt.text = _root.debug_txt.text + ("页面数据提交失败,保存地址:\n" + data_buffer_str + "\n\n");
  387. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  388. getURL("FSCommand:writeline", data_buffer_str);
  389. if (flag_str == "close")
  390. {
  391. _root.debug_txt.text = _root.debug_txt.text + "提交当页数据失败,执行关闭。\n";
  392. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  393. _root.closeWin("null");
  394. } // end if
  395. }
  396. else
  397. {
  398. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",页面数据提交成功!\n\n");
  399. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  400. if (flag_str == "close")
  401. {
  402. _root.debug_txt.text = _root.debug_txt.text + "提交当页数据成功,执行关闭。\n";
  403. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  404. _root.closeWin("null");
  405. } // end if
  406. } // end else if
  407. };
  408. };
  409. var loadAd = function (ad_array)
  410. {
  411. var _loc5 = _root.pages.pp.createEmptyMovieClip("ad_mc", 10001);
  412. var _loc4 = new MovieClipLoader();
  413. var _loc3 = new Object();
  414. _loc3.onLoadInit = function ()
  415. {
  416. var _loc2 = new LoadVars();
  417. var data_buffer_str = "http://xp-adms.xplus.com.cn/ads_paper_jump_new.php?filename=" + ad_array[1] + "&adver_id=" + ad_array[2] + "&adver_pos=" + ad_array[3] + "&uid=" + uid_str + "&guid=" + guid_str + "&cpuid=" + cpuid_str + "&magidno=" + magidno_str + "&mag_name=" + magname_str + "&ver=" + ver_str + "&site=" + site;
  418. _loc2.sendAndLoad(data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32), _loc2, "post");
  419. _root.debug_txt.text = _root.debug_txt.text + ("返回广告数据:" + data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32) + "\n\n");
  420. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  421. _loc2.onData = function (data_str)
  422. {
  423. if (data_str == undefined || data_str != "ok")
  424. {
  425. _root.debug_txt.text = _root.debug_txt.text + ("广告数据提交失败,保存地址:\n" + data_buffer_str + "\n\n");
  426. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  427. getURL("FSCommand:writeline", data_buffer_str);
  428. }
  429. else
  430. {
  431. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",广告数据提交成功!\n\n");
  432. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  433. } // end else if
  434. };
  435. };
  436. _loc4.addListener(_loc3);
  437. _loc4.loadClip(ad_array[0] + ad_array[1], _loc5);
  438. _root.pageSound(0);
  439. _root.debug_txt.text = _root.debug_txt.text + ("载入广告:" + ad_array[0] + ad_array[1] + "\n\n");
  440. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  441. };
  442. _root.reLoadPage = function ()
  443. {
  444. _root.debug_txt.text = _root.debug_txt.text + ("重新加载页面:" + _root.pages.pp.ppp._url.split("/")[_root.pages.pp.ppp._url.split("/").length - 1] + "\n\n");
  445. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  446. _root.pages.pp.ppp.unloadMovie();
  447. _root.pages.pp.ppp.loadMovie(_root.pages.pp.ppp._url.split("/")[_root.pages.pp.ppp._url.split("/").length - 1]);
  448. };
  449. _root.removeAd = function (del_num)
  450. {
  451. if (del_num != 0)
  452. {
  453. _root.reLoadPage();
  454. } // end if
  455. _root.debug_txt.text = _root.debug_txt.text + ("删除前广告:" + _root.pages.pp.ad_mc + "[" + _root.pages.pp.ad_mc.getDepth() + "]" + _root.pages.pp.ad_mc._width + "\n\n");
  456. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  457. _root.pages.pp.createEmptyMovieClip("ad_mc", 1001);
  458. _root.pageSound(100);
  459. _root.debug_txt.text = _root.debug_txt.text + ("删除后广告:" + _root.pages.pp.ad_mc + "[" + _root.pages.pp.ad_mc.getDepth() + "]" + _root.pages.pp.ad_mc._width + "\n\n");
  460. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  461. };
  462. _root.pageSound = function (snd_num)
  463. {
  464. var _loc2 = new Sound(_root.pages.pp.ppp);
  465. var ad_snd = new Sound(_root.pages.pp.ad_mc);
  466. _root.debug_txt.text = _root.debug_txt.text + ("设置音量前:" + _loc2.getVolume() + "\n广告音量:" + ad_snd.getVolume() + "\n\n");
  467. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  468. var onEnterFrame_mc = _root.createEmptyMovieClip("onEnterFrame_mc", 82);
  469. onEnterFrame_mc.onEnterFrame = function ()
  470. {
  471. if (_root.pages.pp.ppp.getBytesLoaded() > 0 || _root.pages.pp.ppp._width > 0)
  472. {
  473. var _loc2 = new Sound(_root.pages.pp.ppp);
  474. _loc2.setVolume(snd_num);
  475. ad_snd.setVolume(100);
  476. _root.debug_txt.text = _root.debug_txt.text + ("设置音量后:" + snd_num + "->" + _loc2.getVolume() + "\n广告音量:" + ad_snd.getVolume() + "\n\n");
  477. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  478. onEnterFrame_mc.removeMovieClip();
  479. } // end if
  480. };
  481. };
  482. var checkAd = function (page_num)
  483. {
  484. removeAd();
  485. _root.debug_txt.text = _root.debug_txt.text + "检查该页是否有广告……\n";
  486. if (ad_id_array[page_num / 2] != undefined)
  487. {
  488. _root.debug_txt.text = _root.debug_txt.text + "该页有广告!\n";
  489. loadAd(ad_id_array[page_num / 2]);
  490. }
  491. else
  492. {
  493. _root.debug_txt.text = _root.debug_txt.text + "该页无广告!\n\n";
  494. } // end else if
  495. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  496. };
  497. _root.btnEnabled = function (s)
  498. {
  499. if (s)
  500. {
  501. _root.debug_txt.text = _root.debug_txt.text + "控制按钮启用\n\n";
  502. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  503. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  504. Mouse.addListener(mousecontroll);
  505. Key.addListener(_root);
  506. buttons.face_mc.enabled = true;
  507. buttons.back_mc.enabled = true;
  508. buttons.contents_mc.enabled = true;
  509. buttons.btn_prev.enabled = true;
  510. buttons.btn_next.btn_next.enabled = true;
  511. delete buttons.page_btn.onRollOver;
  512. }
  513. else
  514. {
  515. _root.debug_txt.text = _root.debug_txt.text + "控制按钮禁用\n\n";
  516. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  517. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  518. Mouse.removeListener(mousecontroll);
  519. Key.removeListener(_root);
  520. buttons.face_mc.enabled = false;
  521. buttons.back_mc.enabled = false;
  522. buttons.contents_mc.enabled = false;
  523. buttons.btn_prev.enabled = false;
  524. buttons.btn_next.btn_next.enabled = false;
  525. buttons.page_btn.onRollOver = function ()
  526. {
  527. this.useHandCursor = false;
  528. };
  529. } // end else if
  530. };
  531. } // end if
  532. delete onEnterFrame;
  533. getURL("FSCommand:fullscreen", fullscreen);
  534. gotoAndPlay(15);
  535. } // end if
  536. }
  537. else if (TB > 4 && PC == 100 && pagesInfoLoaded && pageflipLoaded && g_bXplus != undefined)
  538. {
  539. if (g_bXplus == "1" || debug_mode == "true")
  540. {
  541. if (g_systemDir != undefined && g_diskID != undefined && g_macAddr != undefined)
  542. {
  543. _loc22 = function ()
  544. {
  545. var _loc2 = _root.createTextField("debug_txt", 18999, 50, 150, 300, 400);
  546. _loc2.background = true;
  547. _loc2.border = true;
  548. _loc2.wordWrap = true;
  549. _loc2.text = "";
  550. };
  551. var sendDataBuffer = function ()
  552. {
  553. fscommand("readline", "root_data_buffer_str");
  554. _root.debug_txt.text = _root.debug_txt.text + "获取离线数据……\n\n";
  555. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  556. var send_lv = new LoadVars();
  557. var _loc2 = _root.createEmptyMovieClip("root_data_buffer_mc", 10011);
  558. _loc2.onEnterFrame = function ()
  559. {
  560. if (_root.root_data_buffer_str != "[eof]")
  561. {
  562. if (_root.root_data_buffer_str != "")
  563. {
  564. send_lv.sendAndLoad(_root.root_data_buffer_str + "&selfflag=" + selfflag + "&FBState=offlineexe&ranstr=" + ranStr(32), send_lv, "post");
  565. _root.debug_txt.text = _root.debug_txt.text + ("获取到并发送离线数据:\n" + _root.root_data_buffer_str + "&selfflag=" + selfflag + "&FBState=offlineexe" + "\n\n");
  566. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  567. _root.root_data_buffer_mc.removeMovieClip();
  568. } // end if
  569. }
  570. else
  571. {
  572. _root.debug_txt.text = _root.debug_txt.text + "无离线数据~\n\n";
  573. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  574. _root.root_data_buffer_mc.removeMovieClip();
  575. } // end else if
  576. };
  577. send_lv.onData = function (data_str)
  578. {
  579. if (data_str == undefined || data_str != "ok")
  580. {
  581. _root.debug_txt.text = _root.debug_txt.text + ("发送失败,保存离线数据:\n" + _root.root_data_buffer_str + "\n\n");
  582. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  583. getURL("FSCommand:writeline", _root.root_data_buffer_str);
  584. _root.root_data_buffer_str = "";
  585. }
  586. else
  587. {
  588. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",离线数据提交成功!\n\n");
  589. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  590. _root.root_data_buffer_str = "";
  591. sendDataBuffer();
  592. } // end else if
  593. };
  594. };
  595. if (debug_mode == "true")
  596. {
  597. _loc22();
  598. } // end if
  599. System.security.allowDomain("*");
  600. System.security.allowInsecureDomain("*");
  601. var FBState = function ()
  602. {
  603. if (_root.online)
  604. {
  605. return ("onlineswf");
  606. }
  607. else
  608. {
  609. return ("onlineexe");
  610. } // end else if
  611. };
  612. var ad_url_str = "http://xp-adms.xplus.com.cn/ads_policy_new.php?per=";
  613. var con_str = ".";
  614. _root.zine_str = zine || "zine";
  615. _root.magname_str = magname || "zine";
  616. var uid_str = uid || "";
  617. var guid_str = guid || "";
  618. _loc13 = g_diskID || "";
  619. _loc12 = g_macAddr || "";
  620. _loc24 = g_systemDir || "C:/WINDOWS/system32";
  621. if (_loc13 == "" && _loc12 == "")
  622. {
  623. var cpuid_str = "";
  624. }
  625. else
  626. {
  627. var cpuid_str = _loc13 + "||" + _loc12;
  628. } // end else if
  629. _root.debug_txt.text = _root.debug_txt.text + ("硬盘ID:" + _loc13 + "\n网卡地址:" + _loc12 + "\n\n");
  630. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  631. _root.magidno_str = magidno || "";
  632. var ver_str = ver || "";
  633. var site = site || "";
  634. var selfflag = selfflag || "maga";
  635. if (__registered == 1)
  636. {
  637. selfflag = "xplus";
  638. } // end if
  639. var ranStr = function (length_num)
  640. {
  641. var _loc2 = "";
  642. for (var _loc1 = 0; _loc1 < length_num; ++_loc1)
  643. {
  644. _loc2 = _loc2 + String((Math.random() * 36).toString(36));
  645. } // end of for
  646. return (_loc2);
  647. };
  648. var checkOfflineAd = function ()
  649. {
  650. _root.debug_txt.text = _root.debug_txt.text + "○检查离线广告:\n\n";
  651. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  652. var _loc3 = true;
  653. for (var _loc2 = 0; _loc2 < _root.pagesXML.childNodes.length; ++_loc2)
  654. {
  655. if (_root.pagesXML.childNodes[_loc2].attributes.AdFile.length > 1)
  656. {
  657. _root.debug_txt.text = _root.debug_txt.text + ("○发现离线广告: \n○跨页:" + _loc2 + "\n○AdFile:" + _root.pagesXML.childNodes[_loc2].attributes.AdFile + "\n○AdId:" + _root.pagesXML.childNodes[_loc2].attributes.AdId + "\n\n");
  658. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  659. _loc3 = false;
  660. ad_id_array[_loc2] = new Array("", _root.pagesXML.childNodes[_loc2].attributes.AdFile, _root.pagesXML.childNodes[_loc2].attributes.AdId, _loc2);
  661. } // end if
  662. } // end of for
  663. if (_loc3)
  664. {
  665. _root.debug_txt.text = _root.debug_txt.text + "○未发现离线广告,播放默认包死广告。 \n\n";
  666. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  667. ad_id_array[3] = new Array("", "xplus_ad.swf", "default", "3");
  668. } // end if
  669. };
  670. var ad_files_array = new Array();
  671. var ad_id_array = new Array();
  672. var loadAdData = function ()
  673. {
  674. var _loc3 = ad_url_str + zine_str + con_str + magname_str + con_str + uid_str + con_str + guid_str + con_str + cpuid_str + con_str + magidno_str + con_str + ver_str;
  675. _root.debug_txt.text = _root.debug_txt.text + ("请求广告数据: " + _loc3 + "&selfflag=" + selfflag + "\n\n");
  676. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  677. var _loc2 = new LoadVars();
  678. _loc2.sendAndLoad(_loc3 + "&selfflag=" + selfflag + "&ranstr=" + ranStr(32), _loc2, "post");
  679. _loc2.onHTTPStatus = function (http_num)
  680. {
  681. if (http_num != 200)
  682. {
  683. } // end if
  684. };
  685. _loc2.onData = function (data_str)
  686. {
  687. if (data_str != undefined)
  688. {
  689. if (data_str != "-1")
  690. {
  691. _root.debug_txt.text = _root.debug_txt.text + ("收到广告数据: " + data_str + "\n\n");
  692. dataToArray(data_str);
  693. arrayToObject();
  694. checkAd(_root.page);
  695. preLoadAd();
  696. }
  697. else
  698. {
  699. _root.debug_txt.text = _root.debug_txt.text + "收到广告数据:-1\n不飘广告,不检查离线广告。\n\n";
  700. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  701. } // end else if
  702. }
  703. else
  704. {
  705. _root.debug_txt.text = _root.debug_txt.text + "未收到广告数据!\n尝试检查离线广告。\n\n";
  706. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  707. checkOfflineAd();
  708. } // end else if
  709. };
  710. };
  711. if (!_root.online)
  712. {
  713. _root.debug_txt.text = _root.debug_txt.text + ("☆当前不在线,读取 " + _root.g_systemDir + "/xu.txt:\n\n");
  714. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  715. _loc14 = new LoadVars();
  716. _loc14.load(_root.g_systemDir + "/xu.txt");
  717. _loc14.onData = function (xu_str)
  718. {
  719. if (xu_str != undefined)
  720. {
  721. _root.debug_txt.text = _root.debug_txt.text + "☆xu.txt 存在!\n\n";
  722. var _loc3 = xu_str.split("&");
  723. for (var _loc2 = 0; _loc2 < _loc3.length; ++_loc2)
  724. {
  725. if (_loc3[_loc2].indexOf("uid") == 0)
  726. {
  727. uid_str = _loc3[_loc2].slice(4);
  728. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到uid: " + uid_str + "\n");
  729. continue;
  730. } // end if
  731. if (_loc3[_loc2].indexOf("guid") == 0)
  732. {
  733. guid_str = _loc3[_loc2].slice(5);
  734. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到guid: " + guid_str + "\n");
  735. continue;
  736. } // end if
  737. if (_loc3[_loc2].indexOf("cpuid") == 0)
  738. {
  739. cpuid_str = _loc3[_loc2].slice(6);
  740. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到cpuid: " + cpuid_str + "\n");
  741. continue;
  742. } // end if
  743. if (_loc3[_loc2].indexOf("ver") == 0)
  744. {
  745. ver_str = _loc3[_loc2].slice(4);
  746. _root.debug_txt.text = _root.debug_txt.text + ("☆获取到ver: " + ver_str + "\n");
  747. } // end if
  748. } // end of for
  749. _root.debug_txt.text = _root.debug_txt.text + "☆xu.txt 读取完毕!\n\n";
  750. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  751. loadAdData();
  752. }
  753. else
  754. {
  755. _root.debug_txt.text = _root.debug_txt.text + "☆xu.txt 不存在!\n\n";
  756. loadAdData();
  757. } // end else if
  758. };
  759. _root.debug_txt.text = _root.debug_txt.text + ("打开离线数据文件:\n" + g_systemDir + "\\subbuffer.sl\n\n");
  760. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  761. getURL("FSCommand:open", g_systemDir + "\\subbuffer.sl");
  762. sendDataBuffer();
  763. }
  764. else
  765. {
  766. _root.debug_txt.text = _root.debug_txt.text + "☆当前在线,不读取cpuid!\n\n";
  767. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  768. loadAdData();
  769. } // end else if
  770. var root_page = 0;
  771. _root.onPageFlip = function (state, page)
  772. {
  773. if (state == 0)
  774. {
  775. if (root_page != page)
  776. {
  777. checkAd(page);
  778. sendTimes(root_page);
  779. } // end if
  780. }
  781. else if (state == 2 && page == 0 || state == 1 && page == _root.maxpage)
  782. {
  783. removeAd(0);
  784. sendTimes(_root.page);
  785. }
  786. else
  787. {
  788. root_page = _root.page;
  789. } // end else if
  790. };
  791. _root.postButton = function (name_str)
  792. {
  793. var _loc2 = new LoadVars();
  794. var data_buffer_str = "http://xp-adms.xplus.com.cn/online_paper_button_click.php?uid=" + uid_str + "&guid=" + guid_str + "&cpuid=" + cpuid_str + "&magidno=" + magidno_str + "&mag_name=" + magname_str + "&ver=" + ver_str + "&site=" + site + "&pno=" + _root.page / 2 + "&btn=" + name_str;
  795. _loc2.sendAndLoad(data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32), _loc2, "post");
  796. _root.debug_txt.text = _root.debug_txt.text + ("发送按钮点击数据\n" + data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "\n\n");
  797. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  798. _loc2.onData = function (data_str)
  799. {
  800. if (data_str == undefined || data_str != "ok")
  801. {
  802. _root.debug_txt.text = _root.debug_txt.text + ("按钮数据提交失败,保存地址:\n" + data_buffer_str + "\n\n");
  803. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  804. getURL("FSCommand:writeline", data_buffer_str);
  805. }
  806. else
  807. {
  808. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",按钮数据提交成功!\n\n");
  809. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  810. } // end else if
  811. };
  812. };
  813. var dataToArray = function (data_str)
  814. {
  815. ad_files_array = data_str.split("#");
  816. if (ad_files_array[ad_files_array.length - 1].length < 3)
  817. {
  818. ad_files_array.pop();
  819. } // end if
  820. };
  821. var arrayToObject = function ()
  822. {
  823. for (var _loc1 = 0; _loc1 < ad_files_array.length; ++_loc1)
  824. {
  825. var _loc2 = ad_files_array[_loc1].split("|")[0].slice(ad_files_array[_loc1].lastIndexOf("/") + 1);
  826. var _loc3 = ad_files_array[_loc1].split("|")[0].slice(0, ad_files_array[_loc1].lastIndexOf("/") + 1);
  827. ad_id_array[Number(_loc2)] = new Array();
  828. ad_id_array[Number(_loc2)][0] = _loc3;
  829. ad_id_array[Number(_loc2)][1] = ad_files_array[_loc1].split("|")[2];
  830. ad_id_array[Number(_loc2)][2] = ad_files_array[_loc1].split("|")[1];
  831. ad_id_array[Number(_loc2)][3] = _loc2;
  832. } // end of for
  833. };
  834. var preload_id = 0;
  835. var preLoadAd = function ()
  836. {
  837. var preload_mc = _root.createEmptyMovieClip("preload_mc", 19999);
  838. preload_mc._lockroot = true;
  839. preload_mc._y = 5000;
  840. preload_mc._visible = false;
  841. var _loc4 = new Sound(preload_mc);
  842. _loc4.setVolume(0);
  843. var preload_mcl = new MovieClipLoader();
  844. var _loc3 = new Object();
  845. _loc3.onLoadComplete = function (target_mc)
  846. {
  847. _root.debug_txt.text = _root.debug_txt.text + "预加载完毕.\n\n";
  848. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  849. if (preload_id == ad_id_array.length)
  850. {
  851. _root.debug_txt.text = _root.debug_txt.text + "全部预加载完毕.\n\n";
  852. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  853. preload_mc.removeMovieClip();
  854. } // end if
  855. for (var _loc2 = preload_id; _loc2 < ad_id_array.length; ++_loc2)
  856. {
  857. if (ad_id_array[_loc2] != undefined)
  858. {
  859. preload_mcl.loadClip(ad_id_array[_loc2][0] + ad_id_array[_loc2][1], preload_mc);
  860. _root.debug_txt.text = _root.debug_txt.text + ("预加载广告" + _loc2 + ":" + ad_id_array[_loc2][0] + ad_id_array[_loc2][1] + "\n");
  861. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  862. preload_id = _loc2 + 1;
  863. break;
  864. } // end if
  865. } // end of for
  866. };
  867. preload_mcl.addListener(_loc3);
  868. for (var _loc2 = preload_id; _loc2 < ad_id_array.length; ++_loc2)
  869. {
  870. if (ad_id_array[_loc2] != undefined)
  871. {
  872. preload_mcl.loadClip(ad_id_array[_loc2][0] + ad_id_array[_loc2][1], preload_mc);
  873. _root.debug_txt.text = _root.debug_txt.text + ("预加载广告" + _loc2 + ":" + ad_id_array[_loc2][0] + ad_id_array[_loc2][1] + "\n");
  874. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  875. preload_id = _loc2 + 1;
  876. break;
  877. } // end if
  878. } // end of for
  879. };
  880. _root.closeWin = function (null_str)
  881. {
  882. if (null_str != "null")
  883. {
  884. _root.debug_txt.text = _root.debug_txt.text + "一秒时间到,执行关闭。\n";
  885. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  886. } // end if
  887. fscommand("quit");
  888. clearInterval(_root.closeInterval);
  889. };
  890. _root.sendTimes = function (page_num, flag_str)
  891. {
  892. if (flag_str == "close")
  893. {
  894. if (_root.online)
  895. {
  896. _root.debug_txt.text = _root.debug_txt.text + "一秒钟后关闭杂志!\n\n";
  897. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  898. _root.closeInterval = setInterval(_root.closeWin, 1000);
  899. }
  900. else
  901. {
  902. fscommand("hide");
  903. } // end if
  904. } // end else if
  905. var _loc2 = new LoadVars();
  906. var data_buffer_str = "http://xp-adms.xplus.com.cn/online_paper_page_read.php?uid=" + uid_str + "&guid=" + guid_str + "&cpuid=" + cpuid_str + "&magidno=" + magidno_str + "&mag_name=" + magname_str + "&ver=" + ver_str + "&site=" + site + "&pno=" + page_num / 2 + "&pt=" + _root.g_pageTimeArray[page_num];
  907. _loc2.sendAndLoad(data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32), _loc2, "post");
  908. _root.debug_txt.text = _root.debug_txt.text + ("发送页面浏览时间\n" + data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "\n\n");
  909. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  910. _root.g_pageTimeArray[page_num] = 0;
  911. _loc2.onData = function (data_str)
  912. {
  913. if (data_str == undefined || data_str != "ok")
  914. {
  915. _root.debug_txt.text = _root.debug_txt.text + ("页面数据提交失败,保存地址:\n" + data_buffer_str + "\n\n");
  916. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  917. getURL("FSCommand:writeline", data_buffer_str);
  918. if (flag_str == "close")
  919. {
  920. _root.debug_txt.text = _root.debug_txt.text + "提交当页数据失败,执行关闭。\n";
  921. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  922. _root.closeWin("null");
  923. } // end if
  924. }
  925. else
  926. {
  927. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",页面数据提交成功!\n\n");
  928. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  929. if (flag_str == "close")
  930. {
  931. _root.debug_txt.text = _root.debug_txt.text + "提交当页数据成功,执行关闭。\n";
  932. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  933. _root.closeWin("null");
  934. } // end if
  935. } // end else if
  936. };
  937. };
  938. var loadAd = function (ad_array)
  939. {
  940. var _loc5 = _root.pages.pp.createEmptyMovieClip("ad_mc", 10001);
  941. var _loc4 = new MovieClipLoader();
  942. var _loc3 = new Object();
  943. _loc3.onLoadInit = function ()
  944. {
  945. var _loc2 = new LoadVars();
  946. var data_buffer_str = "http://xp-adms.xplus.com.cn/ads_paper_jump_new.php?filename=" + ad_array[1] + "&adver_id=" + ad_array[2] + "&adver_pos=" + ad_array[3] + "&uid=" + uid_str + "&guid=" + guid_str + "&cpuid=" + cpuid_str + "&magidno=" + magidno_str + "&mag_name=" + magname_str + "&ver=" + ver_str + "&site=" + site;
  947. _loc2.sendAndLoad(data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32), _loc2, "post");
  948. _root.debug_txt.text = _root.debug_txt.text + ("返回广告数据:" + data_buffer_str + "&selfflag=" + selfflag + "&FBState=" + FBState() + "&ranstr=" + ranStr(32) + "\n\n");
  949. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  950. _loc2.onData = function (data_str)
  951. {
  952. if (data_str == undefined || data_str != "ok")
  953. {
  954. _root.debug_txt.text = _root.debug_txt.text + ("广告数据提交失败,保存地址:\n" + data_buffer_str + "\n\n");
  955. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  956. getURL("FSCommand:writeline", data_buffer_str);
  957. }
  958. else
  959. {
  960. _root.debug_txt.text = _root.debug_txt.text + ("返回:" + data_str + ",广告数据提交成功!\n\n");
  961. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  962. } // end else if
  963. };
  964. };
  965. _loc4.addListener(_loc3);
  966. _loc4.loadClip(ad_array[0] + ad_array[1], _loc5);
  967. _root.pageSound(0);
  968. _root.debug_txt.text = _root.debug_txt.text + ("载入广告:" + ad_array[0] + ad_array[1] + "\n\n");
  969. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  970. };
  971. _root.reLoadPage = function ()
  972. {
  973. _root.debug_txt.text = _root.debug_txt.text + ("重新加载页面:" + _root.pages.pp.ppp._url.split("/")[_root.pages.pp.ppp._url.split("/").length - 1] + "\n\n");
  974. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  975. _root.pages.pp.ppp.unloadMovie();
  976. _root.pages.pp.ppp.loadMovie(_root.pages.pp.ppp._url.split("/")[_root.pages.pp.ppp._url.split("/").length - 1]);
  977. };
  978. _root.removeAd = function (del_num)
  979. {
  980. if (del_num != 0)
  981. {
  982. _root.reLoadPage();
  983. } // end if
  984. _root.debug_txt.text = _root.debug_txt.text + ("删除前广告:" + _root.pages.pp.ad_mc + "[" + _root.pages.pp.ad_mc.getDepth() + "]" + _root.pages.pp.ad_mc._width + "\n\n");
  985. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  986. _root.pages.pp.createEmptyMovieClip("ad_mc", 1001);
  987. _root.pageSound(100);
  988. _root.debug_txt.text = _root.debug_txt.text + ("删除后广告:" + _root.pages.pp.ad_mc + "[" + _root.pages.pp.ad_mc.getDepth() + "]" + _root.pages.pp.ad_mc._width + "\n\n");
  989. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  990. };
  991. _root.pageSound = function (snd_num)
  992. {
  993. var _loc2 = new Sound(_root.pages.pp.ppp);
  994. var ad_snd = new Sound(_root.pages.pp.ad_mc);
  995. _root.debug_txt.text = _root.debug_txt.text + ("设置音量前:" + _loc2.getVolume() + "\n广告音量:" + ad_snd.getVolume() + "\n\n");
  996. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  997. var onEnterFrame_mc = _root.createEmptyMovieClip("onEnterFrame_mc", 82);
  998. onEnterFrame_mc.onEnterFrame = function ()
  999. {
  1000. if (_root.pages.pp.ppp.getBytesLoaded() > 0 || _root.pages.pp.ppp._width > 0)
  1001. {
  1002. var _loc2 = new Sound(_root.pages.pp.ppp);
  1003. _loc2.setVolume(snd_num);
  1004. ad_snd.setVolume(100);
  1005. _root.debug_txt.text = _root.debug_txt.text + ("设置音量后:" + snd_num + "->" + _loc2.getVolume() + "\n广告音量:" + ad_snd.getVolume() + "\n\n");
  1006. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  1007. onEnterFrame_mc.removeMovieClip();
  1008. } // end if
  1009. };
  1010. };
  1011. var checkAd = function (page_num)
  1012. {
  1013. removeAd();
  1014. _root.debug_txt.text = _root.debug_txt.text + "检查该页是否有广告……\n";
  1015. if (ad_id_array[page_num / 2] != undefined)
  1016. {
  1017. _root.debug_txt.text = _root.debug_txt.text + "该页有广告!\n";
  1018. loadAd(ad_id_array[page_num / 2]);
  1019. }
  1020. else
  1021. {
  1022. _root.debug_txt.text = _root.debug_txt.text + "该页无广告!\n\n";
  1023. } // end else if
  1024. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  1025. };
  1026. _root.btnEnabled = function (s)
  1027. {
  1028. if (s)
  1029. {
  1030. _root.debug_txt.text = _root.debug_txt.text + "控制按钮启用\n\n";
  1031. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  1032. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  1033. Mouse.addListener(mousecontroll);
  1034. Key.addListener(_root);
  1035. buttons.face_mc.enabled = true;
  1036. buttons.back_mc.enabled = true;
  1037. buttons.contents_mc.enabled = true;
  1038. buttons.btn_prev.enabled = true;
  1039. buttons.btn_next.btn_next.enabled = true;
  1040. delete buttons.page_btn.onRollOver;
  1041. }
  1042. else
  1043. {
  1044. _root.debug_txt.text = _root.debug_txt.text + "控制按钮禁用\n\n";
  1045. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  1046. _root.debug_txt.scroll = _root.debug_txt.maxscroll;
  1047. Mouse.removeListener(mousecontroll);
  1048. Key.removeListener(_root);
  1049. buttons.face_mc.enabled = false;
  1050. buttons.back_mc.enabled = false;
  1051. buttons.contents_mc.enabled = false;
  1052. buttons.btn_prev.enabled = false;
  1053. buttons.btn_next.btn_next.enabled = false;
  1054. buttons.page_btn.onRollOver = function ()
  1055. {
  1056. this.useHandCursor = false;
  1057. };
  1058. } // end else if
  1059. };
  1060. delete onEnterFrame;
  1061. getURL("FSCommand:fullscreen", fullscreen);
  1062. gotoAndPlay(15);
  1063. } // end if
  1064. }
  1065. else
  1066. {
  1067. delete onEnterFrame;
  1068. getURL("FSCommand:fullscreen", fullscreen);
  1069. gotoAndPlay(15);
  1070. } // end else if
  1071. } // end else if
  1072. };
复制代码
替换下面
  1. onEnterFrame = function () {
  2. LB = getBytesLoaded();
  3. TB = getBytesTotal();
  4. PC = LB/TB*100;
  5. loaderbar.setbar(PC);
  6. if (TB>4 && PC == 100 && pagesInfoLoaded && pageflipLoaded) {
  7. delete onEnterFrame;
  8. getURL("FSCommand:fullscreen", fullscreen);
  9. gotoAndPlay(15);
  10. }
  11. // end if
  12. };
复制代码
子墨 | 2010-1-19 21:39:18 | 显示全部楼层
下面是已修改好的zinemaker2007index.swf第一帖用代码
  1. stop ();
  2. main_width = 750;
  3. main_height = 550;
  4. pw = main_width / 2;
  5. ph = main_height;
  6. pageflipLoaded = false;
  7. pagesInfoLoaded = false;
  8. xplusLoaded = false;
  9. var X_Plus;
  10. var FBState;
  11. if (online)
  12. {
  13. var xplus_lv = new LoadVars();
  14. xplus_lv.load("xplus.txt");
  15. xplus_lv.onData = function (data_str)
  16. {
  17. if (data_str != undefined)
  18. {
  19. X_Plus = true;
  20. }
  21. else
  22. {
  23. X_Plus = false;
  24. } // end else if
  25. xplusLoaded = true;
  26. };
  27. } // end if
  28. var magidno = "b4ed96b8fdb511b1dd89ab9a1bb3ed74";
  29. var debug_mode = "false";
  30. var btn_style = 1;
  31. var root_data_buffer_str = "";
  32. var zine_title = "hrdmv.com Vol.1";
  33. var zine_date = "10/01/10";
  34. var content_page = 2;
  35. var default_volume = 50;
  36. var page_mark_start = 0;
  37. var page_mark_left_margin = 3;
  38. var page_mark_right_margin = 3;
  39. page_mark_right_margin = page_mark_right_margin + 15;
  40. var page_mark_bottom_margin = 3;
  41. page_mark_bottom_margin = page_mark_bottom_margin + 15;
  42. var url1 = "http://www.hrdmv.com/";
  43. var url2 = "http://www.hrdmv.com/";
  44. var url3 = "http://www.hrdmv.com/";
  45. var form_title = "Zine Vol.1";
  46. var fullscreen = "true";
  47. var attachfile1 = "";
  48. if (btn_style == 1)
  49. {
  50. var attachfile2 = "buttons.swf";
  51. }
  52. else
  53. {
  54. var attachfile2 = "buttons_2.swf";
  55. } // end else if
  56. var attachfile3 = "";
  57. var attachfile4 = "frontinfo.swf";
  58. var __registered = 1;
  59. var support_info_text = "";
  60. var support_info_link = "";
  61. Stage.scaleMode = "noScale";
  62. Stage.showMenu = false;
  63. getURL("FSCommand:setTitle", form_title);
  64. if (zine_title == "X-Plus Debug Mode")
  65. {
  66. zine_title = "debug";
  67. debug_mode = "true";
  68. } // end if
  69. var pagesXML = new XML();
  70. pagesXML.ignoreWhite = true;
  71. pagesXML.onLoad = function (success)
  72. {
  73. if (success)
  74. {
  75. pagesInfoLoaded = true;
  76. } // end if
  77. };
  78. pagesXML.load("pages.xml");
  79. onEnterFrame = function () {
  80. LB = getBytesLoaded();
  81. TB = getBytesTotal();
  82. PC = LB/TB*100;
  83. loaderbar.setbar(PC);
  84. if (TB>4 && PC == 100 && pagesInfoLoaded && pageflipLoaded) {
  85. delete onEnterFrame;
  86. getURL("FSCommand:fullscreen", fullscreen);
  87. gotoAndPlay(15);
  88. }
  89. // end if
  90. };
  91. var my_mcl = new MovieClipLoader();
  92. myListener = new Object();
  93. myListener.onLoadInit = function (target_mc)
  94. {
  95. if (target_mc._name == "pageflip")
  96. {
  97. if (attachfile2 == "")
  98. {
  99. pageflipLoaded = true;
  100. }
  101. else
  102. {
  103. my_mcl.loadClip(attachfile2, "_root.buttons");
  104. } // end else if
  105. return;
  106. }
  107. else if (target_mc._name == "buttons")
  108. {
  109. buttons._visible = false;
  110. pageflipLoaded = true;
  111. if (online)
  112. {
  113. buttons.button_1._visible = false;
  114. buttons.button_f._visible = false;
  115. }
  116. else
  117. {
  118. if (fullscreen == "true")
  119. {
  120. _root.buttons.button_f._visible = false;
  121. }
  122. else
  123. {
  124. _root.buttons.button_1._visible = false;
  125. } // end else if
  126. buttons.download_progress_bar._visible = false;
  127. } // end else if
  128. buttons.progress_bar._visible = false;
  129. return;
  130. } // end else if
  131. };
  132. my_mcl.addListener(myListener);
  133. _root.createEmptyMovieClip("pageflip", 0);
  134. my_mcl.loadClip("pageflip.swf", "_root.pageflip");
  135. if (!online)
  136. {
  137. _root.createEmptyMovieClip("zine_mask", 1100);
  138. zine_mask._x = Math.floor(-(1280 - _root.main_width - 50) / 2);
  139. zine_mask._y = Math.floor(-(1024 - _root.main_height - 90) / 2);
  140. myBitmapData = flash.display.BitmapData.loadBitmap("background");
  141. zine_mask.attachBitmap(myBitmapData, 0, "never", false);
  142. } // end if
  143. loaderbar._x = (_root.main_width + 50) / 2;
  144. loaderbar._y = (_root.main_height + 90) / 2;
复制代码
youyou2010 | 2010-1-28 19:28:21 | 显示全部楼层
好长的代码呀!好多变量不知道什么意思,头有点晕。哈哈。感谢大侠的解析!
您需要登录后才可以回帖 登录 | 注册

本版积分规则