Solved

select file from HD

Posted on 2002-05-27
18
237 Views
Last Modified: 2011-09-20
Is it possible to select a file path from a swf-file? It would have to work the same way the <input type = file > tag works in HTML. You click on a "select file"-button in a swf and a dialog-window pops up. After you select a file, the file-path gets passed on to a cgi (in order to upload a jpg for example to the server).

JavaScript, cgi and whatever needed is allowed - but I don't want a seperate HTML-window to have to pop up with a <form>-tag, "select file" and "submit"-button. The user-interface is flash!
0
Comment
Question by:99grad
18 Comments
 
LVL 2

Expert Comment

by:thor918
ID: 7036906
Hi 99grad, What you are asking of are possible only if you are going to use the project on your own computer. or a computer on the internett with low security settings.. (Internet explorer)
0
 
LVL 2

Expert Comment

by:thor918
ID: 7036911
I don't think you are ever going to get an answer on this topic.. People has asked similar question and ended up with the simple answer that it is possible, but the user have to do something to get it to work.. and I don't think there are many users that wants to lower their security settings to use your flash..

To upload the file you have to use activex and that's microsoft explorer only(there are plugins to other browsers, but I have not checked them out).
0
 
LVL 2

Expert Comment

by:thor918
ID: 7036914
I think your points for this question is very low..
50 points are what you get for an easy question!
0
 

Author Comment

by:99grad
ID: 7036937
Thanx. But it seems that I'll have to use a HTML-form to get this problem solved. I don't want to force the user to lower his security settings... I'll leave the question online for a few more days to see if there are any other answers...
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 7045291
One way to do this is to call an ASP script which gets all the files on the hard drive. Actually if you use a VBScript it will run on the client side, therefore allowing the user to browse HIS files, not the server files...

However you would have to call the script every time the user changes directories and that kind of stuff. It might not be that bad but there's a lot of programming involved and it might just be easier to use HTML and make it look nice with CSS.

There is no built-in function for this, if that's what you're looking for. You'd have to do a lot of scripting.
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 7045296
Also you do not need activex to upload files, you only need a binary pure asp upload component which can be obtained for free on the net.
0
 
LVL 2

Expert Comment

by:thor918
ID: 7045301
SuperMario, you lost me there. why are you saying that one way is to use asp? then the user have to download the asp file and have a webserver to execute it on.

Asp is server side anyway you see it.. it will need a webserver to execute.
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 7045311
I'm assuming that the FLASH MOVIE would be on the internet, and thus it would reside on a web server, which would have ASP capabilities. The Flash movie could call the serverside ASP code and the user wouldn't have to touch the ASP... that's what ASP is for.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 2

Expert Comment

by:thor918
ID: 7045319
you cant see clients hd with asp.
0
 
LVL 2

Expert Comment

by:thor918
ID: 7045321
and if you have manage to do so I would be very happy to see that
0
 
LVL 3

Expert Comment

by:SuperMario
ID: 7045323
no you can't see it with ASP. You can upload a file with ASP. The client can see his own HD with VBScript (see Scripting.FileSystemObject)
0
 
LVL 2

Expert Comment

by:thor918
ID: 7045324
eeh supermario, the reason for me to say we needed an activex is that the 99grad said that he was going to use flash to upload the file.. and the only way to get that is to use a client side script to call the browse for file dialog. and when the file is selected we need to simulate the submit button.. but explorer does not allow this.. so therefor we need to get the filepath using the input field and client script and use an activex to upload the file.. but this requires extra security access.

offcource he needs a serverside script to handel the incomming files..
0
 
LVL 2

Expert Comment

by:thor918
ID: 7045326
yes. with extra security access you can use filesystem object on client side.. but once that this is executed on the net, the user will have to lower their security
0
 
LVL 2

Expert Comment

by:thor918
ID: 7045334
just try it yourself.. make the code that browses the clients hd using filesytem object..and try it on you computer.. it will look fine..
but once you upload it to the server and try to access it from the web it won't run unless you sett your browser to run unsecure activex..

filesystemobject is an activex you know!
0
 
LVL 2

Expert Comment

by:thor918
ID: 7048899
99grad, have you been convinced?
If you want to upload you can call javascript to open a new window with file upload menu.this is the best way to do this.
0
 
LVL 2

Accepted Solution

by:
thor918 earned 50 total points
ID: 7048909
If you want to upload you can call javascript to open a new window with an file upload menu inside.this is the
best way to do this.

to open a new window using javascript, paste this javascript code in the html page->
<script language="JavaScript"><!--
function newWindow(file,window) {
    msgWindow=open(file,window,'resizable=no,width=200,height=400');
    if (msgWindow.opener == null) msgWindow.opener = self;
}
//--></script>

then from flash you can setup an button ->
on (release) {
    getURL("javascript:newWindow(\'doc2.html\',\'window2\')");
}
0
 
LVL 9

Expert Comment

by:OBCT
ID: 10319712
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept thor918's comment as answer.

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

OBCT
EE Cleanup Volunteer
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now