Skip navigation

Monthly Archives: October 2008

Today I had the first experience which underlines many read quotes that the Flash IDE is not your ideal scripting partner (especially if you just take off like me).
I’ve been writing a rather simple code to get names for images out of a description tag in an xml node.
I wrote a function to add the received data to the textfield I created, and it didn’t work. Until I discovered (yes, took me a while!), that I didn’t specifiy the ‘nr’ in

public function setText(nr):void

… you’ll recognize that it should be

public function setText(nr:int):void … instead.

I discovered it on first debug recreating the script in FlexBuilder – it immediately threw the correct error message
1008: parameter ‘nr’ has no type declaration..
I would’ve expected such a message from Flash as well, I know better know.

This made me stating for the first time: the Flash IDE needs some serious additions, and no, it didn’t change in CS4 unfortunately.

Not only for AS3 beginners (but definitely for you): check out Grant Skinner’s blog, especially the presentations in the link section.
These presentations are excellent readings which give you a good understanding of what’s going on under the hood of your code.
Helped me tons to get going …