I've been recently looking through decompiled AS3 code from Ubisoft's "The Settlers Online" and found an easter egg along with something that looked like trigger, but - as I have never read AS3 before, and even if - decompiled code is often too obscure to understand, even for experienced coders , not to say for me. so, here I came up with question: anyone has a clue how to trigger that easter contained in this tiny AS3 snippet:
package Utils
{
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import mx.core.UIComponent;
public class RabbidCode
{
private var sequence:Array;
public function RabbidCode()
{
while(true)
{
while(true)
{
switch(0)
{
case 0:
super();
this.reset();
(global.getApplication() as UIComponent).stage.addEventListener(KeyboardEvent.KEY_UP,this.handleKeyUp);
return;
case 1:
continue;
}
}
}
}
private function handleKeyUp(param1:KeyboardEvent) : void
{
while(false)
{
}
var _loc2_:int = this.sequence.shift();
if(param1.keyCode == _loc2_)
{
if(this.sequence.length == 0)
{
this.action();
}
else
{
return;
}
}
this.reset();
}
private function action() : void
{
while(true)
{
while(true)
{
switch(0)
{
case 0:
var _loc1_:* = ["Graubart","Pandur","Amaris","Helene","Ravel","EnglishFellow","Shark","AJ","David","Ferhat","Kalle","Buan","Franck","Alexandra","Bine","Nils","ZockenMitKatze","Aenlin","Miriam","Crystaliq","Buddy","Céline","Ally","Jason","Omris","Orowa","Lyedra","Anna","Talamira","Taku","Throril","Naknaknak","Infran","Linki","Henning","Dzan","Sandra","Pherlin","Andreas","Alexander","Angel","Bogdan","Carlos","Chris","Claudiu","Denis","Ignacio","Linda","Marcel","Matthias","Michael","Mirco","Oliver","Paul","Catalin","Bob","Rudi","Ruslan","Simon","Sonja","Stefan","Tobias","Jakub","Violeta","Maggie","Clara","Erkan","Sabrina","Sebastian","Patrick","Aeyline","Penelopa","Ondgrund","Belegha","Acadma","Omris","Amta","Maxhylere","Kumakun","Orowa","Saqui","Nanuq","Taku","Aylea","Anash","Zoltan","Grubur","Veythyru"];
global.ui.mCurrentPlayerZone.mSettlerKIManager.setNameList(_loc1_);
return;
case 1:
continue;
}
}
}
}
private function reset() : void
{
while(false)
{
}
this.sequence = [Keyboard.UP,Keyboard.UP,Keyboard.DOWN,Keyboard.DOWN,Keyboard.LEFT,Keyboard.RIGHT,Keyboard.LEFT,Keyboard.RIGHT,"B".charCodeAt(0),"A".charCodeAt(0)];
}
}
}