How do I make a picture change to something else when the mouse rolls over it?
Is the code anything like:
on mouseOver
*change picure1 to picture2*
end mouseOver
on mouseOut
*change picture2 to picture1*
end mouseOut
Thanks,
Omar

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Code: Select all
on mouseEnter
set the visible of image "picture 2" to false
end mouseEnter
on mouseLeave
set the visible of image "picture 2" to true
end mouseLeave 
Code: Select all
set the layer of image "imagename" to topCode: Select all
local sLoc = "700, 280" --your image placeholder position
on mouseEnter
  lock screen
  set the width of me to the width of image id 1066 
  -- or the long name of the image, etc referencing the picture location in the "gallery"
  set the height of me to the height of image id 1066
  -- you could use the rect of the gallery image, but you will probably
  -- have to lock messages if so, as otherwise you may get an infinite loop
  -- of setting the rect, triggering a mouseLeave message, setting the loc, triggering a mouseEnter message ad infinitum
  -- any difference in size of the images may cause a runaway loop too if you aren't careful
  set the loc of me to sLoc
  set the imageData of me to the imageData of image id 1066
  unlock screen
end mouseEnter
on mouseLeave
  lock screen
  set the width of me to the width of image id 1067
  set the height of me to the height of image id 1067
  set the loc of me to sLoc
  set the imageData of me to the imageData of image id 1067
  unlock screen
end mouseLeave