Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Launching A Local Html File From Local Swf ( Flash 8.)



Hello everyone i am having a problem launching a local html file from my swf. i have a button called print that when clicked it is supposed to open the local html file and print out the content. this is the code i used on the button on (release){getURL("folder/folder/file.htm","_self");} i also tried scripting it on the time line when that didn't work. any ideas?Thanks,kool



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-16-2007, 01:53 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Problem With Local File And Local Link
Hi to everybody,

I have installed a new version of flash player (9,0,28,0) and when I open a local file like:
c: estindex.html

When I click into some link that point to some local file like as:
c: est est.htm

I don't obtain nothing the page still remain index.html.

If i put the test directory into some server everithing working fine.
I have tried to change some machine and i have tried some old flash file but still the same!

How can solve it without upload all file everytime into some web server and without install some local web server?

Thanks in advance to everybody for any tips and sorry for my bad english!

John

Local Html File
how do i load a local html file say "members.html" it is in the same location as the swf and fla but i cant seem to get the "get url:" to work?

Problem With: Local Folder Path, With .swf File Inside A .html File
hey i have:

index.html
in the root of the "folder-structure".

and a photoslide.swf file inside

flashfiles/photoslide.swf

other files inside :
flashfiles/
is
flashfiles/pic1.jpg
flashfiles/pic2.jpg
flashfiles/pic3.jpg


now the index file is at root of the file structure and the photoslide.swf file is embedded in the index.html file.

and then the photoslide.swf file loads in the jpg files.

But it doenst work. unless i put the pictures inside the root level of the file structure. And by doing this i lose some of my options. anyway around this? obviously i could jsut set the photoslide.swf file to load files from the path flashfiles/pic1.jpg. But if i do this i must edit every photoslide.swf file in every flashfiles fodle ri have on the server. I have 10.


So my question is as following;

Is there a way to set the photoslide.swf file to always read from the folder the photoslide.swf file is? and not the folder it is embedded in.


thanks from Neptunesnectar

Local Runtime Sharing? Local External AttachMovie?
I've been trying and searching through the forums but I think I am searching for the wrong keywords.

Is there ANY way of setting it up so that I can use attachMovie/removeMovieClip on external swf's? I've found these runtime sharing options but I am unable to make much sense of them. What I am creating is something that would always be run locally on a machine and not up on the web.

I want to use this one main 'engine' type of file that loads heaps of different movies into it. All of them swf's. Of course I realise that I could do things the loadMovie way, but it seems in this case like an option not really suitable for what I want to do.

Thanks for any tips

User Defines Local Image And Add It To A Local Swf(CD) ?
I have to run flash (swf) locally, which in my case means a CD.

What I want to do is allow the user to have a browse (local) function and pick an image from his hard disk and use that image to see a flash movie (swf) with his/her selected image in it!

Then after the user watched the movie with his/her photo on it, the user should be able to send this movie in a site(upload it). then naturally the user should be able to see it online at that site as well!

So my questions are how to have a browse function that puts the selected image somewhere I would like it to and then use this image in a flash movie (that will be a game with the photo on it).

And I guess then to send it online I do not really have to publish a new swf with the image in it, I can send seperately the swf (game) and the image file to the server through php? Did i get that right?

So far I know flash 8 has a new class for browsing, but how do I take a file selected from a user locally and use it in the movie again locally? load variable can do that but I should know the name of the file selected and also be possible to even select a local file??

Basically it is for educational movie. It will run from a CD. there will be many interactive exercices. At the end of the section there will be one game that in order to make it more personal I want to allow the users to add their photo at the game. So far everything should take place locally. Then if the user desires should be able to send in a specific site the movie he/she just watched(which means with their photo in it).

ANy ideas how I do that.

Even general ideas will help!

Thank you

Local File Creation From Flash
Hello All.

I need some help in creating an HTML file from flash that i would then be able to show in a web-browser. This is a local operation only... is this possible? All i am looking for is how to create that file dynamically so that it may be shown.

Any suggestion in the right direction will be appreciated.

Alina

Can Flash Write To A Local File?
hi

can anyone let me know whether flash can write data to a local txt file with no internet access? ive seen it done in flash 5 but was wondering if its still possible as everything ive seen points towards it not being possible anymore. i hope it is!

thanks in advance for any replies.

cheers

jb

Local File Storage In Flash
Hi folks,

