Attach this script to delete a text file from your system.
global myFile, myName
property pPath, pName, pAttach
on deleteFile
if objectP(myFile) then set myFile = 0
set myFile = new (xtra "fileio")
set moviepath = myName
set myName = pPath
if the moviepath = "" then
alert "No way"
else
openFile (myFile, myName&pName&".txt",0)
delete(myFile)
end if
closeFile(myFile)
set myFile = 0
end
on EnterFrame me
if pAttach = "On EnterFrame" then
deleteFile
end if
end EnterFrame
on ExitFrame me
if pAttach = "On ExitFrame" then
deleteFile
end if
end ExitFrame
on MouseUp
if pAttach = "On MouseUp" then
deleteFile
end if
end MouseUp
on MouseDown
if pAttach = "On MouseDown" then
deleteFile
end if
end MouseDown
on getPropertyDescriptionList me
set description = [:]
addProp description, #pPath, [#default: "C:windowsdesktop", #format: #string, #comment: "Select the path:"]
addProp description, #pName, [#default: "Default", #format: #string, #comment: "Select the file name:"]
if the currentspritenum = 0 then
addProp description, #pAttach, [#comment: "Options to attach:" ,#format:#String, #range:["On EnterFrame","On ExitFrame"],#default:"On EnterFrame"]
else
addProp description, #pAttach, [#comment: "Options to attach:" ,#format:#String, #range:["On MouseUp","On MouseDown"],#default:"On MouseUp"]
end if
return description
end getPropertyDescriptionList
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA