Solved

select file from HD

Posted on 2002-05-27
18
270 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
[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
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.
Suggested Courses

740 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