subclassselect.swf
Panel for selecting a subclass (secondary class passive) in Trove. Displays a scrollable tiled grid of available subclasses, each shown as a row with class name, level, power rank, ability icon, and a button to activate, switch, or (if locked/already active) view the class.
Document/main class: SubClassSelect (extends _kiwi.Core.UIComponent)
SWF-specific classes: 5 (main + SubClassRow + ButtonLegend_3 + art + button helpers)
Main class: SubClassSelect
Contains a ScrollableTileView (itemView) for the grid of SubClassRow objects, and a WindowHeaderSmall (title $subclass_select). Populated entirely by ExternalInterface callbacks from the game engine; the panel itself fires ExternalInterface.call("OnSelect", index) when the player activates a slot.
Public methods
clear() : void— clears all items fromitemView.addSubClass(index, name, active, unlocked, isCurrentClass, level, powerRank) : void— creates aSubClassRow, callsrow.init(...), wires itsactionButtonclick, and appends toitemView.setAbility(iconImage, displayName, description) : void— updates the most recently added row'sicon.art(ArtClip) andabilityDescriptionText.setStat(statText) : void— setsnextTierTexton the most recently added row.sortSubClasses() : void— sortsitemViewby: active first, then level descending, then powerRank descending, then index descending.highlightSlot(index, direction) : void— setsrowHighlight.alpha = 1and auto-scrolls into view if the row is near the edge of the viewport.index(here and inunhighlightSlot/activateSlot) is the row's position in the list as currently ordered, i.e. aftersortSubClasses, read throughitemView.getItem(index); it is not the subclass index.OnSelectsends the subclass index thataddSubClasswas given.unhighlightSlot(index) : void— setsrowHighlight.alpha = 0.
Key fields
itemView : ScrollableTileView— hostsSubClassRowitems; vertical scrollbar always visible; spacing(0,2,0,0); horizontal centering disabled.__id0_ : WindowHeaderSmall— header bar, non-interactive, title$subclass_select.
Frame scripts / timeline
- frame 1 / 11 / 21 —
stop()for PC, Console, and ConsoleLoc layouts. Stage 680×712 at 24 fps, 30 frames.
Runtime dependencies & integration
ExternalInterfacecallbacks:clear,addSubClass,setAbility,setStat,sortSubClasses,highlightSlot,unhighlightSlot,activateSlot, plusobjectPreviewReadyregistered by theObjectPreviewinside each row's abilityArtClip.ExternalInterface.call("OnSelect", index)— fired when action button clicked oractivateSlotis invoked.setupTranslation()called inconfigUI.IsConsole()— skipsverticalStep = 10on console (native scroll).
Other game-specific classes
SubClassRow (extends _kiwi.Core.UIComponent) — Embed symbol42
Single row in the grid representing one subclass option.
init(index, name, active, unlocked, isCurrentClass, level, powerRank) : void — initialises all display fields, sets actionButton label and enabled state:
- Active → label
$ClassChanger_Active, disabled, frame"selected". - Locked (not unlocked) → label
$ClassChanger_Locked, disabled, frame"locked". - Is current PC class but not the active subclass → label
$ClassChanger_MyClass("INELIGIBLE"), disabled, frame"locked". The class being played arrives unlocked with this flag set, and with the character's own power rank rather than a subclass reading, so its power rank is far above every other row's. - Otherwise → label
$ClassChanger_Switch, enabled.
Fields: classNameText, levelText, powerRankText, abilityDescriptionText, nextTierText (TextFields); actionButton:LabelButton; icon:MovieClip (contains an ArtClip named art); rowHighlight:MovieClip.
Private state: _index:int, _level:int, _powerRank:int, _active:Boolean — used by the sort comparator in SubClassSelect.
Translate keys used in init: $Level_X (replace {0}), $NoRarityPowerRank (replace {0}), $ClassChanger_Active, $ClassChanger_Locked, $ClassChanger_MyClass, $ClassChanger_Switch.
On console, defers via ENTER_FRAME until onTargetFrame().
SubClassSelect_fla.ButtonLegend_3 (extends MovieClip) — Embed symbol110
Console button legend clip with a single child buttonLegendSelect:MovieClip; stops on frame 1.
art (extends _kiwi.Controls.ArtClip) — Embed symbol25
Thin symbol wrapper for the subclass ability icon. Used inside SubClassRow.icon.
Button helpers (no additional logic)
btnGreen_wide(extendsLabelButton) — Embed symbol48; wide green button variant; four-state frame stops.btnGreenIcon_small(extendsLabelButton) — Embed symbol37; small icon+label green button; four-state frame stops.
Asset wrappers (no logic, trivial embeds)
rarity_frame_*(×8 PNG wrappers +rarity_frame_stellarMovieClip) — rarity tier border graphics used in slot decorators.- Scroll skin wrappers (×10):
ScrollArrow*_*Skin,ScrollThumb_*Skin,ScrollTrack_skin,ScrollBar_thumbIcon,focusRectSkin— standard kiwi scroll bar skins.
Notable logic
addSubClassandsetAbility/setStatfollow a push-then-configure pattern: the game engine callsaddSubClassfirst, then immediately callssetAbilityandsetStatto finish populating the last-added row (itemView.getItem(numItems - 1)).- The sort comparator uses
active > level > powerRank > indexpriority order, placing the currently active subclass at the top of the list. highlightSlotperforms auto-scroll: scrolls down if the row bottom is within 1.5× row height of the viewport bottom, scrolls up if the row top is within 0.5× row height of the viewport top.activateSlotis the console equivalent of clickingactionButton; it checksactionButton.enabledbefore firing.