Category Archives: Flash

Array shuffling in ActionScript3

Been wanting to add this post for a while. Pretty simple, really. So imagine you have an array: It can be any size, obviously. And you want to change the position of its items. Several ways to do so – like splicing the array, but i dont recommend it because theres a loss in speed… Read More »

AMFPHP 1.9 problem with PHP 5.4

I was developing an application at work that used amfphp 1.9. All was working until i decided to bring it home to work over the weekend (thats already a bad thing to do right there), and i started getting errors. At work i use windows 7+xampp (with php 5.3.8), at home i use windows 8+xampp… Read More »

Iterating through a Dictionary

Keeping things simple for anybody who does a search about this subject: If we have a dictionary like this: var dictio:Dictionary = new Dictionary(); dictio[“france”]=”paris”; dictio[“england”]=”london”; you can iterate like this: Iterating through the keys: for(var country:String in dictio){ trace(country); // this lists england, france } Iterating through the values: for each(var capital:String in dictio){… Read More »

How to add a line break in a flex TextArea

To add a line break inside the text of a TextArea component in flex we cannot use \n, but instead use ‘&#13;’ (without the quotes). For example: <s:TextArea text=”this text will be on the first line&#13;and this one on the second” …/> will produce a text box with this text: this text will be on… Read More »