Yea, i already find how to do it before you told me. Thanks anyway.
But i have a probleme (yes, another...) with a function. I want the players, when they click a little cross i've made, all the page on the menu panel is close. Its working, but we can still click on it even though the pages are close. We can still ear the sound (click.mp3).
So, i imagine that i cant remove the EventHandler onClickCross in the OnClickCross function . Let me paste my code below:
function onClickCross(button,state)
if button=="left" and state=="down" then
local imgX, imgY, imgWidth, imgHeight = (810/1024)*sx, (200/768)*sy , (20/1024)*sx, (20/768)*sy --- Button Location on the screen
if isMouseInPosition ( imgX, imgY, imgWidth, imgHeight ) then
playSound("click.mp3") --- The click sound when you click on the button
--- Close all the pages
removeEventHandler("onClientRender",getRootElement(),playPanel)
removeEventHandler("onClientRender",getRootElement(),registerPanel)
removeEventHandler("onClientRender",getRootElement(),updatesPanel)
--- Close the onClickCross function (this function)
removeEventHandler("onClientRender",getRootElement(),onClickCross)
end
else
return false
end
end
That would be awesome if you can help me with that! Because im learning lua at the same time
(Sorry for my bad english by the way, french are not good at english you should know that ^^)