activitytrackerui.swf
The Activity Tracker is a multi-tab quest/objective panel that surfaces the player's active Trove pursuits across several categories: Events, Expertise (Golden Thread objectives), Adventures (club quests), Repeatable (star bar, tome, challenges, quests), and Badges. It appears as a persistent window the player opens to track daily/weekly progress and earned badge rewards.
Document/main class: ActivityTrackerUI (extends _kiwi.Core.UIComponent)
SWF-specific classes: 19
Main class: ActivityTrackerUI
ActivityTrackerUI is the root component for the entire window. It owns two ScrollableTileView panels — categoryView (the left-side tab list) and contentView (the right-side entry list) — and orchestrates all data arriving from the game engine via ExternalInterface callbacks.
On construction, addFrameScript hooks frames 0, 10, and 20 (each calls stop()), then __setProp___id1__Scene1_header_0() pre-configures the embedded WindowHeaderSmall with the translate key $ActivityTracker.
configUI() (called by the kiwi lifecycle on first render) does:
- Configures both scroll views (spacing, vertical step, scrollbar visibility).
- Calls
focusActivity(-1, 0)to clear the initial focus state. - Registers mouse and custom event listeners on both views.
- When
IggyFunctions.inIggyis true, registers 33ExternalInterfacecallbacks so the C++ game engine can push data into the Flash UI. - When running outside Iggy (authoring preview), populates demo content using hard-coded
translate()calls for every category.
Data is stored in questsByCategory : Dictionary keyed by category string, each value being another Dictionary keyed by entry ID. When the user switches categories, selectCategory() clears contentView, re-adds all entries for the new category, and calls sortContent().
Public methods (Iggy callbacks)
addCategory(id:String, label:String) : void— Creates aCategoryEntrytoggle-button and registers a newDictionarybucket inquestsByCategory.addHeader(category:String, activityId:int, title:String, desc:String, emptyDesc:String, sortOrder:int, hidden:Boolean) : void— Adds or updates anActivityHeadersection divider inside a category.hiddenis the inverse of the header's Always Show box (showBtn.checked = !hidden);sortOrderplaces the header in the content sort.selectCategory(id:String) : int— Switches the visible content pane to the named category; toggles the checked state of the old/newCategoryEntry; hides the first header'sdivider; returns the category's index. An empty id selects the first category whosesizeOfCategoryis above zero, falling back to the last category. A click on a category tab calls this locally; no outbound call is made.selectCategoryIndex(index:int) : void— Simulates a click on a category by index.updateQuest(id, difficulty, name, progress, failed)— Upserts aQuestEntryin the REPEATABLE bucket.difficultyis an index 0–3 (clamped) onto the"1star","2star","3star","5star"icon frames;progress >= 1marks the quest complete.updateActivity(category, id, name, desc, progress, goal, rewardImg, rewardName, rewardQty, source, canRemove, sortOrder, secondarySort, topIcon, hasTimer)— Upserts aPersonalObjectiveEntry.updateGoldenThreadObjective(...)— Thin wrapper callingupdateActivitywith category = EXPERTISE.updateActivityWithTimer(category, id, name, hasTimer, timerMs, desc, progress, goal, rewardImg, rewardName, rewardQty, source, canRemove, sortOrder, secondarySort, topIcon)— LikeupdateActivitybut also callsentry.setTimer(). Note the different argument order: the timer pair followsname.timerMsis milliseconds remaining; the entry'sCountdownTimerruns it down locally and shows hours.updateGoldenThreadObjectiveWithTimer(...)— Wrapper for the timer variant in EXPERTISE.updateChallenge(name, desc, level, progress, goal, rewardName, rewardQty, rewardImg, bonusName, timerMs, dailyBonusName, dailyBonusQty, dailyBonusComplete)— Upserts aChallengeEntry. The engine sends no id: the first argument is the challenge's display name, and the entry is always stored under the fixed key"challenges"in REPEATABLE (the keyremoveChallengedeletes).updateBadge(id, rank, name, desc, texture, maxVal, currentVal, sortOrder)— Upserts aBadgeEntryin the BADGES bucket; wires up rollover listeners.addBadgeReward(badgeId, rewardId, texture, quantity)— Appends a reward slot to an existingBadgeEntrycarrousel. ArewardIdthe badge already holds is ignored, so the same reward can be re-sent without duplicating.clearBadges()— Removes allBadgeEntryitems from contentView and clears the BADGES dictionary.selectCurrentBadge() / deselectCurrentBadge()— Finds the focusedBadgeEntryand fires synthetic ROLL_OVER / ROLL_OUT on itsbadgeImageContainer.badgeRewardHighlightForward() / badgeRewardHighlightBackwards()— Delegates toBadgeEntry.highlightRewardForward/Backward()on the focused entry.setProgressBar(type:int, sortOrder, filledPct, rewardAmt, rewardImg, autoUseTexture)— Creates (if needed) one of three progress bars:StarProgressBar(0),TomeProgressBar(1),AutoUseTomeProgressBar(2), and updates its fill. Bars are keyed"starbar","tomebar","autousebar"in REPEATABLE; the type index is the only handle the engine gives a bar. The auto-use bar also receives anObjectPreviewchild with theautoUseTextureicon, which is applied only when that bar is first created.removeActivity(category, id) : void— Removes a single entry from a category's dictionary and from the content view, then callsupdateHeader().removeGoldenThreadObjective()— CallsremoveActivity(EXPERTISE, "goldenThread").removeChallenge()— CallsremoveActivity(REPEATABLE, "challenges").removeQuest(id)— CallsremoveActivity(REPEATABLE, id).focusCategory(index, direction)— Highlights a category item's background, scrolls the category view if the item is off-screen. CallsbuttonLegend.gotoAndStop("category").focusActivity(index, direction)— SetscurrentFocuson content items, scrolls contentView if needed. Fires badge rollover events when focus moves to/from aBadgeEntry. CallsbuttonLegend.gotoAndStop("activity").toggleHideActivityType(activityIndex)— Walks backwards from an item index to the nearestActivityHeaderwith ashowBtnand clicks it.selectActivityIndex(index)— Fires aTRACK_ACTIVITYevent for thePersonalObjectiveEntryat that content index.removeActivityIndex(index)— Fires aREMOVE_ACTIVITYevent for the entry at that index.setTrackedActivity(category, id)— ClearsisTrackedon the old tracked entry and sets it on the new one.getCategoryId() : String— ReturnscurrentCategory. Registered under two names,getCategoryIdandgetHeaderIndex, so the engine'sgetHeaderIndexcall also receives the category id string. The class's owngetHeaderIndex() : int(index of the firstActivityHeaderincontentView) is never registered.getCategoryCount() / getActivityCount() : int— Item counts of the two scroll views.sizeOfCategory(id) : int— Counts non-header, non-progress-bar entries in a category (everything stored, not only what is on screen).- Index arguments (
focusActivity,selectActivityIndex,removeActivityIndex,toggleHideActivityType) andgetActivityCountaddress positions incontentView, i.e. the sorted list of the open category only.selectCategoryIndex,focusCategoryandgetCategoryCountuseaddCategoryorder. updateHeader() : void— Iterates visible items; setsshowEmpty = trueon anyActivityHeaderthat is last or is immediately followed by another header (i.e., has no entries beneath it).
Key fields
categoryView : ScrollableTileView— Left panel; holdsCategoryEntrytoggle buttons.contentView : ScrollableTileView— Right panel; holds all entry types mixed together, sorted on every update.buttonLegend : MovieClip(timeline symbolButtonLegend_23) — Controller-button hint strip; frames"category"and"activity"show appropriate button hints.__id1_ : WindowHeaderSmall— The window title bar, pre-configured with title key$ActivityTracker(English text "ADVENTURES"), set to disabled (non-interactive).autoUseIcon : ObjectPreview— 30×30 icon injected into theAutoUseTomeProgressBarbarIcon.questsByCategory : Dictionary— Top-level keyed by category string; each value is aDictionary<id, DisplayObject>.categories : Array— Ordered list of category ID strings (insertion order = tab order).currentCategory : String— Currently visible category.trackedCategory / trackedActivity : String— Track the single activity that hasisTracked = true.validateSort : Boolean— Dirty flag; triggerssortContent()on the nextdraw()pass when a new item is added.
Frame scripts / timeline
- Frame 0 →
stop() - Frame 10 →
stop() - Frame 20 →
stop()
These three stop-frames are the platform-skin frame labels "PC" (0), "Console" (10) and "ConsoleLoc" (20).
Runtime dependencies & integration
Iggy / ExternalInterface calls (outbound — Flash → C++):
OnTrackActivity(activityId)— fired when the user clicks the Track button on aPersonalObjectiveEntry.OnRemoveActivity(activityId)— fired when the user clicks the Remove button.OnHideCategory(activityId, alwaysShow)— fired fromActivityHeader.onShowClicked()when the Always Show checkbox is clicked (only for headers with anactivityId). Despite the name, the engine reads the second argument as the new Always Show state, not a hide flag:truekeeps the section shown,falsehides it. The game stores this setting; vanilla sends!showBtn.checked.OnBadgeRollOver(badgeId, badgeRank, x, y)— fired on badge image mouseover (tooltip trigger).x, yis the window's top-right corner (root.x + root.width,root.y), not the pointer; the engine grows the tooltip right and down from that point, so it opens beside the window.OnBadgeRollOut()— fired on badge image mouseout.OnBadgeRewardRollOver(rewardId, x, y)— bubbled fromBadgeEntry; fired on reward icon rollover.x, yis the stage position of the reward slot's right edge and top.OnBadgeRewardRollOut()— bubbled fromBadgeEntry.POST_SOUND_EVENT("Play_ui_starbar_reward")— called byProgressBar.newProgressPercentsetter when a bar reaches 100 %.UIComponent.OnShowTooltip(x, y, name, desc)/UIComponent.OnHideTooltip()— called byProgressBaron hover/rollout, anchored at the pointer's stage position and passing the raw$…Tooltip_Title/$…Tooltip_Descriptionkeys.
translate() keys observed:
$ActivityTracker, $ActivityEventsTitle, $ActivityEventsDesc, $ActivityExpertiseTitle, $ActivityExpertiseDesc, $ActivityClubAdventuresTitle, $ActivityClubAdventuresDesc, $ActivityStarBarTitle, $ActivityStarBarDesc, $ActivityTomeTitle, $ActivityTomeDesc, $ActivityChallengeTitle, $ActivityChallengeDesc, $ActivityQuestTitle, $ActivityQuestDesc, $ActivityTrackerAlwaysShow, $ActivityTrackerTrackButton, $ActivityTrackerTrackedButton, $StarBar_Tooltip_Title, $StarBar_Tooltip_Description, $TomeBar_Tooltip_Title, $TomeBar_Tooltip_Description, $AutoUseBar_Tooltip_Title, $AutoUseBar_Tooltip_Description, $Challenges_TimeUp
Content sort: sortContent() sorts all items in contentView by sortOrder (primary), then secondarySortOrder (secondary), with ActivityHeader items winning ties at equal primary sort order. Each header's sortOrder comes from addHeader (the non-Iggy preview uses 0, 10, 20, 30), and entries are interleaved between them.
Other game-specific classes
Entry types
-
ActivityHeader— Section divider row within a category [Embed symbol190]. ExtendsUIComponent. Has aCheckbox(showBtn) to toggle sub-section visibility; clicking it callsOnHideCategoryvia ExternalInterface. Displays a title (txt_name) and a description that switches between_description(when items are present) and_descriptionEmpty(when the section is empty, controlled byshowEmpty). UsesIsConsole()to choosehtmlTextvstextrendering. The background auto-sizes to the text height infitBackgroundToText().currentFocussetter drives a"on"/"off"background frame. -
PersonalObjectiveEntry— General personal objective / Golden Thread row [Embed symbol100]. ExtendsUIComponent. Holds threeObjectPreviewslots (reward, topIcon, bottomIcon), aCountdownTimer, a track button (trackBtn : LabelButton) that dispatchesTRACK_ACTIVITY, and an optional remove button (removeBtn) that dispatchesREMOVE_ACTIVITY. The track button reads$ActivityTrackerTrackButton("Show"), and$ActivityTrackerTrackedButton("Shown") disabled onceisTracked. Progress is shown asn/goalwhen goal > 1. TheobjectiveCompletedMovieClip replaces the description when_progress == _goal(so a 0/0 objective with no counter also reads as complete) or when the description is empty. ThebottomIconImageandbonusQuantitysetters exist butActivityTrackerUInever sets them. Supports a countdown timer (setTimer/setTimerVisibility). DispatchesDataEvent(TRACK_ACTIVITY)andDataEvent(REMOVE_ACTIVITY)on button clicks, bubbling toActivityTrackerUI. -
ChallengeEntry— Daily/weekly challenge row [Embed symbol132]. ExtendsUIComponent. Shows challenge name, level (drivesbadgeMovieClip frame 1–5), progress text, reward info, bonus reward text, daily bonus with a completion checkmark MovieClip, and aCountdownTimer. The clock animation (clockAnim) starts playing when the timer drops below 60 seconds; it stops on timer expiry. CallssetupTranslation(). -
QuestEntry— Quest row for the REPEATABLE category [Embed symbol53]. ExtendsUIComponent. Displays quest name and a difficulty icon (questDifficultyIcon) with frames"1star","2star","3star","5star","complete","failed"; the engine's difficulty index 0–3 maps to the four star frames, so index 3 is five stars. Background auto-sizes to the text height. No Iggy calls. -
BadgeEntry— Badge entry with a 5-slot reward carrousel [Embed symbol170]. ExtendsUIComponent. Contains a 64×64 badge icon (badgeImageContainer), aBadgeProgressBar(shown whenmaxValue > 0) or plaintaskText, and arewardsCarrouselMovieClip with up to 5reward0Nslots and left/right arrow buttons. Rewards are stored in_rewards : Arrayof Dictionaries with keysID,texture,quantity. Navigation wraps circularly via_leftmostShownReward/_rightmostShownReward. DispatchesDataEvent(REWARD_ROLLOVER)andDataEvent(REWARD_ROLLOUT)on reward icon hover, whichActivityTrackerUIforwards toOnBadgeRewardRollOver/Out. Font auto-shrinks viaKiwiTextUtil.resizeFont.
Progress bars
ProgressBar— Base class (not embedded directly). MasksfillingMaskMCandnewProgMaskMCto represent filled vs. current-total fill. Plays arewardAnimation(with sound event) whennewProgressPercentreaches 1.0. Hover/rollout callsUIComponent.OnShowTooltip/OnHideTooltip.StarProgressBar—ProgressBarsubclass [Embed symbol39]; used for the star bar (sortOrder index 0).TomeProgressBar—ProgressBarsubclass [Embed symbol20]; used for the tome XP bar (sortOrder index 1).AutoUseTomeProgressBar—ProgressBarsubclass [Embed symbol175]; same as TomeProgressBar but hosts anObjectPreviewautoUseIconinsidebarIcon.autoUseDisplay.SimpleProgressBar— Simpler base (no animation, no sound); extendsUIComponent. MasksfillingMaskMCascurrentValue/maxValue * maskMaxWidth.BadgeProgressBar— ExtendsSimpleProgressBar[Embed symbol151]. AddsprogressText(currentValue/maxValue) andtaskText(description label); overridesmaxValueandcurrentValuesetters to update the progress text.
Tab / scroll views
CategoryEntry— Extends_kiwi.Controls.LabelButton[Embed symbol145]. Used as a toggle-button tab for each category incategoryView. Has four frame-script stops (frames 0, 9, 19, 29 — up/over/down/disabled states).ContentView— ExtendsScrollableTileView[Embed symbol244]. No added logic; just a named embedded symbol for the content area.CategoryView— ExtendsScrollableTileView[Embed symbol243]. Adds three platform stop-frames (0, 10, 20).
Button symbol wrappers (top-level, extend kiwi buttons)
arrowBtnLeft— ExtendsBaseButton[Embed symbol166]; left-arrow for badge reward carrousel.arrowBtnRight— ExtendsBaseButton[Embed symbol161]; right-arrow for badge reward carrousel.btnGreenIcon_small— ExtendsLabelButton[Embed symbol83]; used as the Track button.btnKick— ExtendsBaseButton[Embed symbol92]; purpose is to kick/remove entries (used as remove button).
Timeline symbol classes (ActivityTrackerUI_fla package)
ButtonLegend_23[symbol261] — Controller button-hint strip MovieClip; containsbuttonLegendRemove,buttonLegendSelect,buttonLegendToggle,buttonLegendClosesub-clips. Frame labels"category"(frame 0) and"activity"(frame 10).AdventureFrameBackground_44[symbol56] — Background graphic for adventure/club frames; two-state stop-frame.badgeRewardImage_47[symbol156] — Single badge reward slot; holdsrewardPreview : MovieClipandquantityText : TextField.badge_58[symbol117] — 5-frame badge-level icon (frames 1–5 = rank 1–5 visuals).clock_animation_57[symbol109] — Clock spinning animation; frame 2 is the start of the "loop" label, frame 31 loops back viagotoAndPlay("loop").entryBackground_66[symbol22] — Reusable entry background shape; two platform stop-frames.header_background_30[symbol3] — Section header background shape; two platform stop-frames.quest_difficulty_icon_67[symbol52] — 6-state difficulty icon (frames 0, 10, 20, 30, 40, 50 = 1star, 2star, 3star, complete, failed, 5star).reward_animation_69[symbol35] — 47-frame reward pop animation; frame 47 callshalt()to stop.
Scroll-bar skin asset wrappers (trivial — 9 classes)
ScrollArrowDown_disabledSkin, ScrollArrowDown_downSkin, ScrollArrowDown_overSkin, ScrollArrowDown_upSkin, ScrollArrowUp_disabledSkin, ScrollArrowUp_downSkin, ScrollArrowUp_overSkin, ScrollArrowUp_upSkin, ScrollThumb_upSkin, ScrollThumb_downSkin, ScrollThumb_overSkin, ScrollTrack_skin, ScrollBar_thumbIcon, focusRectSkin — pure MovieClip embeds; no logic.
Notable logic
-
Category data isolation: Each category is a separate
DictionaryinsidequestsByCategory. Switching categories fully clears and re-populatescontentView, so the scroll position resets. Headers, progress bars, and entries all share the same flat Dictionary per category, distinguished at runtime byinstanceofchecks. -
Sort order scheme:
ActivityHeadernodes act as section anchors at the sortOrder the engine passes toaddHeader. Entry types sit at values in between:updateQuestandupdateChallengecarry no sort order, soQuestEntryalways sorts at its default 51 andChallengeEntryat 11;PersonalObjectiveEntry(default 1) takessortOrder/secondarySortOrderfromupdateActivity, and the Golden Thread wrappers pass 0/0; progress bars take theirs fromsetProgressBar. The sort function places headers before any peer entry with the same sortOrder, and usessecondarySortOrderfor stable sub-ordering. -
Console vs. PC rendering path: Several
draw()methods callIsConsole()(fromIggyFunctions) andonTargetFrame()to choose betweenhtmlText(console, with rich text mark-up from the engine) and plaintext(PC). On console they also perform dynamic height adjustment viaadjustForDescriptionHeight/resizeDueToHeaderTextto cope with variable text flow. -
Badge carrousel wrapping: The carrousel uses signed integer offsets (
_leftmostShownReward,_rightmostShownReward) that can go negative, mapping to the tail of_rewardsarray via modulo arithmetic, giving infinite left-scroll wrap-around. -
Progress bar animation gating:
ProgressBar.newProgressPercentsetter only triggers the fill-complete reward animation once per cycle (waitingOnAnimationguard). The animation's last frame resetsfilledPercentto 0 and clears the flag, allowing the next cycle to animate again. -
buttonLegend state:
focusCategory/focusActivitydrivebuttonLegend.gotoAndStop("category" | "activity")so the controller hint strip shows the correct bindings for whichever panel has focus.