Re: Tool Shed
Posted: Fri May 08, 2020 8:47 am
I made a button "NEW" with this script:
And it did NOT work: nothing happened, and there were no error messages.
Then I remembered I had a 'mouseUp' command in the card . . .
NOW, just to prove what a 'prawn' I am and how that was wrong . . .
I put this into my cardScript:
and clicking on my 'NEW' button blocked the cardScript . . . so obviously it is time to go downstairs and make a second cup of coffee. 
Code: Select all
on mouseUp
if exists(img "ZZ") then
answer "Do you want to delete your work?" with "Yes" and "No"
if it is "Yes" then
delete img "ZZ"
end if
end if
if exists(img "ZZ") then
--do nix
else
create image "ZZ" in card "KARD"
set the width of img "ZZ" to 500
set the height of img "zz" to 600
set the top of img "ZZ" to 0
set the layer of img "ZZ" to 1
set the showBorder of img "ZZ" to true
set the borderWidth of img "ZZ" to 3
set the threeD of img "ZZ" to false
end if
end mouseUp
Then I remembered I had a 'mouseUp' command in the card . . .
NOW, just to prove what a 'prawn' I am and how that was wrong . . .
I put this into my cardScript:
Code: Select all
on mouseUp
put "Blocked"
end mouseUp