claims.swf
The Claims panel in Trove, showing pending claimable rewards (items, currency, etc.) earned from leaderboards, PvP, mastery, badges, or other sources. Players can claim each reward individually or all at once.
Document/main class: Claims (extends UIComponent)
SWF-specific classes: 2 (Claims, ClaimItemRow)
Main class: Claims
Manages a scrollable list of unclaimed rewards. On construction it adds frame scripts (frames 0, 10, 20), initializes claimDictionary, and sets the window header title to $Claims. configUI() configures itemView (a ScrollableTileView) to use a vertical scrollbar with 2 px item spacing, disables the claimAll button initially, sets its label to $ClaimAll, and registers all ExternalInterface callbacks. In non-Iggy mode a test claim is added automatically.
Frame scripts stop at frames 1, 11, and 21. Frame 21 sets buttonLegend to "ConsoleLoc".
Public methods
addClaim(id, icon, quantity, name, description, source, target, expires, timeUntilExpiration) : void— the engine calls it once per pending reward when the window opens, and addresses each reward byidafterwards. Creates aClaimItemRow, adds it toitemView(deferred viaENTER_FRAMEon console until the row is on its target frame), callsclaimItem.init(...), stores it inclaimDictionary[id], enablesclaimAll, and clearsnoClaimsText.setClaimed(id, hours, minutes) : void— looks up the row by id inclaimDictionary, callsrow.setClaimed(hours, minutes), incrementsnumClaimed, and disablesclaimAllwhen all items are claimed.onClaimAllClicked(e:MouseEvent) : void— callsExternalInterface.call("OnClaimAll"), which the game resolves server-side against the player's whole pending list, not against the rows drawn so far.selectClaimItem(id) : void— triggersonClaimClickedoronFindClickedon the matching row depending on whether its claim background is visible;bg.visibleis the row's "still unclaimed" flag.sourceClaimItem(id) : void— triggersonSourceClickedon the matching row.
Key fields
__id1_ : WindowHeaderSmall— window header; title$Claims.itemView : ScrollableTileView— scrollable container forClaimItemRowinstances; vertical step 10 px (non-console), spacing(0,2,0,0).claimAll : LabelButton— "Claim All" button; enabled only when at least one unclaimed item remains.noClaimsText : TextField— shown when the claim list is empty; cleared as soon as any claim is added.goldFrame / frameBackground : MovieClip— decorative frame elements whose height is dynamically adjusted byupdateButtonLegendBackground.buttonLegend / buttonLegendBG : MovieClip— console button legend and its background; resized based on visible legend entries.- Two root children have no instance name and no field: the content well behind the list (a
DefineShape, chid 202, depth 59) and the window close button (a_kiwi.Controls.WindowCloseButton, chid 138, depth 126). claimDictionary : Dictionary— maps claimid:String→ClaimItemRow.numClaimed : int— count of items that have been claimed; used to disableclaimAll.maxNumVisible : Number = 5/scrollRowBuffer : Number = 10— layout constants.
Frame scripts / timeline
| Frame | Action |
|---|---|
| 0 | stop() |
| 10 | stop() |
| 20 | stop(), buttonLegend.gotoAndStop("ConsoleLoc") |
Frames 1, 11 and 21 carry the labels PC, Console and ConsoleLoc.
Runtime dependencies & integration
ExternalInterface callbacks registered (inIggy):
addClaim, setClaimed, selectClaimItem, sourceClaimItem, highlightClaim, unhighlightClaim
ExternalInterface calls (outbound):
OnClaimAll (claim-all button); the unnamed window close button sends POST_SOUND_EVENT("Play_ui_window_close") and OnRequestClose itself.
Highlight/unhighlight: highlightClaim(id, direction) scrolls the item into view (1.5× height buffer), applies outlineDisplayObject to bg and bg_claimed, sets both to frame "on", and updates the button legend select string. unhighlightClaim(id) removes outlines and resets to "off". Direction 1 = scrolling down, -1 = scrolling up.
Button legend resize: updateButtonLegendBackground measures the actual text height of all four legend entries (buttonLegendSelect, buttonLegendClaimAll, buttonLegendSource, buttonLegendClose), finds the max visible bottom, and adjusts buttonLegendBG.height, goldFrame.height, and frameBackground.height by the delta.
translate() keys (via IggyFunctions.translate): $Claims, $ClaimAll, $Claim_ButtonLegend, $Find_ButtonLegend
Events listened: MouseEvent.CLICK on claimAll, Event.FRAME_CONSTRUCTED (prop-set handler), Event.ENTER_FRAME (console deferred addItem)
Other game-specific classes
ClaimItemRow—UIComponent(embedded symbol 123). One row in the claims list. Displays item slot (Slot), quantity, name (itemNameText), description (itemDescText), expiration countdown (expirationText), source-type buttons (sourceButtonsMC with frames for leaderboards/battle/mastery/collections), aclaimButton(LabelButton, label$Claim), and afindButton(BaseButton, initially hidden).init()populates all fields: the name goes toitemNameText.textand the description toitemDescText.htmlTextexactly as sent. The engine sends some titles and descriptions as finished text and some as raw$Keys, and the stock row shows the latter untranslated. The row never sets its slot'srarity, so every icon keepsSlot's unset default (-1);setClaimed(hours, minutes)hides the claim button, shows the find button if atargetIdexists, and updatesexpirationTextwith the cooldown viaTimeUtil.formatTime.setExpirationTime()callsTimeUtil.formatCountdownand uses$Claims_Expires/$Claims_Expiredtranslate keys with{0}/{1}placeholders. CallsExternalInterface.call("OnClaim", claimId),OnShowSource(sourceId),OnShowTarget(claimId). Two frame-stop states at frames 0 and 10 (console variant). Visibility is deferred by one ENTER_FRAME viaonRenderedto avoid a blank first frame.
Claims_fla/ timeline symbols (6 total)
ButtonLegend_4— console button legend container.bg_claimed_33/itemRowBG_34— claim row background states.slotFrame_36— slot frame decoration.equipped_38— equipped indicator clip.qualityPips_44— quality pip indicator.sourceButtons_46— source-type button container (4 frames: leaderboards, battle, mastery, collections).
Asset wrappers (not detailed): 20 skin/png classes — rarity_frame_*_png / *_over_png (10 rarity tiers × 2), ScrollArrow*_*Skin (8), ScrollThumb_*Skin (3), ScrollBar_thumbIcon, ScrollTrack_skin, focusRectSkin. Plus top-level button MCs (leaderboardButton, btnFind, pvpBtn, badgesBtn, masteryBtn, btnGreen_wide, btnGreenIcon_small) and dummy.as.
Notable logic
- Source routing:
ClaimItemRow.setUpMenu()iteratessources = ["leaderboards","battle","mastery","collections"]and doessourceId.indexOf(sources[i]) > -1to pick a frame forsourceButtons. Only one source type is shown per row; if none match, the source button area and label are hidden. - Console deferred addItem: On console,
addClaimdefers adding the row toitemViewvia anENTER_FRAMEloop that checksclaim.allOnTargetFrame()before callingitemView.addItem(claim). This ensures the row's MC is fully initialized before it enters the scroll view. - Expiration countdown: Uses
_kiwi.Util.TimeUtil.formatCountdown(seconds)which returns aFormatCountdownResultwithvalueandunitsfields, inserted into the$Claims_Expiresstring template as{0}and{1}.