I have a php form on my interactive game (it is offline). The users are supposed to create their own stories and submit them using the form. The question is, how do I store them and where? I don't need them to be e-mailed or anything, just stored locally. What would be the easiest way?

here is my code:











Attach Code

stop();

_global.style.setStyle("fontFamily", "Courier New");
_global.style.setStyle("fontWeight", "bold");
_global.style.setStyle("fontSize", 19);
_global.style.setStyle("color", 0x401A00);

_global.styles.TextArea.setStyle("backgroundColor","none");
import mx.styles.CSSStyleDeclaration;
_global.styles.TextInput = new CSSStyleDeclaration();
_global.styles.TextInput.setStyle("backgroundColor", "none");
_global.style.setStyle("borderStyle", "none");
_global.style.setStyle("borderColor", "0x401A00");
_global.styles.TextArea.setStyle("borderStyle", "none");
_global.styles.TextArea.setStyle("borderColor", "0x401A00");


this.submitBtn.btnLabel.autoSize = "center";
this.submitBtn.btnLabel.text = "submit";

//onRollover

this.submitBtn.onRollOver = function () {
submitBtn.gotoAndStop(2);
}
//onRollOut

this.submitBtn.onRollOut = function () {
submitBtn.gotoAndStop(1);
}




//onRelease
this.submitBtn.onRelease = function () {
if (userEmail.text == "" ||
userComments.text == "") {
gotoAndStop("error");
} else {
gotoAndStop("correct");
}
}




//---------------------Error----------------------------//

stop();

this.backBtn.btnLabel.autoSize = "center";
this.backBtn.btnLabel.text = "back";

//onRollover

this.backBtn.onRollOver = function () {
backBtn.gotoAndStop(2);
}
//onRollOut

this.backBtn.onRollOut = function () {
backBtn.gotoAndStop(1);
}



//onRelease
this.backBtn.onRelease = function () {
gotoAndStop("1",1);
}




//-------------------------------Correct-------------------------//

stop();

this.correctMsg.text = "Thank you for taking time" + "
to complite the application form" +
".
If your letter is good enough" + "
the King will get in touch with you!";

Can Flash Do This? Edit A Local XML File
So i am an AS2 programmer mostly because the client projects at my job do not support Flash Player 9/AS3 so i have not had any real chance to get into as3. Now that i have explained why i am asking this question, here it is. Is it possible for me to setup some sort of flash app that will load up data from a local xml file and then edit it inside a text box. After i finish editing it i was to save/write the changes i made back into the local xml file. I know it is possible to pull the information in from xml but writing the information back. I know it would be much easier just to open the xml file and edit through notepad or something but my coworkers have no idea how to really mess with xml. I am just asking if it is possible and what kind of approach would you all take. Thank!

Please Help How To Get The Full File Path( The File Which Is In Local System) In Flash 8
Hi All,

It would be great if any one can help me about how to get the full file path( the file which is in local system) in flash 8.
i do not want to use any server side uploading or downloading....i just want to view the image in loader component when we select image from any location in the hard disk using browse dialog box.

here is my incomplete code ??? !!!

import flash.net.FileReference;
import mdm.FileSystem;
var lo:mx.controls.Loader;
var listener:Object = new Object();

listener.onSelect = function(file:FileReference):Void {
_root.pa.text = file.name;
////////////////////////////

//////////////////

}
var fileRef:FileReference = new FileReference();
var bro:Button;
fileRef.addListener(listener);
_root.bro.onRelease = function(){
fileRef.browse([{description: "Images", extension: "*.jpg;*.gif;"}] );
};

It would be great if any one can help on this issue...

thanks
Jiby

Can Flash Save To A Local Text File?
I was reading in one of my many books in flash, it was late, I was tired, but I came across a sentence that said it was possible on a windows system to write to a text file. Now I have spent a week pouring through my texts trying to find that reference, but it remains elusive. Does some guru out there have the answer to my quest, or did I fall asleep studying and dream the whole thing...
-John

Can I Open A Local File Through A Web-based Flash App?
I have developed this application and would like to add the ability to save and open XML files (the data file for the program). I was able to modify the javascript file browser component to just browse through the local file system for a file. It then returns the full path and my application then tries to open this file.

The way I have it setup now Flash doesn't let me open up a local XML file when I'm viewing the application through a web browser (one of the preq. for the javascript file browser). However when I give a local XML file path in the compiler, the application can load the file.

