14
Jul

A year has passed…

Posted By wassim in Education/Teaching, Wassim

I read this quote on a site and immediately remembered a student of mine who passed away last year in July, here’s what it says:

“Nous partirons l’un après l’autre, et ceux qui restent porteront la mémoire de ceux qui ont disparu.”

Which means:

We leave one after the other, those who remain hold the memory of those who passed away.

Indeed, we still remember you, Nadim…

14
Jul

Our chicks are leaving the nest…

Posted By wassim in Education/Teaching, Wassim

Yes, another scholastic year has passed, a new wave of our beloved teen students graduated, they are out in the wild now getting ready for the big deal!

Leen, Ali, Mohammad, Sally, Dima, Rania and the lovely Lara are now out of the nest :) they are flying on their own, I will miss you all.

Hear me out guys, the fun has just began! Enjoy yourselves, learn and get out of there as soon as you can.

16
May

Flash player 10 and RTL support

Posted By wassim in Flash

Big news, flash player 10 beta supports complex text layouts and namely support for RTL languages like Arabic! At last, more info here : http://labs.adobe.com/technologies/flashplayer10/demos/videos/text.html

There are many other features added like CPU surfacing and GPU compositing as well as enhanced drawing API and native 3D support yet the RTL support is something we’ve been waiting for long time, finally it has arrived! Thx Adobe, let’s hope it works as advertisied.

25
Apr

Left trim and right trim actionScript functions

Posted By wassim in Flash, Flash Tutorials

Left trim and right trim actionScript functions
These useful functions (lTrim and rTrim) are available in almost all programming languages yet not in actionScript, so here’s how to write ones yourself:
lTrim is easier, so we’ll start with that:

[as]
function lTrim(txt:String):String {
while
(txt.charAt(0)==” ”
||txt.charAt(0)==”\t”
|| txt.charAt(0)==”\n”
|| txt.charAt(0)==”\r”
) {
txt=txt.substring(1,txt.length-1);
}
return txt;
}
//usage example:
trace(lTrim(” here’s a text to trim”));// outputs : here’s a text to trim
[/as]

Pretty much straight forward, the function accepts a string as argument and returns a string, it checks whether the first character is a space, tab, or newline character and simply cuts it out and runs the same check on the resulting substring until there are no white spaces left at the leftmost end of the string.

Now for the slightly harder rTrim function,

[as]

function rTrim (txt:String):String {

while (txt.charAt(txt.length-1)==” ” ||txt.charAt(txt.length-1)==”\t” || txt.charAt(txt.length-1)==”\n” || txt.charAt(txt.length-1)==”\r”){
txt=txt.substring(0,txt.length-1);
}
return txt;

}
trace(rTrim (“rtrim this please \n\r “)+”delimiter”);//outputs : rtrim this pleasedelimiter

[/as]
The logic is very similar, feel free to use these wherever you like.
I would recommend using these as part of a class for string manipulation.
Btw, these functions are AS2 and AS3 compatible.

22
Apr

One More reason to hate Microsoft!

Posted By wassim in Wassim

Like many of you outlook express users, I got an email today informing me that outlook express will no longer be able to access hotmail accounts beyond June 30 because the geniuses at Microsoft have invented what they think is a better protocol and outlook doesn’t support it so they had to come up with a new “magnificent” piece of shit called Windows Live Mail. Why not upgrade outlook express? Well they say it will take a lot of work to add support to the good old outlook express…As if making a new program from scratch is easier! Do they take us for fools or something? Well maybe so and for a reason, we still are using there OS!

Like a dumb ass, I believed this crap and went straight to the download page, installed and fired the application to be saluted by a crash, hmmm, typical Microsoft first run behavior.

Restarted the application and watched it at work, it seems it’s using the same engine as outlook with the sole difference that it crashes every 3 to 5 minutes or so, well, Now I know why they had to put outlook aside, because it works and they simply can’t withstand the idea of having an application or even an operating system that works without killing it for the sake of shitty new applications no one really wants or prefers over the existing ones…

Having that said, I am seriously considering switching to Linux, the knoppix compilation is really cool and I am waiting for the Linux version of Adobe flash to switch permanently to Linux, if anyone knows a way I can start using flash on a Linux, plz drop me a line.