va.lent.in — what a flash developer’s site should be

valentin

A couple of weeks ago I released my new personal portfolio/sandbox site — va.lent.in. I need more opinions and less bug reports.

I like projects which make me learn something. During this one I learned a lot…

Continue reading ‘va.lent.in — what a flash developer’s site should be’

JavaScript lazy functions.

I never thought about lazy functions in JavaScript. Apparently, you can implement it this way:

var foo = function() {
    var t = new Date();
    foo = function() {
        return t;
    };
    return foo();
};

I hate JavaScript.

Want an onReleaseOutside event?

Vote for it now!

Scala functions vs. methods

Scala is hard. To use its syntax sugar you have to know what’s going on.

In case you need to unlock some files on OS X

Recently I got a major headache with OS X file locks. Apparently, I can do nothing with locked files even being under root. So here comes a handy script which does that recursively. Taken from this site but there was a typo.

#! /bin/bash
#
# Simple file unlocking utility for Mac OS X
#
ARGS=1
E_BADARGS=65

function recursiveUnlock() {
 pushd $1
 for rdir in `ls -A`; do
 if [ -d "${rdir}" ]; then
 recursiveUnlock ${rdir}
 else
 /Developer/Tools/SetFile -a l ${rdir}
 fi
 done
 popd
}

if [ $# -ne "$ARGS" ]
then
 echo "Usage: `basename $0` starting-directory"
 exit $E_BADARGS
fi

recursiveUnlock $1

Call it recursiveUnlock.sh and “chmod” it to 755.

VOTE FOR THIS ONE!!!!!1

Now as jailbreaking is legal, couldn’t Adobe publish a Flashplayer for the iOS (iPhone, iPod, iPad) over Cydia(App Store for Jailbreaked Apps)?
I guess this would be a huge market!

https://bugs.adobe.com/jira/browse/FP-5228
I’d like Flash Player on my iPad please!

Continuing on the XML bug

Looks like my XML Flash Player 10.1 issue already has a bug filled at bugs.adobe.com. Too bad, that could be the first ever bug report submitted by me )8

Huge Flash Player 10.1 XML bug.

Check this XML.

<data xmlns:Bla="bla"><Bla:bla></bla:bla></data>

It’s obviously malformed. Flash Player 10.0 fails to parse it but Flash Player 10.1 doesn’t care. This caused major headache yesterday.

How do I submit a bug to Adobe?

Did you know about AS3 “down to” operator?

I am talking about –> operator. Did you know about it? It’s called “down to” operator. Here’s an example.

var a:uint = 20;
while ( a --> 0 ) trace(a);

Isn’t it cool?!

Ten tips for building better Adobe AIR applications

Usually I dislike posts titled “10/20/30 whatever for/to whatever whatever“. Why 10? Can there be more? Why you chose these ones?

But this post about AIR applications seems to be really useful. At least I got some interesting stuff from the article. It is definitely a good read if (even if not) you are developing AIR applications.

initInjector 0.2.1b

Scala version 2.8.0 has been finally released, Joa updated apparat amazingly fast and v.0.2.1b is just a stable Scala 2.8.0 compiled application.

http://va.lent.in/projects/swf/initInjector/initInjector.0.2.1b.zip

InitInjector is a little Scala app which allows you to move code from SWF constructor to a private init method and subscribe it to ADDED_TO_STAGE. This fixes an error of stage being null in loaded SWFs constructor.

0.2.1b:

  • Recompiled for Scala 2.8.0

0.2b:

  • Fixed several bugs
  • Added -p option which also injects init method to parent class constructor
  • Thanks to Joa Ebert who modified apparat for my needs I got rid of half of my code

Thanks to everyone for reporting bugs.