Flex and Flash Developer - Jesse Warden dot Kizz-ohm

A blog on software development, technology, games & movies.

About

This is the blog of Jesse Warden, a Rich Internet Application Architect. He specializes in using Flex and Flash to create Rich Internet Applications.

Since createChild(className:Object, instanceName:String) abstracts the creation of the actual object, TextField’s are hard. They aren’t supported as the first parameter, and doing a createTextField messes up your styles, but createLabel uses it’s own depth.

There IS a depth variable, however, you must take care to access it in the right order. The best way is:

createLabel("my_txt", depth++);

If you do a ++depth, it’ll increment too soon, whilst the rest do a depth++ and overrwrite the depth of one of your controls, destroying it.



Leave a Reply