View Full Version : Is Flex AS3 different than Flash AS3?
MIXPOSURE
01-01-2009, 03:50 PM
Hi,
I've never installed or used Flex but I always assumed it used the same AS3 as Flash. However, I'm currently trying to help troubleshoot an AS3 project and a class is trying to import mx.core.SpriteAsset. I searched my entire system for SpriteAsset.as file but to no avail, and Googling it only found Flex-related articles.
So are there features of AS3 that are proprietery only to Flex? Will I be dead in the water trying to troubleshoot this project without Flex installed? Would I have access to all the Flex classes by installing the Flex SDK? Are there any other differences I should be on the lookout for?
Sorry, I'm quite confused here. Thanks for any help!
Rossman
01-01-2009, 04:34 PM
Flex is a framework.
You use the Flex framework with Actionscript 3. Flex has additional classes (which comprise the framework) that the Flash Authoring environment does not include (such as your mx.core.SpriteAsset). They both use Actionscript 3, though.
MIXPOSURE
01-01-2009, 05:01 PM
Thanks Rossman!
So are the additional Flex classes freely distributable? Would installing a trial version of Flex get me what I need?
Thanks again, I really appreciate it.
Rossman
01-01-2009, 05:08 PM
Would installing a trial version of Flex get me what I need?
I believe so, yes.
lordofduct
01-01-2009, 05:31 PM
The Flex SDK is completely free and comes with the AS3 library.
If you have Eclipse or some other IDE you can use it all you want free of charge.
The flex framework also isn't necessary but very useful. I do a lot of projects in Flex Builder but as a pure AS3 project because most customers expect something they can use in Flash CS3 ( i just wrap it with an fla when I'm done ).
Sekhar
01-01-2009, 07:42 PM
Mix, I feel your pain. Flex and Flash are two alternate ways to produce an SWF, yet Adobe doesn't explain well how the two are related and interact (at least I didn't find any good info). I went through these learning pains myself, so let me summarize what I found for you and for other readers.
What you're hoping to do (I think) is grab the mx library from a trial Flex Builder or SDK download and use Flash as usual with that library. Sorry, that isn't possible - you'll need to use Flex to employ the mx library.
Which means, you'll have to actually get Flex. Now, Flex SDK is a free option, but it's command line and is an incredible pain. Much, much better is to get Flex Builder. This isn't free, but does come with a 60 day trial that has everything except the data visualization stuff.
Now, Flex Builder comes both as a standalone and as an Eclipse plugin. If you're an Eclipse guy, the plugin route is the obvious one. I use the plugin, and it's fantastic. This costs $ though, and if you want the data visualization (and other cool stuff like profiling), you need to get the pro version, which costs $$.
Bottom line in your situation is: you need to get Flex - and I recommend you get the Flex Builder trial to get things going.
MIXPOSURE
01-02-2009, 04:25 PM
Thanks alot, I really appreciate the informative responses.
Sekhar, thanks for warning me about the SDK's command line 'feature'. Whew, that could have easily been 30 minutes of my life I'd never get back. Unfortunately, I'm still a little confused about the Flex/Flash relation. When you said I couldn't just grab the mx library and use Flash as usual,..why is that? Is that to say Flash's compiler isn't keen to the Flex framework at all? Am I dead in the water without Flex Builder (or eclipse) if I need to compile an AS3 project which contains a clip that extends a Flex class such as PainAsset?
A few last non-important questions:
Knowing what you know now, which editor would you recommend for a coder getting his feet wet with Flex that has yet to use either FlexBuilder or Eclipse? Any notable pros or cons?
How does the learning curve of Flex compare to Flash/AS3?
Any good sites for resources such as snippets, tutes, or handy coding tools? (ala this one)
Thanks again everybody!
Well, one of the free options is using Flex SDK with FlashDevelop(Windows only), as it supports MXML syntax and Flex projects. It has no design mode, but the code editor is better than in Flex Builder.
MIXPOSURE
01-02-2009, 07:39 PM
Thanks DL1t.
I hope you took my rant with a grain of salt. My tongue was at least partially in cheek the whole time. Macromedia/Adobe is one of the few companies that I can give money to and know that it's going to an excellent cause.
As for FD, thanks for the tip. I've been toying with it a little for AS3 but I seem to be a lot more productive with Dreamweaver. That's mainly because I rely on using a lot of snippets and the current FD snippets feature has a lot of room for improvement.
Do you (or anyone) happen to know if there is a definition file available for Flex and MXML support in Dreamweaver?
Thanks again!
fx.barrett
01-02-2009, 09:10 PM
You said that you have the money and you are willing to pay for it, then IMHO, buy Flex Builder 3 ( or wait until Flex Builder 4 is launched... i can hardly wait ). It's definitely the best programming platform for AS 3.0 out there... Code hinting and everything you want, easy to configure since it's built on Eclipse and it's totally the right tool for a developer...
I personally have nothing against FlashDevelop or any other soft but Flex Builder is still built by the Adobe guys, and who if not they know what's the best to add into a builder or not ? Especially since it's Open Source ( if I'm not mistaking ) so it will definitely be the best tool for many developers.
wvxvw
01-02-2009, 09:11 PM
Huh... I would've understood if you ware comparing FD to Flex, but DW?! Sorry, DW doesn't have even basic autocompletion for DOM / JS functions, only coloring... and absolutely nothing connected to AS... If you're going to use it for AS it is a huge waste of money :) because it is just so inappropriate for it... it's like coding in Photoshop...
Dealing with your previous question:
Yes, you can compile Flex projects from Flash, you only need to set classpath to the SWC library with Flex classes* (here: <Flex SDK location>frameworks\libs\flex.swc and <Flex SDK location>frameworks\libs\framework.swc ) But this will only mean that what you do, you do backwards, meaning, normally, you create graphic libraries in Flash and code in Flex / FD / FDT / AXDT / (new! plug-in for VS still under development, but seems very promising) Amethyst. Because Flash is not suited for coders...
* Although, keep in mind that certain metatags are not supported by Flash compiler.
@fx.barret:
Flex Builder is not open source, the SDK is, but it is not the same :)
Sekhar
01-02-2009, 10:54 PM
Sekhar, thanks for warning me about the SDK's command line 'feature'. Whew, that could have easily been 30 minutes of my life I'd never get back. Unfortunately, I'm still a little confused about the Flex/Flash relation. When you said I couldn't just grab the mx library and use Flash as usual,..why is that? Is that to say Flash's compiler isn't keen to the Flex framework at all? Am I dead in the water without Flex Builder (or eclipse) if I need to compile an AS3 project which contains a clip that extends a Flex class such as PainAsset?
A few last non-important questions:
Knowing what you know now, which editor would you recommend for a coder getting his feet wet with Flex that has yet to use either FlexBuilder or Eclipse? Any notable pros or cons?
How does the learning curve of Flex compare to Flash/AS3?
Any good sites for resources such as snippets, tutes, or handy coding tools? (ala this one)
Thanks again everybody!
Yeah, you need to get Flex, sorry. Think like this: anytime you see mx.* you need Flex; anytime you see fl.* (not flash.*, which Flex can handle) you need Flash. There are convoluted ways you can get Flex code to work in Flash, but you'll still need Flex in the process. E.g., see this blog (http://labs.wichers.nu/2007/12/25/using-flex-compiled-code-within-flash/).
WRT your question on the editor, I'd strongly recommend you go with Flex Builder plugin for Eclipse. I don't know about FlashDevelop or Flex Builder standalone, but IMO it's always a good idea to build with Eclipse when you can, because it's pretty much the default platform that hosts a bunch of other plugins. E.g., I'm developing some Salesforce apps, and there's an Eclipse plugin for building those. Every time you start with a new plugin, you can hit the ground running rather than having to learn the IDE interface/shortcuts/etc. fresh.
In terms of the Flex Builder plugin capability as an AS3 editor, it's absolutely fantastic. Once you use it, Flash AS3 editor will look like it's from the medieval period. Flex in general is way more advanced and if you're using Flash for serious apps (e.g., full Flash web sites), my suggestion is to use Flex and Flash together: assembling/coding in Flex and customizing with Flash. E.g., add a control to stage in Flex and customize the look in Flash. Or create a cool looking element in Flash and export for use in Flex (just save as SWC and let Flex know its location).
Also, upcoming Flex Builder 4 is supposed to be tightly integrated with Flash Catalyst. Don't be surprised if you start getting Catalyst files from the client's Marketing dept to import into Flex Builder. There might be ways to import into other IDEs, but why bother?
Huwcol
02-06-2009, 05:49 PM
new! plug-in for VS still under development, but seems very promising) Amethyst. Because Flash is not suited for coders..Thanks for the mention!
I should point out that while Amethyst is mainly intended as a Flex/AIR IDE, it can also create pure ActionScript projects and it will have quite powerful coding capabilities including IntelliSense code-completion, a huge range of syntax-colouring options, Smart indenting, auto-code formatting with numerous user options to apply spacing, newlines etc. The coding edition (Amethyst Personal) will be free (including a free ActionScript/Flex edition of Visual Studio if you need one) and is currently available as a beta. The commercial edition will have all the bells and whistles needed for serious visual design and debugging for Flex/AIR. You can find lots more information on the SapphireSteel Software developer's blog:
http://www.sapphiresteel.com/-Blog-
best wishes
Huw
(SapphireSteel Software)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.