Solution to Flash not working properly on Hong Kong and Taiwan data center hosts.

Published: 2012-07-09

To improve the access speed of Hong Kong and Taiwan hosts in mainland China, our company has cached the images of Hong Kong and Taiwan hosts domestically (the access speed can be doubled compared with the non-cached case). Some users’ web pages use the common player `bcastr3.swf`, and therefore the slideshow may fail to display images. You can update this player to a new version in your website program to restore the display. The following steps are recommended to be performed by technicians with a web coding background. Before operating, back up the files to be modified, to avoid errors in modifying the website program that cause the website to be inaccessible. First: Find the file that uses `bcastr3.swf` in your website source code; it is generally in a template file. For example, `bcastr3.swf` is in your template homepage. Your template file is located at `wwwroot/template/default/index.htm`. Please download `index.htm` to your local computer and back it up first. Second: Download `http://downinfo.myhostadmin.net/flash_fix.txt` and `http://downinfo.myhostadmin.net/flash_fix.rar` to your local computer. After downloading `flash_fix.rar`, upload the extracted `focus.swf` to the website root directory (`wwwroot/`). Open the template `index.htm` file with Notepad or another commonly used web page editing tool. In source code mode, find the following code: [Image: https://www.west.cn/Customercenter/UploadImages/houtai/image/201508/14405566356433531.gif] Replace it with the code in the downloaded `flash_fix.txt` document. As shown in the figure: [Image: https://www.west.cn/Customercenter/UploadImages/houtai/image/201508/14405566355100575.gif] Note: If the following four items are already set in the original file, you do not need to copy these four items: ```js var swf_width=288; //width var swf_height=235; //height var files = ''; //image list separated by | var links = ''; //links separated by | ``` If you need carousel images with transition effects, please download: `http://downinfo.myhostadmin.net/flash_focus2.txt` and `http://downinfo.myhostadmin.net/flash_focus2.zip` to your local computer, and upload `focus2.swf` extracted from `flash_focus2.zip` to the website root directory (`wwwroot/`). If it is really difficult to solve, you can submit a 有问必答 request to apply to change to non-cache mode, but this will cause slower access speed. The following are the replacement methods for swf-related files of major programs: 1. dede system: `templates/template directory/template file` ```js var config = '6|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000'; var swf_dir="/focus.swf"; //flash player path document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); ``` If you need images to have transition effects, use the following code (file download: `http://downinfo.myhostadmin.net/flash_focus2.zip`): ```js var swf_width=947 var swf_height=402 var text_height=0 var flashCode = ''; flashCode = flashCode + ''; flashCode = flashCode + ''; flashCode = flashCode + ''; flashCode = flashCode + ''; flashCode = flashCode + ''; document.write(flashCode) ``` 2. ecshop system: find the `cycle_image.js` file ```js var swf_config = "6|0xffffff|0x0099ff|50|0xffffff|0x0099ff|0x000000" var swf_dir="/focus.swf"; document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); ``` 3. AspCms system: `inc/AspCms_MainClass.asp` file ```asp sFiles&vbcrlf& sLinks &vbcrlf& sTexts&vbcrlf& _ "var texts='' ;"&vbcrlf& _ "config=configtg"&vbcrlf& _ "var swf_dir=""/focus.swf"";"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ "document.write('');"&vbcrlf& _ ``` 4. metinfo system: find the `methtml.inc.php` file ```php case 2: $methtml_flash.="\n"; break; ``` 5. Ready-made website: directly upload `focus.swf` to its directory, modify and replace the flash file name; no need to change code. 6. If the images are in an XML file, find the corresponding code file and replace the code: ```html ``` After replacement, check with browser developer tools; pay attention to variable definitions, assignments, etc. For example, if the code has a `files` variable but the browser reports it as undefined.