Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!- need to allow the user to save a file from thje CD-ROM

Status
Not open for further replies.

lax201

Programmer
Jun 23, 2002
2
0
0
US
I'm creating a pretty simple CD-Rom using director. But at one point, I have artwork that the user must be able to save to their hard drive. I created a button. Upon clicking the button, a window is opened up- it's the stock "save as window". But when I click on save withinn the window, it does not link to any file and so does not create a saved file. How do I link the file to the save button? Please- any help would be appreciated.
 
So you're using the MSCommonDialog control? If so, one thing you should know. The CommonDialog does NOT save files. It is simple a place to put the path and filename. You have to use a Lingo command to copy the file, along with a CommonDialog. To actuate the save script when they click save in the save window, just put a script under exitframe like.

if sprite(1).filename <> &quot;&quot; then
doMySaveScript(sprite(1).filename)
sprite(1).filename = &quot;&quot;
end if

And on the button to open the window just put

showopen(sprite 1)

Tell me if you need additional help. To figure out the Lingo for file transfer, look in the lingo dictionary under external files.
 
fugigoose or lax201,

Would really appreciate a hand with this, not sure how to bring up save-as window to utilise second part of this post, could you please outline steps,

Thanks alot,

P
 
Here is how I would do it.
Use fileXTRA3 to open a Save As dialog. This will return the complete filename of where the user wants to save the file. Then there is a file copy method provided by fileXTRA3 with which you can copy the source file to the destination chosen by the user from the dialog box.
You can get the xtra from here.

If you need an example just let me know and I'll try and mane one for you.

Mayuresh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top