Adobe flex application into Electron - apache-flex

Is it possible to launch, integrate Adobe flex application within the electron shell?
Have someone done this before? if so, I am looking for challenges or even a possibility of using it with electron.

In order to do that you will have to migrate from Adobe (maybe apache?) Flex to the new Royale SDK. This will allow you to export as html5 and then wrap it with electron.
When migrating to Apache Royale, you can keep your as3 code but will have to rewrite most of the UI. There is also an option to "emulate" spark components but I haven't tried that.

If your intention are creating Desktop App, recompile your code with Adobe AIR and re-target for Desktop.
This will be much much much more easier.

Related

AS3 only app breaks when I compile w/ adobe sdk, works when I compile w/ apache sdk (same adobe sdk)

something strange happens when I switch between the adobe sdk (3.90.1210), and the apache sdk (which includes the same adobe sdk (3.90.1210)
one would think that there should be no differences when I make this switch, as my app is AS3 only, no flex references, and the underlying sdks are the same
the app builds and runs under both sdks, but about half of my images just dont show up when I run under the adobe sdk
so I dig down and I can see that the bitmap data objects that dont show up all have their HxW set to zero, the others have it set to proper HxW
the thing is, this has worked fine for a long time under the various adobe sdks, and something in the apache sdk fixes the problem, would like to understand it
meanwhile the wierdness in the images has something to do with having been flattened or not during production... images are all pngs, imported into flash and compiled to a swc, then merged into code
not a graphics guy, was hoping I wouldnt have to become one... have poked around and cant figure that side of it out...
suggestions?
one thought is to go back thru our hundreds of images and flatten (unflatten? whatever) them all with some photoshop batch process... this would not be fun
or I could stick w/ the apache sdk... which makes me a little nervous in that I have no idea what magic it's bringing
thoughts? anyone else seeing this?
thanks
To avoid stretching out the comments on the main question further, I'll throw this into an answer.
There are three official SDKs for Flash development. There are several others (like Starling) which have no affiliation with Adobe, so we won't count those.
Flash SDK - This is the basis for all things Flash and is developed solely by Adobe. Your core classes (DisplayObject, Object, Number, System, etc) are all found within this SDK. No matter what you are building for, every Flash application must include this SDK.
Flex SDK - Flex is a GUI framework originally developed by Adobe. After v4.6, roughly two years ago, Adobe donated the framework to Apache. Since that time, Apache has been developing the framework with fairly consistent development. We are currently at 4.11 with 4.12 due out in the coming months. This framework is also open-source, so it is partially community developed, partially Apache developed. There are two main different GUI frameworks in Flex: MX and Spark. MX is no longer in development, while Spark is. You should not mix components from the two.
AIR SDK - This is the Adobe Integrated Runtime. AIR allows you to run Flash apps as native apps on various platforms. The AIR SDK is the bridge between Flash and the native platform and nothing more. It is developed solely by Adobe and is closed-source. Apache has no part in this project, other than Adobe's promise to keep supporting Flex and MXML for the foreseeable future.
So with those things in mind, let's look at how they interact. As I said, the Flash SDK is included in all Flash apps. The AIR and Flex SDKs are built in ActionScript 3 (Flex is NOT built in MXML) using the classes found within the Flash SDK. The AIR SDK is used to build a native application, and that is the only time it should be used. The Flex SDK is a set of GUI components that make building interfaces easy and can be used in both web and AIR applications.
The Flex SDK can exist without the AIR SDK and the AIR SDK can exist without the Flex SDK. There is absolutely no reliance between the two. For the sake of unity, the Flex and AIR SDKs are generally combined into a single folder. This does not mean they are the same SDK or related in any way, just that this is how the SDKs are loaded. This was an ease-of-use decision by Adobe years ago when they still developed Flex.
So if your AS3 project is using the same AIR SDK version are your Flex app and you are getting compiler errors when you compile AS3, there must be something Flex in your project. Maybe a Formatter or the RPC classes used to make SOAP calls). You need to find that and get rid of that or import the correct SWC file from the Flex SDK, assuming it isn't a GUI component.

embed air in flex mobile application?

I'm quite new to developing in Flex. I've found out that it's possible to create mobile applications with Flex 4.5. So far so good, I've made an app and it's working well on my mobile phone. But there is one thing that I'm not very happy with. When I'm installing the app I also have to install Adobe Air (stand alone application). So is not realy cool and not the way to go in my opinion because this will look strange to the users of the app. And especially the users which aren't realy 'geek minded'.
Any solutions to this? Is it possible to include or embed Air in the app? It will make the filesize of the app bigger but that's a much smaller problem then having to install a complete different app next to the real app.
All the best from NL.
This feature is called Captive Runtime and was introduced in AIR 3.
To use it today, you'll have to overlay the AIR 3 SDK onto the Flex Framework of your choice (I suggest 4.5.1). Then you'll have to use command line tools to compile your app using captive runtime.
This will most likely be a lot easier when Flash Builder 4.6 rolls around.
More information

