-- Generic behavior to copy a file
-- Desktop Xtra 1.0 or later required
-- Compatibilities: Director 6.x, 7.x, 8.x, Windows
property SourcePath, DestinationPath
on getPropertyDescriptionList
set file = "mypicture.bmp"
set WinPath = dtGetWindowsDirectory()
set description = [:]
addProp description, #SourcePath, [#default: the moviePath & file, #format:#string, #comment:"Source Path:"]
addProp description, #DestinationPath, [#default: WinPath & "" & file, #format:#string, #comment:"Destination Path:"]
return description
end
on getBehaviorDescription
return " " & ¬
"- - Copy File Bahavior - -" & RETURN & ¬
"Copies a file to the Windows folder."
end
on mouseDown
copyFile
end
on copyFile
set Ok = dtCopyFile(SourcePath, DestinationPath, "")
if getAt(Ok,1) <> 0 then
-- Error
alert("Error: " & getAt(Ok,1) & " - base error code")
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA