building flex applications in eclipse - eclipse

I installed eclipse and the FDT plugin.
Now i would like to create a flex project.
I am wondering how to get a designer for the mxml where i could drag and drop lists, buttong and build a UI in flex.
I am totally new to flex.
Also, once i have that, if I build that as an application, it seems to generate a swf file.
Not sure if i can run this in anything other than a brower. The latest adobe flash player has not standalone exe.
I would like to understand the recommended workflow if I need to build a flex application.
I am basically looking at developing a desktop/web application that has fusion charts to visualize certain data.

I am wondering how to get a designer for the mxml where i could drag
and drop lists, buttong and build a UI in flex.
The current version of Flash Builder has one, and I thought that was the only Flex IDE that had a design view. The Flash Builder design view is limited, as it only works with the current version of the Flex SDK and is all around problematic. Most developer's don't ues it and the feature will be removed in the next version of Flash Builder.
I've heard rumors that IntelliJ may add one in a future version, but I wouldn't count on it.
Once i have that, if I build that as an application, it seems to
generate a swf file. Not sure if i can run this in anything other than
a brower. The latest adobe flash player has not standalone exe.
Correct; a Flex project's primary intent is to build an SWf file that will run in the browser. At one time Adobe offered a stand alone player that the SWF would run it. I'm not sure if they still do. It was not practical to assume end users had the stand alone version of the Flash Player, though.
I have no idea if FDT supports this; but you can use the same, or similar, code with Adobe AIR to create an AIR file. The AIR file should run anywhere that the AIR runtime can be installed. If you use the Adobe AIR Captive Runtime feature on a windows PC you can create an executable.

Idea won't ever get a design view, because it requires a special version of the Flash player built into the IDE. This in turn requires access to the Player source code, and adding a bunch of platform-specific JNDI junk to your IDE. And given that even Adobe is dropping support for the design view, it's apparently not economically viable to maintain that special version, even if you have the sources to Player and the right to use them.

Related

LibVLC v3.0.3 - How to know what are the only plugins needed by my application?

I am using LibVLC v3.0.3 for my application to play WAV sounds from memory.
So far I was able to determine the main plugin folders needed for this (and this is by only testing by deleting one folder at a time and test if the application is working and there is sound in the output).
I want to filter these 5 left folders which are (access, audio_filter, audio_output, codec and demux) to keep only the needed plugin DLLs.
I found out that: the less plugins are loaded, the more the application loads faster.
And, is it possible to link these plugin libraries statically with the application in the compile time !?
Thank you for your understanding.
How to know what are the only plugins needed by my application?
That would depend on what your application is doing. Once you know the features of your application, you can learn about which VLC plugins do what and possibly remove those you do not want using configure if you build yourself https://wiki.videolan.org/Configure/.
I found out that: the less plugins are loaded, the more the application loads faster.
I guess that's true, but not all plugins are loaded by default.
And, is it possible to link these plugin libraries statically with the application in the compile time !?
Depends for which platform. For Windows I don't think so, but current VLC apps for Apple platforms are statically linked.
I'd advise you to have a look at the official apps build scripts from the VideoLAN gitlab https://code.videolan.org/explore/projects/starred
If by any chance you're using the .NET stack (for Windows), that will be easier thanks to https://github.com/mfkl/libvlc-nuget/blob/master/cherry-picking.md

Is it possible to embed or load SWFs when making iphone apps (Is it allowed by Apple)