Is there any way to open up a local file using a local file path when viewing a Flash application through a web browser?

If not, first does anyone know how to open up a file browser via VB and a stand alone flash application. Once this is done, is it possible to use the VB based file browser if the flash app is loaded through a web page?

Thanks for the any answers I can get.

Reg Internet Communication Local Flash File
Dear All,

I am having a problem while loading a swf (present in local system ) from the internet

Can any one help me over this....

I have the following code

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="

Local File Storage In Flash (AS2) Beginner Needs Help
Hi folks,

I have a php form on my interactive game (it is offline). The users are supposed to create their own stories and submit them using the form. The question is, how do I store them and where? I don't need them to be e-mailed or anything, just stored locally. What would be the easiest way?

My code is attached.

Writing From Flash To Local Text File
Thanks in advance!

I have a simple form in Flash. I need to write the data from the input text fields to a local text file. I need the text file to append after each submission of the form to include all entries. Sounds simple?!

Assistance would be much appreciated!

My Flash File Not Working In Local Server
I had linked to a url from my flash file's buttons by refering/taking the url address from n xml file...the whole flash file works perfectly within the flash editor..it takes the correct links...but when i put the swf file in an html page n put it in the local server, its recursively bring the index page(this swf file is in the index page) again for every click to the buttons.. y is this happening?

Local Flash File And File Installations From A Server
Hello all, just a query that I have.

Is there any way for a local Flash file to communicate with a server and download a file, and then install it in a predetermined directory?

For example, if a file package BOOK1 is available on a server, can I get Flash to download it and place it in the current directory that it is in? Will this require network sockets or passing of variables between javascript or the like?

Thanks in advance.

How To Force Flash To Check For A Specific Local File
Hi there guys.

How to force Flash to check for a specific file on a local harddribve ( cookie e.g. ).

Thanx HarryT

[F8+ppc] Javascript+flash Gen Different Result Btw Local + Hosted File
Dear all,

I got different result from the same files localed locally on my computer and hosted on a web server. Please help.

Here is the html file, a.htm:

Code:
<HTML>
<HEAD>
<TITLE>Movie</TITLE>
</HEAD>
<BODY bgcolor='#FFFFFF' LEFTMARGIN='0' TOPMARGIN='0' >
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="320" HEIGHT="240" id="movie1" ALIGN="left">
<PARAM NAME=movie VALUE="Movie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=play VALUE=True>
<PARAM NAME=loop VALUE=True>
<PARAM NAME=devicefont VALUE=False>
<PARAM NAME=menu VALUE=False>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
</OBJECT>
<script language="javascript">
movie1.TSetProperty('/', 2, 100*320/240);
movie1.TSetProperty('/', 3, 100*320/240);
movie1.TSetProperty('/', 10, 90);
movie1.TSetProperty('/', 0, 333);
</script>
</BODY>
</HTML>

when i drag this file, a.htm locally onto a browser, the browser will first:

1. block the Flash movie,
2. after enable the Flash movie, it will display the Flash content, but without execute the javascript between the <script> tag to transform the Flash content to 90 degree.

The same set of file works when I upload it onto a web server and browser it with the HTTP protocol or if I edit it locally with MS Frontpage.

can you help? Thanks.

Elton

Embedding Local Video In A Flash File Using ActionScript 3.0?
I have a .fla flash file. I need to embed video (.flv file ) using ActionScripts 3.0 in this file. The flash file, originally attaches a lot of images(.jpg), voice files (.mp3) and text files (.swf) .Now I want to replace the pictures, text and audio with a single .flv video. The video like the pictures, text files, etc is going to be located in the same local folder as the .fla file . Also on the previous screen when I click on say continue, it will come to next slide, where the video should start playing on its own.

The code used for the image or text is like this.

sceneImage = "img/abstract/1-1.jpg";
textType="txt/abstract/T_1_1.swf";

Now I want a similar code for attaching the .flv video. Please can you provide code like above.

Thanks

Projector - Saving XML File To Local Disk From Flash
I'm working on a flash application for a kiosk that will draw data from a local XML file to determine what displays and what doesn't. I am also adding in a screen that will allow certain people to make changes to the file from within the application (to make it point-and-click simple).

I've read the tutorial on editing XML within flash, but how do I tell Flash to resave an edited version of the XML file? The XML will be in the same directory as the projector, and will need to be written over whenever these changes are made.

