Flex Builder Plugin in Eclipse - Some Controls not available ! - apache-flex

I downloaded Flash Builder from here : Download
I recently started writing some small programs in Adobe Flash Builder Plugin for Eclipse.
I am trying out those programs by reading out the Adobe book : Training from the source.
But, I found that some of the controls mentioned in the book for some e.g, such as ApplicationControlBar doesn't appear in the Adobe Flash Builder 4. That control is mentioned in the book, but unable to find in the Builder.
What should I do ? Any suggestions ?

I suppose you've created project using Flex 4 SDK which is default in Flash Builder 4. And the book covers Flex 3. So Flash Builder created spark Application container (from Flex 4) where ApplicationControlBar isn't actual anymore and replaced with controlBarContent property which allows to skin Application more flexible way.
So I can recommend you the following 3 solutions how to use Flex 3 (to be compliant with the book) in your project:
The easiest way to switch existing Flex 4 project to use Flex 3 is the following. Open project properties then Flex compiler > Flex SDK version > Use a specific SDK and select Flex 3 SDK which should be available there. Then you need to create new application in your project, select it as default using context menu, copy old application context to the new one and delete old application file. But I suppose it is better to create new project as far as you are dealing with sample apps from the book.
So just create new Flex project and select the right SDK version on the New Project master's first page.
If you plan to use only Flex 3 for your book's playground workspace you can set Flex 3 SDK as default so you won't need to select the right version on project creation. Just go to the Preferences > Flash Builder > Installed Flex SDKs and select the default version. You can go there right from the new Flex project wizard by clicking Configure Flex SDKs…
Hope this helps!

I've never seen or heard of an ApplicationControlBox. Perhaps they were referring to the ApplicationControlBar and that it's just a typo.
Adobe has some great documentation out there on each of its packages and classes. It's a great place to start if you ever have a question about one of the components.

Related

converting Adobe AIR to Flex application

We have a Adobe AIR desktop client which talks to a WAMP server. How can i convert this AIR app to a Flex app to be used in the browser.
Please let me know.
Thanks
vish.
I would create a new empty Flex application and copy your files into that project. Then move any code in your main app component (which is derived from WindowedApplication) into the main app component in your new project (which is derived from Application). You'll also have to go through your app and determine which components are used that are specific to AIR and rework them to use other Flex components (the compiler will complain if you don't). This should give you a good start.
I would move everything into a Flex library project. Then have an AIR project as well as a Flex app project which accesses the common code in the Flex Library project. This way you don't have to maintain two different codebases for common code and you can also have code which is specific to each version.

Flex Library Project: NativeMenu vs. ContextMenu

I have a Flex Library Project which has both Flex specific classes, and Air specific classes.
When I reference the library in an Air project, the compiler complains about an overriding contextMenu in mx.containers.Panel, saying that the param should be of type NativeMenu (instead of ContextMenu). If I switch it over to NativeMenu then it compiles fine.
The issue is when I reference the library in a Flex Project. This time it complains that it doesn't know the type NativeMenu. If I try to change it back to ContextMenu, then I get the same error as above.
I've searched google to no avail (found that someone else encountered the exact same problem: http://forums.adobe.com/thread/598791?tstart=-1 )
The docs don't help too much either, except stating the above: http://livedocs.adobe.com/flex/3/langref/flash/display/InteractiveObject.html#contextMenu
I'm thinking that its just not possible to do the mixing of Flex vs Air SDKs that I want, but I was hoping that maybe someone has figured this out.
Thanks!
You can't really target the web Flash Player and the desktop Player using the same project.
I would recommend encapsulating out as much functionality as possible into a library project. Then create a single Flex project and a single AIR project, both using the same library project.
Each respective project can extend, or replace, the different functionality.
I am not sure if this is the exact same problem, but I was having an issue with being able to reference the AIR libraries in a Flex Library project and found the (rather simple) solution.
Using Flash Builder 4.5, when creating a Flex Library Project, (right-click .. New.. Flex Library Project) there is a checkbox for "Include Adobe Air Libraries" at the bottom. This must be checked or AIR libraries will not be included.
When you select the version of SDK/AIR you are using in the dropdown, the message should also indicate what the minimum version of AIR required is for your application.

