2

hello im trying to add a new element to the hud its spoused to be a compass that should function like the minimap

Ive add this code to the main hud.swf

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

so far all is good this is the info on the main MC 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),
        //
        ExternalInterface.call("registerDcompassView", this);
    }

}

in the GFxMinimapHud.uc ive added this code

function registerDcompassView(GFxDcompass dc)
{
    GetPC().ClientMessage("DCopmass Registered");
    Dcompass = dc;
    Dcompass.Init(self);
    Dcompass.SetVisible(false);
    Dcompass.SetFloat("_xscale", 85);
    Dcompass.SetFloat("_yscale", 85);
}

after adding all swf to the content browser and running the game the swf does appear on thew screen but the code is not working im not getting the ClientMessage

Dorpe
  • 31
  • 5
  • I've just done my HUD successfully . What's your problem exactly ? "the code(?) is not working ..." Does your GFxDcompass class's Logic work correctly ? – Emadpres Oct 23 '11 at 03:52
  • check this : **http://forums.epicgames.com/threads/842146-Problem-with-GFxMinimap-%282DMapTexture%29-HUD-flaw-D** – Emadpres Nov 06 '11 at 19:43

0 Answers0