View Single Post
  #7  
Old 01-08-2010, 01:05 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
That's kind of vague, but here's a live example of catchevent.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
catchEventTest();
}

function 
catchEventTest() {
  new 
GuiButtonCtrl("HelloWorldButton") {
    
x = y = 0;
    
width = screenwidth;
    
height = screenheight;
    
text = "Hello World!";
    
thiso.catchevent(this.name, "onAction", "onHelloWorldPressed");
  }
}

function 
onHelloWorldPressed(obj) {
  
player.chat = format("Good bye %s!", obj.name);
  
obj.destroy();
} 
Also right align the result, and you'll be gr8.
__________________
Quote:
Reply With Quote