« the politics of fuel
» intellij + flex

Flash

automatically declare foot shot?

02.05.08 | 1 Comment

Up till now I’ve been using ActionScript 3 in a Flex context. At my new work I am using it with Flash CS3. I came across a “feature” that confirms my suspicions of Adobe’s marketing strategy for its development platform: Flex Builder for developers, Flash CS3 for morons and/or masochists: CS3 is actually a downgrade.

The “feature” is a little option in the Publish Settings dialogue box: “Declare Stage Instances Automatically”. This option is checked by default; it is the way Flash runs out of the box. What this means is that Flash, behind the scenes, creates a whole load of references to items on the stage. You actually have to import classes like flash.text.TextField and flash.display.MovieClip in the class you assign to the symbol - or you get compilers errors. No joke! Except maybe a sick joke by Adobe at the developer community’s expence:

ReferenceError: Error #1056: Cannot create property

The obvious answer is to uncheck the option, and declare your references explicitly. But the fact that it’s checked by default means that most Flash developers (I use the word loosely) will be leaving it checked. Which means that unchecking it will break compilation unless you recode, which, in a medium to large project, will be a lot of stuffing around.

It also means that, just to get around this towering piece of stupidity, you have to rewrite code, that will probably break other FLAs that do depend on the option being checked. This option therefore unwittingly discourages code reuse and sharing - one of the major problems with the Flash work out there.

Also - and this is truly ludicrous - the option breaks compilation when you define a component definition. I have to comment out my references to TextFields, MovieClips and other stage instances when I set up a component; then uncomment them again to compile the app. Crushingly, staggeringly, poorly thought out.

It also screws you over when you try to use Flash and Flex together - as Jesse Warden points out:

Flex has no such feature. When you bring in Flash content, you’ll get an exception, and you can’t debug it easily because it was the MovieClip’s timeline who caused the error. When you go to debug, you’ll get the 1 line exception “ReferenceError: Error #1056: Cannot create property” in the call stack, and nothing more… and you’re left wondering, who the heck is creating this thing?

While I agree why [sic] Adobe put the ADSI feature in Flash CS3, it works against you when you create content for Flex.

Why so meek and mild? Where is the outcry? “There are some tricky settings come with FlashCS3, which may cause a lot of frustration, if not used properly,” says Saumya Ray mildly on his blog. Proper use, I would suggest, would be to bin the crippleware and work solely with Flex Builder. This only compounds my belief that Flash CS3 is a toy.

related

1 Comment

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

:

:


« the politics of fuel
» intellij + flex
Close
E-mail It