reset/ delete image if exist then create new image
Posted: Thu Aug 16, 2007 12:40 am
Hi, I have a button I want to use to reset to a new image.
So if there is an image there I want to delete that image and
create new blank image and position it.
I tried several variations and get different errors, for me its usually in the syntax.
err
Chunk: no such object
Object Button
Line if exist (image "iData")
Hint iData
I know I am missing something, but at the moment it escapes me,
once I get this to work I can then go on to positioning the new image to a certain spot on the screen.
thanks for any suggestions.
Tim
So if there is an image there I want to delete that image and
create new blank image and position it.
I tried several variations and get different errors, for me its usually in the syntax.
err
Chunk: no such object
Object Button
Line if exist (image "iData")
Hint iData
Code: Select all
on mouseUp
if exist (image iData) then
delete "iData"
new image "iData"
end if
end mouseUp
once I get this to work I can then go on to positioning the new image to a certain spot on the screen.
thanks for any suggestions.
Tim