Hi Steve,
your script does not even compile. Here some reasons for the failing:
1. there is nothing like "the selected image" only "the selectedobject"
2. From the dictionary about "doMenu":
...
The doMenu command is not implemented for all menu items. This command is included in LiveCode for compatibility with imported HyperCard stacks.
...
So "Duplicate Objects" obviously is not supported, that's why you only have ONE image in the end.
3. You cannot "set the short name of img xyz" only "set the name of img xyz". Illogical but true
This does work, and don't forget to LOCK SCREEN, so the user will not see what is going on:
Code: Select all
on mouseUp
lock screen
## This is what the "Duplicate Objects" menu actually does:
clone img "girl.png"
put "GHOST" & the short name of last img into NewShortName
## New and cloned objects always have the highest layer number:
set the name of last img to NewShortName
set the ink of img NewShortName to "blend"
set the blendLevel of image NewShortName to 50
## "show xyz AT..." does not work -> error
## show image "GHOSTgirl.png" at the loc of image "girl.png"
## You want to:
set the loc of last img to the loc of image "girl.png"
hide image "girl.png"
unlock screen
end mouseUp
Best
Klaus