Need help with OnClick event
i want to open an error frame with a message in it when i click on for example frame1. I added:
<Frame>
..
<Scripts>
<OnLoad>
frame1_OnLoad();
this:RegisterForClicks("LeftButtonUp","RightButtonUp")
</OnLoad>
..
<OnClick>
message("hello");
</OnClick>
</Scripts>
</Frame>
But when i log in the game the following error appears:
Error: [string "frame1:OnLoad"]:3: attempt to call method `RegisterForClicks' (a nil value)
Can you help me to make it working ?
|