Can Flash Builder 4 Premium compile Flex Builder 3 Pro project?

That's about it. Oh, and I don't want to convert the Flex Builder Project making it incompatible with Flex Builder 3 Pro.
Yes! Here is an article and video that shows how to use the Flex 3 SDK in Flash Builder 4.
Yes, you can compile the project with Flash Builder 4. ISTR it either silently updated my project settings or I might have converted the project.
In any case, if you are trying to simultaneously use Flex Builder 3 and Flash Builder 4 you should note that at least one of the internal eclipse & FB project settings files (.actionScriptProperties, .flexProperties & .project) changed format between FB3 and FB4 - I can't remember exactly which ones changed off the top of my head.
This will affect your development workflow.
I have previously used Flash Builder 4 on a project whilst the rest of the team was using Flex Builder 3. Whenever they updated their project I had a lot of problems with conflicts in at least one of the above files. Whenever this happened, I just accepted the FB3 versions of the files, and let FB4 internally deal with upgrading the format. If I somehow needed to make changes to those files (such as adding a new class), I'd either get another team member to do it, use FB3 to add the files, or just manually edit the file myself. Irritating, but not the end of the world.
YMMV.
Yes. Adobe products are extremely backwards compatible. However, some Adobe products will by default save your "older" files into the newer format - ie if you saved your FB 3 project with the FB 4 application, you may have to choose "Save As" to force it to save it as version 3 (this is true at least for Flash, not certain if Flex is different in that regard). This is only relevant if you need to retain the older file format for compatibility with other coworkers who only have an older version of the program.

Convert Flex Builder 3 project to Flash Builder 4

I just upgraded to Flash Builder 4 (beta 2) from Flex Builder 3 which I have been using since it came out. Problem: All the projects that were in my workspace from Flex Builder 3 did not carry over into Flash Builder 4 (e.g. in the "Flex Navigator" view if FB3). Flash Builder 4 now uses the .FXP format to manage projects, but Flex Builder 3 did not. Is there an easy way to get all my projects back into Flash Builder 4?
Use File->Import->Other
In the dialog, select General->Existing Projects into Workspace
Point the root directory to your workspace, check all the projects you want to import and that's it.
Worked just fine for me.
Sharvey's answer was correct, but I also wanted to correct something from the original question, the part about .fxp files. Flash Builder 4 has not changed the format in which it stores projects; it still stores them as a directory with a .project file, a .actionScriptProperties file, and so on, just as Flex Builder 3 did. Where .fxp files come in is, they provide an easy way to package up a project into a single file and share it -- not only with other Flash Builder users, but also with users of Catalyst.
Catalyst is different from Flash Builder: .fxp files are its "native" format. So, suppose a designer created a project in Catalyst; you, the developer, could then import that .fxp file into Flash Builder using the "import FXP" command. When you do that, it unpacks the fxp into a traditional project format on disk.
Hope this helps clarify things! - Mike Morearty, Flash Builder team

Getting started with Flex3

I'm a little bit confused.
I want to start learn Flex3 with Eclipse and the FlexPlugin .
But I can't find the link.
Is the Standalone version of FlexBuilder free ?
How do i set up the Enviorement ?
Do i have to download the FlexBuilder ( free?)
Or do i have to download Eclipse and then add the plugin ( link ? )
Can anyone help me :(
Flex Builder Standalone will work as is just download and use, but no version of flex builder is free, you get a trail version of 30 days or so.
For Flex Builder plugin version you need to first download Eclipse from eclipse.org and then download the Flex plugin. On installation of the flex plugin, the wizard will prompt you to point it the eclipse (unzipped) location, it will take care of installing the plugins.
The plugin version is useful if you want to work on java based projects, if you just want to learn flex use Flex Builder Standalone version.
Flex Builder is not free. You can use Flash Develop together with flex sdk (both are free) to get syntax highlighting and code completion in mxml/AS files.
Actually, you can get hold of Flex Builder for free, assuming you fit into one of two categories, if you are unemployed or in education (educator or student)
See freeriatools.
Adobe Flex Builder is not free but you can download trial. Flex SDK is free though and will be enough at least for hello world examples.

Resources