playerhud.swf
The Player HUD is the persistent in-game overlay showing the player's class insignia, power rank, XP/prestige bar, active buff icons with cooldown radials, and the group/tether icon. It is always visible during normal gameplay.
Document/main class: PlayerHUD (extends _kiwi.Core.UIComponent)
SWF-specific classes: 4 (PlayerHUD, XpMeter, BuffIcon, prestigeMeter / meter subclasses) + 3 PlayerHUD_fla timeline classes + 6 asset wrappers
Main class: PlayerHUD
PlayerHUD is the root HUD component. On construction it calls super() then registers frame scripts for frames 1, 11, and 21 (all stop()). All setup is deferred to configUI(), which hides the leader icon in the tether container, calls useDiscoveryXPBar(false, false) to set the default meter state, registers eight ExternalInterface callbacks (in Iggy), adds ROLL_OVER/ROLL_OUT tooltip listeners to the insignia, power rank, and all three XP meters, calls setupTranslation(), uppercases powerRankLabel, and adjusts the powerRank TextField's vertical position accounting for locale (Chinese: offset 0; others: −6 px).
In non-Iggy preview mode it calls useDiscoveryXPBar(true, false), setClassLevel("Knight", 12, 0.25, true, false, 0, ""), and setInsignia(5, 4).
Public methods
useDiscoveryXPBar(geode : Boolean, prestige : Boolean) : void— shows/hides the three XP meter variants:geodeXpMeter(Geode world),troveXpMeter(standard Trove),trovePrestigeMeter(prestige). "Discovery" is the game's internal name for Geode ($WorldPortalType_Discoveryis "Geode Portal") and "prestige" its internal name for Paragon ($Inventory_Subheading_Prestigeis "PARAGON"). CallsupdateLockPosition()after.setClassLevel(className, level, percent, locked, prestige, rollOverAmt, prestigeIcon) : void— updates all three meters'classNameTextField width,label, andpercent; sets the prestige meter'sObjectPreviewicon (resized to 60×60) and rollover amount; setslockIcon.visible; callsupdateLockPosition(). The fifth argument is never read.rollOverAmtis written toxpRollOverAmt, the number beside the$PlayerHUD_Rollover("Millenia") label; both are hidden when it is 0 or less.updateLockPosition() : void— positionslockIcon.x9 px right oftroveXpMeter's class name when that meter is visible, otherwise 9 px right ofgeodeXpMeter's level text (also while the prestige meter is the one showing).setPowerRank(pr : int) : void— setspowerRank.text.setInsignia(shieldFrame, wingsFrame : int) : void— the first argument is thegotoAndStopframe forinsignia.shield(frames 1–20), the second forinsignia.wings(frames 1–26).updateBuff(idx, iconPath, timeRemaining, duration, stackCount, ?, bgColor, iconSize) : void— creates a newBuffIconat slotidxif needed (6-column grid, 50×50 px cells), sets icon texture and size (iconSize×iconSize), stack count (blank unless above 0), background color, and draws the cooldown radial sweep onBuffIcon.cooldown.radialusingGraphics.lineTowith 8-point octagon approximation. The sixth argument (aBoolean) is never read, and no buff id or display name is passed: the slot index and icon texture are the only identifiers.resizeBuffs(count : int) : void— hidesbuffs[count…]to trim the visible list.setTetherIcon(iconPath, isLeader : Boolean) : void— setstetherArtContainer.groupIconObjectPreview texture (resized to 35×35) andleaderIcon.visible.updateTetherOutOfRange(outOfRange : Boolean) : void— setstetherArtContainer.groupIcon.alphato 0.5 or 1.
Key fields
insignia : MovieClip— player insignia clip withwings(26 frames) andshield(20 frames) child clips, both stepped bysetInsignia; tooltip on ROLL_OVER callsShowPowerRankTooltip.powerRank : TextField— numeric power rank display; tooltip on ROLL_OVER callsShowPowerRankBreakdown.powerRankLabel : TextField— holds$Stat_PowerRank("Power Rank"), translated bysetupTranslation()and then uppercased.tetherArtContainer : MovieClip— containsgroupIcon : ObjectPreview(group/tether icon) andleaderIcon, which is character 39, an empty sprite with no art, sosetTetherIcon's leader flag has no visible effect in the stock file.troveXpMeter : XpMeter— standard Trove class XP bar.geodeXpMeter : XpMeter— Geode world XP bar (different layout, includes level in label).trovePrestigeMeter : XpMeter— prestige (Paragon) XP bar with additionalimgContainer.groupIcon : ObjectPreviewfor prestige badge (imgContaineris the same symbol astetherArtContainer) andxpRollOverAmt/xpRollOverLabel($PlayerHUD_Rollover, "Millenia") for the rollover count.lockIcon : MovieClip— padlock shown when the class is locked.buffs : Array— dynamic array ofBuffIconMovieClip instances.buffContainer : MovieClip— parent container for all buff icons.IMG_WIDTH : Number = 690,IMG_HEIGHT : Number = 408— likely reference dimensions (unused in AS logic directly).ICON_COLUMNS : int = 6— buff grid column count.TetherIconSize : Number = 35— resize target for the tether icon.
Frame scripts / timeline
Stage 310 × 140, 24 fps, 30 frames in three labelled 10-frame blocks.
- Frame 1 (
frame1, labelPC):stop()— the PC layout, which stays on this frame (there is noPCLoclabel). Placesinsigniaat (4, −16),powerRankLabel(6, 66),powerRank(10, 76), the three meters at (95, 18),lockIcon(145.5, −3.5),buffContainer(98, 51) andtetherArtContainer(30, 108). - Frame 11 (
frame11, labelConsole):stop()— console layout: movesbuffContainer, the three meters andinsignia, and replacespowerRankLabel/powerRankwith new fields.UIComponentpicks it on console platforms for English and Chinese locales. - Frame 21 (
frame21, labelConsoleLoc):stop()— the console layout withpowerRankLabel/powerRankreplaced again; picked on console platforms for every other locale.
Runtime dependencies & integration
ExternalInterface.addCallback("useDiscoveryXPBar", useDiscoveryXPBar).ExternalInterface.addCallback("setClassLevel", setClassLevel).ExternalInterface.addCallback("setPowerRank", setPowerRank).ExternalInterface.addCallback("setInsignia", setInsignia).ExternalInterface.addCallback("updateBuff", updateBuff).ExternalInterface.addCallback("resizeBuffs", resizeBuffs).ExternalInterface.addCallback("setTetherIcon", setTetherIcon).ExternalInterface.addCallback("updateTetherOutOfRange", updateTetherOutOfRange).ExternalInterface.call("ShowPowerRankTooltip", mouseX, mouseY+30)— insignia hover.ExternalInterface.call("ShowPowerRankBreakdown", mouseX, mouseY+30)— power rank field hover.ExternalInterface.call("ShowMasteryTooltip", mouseX, mouseY+30)— dead: the privateshowMasteryTooltiphandler is added as a listener nowhere, and themasteryMetersymbol is placed on no timeline, so the stock HUD never makes this call.ExternalInterface.call("ShowLevelTooltip", mouseX, mouseY+30)— XP meter hover.ExternalInterface.call("HideTooltip")— all ROLL_OUT handlers._locale == LOCALE_ZHcheck — adjustspowerRank.yoffset for Chinese locale.ColorTransformviachangeColor(clip, color)— used to tintBuffIcon.iconBackground.
Other game-specific classes
-
XpMeter(extendsUIComponent) — reusable XP bar component. HasclassName : TextField,levelTextField : TextField, andxpBar : MovieClip.label(level text) andpercent(fill fraction) are data-invalidation properties;draw()updateslevelTextField.textandxpBar.scaleX(proportionally to_barScaleX * percent). Captures initialxpBar.scaleXas_barScaleXvia a frame listener (listenForFrame/setUpXpBar). Used for all three meter instances (troveXpMeter,geodeXpMeter,trovePrestigeMeter) with layout differences managed by the parent. -
BuffIcon(extendsMovieClip, embedsassets.swf#symbol22) — buff icon tile. Containscooldown : MovieClip(withradial : Spritefor the pie-wedge sweep),icon : image(ObjectPreview),displayCount : TextField,iconBackground : MovieClip. No logic; all population done byPlayerHUD.updateBuff.
PlayerHUD_fla timeline symbols
powerRank_15(embedsassets.swf#symbol158) — the insignia MovieClip containingwingsandshieldchild clips; single-frame stop.wings_16(embedsassets.swf#symbol116) — wings sub-clip; 26 frames, each one 88×88 bitmap at (0, 0),stop()on frame 1. Frames 1–8 areDefineBitsLossless2with smoothed clipped fills (0x41); frames 9–26 areDefineBitsJPEG3with non-smoothed clipped fills (0x43, nearest-neighbour when scaled).shield_17(embedsassets.swf#symbol157) — shield sub-clip; 20 frames, each one 88×88DefineBitsJPEG3bitmap at (0, 0) with a non-smoothed clipped fill (0x43),stop()on frame 1.
Asset wrappers (no logic)
6 classes: dummy, image (base ObjectPreview class alias), xpMeter (decompiled as xpMeter_2.as), xpMeterGeode, masteryMeter, prestigeMeter — trivial subclasses with no game-logic code beyond inherited behavior (dummy is a 52×52 BitmapData; image, symbol 17, is the ObjectPreview placed as BuffIcon.icon, cooldown.radial and groupIcon). The four meter classes are XpMeter subclasses with PC/Console labels on frames 1/11 (stop() on each): xpMeter (symbol 59) is troveXpMeter, xpMeterGeode (38) is geodeXpMeter, prestigeMeter (49) is trovePrestigeMeter, and masteryMeter (13) is exported but placed on no timeline.
Notable logic
- Three XP bar modes:
useDiscoveryXPBar(geode, prestige)selects exactly one of threeXpMeterinstances to display. Geode mode showsgeodeXpMeterand wins when both flags are true; prestige mode showstrovePrestigeMeter(with prestige badgeObjectPreviewand optional Millenia rollover counter); otherwisetroveXpMeter. Lock icon position is updated accordingly. - Cooldown radial sweep (pie chart):
updateBuffdraws a filled-arc sweep of radius 32 onBuffIcon.cooldown.radialusing an 8-point octagon tessellation. It iteratesk = 0..7computing anglesk * PI/4 - PI/2, breaking when the angle reaches(1 - timeRemaining/duration) * 2*PI - PI/2, then draws a finallineToat the exact sweep angle. The shaded wedge is the elapsed fraction, growing clockwise from 12 o'clock; fill opacity is 0.5 (dark overlay), and nothing is filled whendurationis 0 or less.PlayerHUDhas no frame or timer handler of its own, so the sweep only moves whenupdateBuffis called again. - Locale-aware layout:
powerRank.yis offset by −6 px for all locales except Chinese (LOCALE_ZH), working around Chinese character metrics differences. - Buff grid: Buffs are laid out in a 6-column grid at 50×50 px intervals. If
updateBuffis called for an index beyond the currentbuffsarray length, a newBuffIconis instantiated, positioned fromidx, appended to the end ofbuffsand added as a child ofbuffContainer. Icons are never removed, only hidden byresizeBuffsand shown again byupdateBuff. WithbuffContainerat x 98, the six columns run past the right edge of the 310 px stage. geodeXpMeterlevel label: Unlike the other meters wherelabelis just a number,geodeXpMeter.labelis set to" - LVL " + level, andlevelTextField.xis repositioned to follow theclassNametext width dynamically. Ahighlightchild clip'sxis also set proportionally topercent * 244 - highlight.width.