Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Rollover Trigger-Alphamania
mySystem
Play/Pause/Rewind Video Sprite
Back Button
Fill using setPixel
Eat That Dot
SendAppleEvent
cXtraTransitions3
Watcher Window Behavior
Set WarpMode of a QTVR Sprite
MediaMacros Xtras Mall
 

 

 

Behavior File Save as..

Added on 4/20/2001

 

Compatibilities:
behavior D6_5 D7 D8 PC

Required Xtras:
FileXtra

This item has not yet been rated

Author: SunilBalan

Updated Chuck's "File save as" behaviour by using the new FileXtra3, as now one has to instantiate the Xtra before use. The return values from methods are now True/False instead of error codes. Thanks to Kent Kersten, without his xtra this would have not been possible, and applause to Chuck for providing such beautiful codes.

property filePath, toPath, theName, theTitle, overwrite

on getPropertyDescriptionList me
  p_list = [:]
  addProp p_list, #filePath, [#format : #string, #default : "files\test.txt", #comment : "Base file-to-save path relative to the movie:"]
  addProp p_list, #toPath, [#format : #string, #default : "C:\", #comment : "Path to start from in save dialog:"]
  addProp p_list, #theName, [#format : #string, #default : "test.txt", #comment : "Name of file displayed in the dialog box:"]
  addProp p_list, #theTitle, [#format : #string, #default : "Save as:", #comment : "Text in the bar on the dialog box:"]
  addProp p_list, #overwrite, [#format : #boolean, #default : true, #comment : "Prompt before overwriting existing file (windows only)?:"]
  return p_list
end

on mouseUp me
  fxObj = new(xtra "FileXtra3")
  if the platForm contains "win" then
    theFile = fxObj.fx_FileSaveAsDialog(toPath, theName, theTitle, overwrite)
  else
    theFile = fxObj.fx_FileSaveAsDialog(toPath, theName, theTitle)
  end if
  fxObj.fx_FileCopy(the moviePath & filePath, theFile)
  fxObj = 0
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail