Open air/flex aplications inside any browser window - apache-flex

I've been searching around web and so far found many tutorials/docs on how to install or open air application from a web page. This just opens a new AIR-browser window and that's not what I'm looking for. I'd like it be opened inside a browser frame (even if downloaded first) much like a plain swf file.
I know air file is more or less plain zip, so maybe I could unpack it? What AIR features shouldn't I use for this to work?

Impossible. Air is a separate application. It's like saying "I want Microsoft Word to open within a browser frame".

Related

Drag and Drop outlook attachment in to Adobe AIR

I would like to know if there is a way to drag and drop an attachment file from an outlook email that is open into an AIR application and for that file to be then accessible to the AIR application.
When I experimented with this the drag operation is giving AIR a File Promise List. But I'm not exactly sure how to make use of it once it is dropped. All the examples out there explain how to manupilate File Promises from an AIR application to the desktop. Nothing that explains a file promise into an AIR app. Any help is much appreciated.
AIR is like any other desktop application in this aspect: you are notified that a thing of type File Promise List is in the clipboard. You have to deal with this type (as any other desktop application would).
If this is the Windows clipboard call-back thing, then AIR's limitations might be a problem. Applications have the option, through the Windows API, to put a token in the clipboard rather than actually moving the data into global memory, which is what the clipboard is. If anyone actually wants the data, the original app gets a callback and supplies the byte stream.
If this is the case, AIR could do whatever the consumer application is supposed to do asynchronously, but I don't know if it does. Or it could be some particular Outlook thing.
Cheers
No, there is no way to drag and drop an attachment file from an outlook e-mail.
#Richard: AIR doesn't allow dropping message files to an AIR-Application.
Instead you receive a String, containing some mail info like subject, size, recipient.
No content, no attachments.
That's a pity...
Please feel free to correct me, but I have searched for a solution for a while and no solution found....
Greetings steelheart

Flex 3 + AlivePDF - How to display pdf in the browser

I'm testing alivePDF 0.1.5 and till now everything's been fine.
I'm super interested in the new function writeFlashHTMLText() cause it makes my life so much easier! xD
I'm now trying to display the generated pdf in a browser tab/window instead of just saving the file (using the filereference class' save function). I saw that there was a PDF.save() function that allowed that specifying the argument Download.INLINE.
However I don't want to use the save function of the pdf class cause I don't want to use a script.
Is there any other way to achieve what I want?
Thanks a lot for your answers.
Regards,
BS_C3
Because of the way Flash works security-wise you have two options:
Generate and save the PDF to the local machine - this can be done entirely client-side using FlashPlayer 10+ (see the FileReference class).
The user can then navigate to, and launch, the generated PDF file.
Save the PDF to a server and link to the PDF from your Flash application. This will let you open the PDF in the browser.
Obviously this requires a server of some sort.
Build your app as an AIR application - this will let you save the file and, as far as I'm aware, launch it from the local machine.
The current state of things: you cannot generate a PDF and open it in the browser completely client-side (i.e. FlashPlayer in a browser) unless you are using AIR.

Flash Projector with multiple windows, each with a new flashPlayer instance

Does anyone know of a flash projector 'project' or 'framework' that uses a new flashPlayer for each window?
We've used mProjector, which works well to a point, but I'm very disappointed in the fileIO patterns they use. It is very buggy with regard to reading and writing files.
mdm zinc uses multiple windows, but it is all sits on one flashPlayer 'session'. The same applies for AIR. It is great, but there isn't a way to make each window run on a seperate flashPlayer... extreme number crunching on one window will lock up all other windows.
Thank you in advance. --jeremy
edit - Just to clarify my needs (since I'm adding a little bounty), the app is an ERP application, built on Flex 3.x, and the size and scope of the project == huge.
tl;dr -- I need an exe wrapper (for windows), similar to AIR, that can have multiple windows, running each window on a seperate flashPlayer instance, and when a window is closed, it blows-away that flashPlayer instance / stage / etc.
How about a DotNet application to handle the wrapper? It can spawn windows each with it's own instance of the Flash Player (ActiveX dll) running in it.
I'm Sorry I found this too late to help you, but hopefully this saves someone else some work.
You can use SWF Studio to do this.
What you do is create a stub EXE that takes command line parameters to tell it which SWF to load. The parameter tells the EXE which SWF to load from its internal collection of files added to the SWF studio Files Tab. Whenever you need to open a new "window" you just execute your own EXE again and pass it the name of the SWF to use.
SWF Studio's App.sendData commands allows you to send data between youe various windows with very little effort so your separate applications can easily behave like they are all parts of a single application.

What is the best tool to make a CD-ROM Demo Application?

I have to make an application that will do the following:
Open a video file embedded in the application
Open some pdf files, preferably embedded in the application, but if it will have to open externally, it's no problem.
Work in fullscreen on the user computer, with a minimum resolution of 1024x768. I'm thinking about a resolution of 1024x768, centered on a black background.
I was thinking of using Flash, but I don't have much experience, so if there is another easier IDE that creates a Flash application, I would prefer that.
So, if anyone knows any Flash component to do this, I'll be very thankful.
Creating a Flash CDROM takes a little bit of care, but from my experience it's well worth it. From your requirements, the Flash IDE is well up to the task. The common requirements are as follows:
Windows / Mac platform
Flash Projector file
Autorun file (For the Windows platform)
Net access or all local
If your client is happy with creating the CDROM just for Windows, there will be very few dramas - but if they want to create a Mac-friendly version, you can do that too and I will explain afterwards.
Your Flash should preferably be an .exe projector file - the reason for this is so that the Windows user can open your app without downloading a Flash player (If the client wants a CDROM, they probably have limited net access, so this is a good thing!)
Within Flash, you can perform all your standard fs commands including full-screen.
You will likely need an Autorun file so that the user sees your application as soon as you put in the CDROM - simply create a file named 'autorun.inf' in notepad and enter the following:
[autorun]
open=yourProjector.exe
Where 'yourProjector.exe' is the name and path of your projector file.
It sounds like you're going to embed your videos and content in the CDROM - this is usually the ideal case, since your client won't receive annoying security messages, but this can also be a bad thing if you want to correct your content later (spotting errors after a thousand CDROMS have been distributed can be a PAIN).
You can serve some of your content online to avoid this, but it would give your user some ugly messages, so as long as you triple-check your content and embed everything, it would be the best scenario.
Now for a Mac, Apple has done away with autorun features years ago - there is a way to turn it on through Quicktime, but this is off by default for almost all Mac users, and turning it on is not recommended because it makes the Mac vulnerable to the 'Hong Kong Virus', one of the few Mac viruses around.
You can make your CDROM mac-friendly by creating a Mac Projector and adding instructions for how to use it by changing the background image of the CDROM window. I haven't had to do it before, but I hear that it's not too difficult.
You can use the Flash Projector. Here is a tutorial to get you started. Now, you won't be able to embed the PDF files but you can open them easily enough using fscommand("exec","foo.pdf")
You can create an Adobe AIR Application; however it won't run off the CD ROM; it'll need to be installed locally.
If creating a projector from Flash Pro doesn't work; look at a tool like Janus or Zinc

After working for years, videos in my Flex Application won't play, just "buffering"

An application I wrote for a client almost 2 years ago using Flex 2 has stopped playing the .flv videos. It's been nearly 9 months since I've had to perform any updates to the app, so I don't have the source code on the computer I'm using at the moment. I'm not sure how often the client uses the application, so I can't say exactly when this started.
The videos just displays a black screen, does not load the first frame. I believe I used standard VideoDisplay object. The videos are contained in a folder on the same shared account as the application.
I've checked the application in latest versions of IE, Firefox and Chrome (running Flash 10) and I've also fired up a virtual machine to test it out in IE 7 with various releases of Flash 9 instead of Flash 10.
I checked, and the videos are still present, and I scattered some extra no-security cross-domain files around... but to no avail.
Does anyone have an ideas as to where I should start looking when I get back to my development computer? Could a change on the hosted server cause this?
UPDATE: I remembered another application with video that I had on the site that was made more recently using Flex 2. This application is a simple shell VideoDisplay object that serves up a .flv file in the same directory... and it works just fine.
So, the server is serving .flv files. The application I'm having problems with pulls .flv files from a different folder that is at the same level of the applications parent folder (the only difference I can see right now).
The someone cryptic error message received when using the debugging version of the Flash player was:
Error: 1000: No bitrate match
at mx.controls.videoClasses::VideoPlayer/play()
After getting back to my development machine I was able to determine that the XML file containing the URLs of the videos showed an old variant of the domain name that was in use a couple of years ago. This domain name was just allowed to expire, and so, the video player was pointing to .flv filenames no longer existed. Correcting the domain name resolved the problem.
You said the videos are still present, but are the being served?
A small hosting configuration change might cause files to no longer be served.
I would start there, you rule out that both your swf, and flv are accessible by the client browsers..
If it's on a new server, make sure it's serving the right mime type for .flv files, video/x-flv. I've had flash refuse to play videos without that set. Also, IIS now gives bogus 404 errors on requests to files of unknown mime type, so files can be on the servers, but invisible to clients. http://it.toolbox.com/blogs/rymoore/adding-flv-mime-type-in-iis-4198

Resources