[CS5] [as2] [scaleform3] Skyrim interface project

Im working on a plugin for the game Skyrim. The game will play .swf files with the Scaleform3.0 player. Its been years since Ive seen any actionscript so Im stumbling along as I slowly pick it up. I was hoping someone might be able to give me a few pointers :slight_smile:

The entire project is hosted on Github where you can clone the whole project or just view the code. https://github.com/Scrivener07/A-Quality-World-Map
[SIZE=4]Download the .fla here[/SIZE] and ‘View Raw’

This project modifies Skyrims map menu.

//youtu.be/uhSJJQaFzWc

Dependencies


+---map.fla
    +---Components
    | CrossPlatformButtons.as
    |
    +---gfx
    | +---controls
    | | Button.as
    | | ButtonGroup.as
    | | OptionStepper.as
    | | RadioButton.as
    | | ScrollBar.as
    | |
    | +---core
    | | UIComponent.as
    | |
    | +---events
    | | EventDispatcher.as
    | |
    | +---io
    | | GameDelegate.as
    | |
    | +---managers
    | | FocusHandler.as
    | | InputDelegate.as
    | |
    | +---ui
    | | InputDetails.as
    | | NavigationCode.as
    | |
    | \---utils
    | Constraints.as
    | Locale.as
    |
    +---Map
    | | LocalMap.as
    | | MapMarker.as
    | | MapMenu.as
    | | MarkerDescription.as
    | |
    | \----Aqwm
    | CartographerMapTab.as
    | CartographerMarkersTab.as
    | CartographerMenu.as
    | CartographerQuestsTab.as
    | OptionsList.as
    | SettingsOptionItem.as
    |
    \---Shared
            ButtonChange.as
            GlobalFunc.as

First I have a few script related questions.

Im not sure what it means for something to be defined or not. Does, if (x != undefined) mean it is defined?
map.mapmenu.as

    function Init(): Void {
        onResize();
            **if (GeoIcon != undefined)** { // (x != undefined) means it is defined &| anything 

but undefined?
                GeoIcon.swapDepths(4);
                GeoIcon.geoCompassButton.addEventListener("click", this, 

"OnGeoCompassButtonClick");
            }
        
            
            **if (MapMovie.localMapFader != undefined)** { 
                MapMovie.localMapFader.swapDepths(3);
                MapMovie.localMapFader.gotoAndStop("hide");
            }    
    
        
            **if (MapMovie.cartographerFader != undefined)** {
                MapMovie.cartographerFader.swapDepths(3);
                MapMovie.cartographerFader.gotoAndStop("hide");
            }
                
        GameDelegate.addCallBack("RefreshMarkers", this, "RefreshMarkers");
        GameDelegate.addCallBack("SetSelectedMarker", this, "SetSelectedMarker");
        GameDelegate.addCallBack("ClickSelectedMarker", this, "ClickSelectedMarker");
        GameDelegate.addCallBack("SetDateString", this, "SetDateString");
    }

What exactly does super(); do?
map.mapmenu.as

    function LocalMap() {
        super();
        //snip..
    }

Is this the best way to reference between two nested child movieclips? Would this.mapTabFader.mapTab; work? I think I should be using _parent some how.[URL=“https://github.com/Scrivener07/A-Quality-World-Map/blob/working/src/map/Aqwm/CartographerMenu.as”]
map.Aqwm.CartographerMenu.as

    function CartographerMenu() {
        super();            
        MapSettingsTab = _root.cartographerFader.cartographerClip.mapTabFader.mapTab;
        MarkersSettingsTab = _root.cartographerFader.cartographerClip.markersTabFader.markersTab;
        QuestsSettingsTab = _root.cartographerFader.cartographerClip.questsTabFader.questsTab;    
        MapSettingsFader = _root.cartographerFader.cartographerClip.mapTabFader;
        MarkersSettingsFader = _root.cartographerFader.cartographerClip.markersTabFader;
        QuestsSettingsFader = _root.cartographerFader.cartographerClip.questsTabFader;
        
        PageArray = new Array(MapSettingsTab, MarkersSettingsTab, QuestsSettingsTab);
        TopmostPage = MapSettingsTab; 
        bTabsDisabled = false;
        SetPageDefault();
    }

Now I have a few behavior questions :slight_smile:

You can almost spot these in the video.
The first issue is the map icons are on I higher depth than the local map.

I have to change a tab at least once before buttons will fire there click events.

The Cartographer menu doesnt respond if the local is up. I have to used a hard coded shortcut key to hide it.

Between all the cartographer menu tabs, buttons from one tab will fire click events on another tab even though

they arnt visible. For example I can click an invisible ‘show current time’ button on the quests tab.

And any general advice on my scripts.

Thanks to everyone who can help.

[SIZE=3]Huge thanks to the SkyUI team for decompiling Skyrim’s original assets and Bethesda devs for giving the greenlight on this.[/SIZE]