Solved

Prompt user to save or open a document from Adobe Flash, for Adobe Air application

Posted on 2011-02-27
7
378 Views
Last Modified: 2013-11-11
I'm using Flash to create an Adobe Air application.  I need to create a link that when clicked will prompt the user to save or open a .doc, .ppt, or .xls file.  Just like html would if a link was directed to that file.  I'm aware that air won't launch an external file or program but is it possible to prompt the user to 'save' the file?
0
Comment
Question by:markus7878
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 34991246
0
 

Author Comment

by:markus7878
ID: 34992969
It seem the 'fileReference' object will only allow you to point to images, .xml, or .txt files.  If referencing .docx or .ppt nothing happens
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 500 total points
ID: 34993219
There should be no restriction for this.
Have a look at the followin line:
file.browse(new Array(new FileFilter("Images (*.jpg, *.jpeg)", "*.jpg;*.jpeg")));

Open in new window


Simply change this to
file.browse(new Array(new FileFilter("Images (*.docx, *.ppt)", "*.docx;*.ppt")));

Open in new window


Or use it without any filter to allow any file type.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:markus7878
ID: 35033512
The above solution uses the 'URLrequest'
public function ImageSave() {imgFile = new URLRequest("coffee.jpg"); //change it to your image path

Open in new window

'URLrequest' will only work with image, or .pdf file when exporting flash as an air application.
When using the the 'URLrequest' and referencing a .ppt file it simply opens a blank window, in adobe air, rather than launching the application or prompting the user to save the .ppt file to their hd.
 
0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35034195
Well the problem is not Flash from not loading the PPT, its simply that flash cannot display a PDF or PPT. The download works great with URLRequest.
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 36321177
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flash media server 1 337
How to disable  HTML5 video in chrome 2 1,583
Flash Player White Screen Facebook 5 791
Adobe Flash Player not supported on my Tablet 7 762
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question