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
TranZtions
Toggle DirectToStage Property of a Flash Member
Behavior Property Inspector
Orbital Master
XML Parser List Converter
3D Model
Volume Control Behavior
Sprite Blender - Distance
Cinemac
open control pannel
 

 

 

Behavior File Save Button

Added on 6/9/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC

This item has not yet been rated

Author: MediaMacros (website)

Drop this on a button and input the paramaters to make the button save a file to the location the user specifies. Note that the location of the origonal file is RELATIVE to the move.

--Copyright 1999 Chuck Neal
--chuck@mediamacros.com
--If you find this code helpful, send me an e-mail and let me know.  :-)

property filePath, toPath, theName, theTitle, overwrite

on getPropertyDescriptionList me
  p_list = [:]
  addProp p_list, #filePath, [#format : #string, #default : "files est.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 : "Prompt before overwriting existing file (windows only)?:", #comment : true]
  return p_list
end

on mouseUp me
  if the platForm contains "win" then
    theFile = fileSaveAsDialog(toPath, theName, theTitle, overwrite)    
  else
    theFile = fileSaveAsDialog(toPath, theName, theTitle)
  end if
  copyFile(the moviePath & filePath, theFile)
end

 


Contact

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

Send e-mail