Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Delet an Existing File
Toggle ImageEnabled Property of a Flash Sprite
MouseWheel
Movie Slider Control
Wait for a DirectMedia CuePoint(Name as Reference)
StarMenu Xtra
Super Debugging
Simple Character Substitution
Controlling DIgital Video
Rotate Click-Alphamania
 

 

 

FAQ File open/save dialog

Added on 4/3/2001

 

Compatibilities:

Required Xtras:
Buddy API
FileXtra

Rating:

Author: MediaMacros (website)

How can I get a system file save or file open dialog in Director?

There are a number of ways to get a file save and a file open dialog box in director. Here are the 4 most common. Note that the box does not open the file, it just returns the full path and filename.
FileIO
Open -
set myFile = new(xtra "fileio")
set theFile = displayOpen( myFile )
set myFile = 0 set myFile = new(xtra "fileio")
Save -
set theFile = displaySave( myFile, "Title", "Default File Name")
set myFile = 0

Buddy API
Open -
set theFile = baGetFilename("Open", "C:\", "Filename", "Filters|*.*", Flags, "Instruction", Allow Folder Selection, X-Location, Y-Location )
Save -
set theFile = baGetFilename( "Save", "C:\", "Filename", "Filters|*.*", Flags, "Instruction", Allow Folder Selection, X-Location, Y-Location )

FileXtra
Open -
set theFile = fileOpenDialog(initialDirectory, filterString, dLogTitle, createPrompt, FileMustExist)
--On the Mac, only the initial Directory and filterString are valid
Save-
set theFile = fileSaveAsDialog(initialDirectory, fileName, dialogTitle, overwritePrompt)
--On the Mac, only the initial Directory and fileName, and prompt are valid.

MUI Xtra
Open -
set aMuiObj = new (xtra "MUI")
set fileString = "Open this file"
set theFile = fileOpen(aMuiObj, fileString)
Save -
set aMuiObj = new (Xtra "MUI")
set fileString = "save this file"
set theFile = fileSave( aMuiObj, fileString, "with this prompt" )

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail