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 trying to add a new element to the HUD, it's supposed to be a compass that should function like a minimap.

I've added this code to the main hud.swf:

var DcompassContainer:MovieClip = this.createEmptyMovieClip("DcompassContainer", this.getNextHighestDepth());
DcompassContainer._x = 280;
DcompassContainer._y = 8;

So far all is good, this is the information on the main MovieClip in Flash:

name directional
instence name directional
identifier directional
class com.scaleform.directional

In the class file:

import flash.external.ExternalInterface;
import gfx.core.UIComponent;

class com.scaleform.directional extends UIComponent {
    // The entities, layers and controls of the minimap
    public var directionshow:MovieClip;

    public function directional() {

    public function configUI():Void {   
        // Register compass values with the app
        // Params: 
        //          compass movieclip (this),
        //"registerDcompassView", this);

In the GFxMinimapHud.uc I've added this code:

function registerDcompassView(GFxDcompass dc)
    GetPC().ClientMessage("DCopmass Registered");
    Dcompass = dc;
    Dcompass.SetFloat("_xscale", 85);
    Dcompass.SetFloat("_yscale", 85);

After adding all SWFs to the content browser and running the game the SWF does appear on the screen, but the code is not working, I'm not getting the ClientMessage.

share|improve this question

closed as unclear what you're asking by Anko, bummzack, concept3d, Seth Battin, Byte56 Dec 21 '13 at 5:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Check this post on the epicgames forums – Emadpres Nov 6 '11 at 19:44