Before AS3, we can only use substr to abbreviate string characters number for TextField, but we have to guess a extract number to fit our UI design, e.g. only show two lines, we have to guess in this font size, font face, what is maximum numbers of character can be shown. It is a problem […]
Category Archives: Flash
Flash Player 10.1, Client-side Microphone Recording Demo
Thanks Flash Player 10.1, now we can record the sound through microphone directly in browser without the use of Flash Media Server, you can download the wav file converted from ByteArray immediately, you can download mp3 which I send wav file to server and using LAME to encode as mp3. Hope AS3 mp3encoder can come […]
Trouble with Hotlink Protection and HTTP Referer in Different Browsers
To save bandwidth, most of servers will practice some hotlink protection, usually using either following script to check whether the HTTP referer is come from the same server, most script are focus on image file, but it can slightly modified for FLV protection. There are two common methods to do that: Edit in .htaccess RewriteCond […]
Several Useful SWF, Flash Player Version Detection Service
Detect Flash Player version: HTML: http://playerversion.com/ Flash: http://www.flashplayerversion.com/ Detect SWF version: Detect is it AS1/2 or AS3: http://swfversion.com/ Detect is it built with Flex: http://www.jamesward.com/is_it_flex/
[AS1/2] Using POST method to send parameters and receive XML
If you use POST method to send parameters, the received result is XML, you should use LoadVars or XML? sendAndLoad from LoadVars cannot handle received XML format, sendAndLoad from XML can use GET method to send parameters only, cannot use POST Method. I have already sticked to write AS3, suddenly switch back to AS1, I […]
Using BlendMode:Layer solve the problem when MovieClip is semi-transparent, the colors are mixed together
Designers always face this problem, inside a MovieClip, there are different symbols, when MovieClip is semi-transparent, each symbol has its own semi-transparent, so the colors are mixed together as the following example: To solve this problem you can set MovieClip BlendMode to Layer ActionScript syntax: mc.blendMode = “layer”;(For Flash 8 AS1/2, too) Download sample fla(Flash […]
[AS2] Handle Special Characters in XML
When loading XML File and parsing, usually use ChildNode[n].toString() for extract the data, sound like it can get the data and convert to “String” or other variable type. Normally, it has no problem, but when the XML contains special characte, it will get back wrong data, for example special characters like: ‘, &, ". Here […]
Sometimes deprecated ActionScript is useful
Although and, or those ActionScript are deprecated by Adobe, I still love to use it, because it is defaultly support as Keyword in Action panel with color syntax, easy to spot out. Also, the bytecode compiled, it is smaller than &&, ||. You can compare the following two code snippets: if (a and b) { […]
FSCommand and Flash Player Version in Firefox
I have a project need to use FSCommand communicate with JavaScript for Flash Player 7 or below, so I downloaded archived Flash Players and test again. I find FSCommand can work in Firefox (1.5 here), it requires at least Flash Player 6r47, older version cannot work. 🙁
Can anyone confirm Flash Player 9 is really work on Mac IE?
I have installed the lastest Flash Player 9 in Mac(PPC), but I cannot watch any Flash 9 works, e.g. those entries in Flex Derby, my own Flash 9 works in Mac IE (No problem in Safari, Firefox, Netscape and no problem for Mac IE to view Flash 8 content). It just show a blank white […]