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




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.htmlWhen I click into some link that point to some local file like as:c: est est.htmI 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



Adobe > Flash General Discussion
Posted on: 02/09/2007 01:28:45 AM


View Complete Forum Thread with Replies

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

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

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

How To Use Button To Create A Link To The Local File
How to use button to create a linkage to the local file such as "c:login.htm" file? Thanks

GetURL...trying To Link To Local Htm File On Intranet...very Frustrating
I will be extremely grateful if someone can help. I'm a newbie, by the way.

Trying to set up a getURL to link to a local htm file, NOT a page on the internet. All the tutorials I have read tell me how to link to a file on the internet eg. getURL("http://www.sitename.com")

I'm trying to set up an intranet site for my training college where students can access training resources etc on the local network. Therefore my getURL needs to point to a local file, not one on the internet.

I'm trying to link to a .htm file that resides on my computer.

Does the htm file have to be in the same folder as the .fla file??

How do I do this??

I'm working on a Mac, Os X, MX 2004, if that makes any difference.

I am frustrated to the point of tears, and have wasted numerous hours trying to work this out, and I would really appreciate if someone could help me out.

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

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?

[MX] Local Link To A Word Document
Hi I am currently developing an swf to work on my local machine, it will not be hosted on the Internet.

I have created a button which I would like to open up a Word document when pressed. The Word document (instructions.doc) is currently saved in the same folder as my .swf file.

I have been looking on the net for a solution but have tried lots of things but have still not managed to get it working.

Thanks

Problem Trying To Link From SWF To Local Files (for CD Rom)
Hi,

I'm creating a flash movie which will be published as an exe - it's to be burnt onto a CD Rom. I need to link to word documents and PDFs from this flash file.

Currently, my button action looks like this:

myButton_mc.onRelease = function(){
getURL("files est.html", "_blank")
};
this opens the browser, but the url comes up muddled:

file:///C|/Documents%20and%20Settings/Ponch/My%20Documents/DESIGN/Clients/90ten/DESIGN/filesest.pdf

you can see that instead of using "files est.html" as the path, it's changed to "filesest.pdf".

Any ideas what is going wrong?


I've also tried (with forward slashes):
pdfNav2Link1_mc.onRelease = function(){
getURL("/files/test.html", "_blank")
};

and (not specifying a window):
pdfNav2Link1_mc.onRelease = function(){
getURL("/files/test.html")
};

and (adding to dots and to backward slashes before the URL):
pdfNav2Link1_mc.onRelease = function(){
getURL("..\files est.pdf", "_blank")
};

Problem Trying To Link From SWF To Local Files (for CD Rom)
Apologies - posted this twice. Mods please feel free to delete this one.





























Edited: 01/30/2009 at 09:02:02 AM by ponch

Link To Local Program On My Hard Drive
Hello and thank you in advance for your help. I am attempting to author a flash MX file that contains links to programs on my hard drive. Upon clicking said links I would like to activate the local programs. Is this possible? Any insight on how to do this? Thanks again!

Regards,
Mark

How To Link Local Files In A Flash Movie For Cd Autorun
What I am trying to do is basically create a CATALOGUE for my company (In PDF format) and I want to have an autorun (compiled EXE flash movie) to pop up when the cd is inserted into the computer.

WIthin the EXE (flash screen) I want to have 2 basic options:

1) To have a button that says, Install Adobe acrobat reader.. and

2) View the Catalogue here

When I click the install acrobat reader button I want it to launch an EXE file that is on the CD.

And when I click on the catalogue button, I want it to launch the PDF.

I don't know the script in which to link it to a directory on a CD or hard drive,

can anyone help me out?

Thanks in advance..

Chris

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.

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

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

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

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?

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!

Loadmovie From Local File
Am I doing something wrong, or isnt Actionscript allowing to loadMovie a file from my harddrive?
I have as folows (piece of code, not full):

Code:
var MC: MovieClip = _root["day"+owner].createEmptyMovieClip("loader", -16382);
MC.loadMovie(file);
While testing from the Harddrive it works fine, but when it's online it stops working.

Any kind of info on this is greatly appreciated.

Writing To Local File...?
Hey all,
So I know games like 'Diner Dash' and similar write to local files, and are made in flash. From what I can tell, they're not wrapped in Java or not another language... does anyone know how they do it?
Much obliged,
Daniel

Import A Local File Into A Swf?
I see lots of examples about how to upload a file to a server using FileReference and a helper script like php. What if I just want to use the file locally? Must I upload to the server?

