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




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.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 01-11-2005, 07:11 AM


View Complete Forum Thread with Replies

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

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:????

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

XP IE7 Wont Open Local Swf File
Normally i can use IE7 xp to open local swf flash files but now i it wont.

have read something about a windows update which cause the bug/error.

Is there any easy solutions to this problem? or do I need to reinstall XP

Best regards

Open A Local File From An AIR Application
Hello people, I just have one question.

I'm currently developing a download manager, in which the user can download several zip files from a website. I'm able to stream down those files, save them to the local file system, and check if they already exist. My question is, how can I open one of these zip files from the AIR app... just like if you'd double clicked on the icon from the Finder on a Mac or Windows Explorer on a PC?

Thanks for your help.

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

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

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.

Local Connection Based On Movie
Hello guys.. this is my first thread on this Forum. okay.. does anybody know how to use a Local connection based Movie on AS3 ?! i already read the Documentation but i still don't understand how to apply it on swf file based movie.. for example, like a remote TV and the TV. when you click the remote and the TV get loading and perform the swf file (something like that hehehe..) any Idea Guys...?!

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

Data To Be Displayed From A Web Based File To A Flash File
Is it possible to grab the contents of a web based file and display it in a flash file.

The data might be in HTML table / or in an .asp page.
Also, the same table might have to be displayed in the flash file.

Plz do clarify on these points & do let me know how to do it.


- Sanjay

Getting Hours From Your Local Machine And Going To Parts Of Site Based On Time
newDate = new Date();
myHour = newDate.getHours();
// If the hours number is less than 6 (am) and greater than 18 (6 PM) the mc goes to NightTime
if (((myHour)<6and(myHour)>18)) {
tellTarget ("_root.MainBG") {
gotoAndPlay("NightTime");
}
} else {
play();
}

this is the code I have in my mc. When the Time is before 6AM and after 6PM the mc is supposed to go to the frame labeled "NightTime" all the labeling is correct so it must be an error in the actionscript. I'm not an expert so can anyone help out?

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!

Air - Open Local Application
Is there a way to open a local application with adobe air and as 3. For example, i want to download a file and open it with he appropriate application such as word excel etc.

Open Online Swf If Local Is Not There
Hi

I am working on projector file running locally
there is link that open a swf file in projector.

I want to know how can i tell that link
if the swf file is not availabe locally then open it from web.

Something like this

function openLocal (){
loadMovie("test.swf",3)}

function openWeb (){
loadMovie("http:domain.com/test.swf",3)}

if (openLocal == Error)then openWeb.

something like that

Thanks

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

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?

Lost Original Flash File, Need To Open/Edit My .SWF File
I need to edit my .SWF file. I don't have the original file created in Flash5. Can I open and edit my .SWF file?

Thanks!
Randall

Open A Window Browser Directly From Flash File (*.exe File)
i have a standalone exe flash file which opens autorun from a cd, and i need to open a windows browser directly from that flash. i want it to open the htm without any toolbars or scroll... anybody can help???

Open A Window Browser Directly From Flash File (*.exe File)
i have a standalone exe flash file which opens autorun from a cd, and i need to open a windows browser directly from that flash. i want it to open the htm without any toolbars or scroll... anybody can help???

How Can I Open Local Files (*.doc; *.pdf Etc.) With Flash_mx
how can i open local files (*.doc; *.pdf etc.) with flash_mx
withouth using *.bat file;
It works with *.bat file , but when i tried this:

on (release) {
fscommand("exec", "start file.pdf");
}
nothing happend.

How To Open Local Directory With GetURL() ?
Hi,

I should have a solution to open a directory on a local computer/network with flash. I've tried the code beneath. It works in the Flash IDE but not
when I call the *.swf through a html page.

Are there any other solution around?

//open C: directory on
getURL("file://C:");

Check To See If Local Connection Is Open?
Need a little help here, my app is getting hung up on a local connection issue. I need to check to see if the connection is already open, and if so, remove it so I can reconnect (sending a new variable on the new connection).

Here's what I have so far:

ActionScript Code:
if (incoming_lc) {
    incoming_lc.close();
}else{
    var incoming_lc:LocalConnection = new LocalConnection();
    incoming_lc.connect("lc_example");
    incoming_lc.client = this;
}

Open Documents From A Local Presentation
Hi my first post so please be gentle

I have read and tried Jesse Stratford's tut on this but I can 't get it to work in Flash Player 7. So anyone have any ideas/pointers?

Any help greatfully recieved.

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.

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.

Open A Pdf Or Word File From Flash Projector File?
Hiya
I'm making a catalogue in flash 4 as a projector file to run on someones laptop.
Can you set a button to open a pdf or word file (eg a pricelist form) while the flash show is running?
Cheers
Michael

Extreamly Urgent How To Open *.xls File From Flash Exe File
Hi,
I tried to open *.xls file from flash *.exe with getURL action
like this
on (release){
getURL ("myXls.xls", "_blank");
}

It did not worked.

Please help me, it works on some machines but on the most it do not,
what chould be the problem?

Using Java Script To Open Local Files
Ive managed to get java script working on MX by geeting a website to open in a new window but i cant seem to open files in my website folder. I basically want an image to open up thats an swf but i dont want the address or tool bar showing when they are opened.
Thanks all.

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!

Having Player Local On Stick Or Cd For Swf To Open In Full Screen?
need to send out swf on cd and also on usb flashstick .
swf should open with player and goto fill screen mode. both pc and mac . i figure the player should be on the disks as well. is this the best way to ensure viewing?

Firefox Can't Open Local HTML Files With GetURL
When Firefox is a the default browser getURL("localfile.html") will not work properly.

What happens is Firefox opens a blank tab then a second tab which can't locate the local file. Firefox then uses Google to try and locate a public website. So if you’re local files are within My Documents, Google redirects you to the page http://support.microsoft.com/kb/236621 "Cannot move or rename the Documents and Settings folder" which is the best match for a "documents and settings" search with "I'm feeling lucky".

Now here's the weird thing. Once one Firefox window is open, any more getURL functions will work. It doesn't work if you have two getURL functions on the same button but if you push the same button two times, the first will produce the error the second will work correctly.

Using getURL("localfile.html", "_blank") doesn’t change anything either.

Works fine with IE set as your default browser. No idea what a Mac does.

Using:
Publishing from Flash 8 Pro
Firefox version 1.5
IE version 6
Published as Action script 1.0 or 2.0 (makes no difference)
Published as player 7 or 8 (makes no difference)

Final published file is to be an EXE. Symptoms still happen when using the SWF file. When the SWF is embedded into a html page, everything works because a Firefox window is obviously already open.

Please help.

Firefox Can't Open Local HTML Files With GetURL
When Firefox is a the default browser getURL("localfile.html") will not work properly.

Using getURL("localfile.html", "_blank") doesn’t change anything either.

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

How Do I Save A PDF File From A Flash-based CD Rom Interface?
Hello,

This is my first post, so sorry if this has already been answered elsewhere.

I am working on a Flash-based CD Rom. The interface is to be done in Flash MX 2004 and the CD is supposed to have a feature that would allow the viewer to download a .PDF, .PPT, and/or .DOC from the disc to the viewer's hard drive (to a directory of their choosing).

What is the best way to handle this? Please advise as soon as possible

Thanks!

Fabio Sborea
fabiosborea@yahoo.com

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