Shared Know How

Howto: fix, find, use, make & do it guide
Filed under flash, programming

When working with flash components we often run into disadvantages. As with the TextArea class (fl.controls.TextArea) we encountered that it is not possible to use a CSS on its 'textField' property. Once again we thought to have the fast way to an end with components, but nothing of the sort.:'(

Since the 'styleSheet' property returns a standard TextField instance it struck us as weird that setting its 'styleSheet' property didn't work. The TextArea class was trying to set textFormat which fails after setting the stylesheet of the textfield.

Error message:

Error: Error #2009: This method cannot be used on a text field with a style sheet.
at flash.text::TextField/setTextFormat()
at fl.controls::TextArea/drawTextFormat()
at fl.controls::TextArea/draw()
at fl.core::UIComponent/callLaterDispatcher()

This pointed us to the 'drawTextFormat()' function in the TextArea class. After taking a look we figured out what to do.

The problem turned out to be that every time you add text to your textarea the class tries to add a designated, or default flash-textFormat to the textfield. Adding Flash TextFormat objects to textfields conflicts with stylesheets. Our solutions was relatively simple: a small class extends of the textArea class.

Click continue for the fixing source
Continue reading...

Comments (5) Posted by wytze on Tuesday, July 8th, 2008


Filed under flash

Problem:
TextArea shows a border by default

Solution:
myTextArea.setStyle("upSkin",Sprite);

Description:
Using a TextArea in actionscript 3 could come in handy as the Flash component adds in a ScrollBar by default. But it also provides some things you might not want there..

One of those things is the border, that is placed there by default.

Inspired by the solution posted here I found that you can override the skin that is used by default in the component ("upSkin") by using:

myTextArea.setStyle("upSkin",Sprite);

by overriding it with a Sprite, which is empty by default, all the visual aspects are cleared... including the border!

Comments (0) Posted by thijs on Tuesday, July 8th, 2008


Filed under windows

For my mac I have the Equinux Tubestick but I guess there exists a lot of similar products with the same chipset. When connecting it to a windows computer it is recognised as a "DVB-T" with Device instance id "Vid_15a4&PID_9015". Google with this information gives a few hits but it is hard to find that it uses a chipset of Afatech Technologies.

Windows driver can be downloaden from http://www.afatech.com.tw/EN/support_kind.aspx?CategoryID=1 select the AF-9015

Comments (0) Posted by Tim on Thursday, May 29th, 2008


Filed under macos

Trying to run the Darwin Streaming 5.5.5 server under Leopard will not work. If you look trough the logfiles you will see the following error:

//System/Library/StartupItems/QuickTimeStreamingServer/QuickTimeStreamingServer: line 19: /usr/sbin/QuickTimeStreamingServer: cannot execute binary file

Somehow this version of Darwin Streaming Server does not work under macos 10.5 (Leopard) this can be fixed by using the binary from an older version. I did the following steps to get it running under Leopard.

Continue reading...

Comments (0) Posted by Tim on Tuesday, May 13th, 2008


Filed under linux

I had a old installation on our personal server of Netatalk withouth encrypted password support. This is fine when you are on your local network and use Tiger but with Leopard this is no longer supported.

I used netatalk-2.0.3

First time I tried to install under centOS5 I got an error

cnid_index.c:277: warning passing argument 2 of 'db->stat' from incompatible pointer type
cnid_index.c:277: error: too few arguments to function 'db->stat'

after some googling I found out that this has to do with support for an outdated Berkeley DB.

Continue reading...

Comments (3) Posted by Tim on Friday, May 2nd, 2008


Filed under flash

There is this nifty firefox plugin that lets you see the trace messages of Flash files in your browser called FlashTracer made by Sephiroth.

To use this plugin you have to download the flash debugger player.
As you cannot use the provided flashplayer installer in the package, as it collides with the 64-bits architecture, you have to use ndiswrapper to do the job.

After unpacking the archive, find where the libflashplayer.so file is located (probably flash_player_9_linux_dev/plugin/debugger).
Then open-up a terminal and type:

  • nsplugginwrapper -i /full/path/to/libflashplayer.so

(in my case: /home/myname/flash_player_9_linux_dev/plugin/debugger/libflashplayer.so)

After that, hit Alt + A (default shortcut for the flash tracer) or go to Tools -> Flash Tracer to start tracing away!

  • OS: Ubuntu 8.04 (Hardy Heron ) 64-bit
  • Using: Firefox 3 beta 5, Flash debug player 9.0.124 (also works for 9.0.115)
Comments (0) Posted by thijs on Friday, April 25th, 2008


Filed under webserver

I always keep on reinventing the wheel when it comes to .htaccess settings like for automatic redirect to https://, utf-8 character settings or custom error documents. Here are some settings I use.

Continue reading...

Comments (1) Posted by Tim on Wednesday, April 16th, 2008


Filed under voip

Update (25-04-2008): Fixed with new VirtualBox 1.5.6

After upgrading Ubuntu to 8.04 (Hardy Heron) and upgrading VirtualBox to 1.5.6 the problem does no longer occur!

Problem:
AsteriskNow install gets stuck at /sbin/loader when using VirtualBox

Solution:
None --> Use VMWare

Description:
Yesterday I was trying to install AsteriskNow 1.0.2.1 in a VirtualBox (1.5.0). Continue reading...

Comments (1) Posted by thijs on Wednesday, April 16th, 2008