welcomescreen.swf
The Welcome Screen is the first major UI shown to the player on login, combining a rotating featured-content panel (store deals, events, new features), a daily bonus strip, a Message of the Day (MotD) band, and an event highlight panel. Clicking the daily bonus panel opens a full weekly-bonus detail popup.
Document/main class: WelcomeScreen (extends _kiwi.Core.UIComponent)
SWF-specific classes: 5 (WelcomeScreen, WelcomeFeaturedPanel, WelcomeDailyBonusPanel, WelcomeDailyBonusWindow, WelcomeMotD) + 14 WelcomeScreen_fla timeline classes + ~8 asset wrappers
Main class: WelcomeScreen
WelcomeScreen is the root component. On construction it registers frame scripts (frames 1 and 11, both stop()), hides dailyBonusWindow and lightbox, enables font-resize on the header, wires click listeners for the daily-bonus toggle (panel + close button + lightbox), adds a MOUSE_LEAVE listener to hide popups, registers nine ExternalInterface callbacks (in Iggy), and configures the header title $Welcome_WindowName (English "WELCOME").
Public methods
addFeaturedItem(type, imagePath, title, subtitle, description, btnLabel, currencyCode, normalPrice, discountPrice) : void— delegates tofeaturedPanel.addFeaturedItem(…). The first argument is the offer type (seeWelcomeFeaturedPanel), not an index.addEventItem(…) : void— takes the same nine arguments asaddFeaturedItem; here the fourth is the event's date text. OnlyimagePath,name,dateStranddescriptionare read: the first argument and the last four (button label, currency, prices) are ignored, so the event panel has no button. Populates theeventPanelMovieClip'snameText,descriptionText,dateTextfields with layout adjustments; setseventPanel.artObjectPreview texture.populateDailyBonus(todayIdx : int) : void— storestoday, callsdailyBonusPanel.populateDailyBonus(today)anddailyBonusWindow.populateDailyBonus(today).setMOTD(text : String) : void— setsMotD.text; expandslightbox.heightbyMotD.height(645 console / 592 PC base + height).highlightPanel(panelIdx : int) : void— shows/hidesfeaturedPanel.selectedanddailyBonusPanel.selected; dispatches synthetic ROLL_OVER/ROLL_OUT events to drive popup visibility on each panel.onDailyBonusClicked(e : MouseEvent = null) : void— togglesdailyBonusWindow.visibleandlightbox.visible; when opening, repopulates the window and pausesfeaturedPanel.autoScroll; when closing, resumes auto-scroll.hidePopups(e : Event) : void— delegatesonShowHidePopupto bothfeaturedPanelanddailyBonusPanel.
Key fields
featuredPanel : WelcomeFeaturedPanel— rotating featured-content area.dailyBonusPanel : WelcomeDailyBonusPanel— compact 7-day bonus strip with hover popup.dailyBonusWindow : WelcomeDailyBonusWindow— full weekly-bonus detail window (initially hidden).lightbox : MovieClip— semi-transparent overlay shown whendailyBonusWindowis open.eventPanel : MovieClip(instance ofEventPanel_2) — single-event highlight area with name, date, description text fields and anObjectPreviewart slot.header : WindowHeaderSmall— window header; title$Welcome_WindowName;allowFontResize = true.- An unnamed
WindowCloseButton(symbol111) at (888, 6) closes the screen through its ownOnRequestClosecall; the Console frame removes it. MotD : WelcomeMotD— message-of-the-day band at the bottom.today : int— index of today's day (0 = Monday … 6 = Sunday).static DAYS_S : Array—["MON","TUE","WED","THU","FRI","SAT","SUN"]— shared withWelcomeDailyBonusPanel.
Frame scripts / timeline
- Frame 1 (
frame1, label"PC"):stop(). - Frame 11 (
frame11, label"Console"):stop().
Runtime dependencies & integration
ExternalInterface.addCallback("addFeaturedItem", featuredPanel.addFeaturedItem).ExternalInterface.addCallback("addEventItem", addEventItem).ExternalInterface.addCallback("populateDailyBonus", populateDailyBonus).ExternalInterface.addCallback("setMOTD", setMOTD).ExternalInterface.addCallback("changeFeatureShown", featuredPanel.changeFeatureShown).ExternalInterface.addCallback("highlightPanel", highlightPanel).ExternalInterface.addCallback("highlightDay", dailyBonusWindow.highlightDay).ExternalInterface.addCallback("onActionClicked", featuredPanel.onActionClicked).ExternalInterface.addCallback("onDailyBonusClicked", onDailyBonusClicked).- Translate key:
$Welcome_WindowName(header). - Offer and event text arrives as translation keys rather than words:
addFeaturedItemandaddEventItempass$…keys in their title, subtitle/date and description (Luxion's offer title is$Welcome_luxion_lands_name, "Trials of Luxion!"). The screen assigns them to TextFields untranslated and the game resolves$-prefixed text; the daily-bonus window's$Monday…$Sundayday labels rely on the same thing. - The engine sends the whole offer list again each time the screen is opened.
Other game-specific classes
WelcomeFeaturedPanel (extends UIComponent, embeds assets.swf#symbol182)
Rotating featured-content panel displaying one item at a time from featuredItems : Vector.<Object>. Supports 7 panel types: panelNewPlayer, panelPack, panelRadiant, panelChaos, panelDragon, panelGenericA, panelGenericB (constants FEATURE_NORMAL…FEATURE_BOMBER). The offer type indexes PANEL_TYPES directly: 0 NORMAL → panelNewPlayer, 1 PACK → panelPack, 2 EVENT → panelRadiant, 3 CHAOS → panelChaos, 4 DRAGON → panelDragon, 5 BOMBER → panelGenericA; panelGenericB has no constant.
addFeaturedItem(…)— pushes an object tofeaturedItems; if it's the first item, callsshowFeaturedItem()immediately.showFeaturedItem()— fades in the correct panel type, setsnameText,descriptionText,ObjectPreview art.textureName; populatesfeaturePopupwith the action button label, description CTA text, and background/price display; callsExternalInterface.call("OnResetYaw", isDragon).changeFeatureShown(delta)— fades out current panel viaIggyTween, then callsshowFeaturedItemon finish; wrapsfeatureShownindex with modulo.onActionClicked(e)— when popup is visible, callsExternalInterface.call("OnShowDeals"),"OnShowChaosChests", or"RequestBomberRoyale"depending on feature type.onShowHidePopup(e)—IggyTweenfadesfeaturePopup.alphaon ROLL_OVER/ROLL_OUT; pauses/resumesautoScrollTimer.autoScroll : Timer— fires every 1 second; advances to next feature afterAUTO_SCROLL_SECONDS (6)ticks.- Price display: uses
KiwiTextUtil.getCurrencySymbolandKiwiTextUtil.formatPricefor discount/normal price sticker. arrowLeft / arrowRight : BaseButton— left/right nav arrows.featurePopup : MovieClip— hover popup withfeatureBtn (LabelButton),featuredText,featuredTextCTA,background.valueSticker : MovieClip— shows discount vs normal price.
WelcomeDailyBonusPanel (extends UIComponent, embeds assets.swf#symbol185)
Compact strip showing today's bonus icon with a hover "learn more" popup.
- Seven
bonus_MON … bonus_SUNMovieClip children; only today's is visible. tomorrowBonuschild contains matchingbonus_*children for tomorrow's preview;dayLabelset to$Welcome_DailyBonus_Tomorrow("Tomorrow:").populateDailyBonus(todayIdx)— shows correct day icon, hides others, also shows tomorrow's intomorrowBonus; callsKiwiTextUtil.resizeFont(dailyName, 20)on each.onShowHidePopup(e)—IggyTweenfadeslearnMorePopup.alphaon ROLL_OVER/ROLL_OUT.selected : MovieClip— selection highlight; driven fromWelcomeScreen.highlightPanel.
WelcomeDailyBonusWindow (extends UIComponent, embeds assets.swf#symbol112)
Full weekly-bonus detail popup (toggled by clicking the daily bonus panel).
static DAYS_L : Array—["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"].static BONUSES : Array—["shadow","gathering","gem","adventure","dragon","xp","loot"], indexed by day (0 = Monday). The keys are not the display names: Monday'sshadowbonus is "Delve Day" in English ($Welcome_DailyBonus_ShadowDay).- Day-label TextFields on each day MovieClip are set to
$Monday…$Sundayin constructor (keys intime.binfab). populateDailyBonus(dayIdx)— fills fourdailyBonusDetails*anddailyBonusDetailsPatron*TextFields using translate keys of the form$Welcome_daily_bonus_details_<bonus>_1..4and…_patron; repositions bullet points dynamically based ontextHeight; hides bullet 4 if text is empty (in English onlygathering, Tuesday, has a fourth line); shows the matchingbonus_*icon.highlightDay(dayIdx)— marks the clicked day tab "over" / "up" then repopulates.closeButton : WindowCloseButton— wired by parent toonDailyBonusClicked.dailyheader : WindowHeaderSmall— title$Welcome_daily_bonus_header(English "DAILY BONUS").
WelcomeMotD (extends UIComponent, embeds assets.swf#symbol206)
Message of the Day band positioned below the main panels.
set text(str)— if empty, hidesmessageIcon/backgroundand resetsy = 412; otherwise setstextfield.text, sizesbackground, and repositions icon/text based ontextfield.textHeightvsMIN_HEIGHT (54).get height()— returnsthis.y - 412(distance the MotD has pushed down from baseline).
WelcomeScreen_fla timeline symbols (14 classes)
EventPanel_2(embedsassets.swf#symbol216) — event panel MovieClip withnameText,dateText,descriptionTextTextFields andart : PreviewContainer.DailyBonus_Loot_22,DailyBonus_XP_23,DailyBonus_Dragon_24,DailyBonus_Adventure_25,DailyBonus_Gem_26,DailyBonus_Gathering_27,DailyBonus_Shadow_28— per-bonus-type icon/label clips for the compact panel; each has adailyNameTextField.DailyBonusPopup_29— the "learn more" hover popup.SelectedStroke_15— selection highlight graphic.FeaturedPanelNewFeatureA_34,FeaturedPanelNewFeatureB_33— generic featured panel layouts A and B.FeaturedPanelChaos_36— Chaos Chest panel layout.FeaturedPanelDragonCoin_35— Dragon Coin panel layout.FeaturedPanelPackRegular_38,FeaturedPanelPackStarter_39— store pack panel layouts.FeaturedPanelRadiantDayspring_37— Radiant Dayspring panel.FeaturedPopup_45— the hovering popup that appears over the featured panel.
Asset wrappers (no logic)
~8 classes: PreviewContainer, btnGreen, ButtonArrowLeft, ButtonArrowRight, DailyBonus_Tomorrow_Loot/XP/Dragon/Adventure/Gem/Gathering/Shadow (tomorrow-bonus icon clips) — all trivial MovieClip/UIComponent subclasses with no game-logic code.
Notable logic
- Auto-scroll timer:
WelcomeFeaturedPanel.autoScrollis aTimer(1000)that counts toAUTO_SCROLL_SECONDS (6)before callingchangeFeatureShown(1); it pauses on ROLL_OVER and when the daily-bonus window is open. - IggyTween panel cross-fades: Feature panel transitions use
IggyTweenon the panel'salpha(0.2 s ease), chained: fade-out →showFeaturedItemcallback → fade-in new panel. - Dynamic MotD layout:
setMOTDadjustslightbox.heightby the MotD component'sheightproperty, which is computed from the component'syoffset rather than its clip height. - Patron vs non-patron bonus details:
populateDailyBonusinWelcomeDailyBonusWindowfills both a standard and a patron variant of each detail text field (e.g.dailyBonusDetails1anddailyBonusDetailsPatron1) from separate translate keys, allowing the window to simultaneously show both versions side-by-side. - Dynamic bullet positioning: Detail text fields and bullet points are repositioned vertically based on the measured
textHeightof the preceding text field, allowing variable-length localized strings without clipping.