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.


hi,
first of all thank you Joshua for visting my blog and making me feel good :).
I completely agree with you Joshua, there has to be a standard in FlashIDE not an option for doing things. But this will be a programmers view.I think Flash has actually matured itself out of a designers’ tool and Adobe wants to make Designers’ at home in any form of Flash.That might be the cause of providing the settings.Being said that, it is also true when you talk about component creation.You have to revert back and forth with the setting which is waste of time and mind. And there should be an alert upfront while opening FlashIDE pointing out that, this is the tricky setting you have to deal with while developing in FlashIDE.