Does anyone have any code that just lets you browse to a local file and import it into a swf during runtime?

I want to import an image and trace over it.

I suppose it would need an ON COMPLETE event or something so I know when I can start using it.

Thanks a million

Linking To A Local File
Hi guys, i need a bi of help please

i've decided to do a media project for college using flash. i need to include audio and video in the project, but i dont want it embedded in the swf file. is there any way i can link a bit of text or a button to a file that will be kept locally on the pc?

i've done it one way, where by i hyperlink a bit of text, but it opens up internet explorer and then opens windows media player (on the video links)

thanks for any help

regards

Jack Lindsay

SWF File Contains Ref. To Local Dir Structure
Newbie here; sorry.

Flash CS4 Professional, ver. 10

Am creating a simple flash video to get my feet wet. In the process, I am drowning.

I created the video with Flash (ActionScript 3.0) by inserting a player object, and specifying a f4v source that I had created using the CS4 Media Encoder to convert a wmv file; nothing to it.

Publish Preview worked fine. Publish Settings/Publish created the necessary files, just as decribed in a Flash 411 tutorial:
http://tv.adobe.com/?trackingid=EBYHH&pss=fl_10.0.0_win_en_full__PF_20040226#vi+f1527v1000.

Video works fine on my local PC (XP, SP2). But when I load it to my server, it does not work. In IE 7, the page loads; source code is there, but the window is blank: http://www.bbhq.us/pva1.html

Adding mime type to .htaccess file did not solve the problem. Changing permissions to the files did not, either.

It apparently is not a server problem. A simple swf file created by Mr. Gates and simple HTM coding works: http://www.bbhq.us/flash3.htm

What does Mr. Gates know that I do not?

Well, where do I begin???

However, when I loaded my file -- http://www.bbhq.us/pva1.html -- in FireFox 2.0, I got a blank window, but also this revealing error message:

SecurityError: Error #2148: SWF file http://www.bbhq.us/pva1.swf cannot access
local resource F:pva1pva0117a.f4v. Only local-with-filesystem and
trusted local SWF files may access local resources.
at flash.net::NetStream/play()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::_play()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::_setUpStream()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::_load()
at fl.video::VideoPlayer/load()
at fl.video::FLVPlayback/doContentPathConnect()

That tells me that the swf file has my original directory location and file name(s) -- F:pva1... -- embedded in it. No wonder!

However, I cannot see where in Flash I specify a directory structure for my video, other than, of course, when I originally specified the video to add to the player component. But somehow, the swf file picks up the directory structure as part of the file names. That boat does not float.

Adobe help did not throw me a life preserver; it tossed me a lead weight, instead.

Must be a settings issue somewhere, or I am missing something obvious that I just cannot see.

Goin' down here for the 3d time. A little help here, please.

Thanks.

Downloading A Local File From A CD
Hi All,
I am creating a CD demo, and want to download files from the CD to the users desktop. I know that the FileReference command can be used to get files from a web server (HTTP and HTTPS), but can it be adapted to download a file from a local CD? It needs to work on a Mac and a PC.

Thanks
-G-

Loading Local XML File
I need some help with a problem I'm having.

In my Flash application, the SWF file is located on a server and is downloaded to clients in a controlled network. I want to be able to load XML data located on the client machines into the SWF file. It looks like security settings is not allowing this to happen, as the local files are treated as a separate sandbox.

If I were to use System.security.allowDomain, how do I specify local files? It's not a domain or URL.

Or is there another way to do this? I'm wading through the security information, but I haven't found the solution yet.

FYI - this is for Flash Player 7.

Thanks!

Local File Security Help
Is there a way to get around the local file security so a movie hosted on a site can load an audio file on the users computer?

Thanks,
Brendan Smith

Writing To A Local File
Can ActionScript write to a file during runtime? I want to be able to enable a save feature to a game.

I tried using JSFL:


ActionScript Code:
str = "Hello";MMExecute('FLfile.write("file:///C:/test.txt", ' + str + ')');


But that didn't seem to work. MMExecute doesn't do anything when I test the movie.

SendAndLoad With A Local File
I'm trying to load a text file from a Local Network Drive rather than from the web.

