Archive for the 'actionscript / flash' Category


Solution Found: Displaying Smileys in a Flash8 TextField

Whoever has tried to display smileys in Flash-textfields has recognized the strange and unpredictable way Flash displays inline images. It’s not possible to do this in the expected way by using <img> tags in a html textfield.

As I am currently developing a realtime chat application based on the open-source instant messaging server Jabber I had to find a work-around for this problem. Jolan’s SmileyTextField, an early solution published as Flash MX component, uses a seperate Textfield and a MovieClip displaying the smileys. The big problem of this solution is that its not possible to get the coords of a specific letter in a textfield in an easy way. SmileyTextField calculates image (or, in this case, library assets) positions using autosizing textfields and line counts, which seemed to be rather imprecise on long texts and caused severe performance issues.

Our solution, we call it the EmotionalTextField, also uses a seperate TextField and MovieClip for smiley positioning. But smiley-positions are calculated using the Flash 8 bitmap-manipulation capabilities. Basically, predefined string sets (like  :-) or :-( ) are replaced by colored dots, the textfield is loaded into a flash.display.BitmapData, and the colored dots are searched using BitmapData.getColorBoundsRect().

After some refactoring and documentation our EmotionalTextField will be released here. Also included will be a configuration-xml, where you can register the text-snippets and corresponding images you want to use in your project.

—- 05/24/07 —-

finally. it’ done! the component can be downloaded here:

Download EmotionalTextfield 0.1b

Installing Flash Media Server 2 on Ubuntu 6.10

The installation script for Flash Media Server works only on RedHat Enterprise by default. With some modifications it works fine on Ubuntu Edgy:
apt-get install libnspr4 libstdc++5 libstdc++5-3.3-dev
wget http://download.macromedia.com/pub/flashmediaserver/updates/2_0_3/linux/flashmediaserver2.tar.gz
tar xfz flashmediaserver2.tar.gz
cd FMS*
wget http://www.bluetwanger.de/~mbertheau/fms.patch
patch -p1 < fms.patch
sudo ./installFMS

Live aus der Marschrutka » Installing Flash Media Server 2 on Ubuntu 6.10 Edgy

this howto is written bei Markus Bertheau, please check the original article and his blog here.
with his great patch my installation of FMS2 on my Mac Book Pro running Ubuntu 6.10 server inside Parallels Desktop worked like a charm :-)

Technorati Tags: , ,

Browser crashes when using Flash FileReference Object

If you are using a File Reference Object withing Flash 8 or higher, you need to make shure, that Flash does NOT make JavaScript calls when the browse window is opended. If you do so, your browser will crash