Apache – Extending Sprite Using Flex

apache-flexapplication-typesflash

I have done all of my Flash applications up until now with the Flash IDE (although I rarely use the timelines, since I prefer to do everything in code) or in FlexBuilder as Flex applications. Are apps that just extend Sprite (used in the FlexBuilder IDE, for instance) a viable way of doing an application, or are they just for HelloWorlds? Under what conditions would you not bother to use the Flash IDE? Can MXML files be used with apps that just extend Sprite?

Note: I'm not asking when to use Flex vs. Flash. I am also not asking whether the Flash IDE or the FlexBuilder IDE is better for editing ActionScript files.

Edit: What I mean by "can MXML files be used with apps that just extend Sprite?" I am referring to whether you can use MXML markup in an Actionscript 3.0 file in Flexbuilder 3. I'm pretty sure you cannot do this.

Best Answer

Are apps that just extend Sprite (used in the FlexBuilder IDE, for instance) a viable way of doing an application, or are they just for HelloWorlds?

In Flex you have the option of extending the Sprite class or implementing the IUIComponent class. There are differences though.

Under what conditions would you not bother to use the Flash IDE?

Do you need dataservices? In that case, I am not too sure how easy it is to work with the Flash IDE.

Can MXML files be used with apps that just extend Sprite?

Not too sure what you mean by apps. However, AS3 components work just fine with MXML. Sprites will have to be wrapped up in some sort of a IUIComponent if you are using it with MXML. MXML is syntactic sugar. It is compiled into AS3 and as such may not be as efficient if you were to code them up.

This blogpost may be of interest to you.