Thanks for any help!!

Security Issue - Trying To Load A Local Flash File
We have a web application that is trying to load a local flash (.swf) file. The web site is on a central server, but accesses a file on the user's c: drive.

The security model changed with flash 8 to disallow this (by default). It works file if you put a webserver on the local machine and refence it using http://, but if you just refer to c:filename.swf, it fails. The Adobe website has an article on this, but we cannot get it to work. We must be leaving something out. Has anyone done something like this?

Can I Save Image File In Flash To Local Disk?
Can I save image file in Flash to local disk?

Let say I use Bitmap class (actionScript) to manipulate the image file, and save it in my local disk, is that doable?

Saving Info To A Local Text File From Flash
I have created a flash presentation for a client, they are going to have their sales people run the presentation at different locations from their personal laptops. What they are asking for is to have a form in the flash file that at the end of the presentation the viewer can fill out and have that info save to a LOCAL text file that they can open later and have the infomation. Thank you in advance for the help.

How Can I Get A Local Path Of The Local Disk With Swf
Since FileReference.download() doesn't download multiple files, I want to download files with php ftp_get by FTP.
I need to pass the local path of the local disk where I can download the files from a remote serveur. How can I get a prompt to have a user choose a folder on his computor (local disk), if any way possible?

Can Flash Store Data In Flat File On User's Local Machine?
I am developing a CD ROm training piece and need to know if it's at all possible for Flash to store data on the user's machine in a flat comma delimited file without the use of any server side languages?

I need to store a user record with about 5 fields. The user would pop the CD in, take the lesson and, ideally the responses from the lesson would be stored in a local text file.

Is that possible? If so, how?

Thanks

File Uploads And Flash (how To Browse Local Drives From Flash)
Hi there!
I'm setting up my corporate site, which is an image presentation based project, and I need to put a dynamic uploader to let my mates put their pics on the site.

I have it all set, but the file upload is made by an php/html page (all the rest is in one flash movie).

Is there any way to open a darn browse window to let user choose the file to upload directly from the flash movie??

Thanks guys!

How: HTML-SWF-Scripting Local AND Web
Dear all.

I'm close to surrender.

I've lost track of the several security-changes within the flashplayer(-plugin) and therefore didnt use SWF-HTML communication for quite a while. Now I need to create some WBL animations that should interact with the surrounding WBL-player-framework. But these WBL will be published both ways offline on CD / local on workstations AND put on an LMS.

Is it possible to let a SWF call JS without the need for the end-user to change their security-settings?
Regardless if its called on- or offline?
And how?

I did some research but have to go on with my daily business.

Many thanks in advance.

Andrej

XML Will Load In Local SWF, But Not In HTML
i'm trying to use an XML slideshow in my flash website. i've gotten the xml to load into a swf and show all the images just fine. then i loaded that swf into another swf (my website) and things are no longer fine. if i 'preview movie' everything still works, but when i open up the html file that i published from the website swf, the images don't show up...

...any ideas?

Opening Local Html Document
what do you do to open a html document from you local c drive. The get URL doesn't work without the (http://)

I want to do something like
getURL ("c:picturesa2.html", "_blank");

Obviously this does not work or I wouldn't have a question does anyone have a suggestion. Also what if I wanted to open a text file. For instance I want to open c:picturesa2.txt

Please help I really need this to finish my program.

Linking To Local Html Files
hi, please let me know if I am doing something wrong. I just registered. I'm not sure how to even read the replies. I am a student in flash, four weeks into it. Have mercy please. :-)

I have been trying for five hours to try to find how to link in a flash movie, from a button, to an external file. Not a url, but a local html (index.html) file that resides in the same directory as the flash movie.Can anyone help me, or tell me where I can go, or what search words to use to find the answer. thank you very much.

Linking To A Local HTML From Projector?
Please help.. Am trying to create a projector for a cd-rom. I need to be able to link to some external websites which are not online but will be stored on the cd-rom locally. What can i do?

eg i want to link to

foldername/index.html

this would hopefully load in another window above the projector

any help would be greatly appreciated cos i cant seem to find anything about it online.

cheers

speakerz

Calling A Local Html Page
im trying to call a local html page and keep getting these:

error1180: Call to a possibly undefined method getURL. source: getURL("html_productions.html")

