You'll need some error checking with that for times when the users cancel
the file open dialog box rather than clicking ok. During such an event
photoFileName will turn VOID and your code will generate an error. I've
made the modifications in it myself.
<snip>
on mouseUp me
-- add the name to our list
set myFile = new(xtra "fileio")
if the machineType = 256 then
-- Windows
setFilterMask(myFile, "*.bmp, *.jpg, *.gif")
end if
set photoFileName = displayOpen(myFile)
-- This is the error checking line --
if photoFileName <> VOID AND photoFileName <> "" then
-- assign the filename to the displayed castmember
set whichMember = the member of sprite 2
set the fileName of member whichMember = photoFileName
end if
-- dispose of xtra
set myFile = 0
end
<snip>
Regards,
Pranav
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]