Scaleform - Actionscript not calling Fscommand

496 Views Asked by At

I am making a game in udk, and for some reason in ActionScript the function fscommand doesn't execute. I am using Adobe Flash Professional CC 30 Day Trial, with UDK July 2013. I have installed CLIK (AS3) as specified on the UDN website (http://udn.epicgames.com/Three/SettingUpScaleformGFx.html#ActionScript 3 / Scaleform 4) yet Adobe Flash is unable to load or recognize any of the CLIK ActionScript files.

My CLIK settings:

enter image description here

And the code I used for all my buttons (the only difference are the fscommands I call):

import flash.events.MouseEvent;

addEventListener(MouseEvent.MOUSE_OVER, hover);
addEventListener(MouseEvent.CLICK, clicked);

function hover(e:MouseEvent):void {
    this.nextFrame();
    removeEventListener(MouseEvent.MOUSE_OVER, hover);
    addEventListener(MouseEvent.MOUSE_OUT, out);
}

function out(e:MouseEvent):void {
    this.prevFrame();
    removeEventListener(MouseEvent.MOUSE_OUT, out);
    addEventListener(MouseEvent.MOUSE_OVER, hover);
}

function clicked(e:MouseEvent):void {
    fscommand("singleplayer");
}
1

There are 1 best solutions below

0
On

Have you verified that the clicked() function is being called? Try putting a trace() statement in there. Do you see any compiler errors when compiling the SWF?