I have the following code which worked with a sendAndLoad web address and adapted it to try and get it from the drive (s

I have tried the following:

loadText.uniq= Math.floor(Math.random()*10000000);
loadText.sendAndLoad("file:///s|/screen.txt", loadText, "GET");
loadText.target = this;
loadText.onLoad = function() {
this.target.HTML.htmlText = loadText.TEXT;
this.target.Image.loadMovie(this.Image);
};


And also with the following:

loadText.sendAndLoad("s:screen.txt", loadText, "GET");

But I keep getting the error - Error opening URL "file:///s|/screen.txt"

Where am I going wrong? Your helped would be much appreciated.

Local File Browsing? Is Possible?
is it possible to make a local file browsing, for example a form to search .wav or .mid files in the user machine, the app is in a server...

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.

Understanding Security With Local File To Remote File
First let me explain the setup:

Our company uses a set of talking avatars in lesson Modules to help students learn Math or Writing. Each Course loads in external avatars located on our Avatar server. I have a LocalConnection (technically using SWFBridge) that has the AS3 containers loading in the AS2 version avatars (created from Character Builder by Media Semantics). I can get the LocalConnectionto accurately connect a local version of the avatars in a development environment, however once I try to access the avatars from our Avatar server, the LocalConnection refuses the connection because of the different domains (local vs the avatar server). They both have a LocalConnection, one from the Course to Avatar and vice versa. Also, the Course says it has a sandboxType of localTrusted. The error is a common one:


Code:
*** Security Sandbox Violation ***
Connection to file:///(localFilePath) halted - not permitted from http://(avatarServerPath)/avatar.swf
-- Remote SWFs may not access local files.
The issue is definately because of the Security Sandbox and I have tried : Security.allowDomain("http://(avatarServerPath)"); in the Course, and System.security.allowDomain("*") in the AS2 avatars (which are Flash Player 6) Other attempts included playing with the Publish Settings - Local Playback Security, attempting to set a setting a PolicyFile, and a few others.

I just must be missing a key part of the equation, I know it's just a small fix that I am totally missing the boat on. Any thoughts or assistance is appreciated.

Local To 'other' Local Coordinates
Hi, I have a clip with twenty points in it.

I am trying to do a point hit test with these and a shape a few clips down - but nowhere near the _root.

I have used local to global before but would really like to just see what the coordinates would be on the other clip.

?? Cheers, M@)

Local Exe Can't Load Local Swf's Into It?
Hi!

I have created a presentation with Flash that has an exe file which loads swf files to it with loadMovie command.

Some of our clients have had problems with this. They can execute the exe file fine, but it doesn't load any of the swf's or other external files into it. All the files are local on users computer on the same folder.

At some computers this works fine, so it seems like it is some sort of security thing that an exe file cannot load anything external to it. Has anyone had similar problems?

-sumo-

GetURL Local File (windows) ?
Hiho

getURL("file://c:/bla.lnk");

I want to call a windows .lnk file but i will be asked to
open or to save. Can I do it without notification ?
[Edited by borisp on 07-04-2001 at 11:15 AM]

Reading Local File System
Does anyone out there know if there is anyway a user can allow you to read their local file system. This is of course, with them downloading the app to get around the security issue. For instance, a Flash FTP client. It would have to know what is on the server as well as what is on the users local file system, then refresh when either contents change. Anyone know if this is possible?

Thanks in advance!

Exporting Variables To A Local File
I know its possible for Flash to read variables from a text file on a PC, but I can't seem to find a way of exporting variables to a text file on a PC.

I dont particularly understand SEND and POST but assume they are for Servers and Networks, whilst all I'm interested in for this project is a standalone system.

Is it possible?
Cheers,
Si

Opening Local File From Projector
I'm trying to figure out how to open a Word file from a Projector movie. I've been trying to use the "exec" command from the "fscommand" but nothing happens.

Any ideas?

Writing To Local Text File?
Is there a way to write data into local text files in my hdd rather than thru the server ? i recall last time i read something about the unsupported write function that allow you to write to a file in your harddrive.

Can someone slightly teach me how to use the write function please ?

Refering To A Local Image File
Hello!

1. I'm trying to make an application with flash where the user could browse a picture from his/her local HD and add it to this application without uploading the image to the server.
In html this is possible by using the 'input type="file"' -form element and passing the file url to the next view which is constructed using document.write.

Could it be possible to have somekind of browse button in the first keyframe and after the user chooses a local image the second keyframe has a pointer to this local file. f.ex
file:///C:myimage.jpg so it could be seen on the flash app as a locally linked element ?

thanks alot

/s

How To Download File From CD ROM To Local C:/ Drive
you have your flash.exe file + resource.pdf (for instance)file burned on CD-ROM.
how can you script the button in your flash movie wich will allow you to download resource.pdf to local c:/ drive?

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