minigamescorecard.swf
End-of-match scorecard window displayed after a Trove minigame concludes. Shows a ranked leaderboard of players with their scores, a set of up to four level-gated rewards available for that match, and a victory summary panel with earned rewards once a winner is declared.
Document/main class: MiniGameScorecard (extends _kiwi.Core.UIComponent)
SWF-specific classes: 11 (main + 5 game-logic classes + 5 MiniGameScorecard_fla timeline symbols + button/asset helpers)
Main class: MiniGameScorecard
Owns a WindowHeaderSmall (title $Minigame_Header), a header MovieClip with a score column label (header.txt_score), a Rewards component, and a ScoreList. On console, a ButtonLegendClose visibility is deferred until onTargetFrame() via ENTER_FRAME. Registers three ExternalInterface callbacks in configUI.
Public methods
setVictory(level:int, bestRewardLevel:int) : void— delegates toRewards.setVictory; showsButtonLegendCloseon console.setScoreType(type:int) : void— setsscoreList.scoreType; swapsheader.txt_scorebetween$MINIGAME_TIMEand$MINIGAME_SCORE.setSortType(type:int) : void— setsscoreList.sortType(ascending or descending).
Key fields
rewards : Rewards— sub-component managing up to 4 reward slots and the EOM earned panel.scoreList : ScoreList— scrollable stack ofScoreListingrows.header : MovieClip— header row containingtxt_score:TextField.ButtonLegendClose : MovieClip— console button hint for closing; hidden until game result is received.currentLevel : int— cached victory level (−2 = not yet set).
Frame scripts / timeline
- frame 1 / 11 / 21 —
stop()for PC, Console, and ConsoleLoc layouts respectively.
Runtime dependencies & integration
ExternalInterfacecallbacks:setScoreType,setSortType,setVictory(plusaddPlayer/removePlayer/setPlayerScorefromScoreListandsetReward/setVictoryRewardfromRewards).IggyFunctions.inIggygate.setupTranslation()called from constructor.- Translate keys:
$Minigame_Header,$MINIGAME_TIME,$MINIGAME_SCORE.
Other game-specific classes
ScoreList (extends _kiwi.Controls.StackList) — Embed symbol107
Maintains an internal scoreData:Array of ScoreData objects and keeps a matching set of ScoreListing display children in sync. Sorting is done client-side with custom comparators; ties are broken by scoreUpdatedTime (earlier update wins in ascending; earlier update also wins in descending).
Public methods:
addPlayer(name:String) : void— creates aScoreData, pushes it, callsupdateRows().removePlayer(name:String) : void— splices by name, callsupdateRows().setPlayerScore(name:String, score:Number, level:int) : void— updates score and timestampsscoreUpdatedTime; callsupdateRows()only if score changed.
Key fields:
scoreData : Array— array ofScoreData; sorted in-place before every redraw._sortType : int—SORTING_ASCENDING(0) orSORTING_DESCENDING(1, default)._scoreType : int—SCORE_INTEGER(0, default) orSCORE_TIME(1); controlsformatScore()output.
Score formatting: integer scores displayed as plain integers; time scores formatted as MM:SS (milliseconds are computed but not displayed in the formatted string).
ExternalInterface callbacks: addPlayer, removePlayer, setPlayerScore. Test data injected when not in Iggy.
ScoreListing (extends MovieClip) — Embed symbol36
Row display object: txt_rank, txt_name, txt_score TextFields; levelIcon:MovieClip (driven by gotoAndStop(level + 1); chid 25 is blank on frame 1, then labelled bronze, silver, gold, platinum, so level 0 shows no badge); friendIcon:MovieClip. Frame scripts at frames 2 and 3 (stop()).
ScoreData
Plain value object: name:String, score:Number, level:int, scoreUpdatedTime:Number. No display logic.
Rewards (extends _kiwi.Core.UIComponent) — Embed symbol151
Manages two child panels: rewardsAvailable (4 RewardInfo slots shown pre-victory) and rewardsEarned (EOM panel shown post-victory). Registers its own callbacks, setReward and setVictoryReward. On console, fires ExternalInterface.call("OnConfigured") after first ENTER_FRAME; on PC it is never sent.
Key methods:
setReward(slot, scoreThreshold, qty, ghosted, iconImage)— populates oneRewardInfoslot (1–4); setsartClip.iconImage,txt_level,txt_score(the threshold arrives as a string),txt_quantity(blank unlessqty > 1), and sendslevelIconto frameslot + 1(slot 1 bronze … slot 4 platinum). Theghostedflag both ghosts the art and shows thechecktick.setVictoryReward(slot, qty, ghosted, iconImage)— populates the corresponding earned slot inrewardsEarned.rewards.setVictory(level, bestRewardLevel)— switches visibility torewardsEarned, fillstxt_level/txt_nextLeveltexts, setslevelIconframe, wiresbtnExitclick toExternalInterface.call("OnRequestClose")(the button is hidden on console). Level 0 shows$Minigame_No_Level_Earned; the next-level line quotes thetxt_scorethreshold of reward slotmax(level, bestRewardLevel) + 1.
Translate keys: $Minigame_Level (replace {0}), $Minigame_Level_Earned (replace {0}), $Minigame_No_Level_Earned, $Minigame_Level_Next (replace {0}).
RewardInfo (extends MovieClip) — Embed symbol116
Single reward display row: artClip:ArtClip, txt_score:TextField, txt_level:TextField, txt_quantity:TextField, check:MovieClip, levelIcon:MovieClip.
MiniGameScorecard_fla timeline symbols
| Class | Symbol | Role |
|---|---|---|
rewardInfoEOM_4 |
symbol148 | EOM earned-rewards panel; holds 4× artClip/txt_quantity/check triplets, levelIcon, txt_level, txt_nextLevel, txt_reward, and btnExit:btnGreenIcon_small (label $Scorecard_ExitGame). |
iconLVLReward_11 |
symbol108 | Multi-frame clip for level-badge icon in reward slots; stop() on frame 1. |
equipped_23 |
symbol49 | Two-frame clip (equipped / unequipped indicator). |
scoreChange_35 |
symbol30 | Single-frame clip; score-change animation placeholder. |
YouIcon_36 |
symbol35 | Three-state clip (frames 1/10/19) marking the local player in the score list. |
levelIconMC_8 |
symbol (no explicit Embed seen) | Level badge used in the score rows (referenced via ScoreListing.levelIcon). |
iconLVL_34 |
— | Additional level icon variant. |
slotFrame_21 / slotFrameLarge_32 |
— | Slot frame decorators for reward slots. |
Button/asset helpers (no game logic)
btnGreen(extendsLabelButton) — Embed symbol81; green button, four-state frame stops.btnGreen_small(extendsLabelButton) — Embed symbol91; small variant.btnGreenIcon_small(extendsLabelButton) — Embed symbol126; icon+label small button (used as Exit button in EOM panel).slot_large(extends_kiwi.Controls.Slot) — Embed symbol64; large item slot graphic.dummy(extendsBitmapData) — Embed53_dummy.png; placeholder bitmap for unloaded art.rarity_frame_*(×9 PNG/non-PNG wrappers) — rarity tier border graphics.rarity_frame_stellar— stellar rarity border (no_pngsuffix, pure MovieClip).
Notable logic
- Score sort uses a stable-by-time comparator: if two players share the same score, the one whose score was set earlier wins in descending sort (i.e. first to achieve the score ranks higher).
KiwiTextUtil.resizeFontandKiwiTextUtil.alignTextFieldVerticallyare called on the EOM panel'stxt_levelfield to fit long localised strings.- Every reward
ArtClipis givendata = 1, so hovering any reward sendsSLOT.POINTER_ENTER(1, x, y)and leaving itSLOT.POINTER_LEAVE(1), whichever slot it is. - The
Rewardscomponent references child objects by name string ("reward1"…"reward4","artClip1"…"artClip4","check1"…"check4","txt_quantity1"…"txt_quantity4") viagetChildByName, so the FLA timeline naming is load-bearing.