Here is a small stack showing how to change a background image based on a menu selection.
The stack builds the path to the chosen image file, which it assumes is in a folder called "backgrounds" located next to the stack itself. It then appends the chosen image name to the folder and resets the filename property of the background image.
The code is in the menuPick handler of the drop down menu.
Code: Select all
on menuPick pItemName
set the itemDel to "/"
put item 1 to -2 of the filename of this stack & "/backgrounds/" & pItemName & ".jpg" into tImageFilePath
set the filename of image "background" to tImageFilePath
end menuPick
Kind regards
Elanor