I am a little confused on whether to embed swfs or load them when making apps for the iphone. Does anyone know what are the advantages of each (which is preferable to use)? I know that embedding swfs should be a little faster than loading them but is that all?
Also and this is kind of important, I read that Apple will reject any app with external swfs?? Is that indeed correct? If so, will embedding or loading said swfs solve this problem?
Thanks in advance
EDIT: after some searching around, turns that Apple does have problems with loading external swfs, u can still do it, but your swfs need not have any actionscript attached, here is a link http://whizzkid74.blogspot.com/2010/12/air-for-iphone-loading-external-swf.html It doesnt say anything about embedding swfs however, so my question is this: can u embed swfs when writing apps on the iphone??
EDIT To clarify, when i say external SWFs. I mean SWFs that are found on your system locally but you need to add them to your program since they contain MovieClips or Sprites etc... that u need. I didn't mean SWFs that you need to download from a website or an online source. (hope that clarifies things)
EDIT Changed the question's title...Problem solved, thanks for all the help guys and happy new year =D
Update, Oct 2012:
In Adobe AIR 3.5, adl is introducing a feature called "multiple SWF support" that allows the use of Loaders to load SWFs delivered in the .ipa (local files, not from servers) to have code in them. The adl compiler AOT compiles SWFs that are included in the .ipa, allowing them to be loaded and work under iOS.
AIR 3.5 is currently in beta at the time of this writing, available on the adobe labs site:
AIR 3.5 on Adobe labs website
AIR 3.5 release notes
Note that this feature requires -swf-version=18 or greater of the root SWF (not necessarily the assets being loaded) and AIR namespace ending in 3.5 in the application xml file.
Older answer:
I wanted to update this answer because I've learned a lot about this issue since I first looked into it.
The root of the issue is that, when making iOS apps with AIR, Apple TOS disallows runtime interpretation of code - and this includes SWF bytecode. So loading SWFs with code in them (even simple animation commands like stop(), gotoAndPlay(), etc) is disallowed and will not work via a Loader (prior to AIR 3.5).
Note that it's perfectly fine to load SWFs for their vector graphics content. The graphics will display, but the code will not execute.
However, there are a few workarounds for this. Both workarounds avoid a Loader by compiling assets with code in them into the main SWF, because once they're part of the main SWF, the AIR compiler (adt) will cross-compile the code into objective-c, and everything will work fine on iOS devices.
Using SWC libraries
This is the best option for iOS development. If you compile your graphical assets (.fla file) into SWCs (or export SWCs from symbols in your library), then compile your main swf against these SWCs, this goes through the compiler and actionscript code will execute on iOS devices.
Using SWFMerge for [embed]ed SWFs
Embedding assets into SWFs is very easy, and looks like this:
[Embed(source="GameLevel.swf")]
private var GameLevel:Class;
public function main():void
{
var my_level:* = new GameLevel();
addChild(my_level);
}
In this scenario, if gameLevel.swf has code in it, it typically wouldn't work in iOS, because new gameLevel() would create a Loader and interpret SWF bytecode. But, if you first run the above SWF through my tool called SWFMerge, it will take your embedded SWF and merge it into your root SWF. Then ADT will compile your main swf (including embedded code) into objective-C, it will work on iOS, and note: new gameLevel() now results directly in an instance of your asset - NOT a Loader.
The SWFMerge tool is here:
http://www.onetacoshort.com/temp/SWFMerge_alpha.swf
Let me know in the comments if this workaround works for you or if you have trouble.
Using Loaders
Prior to AIR 3.5, if you use a Loader to load a SWF file (whether this swf is included in your IPA or served from a webserver), the target SWF graphics will load just fine, but no code inside the SWF will execute, again because this is disallowed by Apple's TOS.
As of AIR 3.5, packaging SWF files in the .ipa as assets, using a Loader will work even if they contain code as this code is now AOT-compiled by adt. This requires -swf-version=18 or greater of the root SWF (not necessarily the assets) and AIR namespace ending in 3.5 in the application xml file.
However, it is technically possible to interpret SWF bytecode, it's simply an App Store legal restriction not to. If you only want to test on an iOS device and won't be distributing your app via the App Store, you can compile your SWF using adt's -target ipa-test-interpreter option, and Loading SWFs with code in them will work.
I'm not familiar with the rules around Apple and iPhone apps, but generally when I make apps/games, I embed everything. The advantages:
Your game/app is in one swf, making it easy to share
Your game/app loads quicker as all the assets are there at load-time
You're not dependant on internet access to get your assets (if you're loading them from a site) - good for an app
Your game/app will "just work" - no security issues, no problems with urls changing/asset site going down (if they're external)
If you use a swc instead of an swf (an swc can also be loaded btw), then you can also benefit from strict-typing
The disadvantages:
If you need to update one of your assets, you need to republish the game/app
The answer is yes, you can embed SWFs, but that is not the only way. You can also use normal Loader methods, with everything relative to the main SWF:
var myLoader:Loader = new Loader();
// iOS apps act as if the main SWF is in a folder
// and the other SWFs are in the same (or sub) folders.
var url:URLRequest = new URLRequest("loadedSWF.swf");
myLoader.load(url);
addChild(myLoader);
myLoader.x = 50;
myLoader.y = 30;
With one caveat: during compile time (in the "Air for iOS Settings", in the "Included files" list), you have to list the SWFs that you want to be loaded, and they will get compiled into the IPA.
So, no you cannot call to external SWFs, but you certainly can access other SWFs using the embed tag, or using (what might be called) IPA embedding.
Edit:
Since the question and title have changed a bit since I first answered this, here is a more generic summary. Apple does not allow loading local SWFs in the same way that you would be able to if using Flash Player on a website. There is no way to load an SWF (or anything else) using "relative" or "local" references in an i-device unless that content is compiled into the app. This does not apply to some types of "remote" SWF loading, and also does not apply to Actionscript "Native" coding, but that is not what the (original) question was about.

Creating and installing a Plugin for mobile Safari on ios4 devices

I have created a simple web plug-in to write data to file system. This works as expected on a mac Safari. Here i have to manually place the plug-in on to the /Library/Internet Plug-Ins folder. My question is there a way to find if the plug-in is not present through JavaScript and if it is not then download and install the same. I also would like to know if the same can be done on mobile Safari running on ios4 devices?
Obviously you can not load Plugins of any kind in Safari on the iOS device. This is the main reason Flash does not exist on iOS.
On the Mac you can do that. But you need to create the plugin in C++ and for each platform independently.
If you code the plugin correctly, it should be possible to "detect" it using JavaScript. I highly doubt you can download it automatically, though. This would pose a very large security hole for every user.

Port AS3/Flex app to iPhone

I believe Adobe tools like CS5 have ways to output as an iPhone app, but what about a regular AS3 or Flex project? Are there any tools to auto-port, or AS3/Flex iPhone implementations out there?
Out of interest, how does the CS5 thing work? Is it a totally different code-path or something less drastic? For instance Flash supports Shapes and Timelines, etc... do they in fact provide an iPhone Flash runtime of some sort?
Packager for iPhone is what you should try out:
http://labs.adobe.com/technologies/packagerforiphone/
I guess its still a beta, but doesn't hurt in trying. It also has a standalone version (without the need of CS5).
Actually it is still the flash runtime, the same way that when you export a .exe in the publish settings (not an AIR native EXE, just a projector exe). It grabs the flash VM, and your source code, compiles your source and the flash vm wrapped up together into a single executable. It's just compiled down to ARM. There is still the flash runtime running inside that executable and your bytecode is still being executed against it. So virtualization is still essentially taking place. You're right in saying it's "native" assembly code but it's a far cry from a "native" application.
Regarding how it works, it is not a Flash runtime, but a way to compile ActionScript to native ARM assembly code, via LLVM.
Edit: also see Jesse Nicholson's answer.

How do you setup Eclipse to work on iPhone development (instead of Xcode)?

Although I've been getting more and more familiar with Xcode while developing for the iPhone, there are times I just wished I had a better IDE, something like Eclipse.
So I was wondering does anyone know how to migrate iPhone projects to Eclipse, and if it's worth it?
XCode largely uses standard Unix tools for a lot of its work. iPhone applications are compiled using GCC 4.0, it uses gdb for debugging, so it should be possible to set up Eclipse to at least compile applications.
If you look in the Build section of the Project Info pane (select the project, hit the Info button in XCode, choose the Build tab from the top) you can see many of the options.
I'm not sure what is required to copy a file to the simulator and attach a debugger to do a test run, it might not be worthwhile to jump through all the hoops and Apple may require an XCode generated build to accept an app into the App Store.
It may be the case that for regular code editing you can work reasonably well in Eclipse, then switch to XCode for interactive debugging.
Most of the existing Eclipse plugins seem to be oriented towards developer iPhone-aware web applications, so I'm not sure if you'll get any help there.
As far as I know you cant use Eclipse or any other IDE to develop for iPhone.
Apple only supports XCode and this wont change in the future. So I think you have to get used to XCode.
Late in the game, but you might want to kick the tires with JetBrains's AppCode, eventually a full feature drop-in replacement for xCode ... and very similar to IntelliJ (GUI, work flows, etc...). Still Early Adopter as of now, it performs some tasks rather well. I still use xCode for configuring the build options and targeting the device, but that will eventually be taken care of.
regards
There's cross compiling that give you ability to develop IPhone apps on eclipse
http://www.youtube.com/watch?v=TG-NIt2O5J8
There are no plugins that support Apple IOS application development in Eclipse but on windows, you can develop using Adobe CS5. This is one of the powerful tool from Adobe in which you can develop .ipa applications on windows but you need some stuff to be ready before you start developing IOS applications using Adobe CS5