Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Unreal Development.

In a nutshell, how do I create a button, install it in a basic game, and capture the button click event?

share|improve this question
up vote 5 down vote accepted
  • Send of signals:

We can send messages from flash to UDK with the ActionScript command fscommand( "mycommand" )

For example, we want a button that permit us exit from the game

With ActionScript, we asign the function fscommand("exit") to the click button event

btn_exit.addEventListener( "click", this, "btn_exit_click" );

function btn_exit_click():Void
  • Receiving message:

From kismet we can receive the pulsation of the button, for this:

New event -> GFx Ui -> fscommand .

Inside the properties, we have two that are necessary, Movie and FSCommand

On Movie we'll put the flash movie that we are using ( button with green arrow ) and in FSCommand we write the command that we are waiting for, in that case Exit


  • Send of signals:

We can connect the exit to that we want to happen when the signal was sended from Flash.

With this example, we are created a "Console Command"

New Action -> Misc -> Console Command


share|improve this answer

The accepted answer is outdated. FScommands are deprecated and slow.

Try using scaleform CLIK and:

event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)

    // Determine which widget is being initialized and handle it accordingly
        case 'btnStart':
            // Save reference to the label that displays the message to the player
            btnStart = GFxCLIKWidget(Widget);
            btnStart.AddEventListener('CLIK_click', startGame);

            // Pass on if not a widget we are looking for
            return Super.WidgetInitialized(Widgetname, WidgetPath, Widget);

    return false;

function startGame(EventData data)
    // Only on left mouse button
    if(data.mouseIndex == 0)
        ConsoleCommand("open DM-DECK");
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.