Jump to content

cancelEvent problem.


Recommended Posts

Hello guys. I made a function and an event to start the function, when the browser was created to draw an image, but I don't know how to cancel the event.

Look: the function and the start event.

function renderDisplay ( ) 
    local seconds = getTickCount() / 1000 
    local angle = math.sin(seconds) * 20 
    dxDrawImage ( screenWidth/2 - 680, 720, 50, 50, 'onbutton.png', angle, 0, -120 ) 
function HandleTheRendering ( ) 
    addEventHandler("onClientRender", getRootElement(), renderDisplay) 
addEventHandler("onClientBrowserCreated",resourceRoot, HandleTheRendering) 

Thanks !

Link to comment

I've these events:

addEventHandler("onClientGUIClick", self.m_LoadButton, function(...) self:LoadButton_Click(...) end, false) 
    addEventHandler("onClientGUIAccepted", self.m_EditAddress, function(...) self:LoadButton_Click(...) end, false) 
    addEventHandler("onClientGUIClick", self.m_BackButton, function(...) self:BackButton_Click(...) end, false) 
    addEventHandler("onClientGUIClick", self.m_ForwardButton, function(...) self:ForwardButton_Click(...) end, false) 
    addEventHandler("onClientGUIClick", self.m_ButtonClose, function(...) self:CloseButton_Click(...) end, false) 

And I want to trigger with this event:

addEventHandler("onClientGUIClick", self.m_ButtonClose, function(...) self:CloseButton_Click(...) end, false) 

I think it's a little bit complicated :lol:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...