Hehe! That's alright for me! I 'm at the crowd's service.
Anyway, I had to go to school, it was like 10 in the morning here (well, normally we go to school at 8:15- that's not spam, I right this to prevent any questions)
mercedes, I replied your PM without seeing this post, so the code included there is used to automatically change the color.
The variables you declare in your code are not global variables. That means that when the procedure ends, they are automatically destroyed and even if the procedure is still running, another call of the same procedure can't see them
What you need to do is create the variable Mystery mentioned. Remember to create an integer variable.
Then use one of the hotspots.
Make appear as red
Go to advanced and use this code:
- Code: Select all
If myvariable=0 Then
myvariable=1
end if
Select case myvariable
Case 1
color="red.bmp"
Case 2
color="green.bmp"
Case 3
color="black.bmp"
Case 4
color="blue.bmp"
End Select
Action.LoadAPicture Hotspot(1), color
myvariable=myvariable+1
Alternatively, If you don't need the colors to re-appear, Create four hotspots on top of each other as you did before, make them appear as red, green, black and blue and finally make them hide once they are pressed (hotspot->Actions->Hide This Hotspot (permanently))
Now that I am rethinking, If you use the second one, Then have the last (blue) hotspot use the new action of AM 4.5, Action.ResetRemovedHotspots, you won't need the rest of the coding...