Can someone please help me?

thank you

Local Connection Across HTML Pages.
Hello all,

I'm a little confused trying to get my head aorund this. I have three swf's using local connection to communicate. Basically a top and bottom navigation communicating with a main module. All this works fine and looks a little like this:

Top_Nav:

ActionScript Code:
Actions.LINKFunction = function(){    outgoing_lc = new LocalConnection();            //send the contents of the text field             //using the send() method    outgoing_lc.send("lc_navigation", "LINKFunction", whichCat.text);            //delete the local connection now that the             //message has been sent    delete outgoing_lc;        left_lc = new LocalConnection();    left_lc.send("lc_left", "LINKFunction", whichCat.text);    delete left_lc;};


Main_Module:

ActionScript Code:
incoming_lc = new LocalConnection();    incoming_lc.LINKFunction = function() {        copyMC = "LINK_text";        textloadMC();        }incoming_lc.connect("lc_navigation");left_lc = new LocalConnection();    left_lc.LINKFunction = function() {        imageMC = "LINK_left";        loadMC();        }left_lc.connect("lc_left");


As I mentioned this all works fine. Where I am having trouble is that there is one link that takes the user to an eCommerce area of the site that lacks the main module. It only has the top and bottom navigation. So the navigation is basically broken once the user heads to this area. By putting a getURL into the top nav function I can easily get back to index.html, but I can't figure out how to send the functions once the page has loaded. Basically looking for a way for the functions to execute after the new html page has loaded. So the user hit's the LINK button, the page index.html is loaded along with the three swf's and instead on the default movie's loading in the main-module, the functions in the main module corresponding to LINK are run.

No idea if this is even possible, but maybe there is a workaround.

Does this make any sense? Let me know if I can clarify anything.

Open Local Html Via Javascript
Hi, I have a flash 7, as an exe file thatks going onto a cd. In a folder called "files" there will be a bunch of .html files

I'm trying to open these .html files via JavaScript from within the .exe  I have tried to use a function in the html to open the windows, and call that function from within flash, I have also tried to open it from within flash, both ways i get a security prompt that states:
CODEMacromedia Flash Player has stopped a potentially unsafe operation

The following loacal application on your computer or network:
c:Documents and SettingsmyComputerDesktop est.swf

is trying to communicate with hte Internet-enabled location:
c:Documents and SettingsmyComputerDesktop est.html

To let this ap[plication communicate with the Internet, click settings
You must restart the application after changing your settings.

Local File In Pop-up
Just figured out how to launch a pop-up window, but how if I need to load a local file (say in a CD-ROM)? Flash seems can't recognise the path.

Local File
Hi this is kind of a repost, so apologies but i am still having no luck with opening a local PDF file from within flash.

I use an on release get url action that opens a plank document, i link the url to the directory that my PDFs are stored but nothing happens?

Can anyone help? Thanks again.

Local File IO?
I've been racking my brain for the past few days with what should be a trivial problem. Is it possible to get local file IO through Actionscript 3?

I am also working with Flex...if that helps...

Thanks in advance.

Local Connection - Works With Swf Doesn't In HTML
Hello,

I'm having an issue where I have an application that pops up a display engine and communicates with the backend via the application that popped it up.

I am using a local connection to do the communication and have been testing it in flash. As soon as I test the application embedded in HTML the communication stops working. I make sure to close the swf instances before trying the html version to avoid catching the communication in the wrong place.

The weird thing is if I have the application open in html and run the engine in flash the communication works. As soon as I try it both in HTML pages it stops working. Am I missing something obvious?

Thanks

Link To A Local EXE File ( Help Me )
(English)

Dear friends ,
I have a technical question about programing
in ' Macromedia FLASH '. Please assist me if
you can .
I want to create a link from flash animations
that it can run an EXE file in a local
address . For example if when we make an
AUTORUN for CD, we have to run an EXE file
like SETUP.EXE in the another folder .
I used the 'get url {}' script for this , but
there are 2 problem. At first I have to enter
drive letter ( d: , e: , .. ) . Also this
command can not run the file at the location
automaticly & show a message for download .
My web address is :
http://www.geocities.com/pedramr2001

Thanks a lot
Pedram . Rahimi

Open Local File?
im trying to make an "on mouse" action to where it opens an html file in my browser... i know how to use the "get url" action, but i want it to read it as a local file...its going to be on a CD, what do I need to do???

Open Local File?
im trying to make an "on mouse" action to where it opens an html file in my browser... i know how to use the "get url" action, but i want it to read it as a local file...its going to be on a CD, I was told to put it as
getURL("yourFile.html"); but it opens it in the browser as: http://yourfile.html in the browser. What do I need to do???

Open Local File?
Hello,
I was the one that asked the question about opening a local file using the geturl action. and someone replied: "How about trying file:///x:/folder/subfolder/file.exe"

Thats great, it works!!! but i have a question, if i specify the drive name (ie. D:) what if the person that views the CD has a different dive letter, like E: or F:????

Writing To Local Txt File
Ok, I am creating a cd-rom based, stand alone player app. I want to be able to write variables to a txt file created on the users machine.

This is easy in Flash 5 with the fscommand ("save", "txtname.txt")
It does not work (or I cant make it work) in Flash MX.

Any ideas? I really do not want to write server code.....

Save On Txt File Local
Hi,
PLease:
first to create a txt file then to save a varible in it .
on Hard disk ( localy)
I have Flash MX.
any Example pleaseeeeeeeeeeeeeeeeeeeee

How Do I Open A Local File?
Hi,

I want to open a user-supplied local file from my movie. I suppose, I could feature an input field and ask the user to type in the filename, but what I really want is to open the OS's "Open File" dialog. Does anybody know how?

Thx, Peter

Copy File From CD To Local
ok..Ive tried to search....and either nothing came back..or it "crapped" out on me...

How can I save a file in my CD project to a specified location on the users HD? (from a button click)

it is NOT a cookie..or text file.... so I dont think sharedObject will work.. I looked into MM_Save (or whatever it is)..and I think that only saves a copy of the .SWF (correct?)

this file will be an .exe or .pdf or similar....do not want to OPEN it with default app.

Anybody point me in the right direction?

Thanks

-whispers-

Load A Local Xml File?
I am trying to use the FileReference class to allow a user to open an xml file.

the xml looks like this


HTML Code:
<?xml version="1.0" ?>
<level>
<row>0,0,0,0,0,0,1,1,0,0</row>
<row>0,1,0,0,0,0,1,1,0,0</row>
<row>0,1,1,0,0,0,0,1,0,0</row>
<row>0,0,1,0,0,0,0,0,1,0</row>
<row>0,0,1,1,1,0,0,0,0,0</row>
<row>0,0,0,0,1,0,0,0,0,0</row>
<row>0,0,0,0,1,1,1,1,1,0</row>
<row>0,0,0,0,0,0,0,1,0,0</row>
<row>1,1,0,0,0,0,0,0,0,1</row>
<row>0,1,1,1,0,0,0,0,0,1</row>
</level>
this is for a level editor. I want the user to be able to save xml files from this app, and load them back in to start where they left off. I know saving to a file from flash is probably not possible, but opening from flash seems like it should be.

here's the FileReference code I'm using


ActionScript Code:
import flash.net.FileReference;

var allTypes:Array = new Array();
var fileTypes:Object = new Object();
fileTypes.description = "XML (*.xml)";
fileTypes.extension = "*.xml";
allTypes.push(fileTypes);

var listener:Object = new Object();

listener.onSelect = function(file:FileReference):Void {
    trace("onSelect: " + file.name);
    if(!file.upload("http://www.yourdomain.com/yourUploadHandlerScript.cfm")) {
        trace("Upload dialog failed to open.");
    }
}

listener.onCancel = function(file:FileReference):Void {
    trace("onCancel");
}

listener.onOpen = function(file:FileReference):Void {
    trace("onOpen: " + file.name);
}

listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
    trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal);
}

listener.onComplete = function(file:FileReference):Void {
    trace("onComplete: " + file.name);
    trace(file);
    //I NEED THE DATA HERE!!!
}

listener.onHTTPError = function(file:FileReference):Void {
    trace("onHTTPError: " + file.name);
}

listener.onIOError = function(file:FileReference):Void {
    trace("onIOError: " + file.name);
}

listener.onSecurityError = function(file:FileReference, errorString:String):Void {
    trace("onSecurityError: " + file.name + " errorString: " + errorString);
}

var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
fileRef.browse(allTypes);

is it possible to access the data from the selected file using only flash?

thank you in advance!

Copyright © 2005-08 www.BigResource.com, All rights reserved