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/Taiwan hosts in mainland China, our company has enabled domestic caching for images on Hong Kong/Taiwan hosts (the access speed can be doubled compared with the non-cached case). Some users’ web pages use the generic player `bcastr3.swf`, which may cause the slideshow to fail to display images. You can update this player to a new version in your website program, and display will be restored. The following steps are recommended to be performed by technicians with a web page code background. Before doing so, back up the files to be operated on first, to avoid incorrectly modifying the website program and causing the website to be inaccessible. First: In your website source code, find the file that uses `bcastr3.swf`; generally it is 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 the `index.htm` file to your local machine 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 machine. After downloading `flash_fix.rar`, upload the extracted `focus.swf` to the website root directory (`wwwroot/`). Use Notepad or another web editing tool you commonly use to open the template `index.htm` file. In source code mode, find the following code: [Image] Replace it with the code in the downloaded `flash_fix.txt` document. As shown in the figure: [Image] 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 machine. Upload the `focus2.swf` extracted from `flash_focus2.zip` to the website root directory (`wwwroot/`). If it is really difficult to solve, you can submit a support ticket (有问必答) to apply to change to non-cached mode, but this will cause slower access speed. Below are the replacement methods for swf-related files for 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(''); ``` For images with 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& _ ``` 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/replace the flash file name; no need to change code. 6. If images are in an xml file, find the corresponding code file and replace the code: ```html ``` After replacement, check through 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.