New web app that I would also like to port to Android - The question is: Air or Flex?

I'm very familiar with the Adobe Air runtime, and quite handy with the workings of a Flex application, but I'm unsure which technology I should use if I would like to have a multi-platform application able to be deployed to the Web foremost, Android Phone secondly, and Desktop third.
I understand that AIR is probably the route I should go, but I'm very conflicted on how integrated it is with Android? Is it easy to do now, or still a headache (I haven't read about it in ages)? I've seen the new Flex 4 deploying to Android very smoothly, but I've heard it's difficult to write an AIR program with Flex.
Any thoughts are appreciated!
You have me scratching my head here.
AIR is a runtime, not an application development framework.
Flex is an application development framework, not a runtime.
You can author your application in Flex and deploy it via Flash to the phone and web and deploy it to the desktop with AIR.
Now, if you were implying that you would develop your web app using HTML/JS/etc..., deploy that to the desktop with AIR, and then try to rewrite the whole thing in Flex, I agree... that's not a reasonable approach.
My advice is that you stick to one stack.
So, if you're going to do Flex, do Flex all the way. If you're going to do standard web stack, do that all the way (there are a lot of mobile web dev frameworks out there - jQuery Mobile is probably one of the better ones, but Ext.JS/Sencha is out there too).
Make sense?
I have not tried it, but Adobe acts as if it's fairly simple to adapt from straight Flex to Flex within AIR.
What's more important is what language the app is already in. If it's in JavaScript and HTML, then it would stand to reason that adapting that to AIR's HTML5/Javascript engine would be quicker and less frustrating than porting it to Flex and adapting it to AIR.
Additionally, it gives you a codebase you can more easily adapt to iPhone if you want, using PhoneGap or Titanium, which are HTML5/Javascript based as well.
I've had a couple of projects end up withering on the vine because I went back and forth between technologies (and in parallel allowed feature creep to make them more and more monolithic and daunting undertakings). So, IMO, the development paradigm to use is the one that will allow you to spend more time coding and less time second guessing yourself.
I want to clear up some confusion:
I understand that AIR is probably the
route I should go, but I'm very
conflicted on how integrated it is
with Android? Is it easy to do now, or
still a headache (I haven't read about
it in ages)?
AIR is very integrated with Android through the runtime, officially known as "AIR For Android". Adobe released it recently and people already have applications in the Android store. The tooling introduced in Flash Builder Burrito makes it very easy to build Flex applications for Android. I expect Burritio to become a formal release early next year.
I've seen the new Flex 4
deploying to Android very smoothly,
but I've heard it's difficult to write
an AIR program with Flex.
It is borderline trivial to convert a Flex application to an AIR application. However, switching a "standard" Flex or AIR application to AIR for Android will most likely require code optimization due to device resources. I would anticipate sharing 60-80 percent of the code base, but the UI will most likely require rework because of the smaller screen size and component management will have to be done differently because of memory / processor requirements on a mobile device.

Can I use an Application developed with Flex Builder Trial?

Can I create an application with Flex Builder Trial ( that I have just downloaded ) and use that application on my website ?
But all of you that use Flex Builder have the licence ?? It's very expensive for me ;(
Yes.
The builder does nothing to limit the swf files that are generated during the trial period. The trial is practically full version, just for a limited time.
If money is an issue you don't have to use flex builder. You can run eclipse with the flex plug-in and the flex SDK is free. I use the builder myself, but I'm sure Google can help you set up eclipse.
Yes you can. If you will not use charts it will be absolutely the same app as an app built with a licensed version of FB. You can even build an application without a Flex Builder at all by using free Flex SDK.

Requirements to create Adobe AIR application

i am working with Flex for quite sometime. but i hadn't get any chance to even look at Adobe AIR platform. I am planning to do some personal softwares using AIR.
Provided the background that am an absolute zero in AIR, what all should I have in my system apart from Flex builder? And how fast i can learn AIR if I am pretty comfortable in Flex?
Regards,
Anoop
You can quite literally use any Flex code in AIR - the most imminent differences are the root tag of the application that is WindowApplication and a wider selection of methods available. AIR is only a platform that your Flex runs on, not an alternative or anything.
After you have created a new AIR project, you may want to check the MyTest-app.xml (or whatever the name of your app) file in the src folder. This is where, for instance, some properties of the new window created by the operating system reside.
As for tools, you'll want to install the AIR runtime if you don't have it already, but apart from that and Flex Builder you're all set!
You're in a good position to start developing AIR applications given your background in Flex. What you have to learn would depend on what you already know and the kind of application you are going to build. We can help you if you share more details about the app.
Some things you can look out for are the WindowApplication object, File systems i/o, SQLite database ops, windows/menus/task bars etc. Here's the basics for getting started with AIR app development in Flex: http://livedocs.adobe.com/flex/3/html/Part5_AIR_1.html

Resources