STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228074
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/34455378?noj=FRM34455378-30DC" width="1" height="1"></div>

Character database by Doom-the-wolf.swf

This is the info page for
Flash #163205

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS3]
Section 1
//MainTimeline (characterBios_fla.MainTimeline) package characterBios_fla { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.media.*; import flash.net.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public const WORLD_MENU:int = 1; public const MAIN_MENU:int = 0; public const MENU_OTHER_HEIGHT:int = 100; public const BUTTON_RADIUS:int = 8; public const SLIDER_HEIGHT:int = 20; public const BUTTON_WIDTH:int = 120; public const COMPARE_MENU:int = 5; public const MENU_SIDE_MARGIN:int = 100; public const SLIDER_WIDTH:int = 20; public const BUTTON_HEIGHT:int = 30; public const CHARACTER_MENU:int = 2; public const AMBER_WORLD_COLORS:Array; public const AMBER_WORLD:String = "Amber's World"; public const STAGE_WIDTH:int = 800; public const BUTTON_COLORS:Array; public const ALL_WORLD:String = "All Characters"; public const LEAVE_PROPORTION:Number = 0.1; public const OTHER_COLOR:int = 0xCCCCCC; public const DOOM_WORLD:String = "Doom's World"; public const COMPARE_LIST_MENU:int = 4; public const OTHER_WORLD:String = "Others"; public const HEIGHT_MENU:int = 3; public const DEFAULT_PROPORTION:Number = 0.35; public const MIN_V:Number = 32; public const BOX_ROTATION:Number = 1.25663706143592; public const BOX_RADIUS:int = 16; public const STAGE_HEIGHT:int = 600; public const SLIDER_RADIUS:int = 4; public const DOOM_WORLD_COLORS:Array; public const MARGIN:int = 20; public const OTHER_WORLD_COLORS:Array; public const BUTTON_ROTATION:Number = 1.5707963267949; public const MENU_TITLE_HEIGHT:int = 50; public var viewAllBtn:MovieClip; public var BG_HLINE_BITMAPDATA:BitmapData; public var BG_ALPHAS:Array; public var BG_LINE_THICKNESS:uint; public var secondaryCharacter:Object; public var bgTimer:int; public var bgColors:Array; public var doomWorldBtn:MovieClip; public var BG_ROTATION:Number; public var BG_HLINE_FLOOR_THICKNESS:Number; public var menuTitle:MovieClip; public var selectedItem:int; public var BG_HLINE_MID_THICKNESS:Number; public var copyClip:MovieClip; public var i:int; public var characters:Array; public var worldMode:String; public var titleFormat:TextFormat; public var amberBtn:MovieClip; public var BG_LINE_SEPARATION:uint; public var BG_COLOR_CHANGE_SPEED:int; public var otherWorldBtn:MovieClip; public var BG_HLINE_COLOR:uint; public var bgHeightLines:Array; public var BG_HLINE_TIMER:int; public var PARENT:MovieClip; public var BG_NUM_COLORS:int; public var viewAll:Boolean; public var selectedCharacter:Object; public var BG_HLINES_PER_HEIGHT:int; public var BG_LINE_ANGLE:Number; public var BG_RATIOS:Array; public var BG_COLORS:Array; public var allBtn:MovieClip; public var BG_HLINE_THICKNESS:Number; public var bgLineColor:uint; public var BG_LINE_CURVE:int; public var clips:Array; public var BACKGROUND:MovieClip; public var tempText:TextField; public var otherBtn:MovieClip; public var BG_LINE_COLORS:Array; public var compareBtn:MovieClip; public var names:Array; public var tempClip:MovieClip; public var amberWorldBtn:MovieClip; public var textFormat:TextFormat; public var BG_LINE_ALPHA:Number; public var menuMode:int; public var BG_HLINE_CLIP:MovieClip; public var items:Array; public var heightChartBtn:MovieClip; public var comments:Array; public var doomBtn:MovieClip; public var backBtn:MovieClip; public function MainTimeline(){ BUTTON_COLORS = [39423, 10079487, 0xFF]; DOOM_WORLD_COLORS = [8899583, 0x444444, 14586111]; AMBER_WORLD_COLORS = [15649928, 16751052, 2900387]; OTHER_WORLD_COLORS = [0xCC00]; super(); addFrameScript(0, frame1); } public function setViewAll(_arg1:Event=null){ var _local2:TextField; viewAll = !(viewAll); _local2 = (viewAllBtn.getChildAt(0) as TextField); _local2.text = (viewAll) ? "Zoom in" : "View All"; updateSize(); setHeightChartPos(); updateSize(); } public function itemFrame(_arg1:Event):void{ var _local2:MovieClip; var _local3:Boolean; var _local4:Boolean; var _local5:int; _local5 = 0; while (_local5 < items.length) { _local2 = items[_local5]; if (!_local2.visible){ } else { if (_local2.leave){ _local4 = false; _local3 = _local4; if (Math.abs((_local2.destX - _local2.x)) <= 1){ _local3 = true; }; if (Math.abs((_local2.destY - _local2.y)) <= 1){ _local4 = true; }; if (((((_local3) && (_local4))) && (_local2.parent))){ _local2.visible = false; return; }; }; if (Math.abs((_local2.destX - _local2.x)) <= Math.abs(_local2.vX)){ _local2.x = _local2.destX; _local2.vX = 0; }; if (Math.abs((_local2.destY - _local2.y)) <= Math.abs(_local2.vY)){ _local2.y = _local2.destY; _local2.vY = 0; }; _local2.x = (_local2.x + _local2.vX); _local2.y = (_local2.y + _local2.vY); _local2.scaleX = (_local2.scaleX + _local2.sVX); _local2.scaleY = (_local2.scaleY + _local2.sVY); _local2.alpha = (_local2.alpha + _local2.vA); _local2.sVX = ((_local2.destW - _local2.scaleX) * _local2.proportion); _local2.sVY = ((_local2.destH - _local2.scaleY) * _local2.proportion); _local2.vX = ((_local2.destX - _local2.x) * _local2.proportion); _local2.vY = ((_local2.destY - _local2.y) * _local2.proportion); _local2.vA = ((_local2.destA - _local2.alpha) * _local2.proportion); if (_local2.leave){ _local2.proportion = Math.sqrt(_local2.proportion); }; }; _local5++; }; } public function sortByHeight(_arg1:Array, _arg2:Boolean=true):void{ var _local3:int; var _local4:int; var _local5:int; _local3 = (_arg2) ? 1 : -1; _local4 = 0; while (_local4 < (_arg1.length - 1)) { _local5 = (_local4 + 1); while (_local5 < _arg1.length) { if ((_arg1[_local4].height * _local3) >= (_arg1[_local5].height * _local3)){ swap(_arg1, _local4, _local5); }; _local5++; }; _local4++; }; } public function centerItemInBox(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:uint):void{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Rectangle; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local6 = (_arg1.width / Math.abs(_arg1.scaleX)); _local7 = (_arg1.height / _arg1.scaleY); _arg1.destW = (_arg4 / _local6); _arg1.destH = (_arg5 / _local7); if (_arg1.destH < _arg1.destW){ _arg1.destW = _arg1.destH; } else { _arg1.destH = _arg1.destW; }; _local8 = (_arg1.destH * _local7); _local9 = (_arg1.destW * _local6); _local10 = _arg1.getRect(_arg1); _local11 = (-(_local10.left) / (_local10.right - _local10.left)); _local12 = (-(_local10.top) / (_local10.bottom - _local10.top)); if (_local10.right == _local10.left){ _local11 = 0; }; if (_local10.top == _local10.bottom){ _local12 = 0; }; _local13 = (_local11 * _local9); _local14 = (_local12 * _local8); _arg1.destX = ((_arg2 + ((_arg4 - _local9) * 0.5)) + _local13); _arg1.destY = ((_arg3 + ((_arg5 - _local8) * 0.5)) + _local14); } public function sliderRemoved(_arg1:Event){ var _local2:MovieClip; _local2 = (_arg1.currentTarget as MovieClip); _local2.removeEventListener("mouseDown", sliderPicked); } function frame1(){ stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; PARENT = new MovieClip(); BACKGROUND = new MovieClip(); characters = []; clips = []; names = []; items = []; comments = []; selectedItem = 0; menuMode = MAIN_MENU; worldMode = null; selectedCharacter = null; secondaryCharacter = null; viewAll = false; titleFormat = new TextFormat(); textFormat = new TextFormat(); menuTitle = new MovieClip(); doomWorldBtn = new MovieClip(); amberWorldBtn = new MovieClip(); otherWorldBtn = new MovieClip(); copyClip = new MovieClip(); heightChartBtn = new MovieClip(); backBtn = new MovieClip(); compareBtn = new MovieClip(); doomBtn = new MovieClip(); amberBtn = new MovieClip(); otherBtn = new MovieClip(); allBtn = new MovieClip(); viewAllBtn = new MovieClip(); titleFormat.size = 32; titleFormat.bold = true; titleFormat.font = "Arial"; titleFormat.align = "center"; textFormat.size = 18; textFormat.font = "Arial"; characters[characters.length] = makeCharacter("Max", DOOM_WORLD, "Max is a thin guy with black hair. He studies computer engineering at univeristy. He is skilled at logic and programming. He is optimistic and confident. Although is is not a very social person, he tends to be polite when interacting with people.\n\nOn occasions, Max goes out to explore the area around the city for ancient ruins. With Liviana's help, he learns things about the civilization of his ancestors.\n\nOn his 18th birthday, his sword was given to him by his father. The light sword was a weapon used by an ancient hero in the last war, thousands of years ago. The sword is a magical artefact with useful properties. It can be summoned and made to vanish at the will of the owner. It is weightless and very sharp. When used properly, it will guarantee victory in single combat. ", 8899583, 0.97, new max(), characters.length); characters[characters.length] = makeCharacter("Max (Wolf form)", DOOM_WORLD, "On one of his adventures into the forest, Max found an ancient ruin. In there he discovered a dark cape, which he tried on. The cape transformed him into a wolf. He found himself unable to get rid of it and unable to become human again. Returning home, he decided to hide behind the name \"Doom\".\n\nAfter a visit from his best friend, Liviana, he learned that he could summon the cape or cause it to vanish at will, allowing him to choose his form. Additionally, the cape offers immunity to damage from piercing weapons. However, it is ineffective against magic or brute force.\n\nAs a wolf, he becomes bad-tempered, anti-social and insecure. Hiding behind an aggressive attitude, he avoids being around people, but the people who stay around long enough know he is rather docile. Max prefers to remain in this form most of the time.\n\nValentine was initially uncomfortable with Max's wolf form, mistaking his changed personality for depression. She refused to accept his pseudonym, \"Doom\". She eventually learned that his personality was not causing him any emotional harm. She also finds his new form easier to control, and is captivated by his aggressive mask. however, she still insists on calling him \"Max\" at all times.\n\nThe scar on his belly is not a battle scar, but is the much less glamourous result of a life saving surgery he had to go through.", 0x444444, 1, new doom(), characters.length); characters[characters.length] = makeCharacter("Valentine Vixen", DOOM_WORLD, "Valentine is a vixen, as her name suggests. She has a calm and caring personality. She looks innocent and shy, but she is actually intelligent and controlling. Her favorite color is purple, the color of her eyes. Most of her belongings and clothes are purple. She studies magic as a career. She specializes in healing, aesthetic and defensive spells.\n\nValentine is Doom's girlfriend, although she refuses to call him by that name out of respect for his human form. She's obsessively in love with him and doesn't miss a chance to show it. His unenthusiastic response doesn't seem to discourage her. She knows he has more feelings than he shows.\n\nAlthough she originally liked Max for his optimistic, strong-willed personality, his transformation into a wolf revealed one of her previously unknown darker desires. After experiencing the forceful way he handles her on rare occasions, she discovered that being pushed around sends her heart racing. It arouses her. Since then she's been trying to get him to be more aggressive, with poor results.\n\nAlthough she appears to be a normal vixen, she is the descendant of a dragon. Some of the dragon traits she inherited can be noticed. What seem to be ears are actually a variation of a dragon's horns. Her tail is longer than most other foxes. She has a relatively sturdy, strong body for her species. Finally, one of the most noticeable traits is the lack of breasts.", 14586111, 0.99, new valentine(), characters.length); characters[characters.length] = makeCharacter("Liviana Wolf", DOOM_WORLD, "She is an attractive, furry, black wolf, with a strong and cheerful personality. She is rather short in height.\n\nAt night she works as a stage performer in an adult entertainment show. She's takes the \"Look, don't touch\" policy very seriously. At day she gets around normally without too many people staring at her. She is the daughter of a historian, so she knows a lot of history.\n\nLiviana is Doom's best friend. She used to be in his class when they were at school. She helped him with history, which he was terrible at. In the present, she's very supportive towards him whenever he's feeling sad.\n\nShe has a strong interest in his newly obtained artifacts. If her history is correct, he will have to play a big role if the city gets involved in a war.\n", 204, 0.97, new liviana(), characters.length); characters[characters.length] = makeCharacter("Estella", DOOM_WORLD, "A tall, white wolf with large breasts. She's a simple girl. She works as a cashier at the local store. She has a cheery, shy personality. She likes to eat a lot, sometimes to the point where she ends up looking heavily pregnant. However, she doesn't lose her figure for very long. Her body doesn't store fat very easily.\n", 0xFF00FF, 1.1, new estella(), characters.length); characters[characters.length] = makeCharacter("Violet Vixen", DOOM_WORLD, "Valentine's younger sister. She's thinner and darker than Valentine. She is rarely seen without the symbol of Venus somewhere on her clothes. She's one year younger than Valentine. Like her sister, she studies magic in the same place. She specializes in dark and pleasure-inducing magic.\n\nThe similarities just about end there. She's arrogant and seductive. She's been with most of the boys in the academy. She may still be a student, but any random night, she'll work as a prostitute, and she isn't ashamed of it.\n\nShe may seem completely careless, but she does have some emotions. She watches out for her friends and family. She also has a weak spot for Doom - specifically his wolf form - and she makes no secret about it. After finding out he isn't the cool, mysterious, dark wolf she dreamed about, she lost interest in him. She still flirts with him occasionally to make him nervous.", 0x8800BB, 0.99, new violet(), characters.length); characters[characters.length] = makeCharacter("Doom the wolf", DOOM_WORLD, "A supernatural being with no real name or visible form. She decided to steal the shape and name of Max's wolf form - but in a female version. She has officially claimed the name \"Doom\" as her own, although she is commonly known to everyone as \"She-Doom\". She-Doom played a role in creating Max's sword and cape.\n\nShe appeared some time after Max discovered his grey cape in an ancient ruin. With her supernatural powers, she was able to trick everyone into thinking she is a normal person. Only Max knows about her true nature. Her mission is to make sure Max is available and ready to fight in the unlikely event of a war starting.\n\nDespite her mission to support Max, she takes any chance she can to make fun of him, appearing out of nowhere to make critical remarks about him. As a person, she is a strong character, who demands respect. She is also a strong feminist and does not approve of people who like to stare at girls a lot. She also looks down upon girls who give into the desires of those people.", 0x444444, 1, new shedoom(), characters.length); characters[characters.length] = makeCharacter("Cristina", DOOM_WORLD, "Cristina is a very thin, yellow dog. She goes to the same magic academy as Valentine and Violet. She has changed very little since her rebellious teenage years. She's a big fan of the pop star celebrities and hangs around in bad girl gangs, sometimes causing trouble to other students.\n\nBehind her mean mask is a sad girl, rejected by the boys she had a crush on. Boys who, back in the day, had more interest in the size of her breasts than in her cute, pop-star-fangirl personality. Having kept her emotions a secret, nobody is aware of her problems.", 16777062, 1, new cristina(), characters.length); characters[characters.length] = makeCharacter("Amber", AMBER_WORLD, "A cheerful, energetic kangaroo. She is friendly and isn't afraid to talk to strangers.\n\nHer belly is stretchy and easily expandable. She loves being inflated. During her journeys she learned many magic spells to inflate in all sorts of ways.\n\nShe has the unusual bad luck of getting lost frequently. Not for lack of a sense of direction, but rather because something or another ends up sending her to a far away place.", 15649928, 0.85, new amber(), characters.length); characters[characters.length] = makeCharacter("Dragon Amber", AMBER_WORLD, "Amber's mysterious dragon form. When Amber is charged with enough magic, she can transform into a pink dragon. It appears to be a dragon-shaped suit of armor surrounding her, but some of her body is also altered during the process.\n\nLike a suit of armor, Amber's dragon skin does not have nerves, so she can take quite a few hits without feeling pain. Her pink eyes are actually a transparent cover for her real eyes.\n\nUnlike armor, her dragon form becomes a part of her. Her muscles are incredibly strong. Her wide hips that can hold really heavy weights. She can use her small wings to fly for short periods of time. She can also breathe fire like a real dragon.", 16751052, 0.9, new dragonAmber(), characters.length); characters[characters.length] = makeCharacter("\"Pink\"", AMBER_WORLD, "She seems to be of a species that has not developed the physical ability to speak. This may seem to imply that she is a wild, feral wolf, but she is actually as self aware as any of the other characters and understands normal speech perfectly.\n\nShe was first seen by Amber in a forest near town. She has no known name, but gladly accepted the nickname \"Pink\", given to her by Amber.\n\nShe owns a silver necklace that causes the wearer to take a pregnant form. The strange effects are triggered by imagining what it would feel like to have something nice and warm in her belly. Once activated, this pseudo-pregnancy remains until the necklace is removed. The origin of the necklace is equally as mysterious as Pink's own origin.\n\nAlthough she is intelligent, she's a simple girl. She usually only thinks about what happens here and now. She is peaceful and carefree most of the time.", 16764108, 0.82, new pink(), characters.length); characters[characters.length] = makeCharacter("Celestina", AMBER_WORLD, "Shy and nervous, Celestina is a very thin blue wolf. She gets more nervous around guys. She hopes to get a boyfriend one day, but she doesn't think any boy will notice her with her flat body. She wishes her hips and breasts would be bigger.", 2900387, 0.95, new celestina(), characters.length); characters[characters.length] = makeCharacter("Tania", AMBER_WORLD, "A pink, loud-mouthed cat. She doesn't let anyone walk over her.\n\nShe looks pregnant, but she really isn't. Inside Tania's belly is the source of her power. This power was given to her one day when she stumbled upon an ancient altar after getting lost in a forest. She met the goddess of fertility there, who explained to her that she had become the oracle of fertility. Tania was given a chance to reject the offer, but she decided to keep her powers.\n\nAs the oracle of fertility, she can make flowers bloom and fruits grow. She can also affect pregnant people and animals by making their pregnancies progress rapidly, or easing the pains and discomforts of pregnancy. She can also increase the intensity of sexual pleasure, both her own and of the people around her.", 16751052, 0.92, new tania(), characters.length); characters[characters.length] = makeCharacter("Azalea", AMBER_WORLD, "The goddess of fertility. She takes the form of a brown vixen with long hair, covering her body. She doesn't normally wear clothes.\n\nIn the past, an ancient civilization built a village around an altar, where young females would perform rituals to become oracles of fertility. Azalea had a close connection to that tribe. She would visit them regularly. One day, the village was invaded by conquerors, and the vilagers were either killed or taken to other lands. This rendered her unable to communicate with people anymore.\n\nWhen Tania showed up at the altar by accident, she was unexpectedly turned into an oracle. Azalea went to visit Tania. She explained that she was only able to appear among ordinary people when an oracle was present. Whenever Azalea can be seen, Tania is always close by. When she is visible, she is easily confused with a normal person.\n\nAzalea is calm, patient and kind. After many tens of centuries of solitude, Azalea has become somewhat disconnected from reality. It always looks like she is daydreaming. She is also ignorant of the way modern society works, which frequently causes people to stare at her or think she is crazy.", 13275476, 1.02, new azalea(), characters.length); characters[characters.length] = makeCharacter("Nieve", OTHER_WORLD, "A yellow cat. She works as a secretary. She is a rather average girl.", 16777113, 0.97, new nieve(), characters.length); characters[characters.length] = makeCharacter("Demon Girl", OTHER_WORLD, "A demon girl of unknown name or origin, similar to a bat. Her thin body, smooth curves and round breasts try to emulate the pure image of feminine beauty. She seems to have made the purpose of her immortal existence to sleep with every guy she lays eyes on.", 13542225, 0.95, new demonGirl(), characters.length); characters[characters.length] = makeCharacter("Werewolf girl", OTHER_WORLD, "A girl with a werewolf curse. Unlike normal werewolves, she does not transform under the light of the full moon. Instead, she transforms into a wolf at random, in an unpredictable way.\n\nHer wolf form is not fixed. It can have a variety of different shapes. Sometimes she is more human-like, and other times she is more feral. Her breasts may grow larger or she may grow multiple breasts. She may also appear to get pregnant, but this effect vanishes when her transformation ends. The only things that remain constant are her glowing red eyes, her messy brown fur and her human hair.\n\nWhen she transforms, she loses control and adopts a completely different personality. Instead of killing people, she looks for men to seduce and spend the night with. She seems to be unable to speak while being a wolf.", 9198636, 0.98, new werewolf(), characters.length); stage.addChild(BACKGROUND); stage.addChild(PARENT); tempText = new TextField(); tempText.selectable = false; tempText.defaultTextFormat = titleFormat; tempText.text = "Doom the wolf's characters"; tempText.width = stage.stageWidth; tempText.height = MENU_TITLE_HEIGHT; tempText.x = (tempText.y = 4); menuTitle.addChild(tempText); menuTitle.cacheAsBitmap = true; tempText = new TextField(); tempText.selectable = false; tempText.defaultTextFormat = titleFormat; tempText.text = "Doom the wolf's characters"; tempText.width = stage.stageWidth; tempText.height = MENU_TITLE_HEIGHT; menuTitle.addChild(tempText); makeIntoItem(menuTitle); menuTitle.visible = false; PARENT.addChild(menuTitle); tempText = new TextField(); tempText.selectable = false; tempText.defaultTextFormat = titleFormat; tempText.text = "Doom's\nWorld"; doomWorldBtn.addChild(tempText); tempClip = new doom(); doomWorldBtn.addChild(tempClip); makeIntoItem(doomWorldBtn); doomWorldBtn.addEventListener("mouseDown", loadWorldMenu); doomWorldBtn.visible = false; PARENT.addChild(doomWorldBtn); tempText = new TextField(); tempText.selectable = false; tempText.defaultTextFormat = titleFormat; tempText.text = "Amber's\nWorld"; amberWorldBtn.addChild(tempText); tempClip = new amber(); amberWorldBtn.addChild(tempClip); makeIntoItem(amberWorldBtn); amberWorldBtn.addEventListener("mouseDown", loadWorldMenu); amberWorldBtn.visible = false; PARENT.addChild(amberWorldBtn); tempText = new TextField(); tempText.selectable = false; tempText.defaultTextFormat = titleFormat; tempText.text = "Others"; otherWorldBtn.addChild(tempText); makeIntoItem(otherWorldBtn); otherWorldBtn.visible = false; PARENT.addChild(otherWorldBtn); otherWorldBtn.addEventListener("mouseDown", loadWorldMenu); copyClip._txt = new TextField(); textFormat.align = "right"; textFormat.size = 12; copyClip._txt.defaultTextFormat = textFormat; textFormat.align = "left"; copyClip._txt.text = "Drawn and programmed by Doom the wolf.\nhttp://doom-the-wolf.deviantart.com"; copyClip.addChild(copyClip._txt); copyClip._txt.width = (copyClip._txt.textWidth + 5); copyClip._txt.height = (copyClip._txt.textHeight + 5); copyClip._txt.selectable = false; makeIntoItem(copyClip); copyClip.x = (copyClip.destX = (stage.stageWidth - copyClip.width)); copyClip.y = (copyClip.destY = (stage.stageHeight - copyClip.height)); stage.addChild(copyClip); makeButton(backBtn, "Back"); makeIntoItem(backBtn); backBtn.addEventListener("mouseDown", back); backBtn.visible = false; PARENT.addChild(backBtn); makeButton(heightChartBtn, "Height Chart"); heightChartBtn.addEventListener("mouseDown", loadHeightMenu); makeIntoItem(heightChartBtn); heightChartBtn.visible = false; PARENT.addChild(heightChartBtn); makeButton(compareBtn, "Compare"); makeIntoItem(compareBtn); compareBtn.addEventListener("mouseDown", loadCompareListMenu); compareBtn.visible = false; PARENT.addChild(compareBtn); makeButton(doomBtn, DOOM_WORLD); makeIntoItem(doomBtn); doomBtn.addEventListener("mouseDown", loadHeightMenu); doomBtn.visible = false; PARENT.addChild(doomBtn); makeButton(amberBtn, AMBER_WORLD); makeIntoItem(amberBtn); amberBtn.addEventListener("mouseDown", loadHeightMenu); amberBtn.visible = false; PARENT.addChild(amberBtn); makeButton(otherBtn, OTHER_WORLD); makeIntoItem(otherBtn); otherBtn.addEventListener("mouseDown", loadHeightMenu); otherBtn.visible = false; PARENT.addChild(otherBtn); makeButton(allBtn, ALL_WORLD); makeIntoItem(allBtn); allBtn.addEventListener("mouseDown", loadHeightMenu); allBtn.visible = false; PARENT.addChild(allBtn); makeButton(viewAllBtn, "View all"); makeIntoItem(viewAllBtn); viewAllBtn.addEventListener("mouseDown", setViewAll); viewAllBtn.visible = false; PARENT.addChild(viewAllBtn); updateSize(); loadMainMenu(); updateSize(); stage.addEventListener(Event.RESIZE, updateSize); stage.addEventListener(Event.ENTER_FRAME, itemFrame, false, 0, true); BG_NUM_COLORS = 3; BG_COLORS = []; BG_ALPHAS = [1, 1, 1]; BG_RATIOS = [0, (0xFF / 2), 0xFF]; BG_ROTATION = (Math.PI * (0.5 - 0.1)); BG_COLOR_CHANGE_SPEED = 16; BG_LINE_SEPARATION = 15; BG_LINE_CURVE = 20; BG_LINE_THICKNESS = 1; BG_LINE_ANGLE = (Math.PI / 6); BG_LINE_ALPHA = 0.5; BG_LINE_COLORS = []; BG_HLINE_CLIP = new MovieClip(); BG_HLINE_THICKNESS = 2; BG_HLINE_MID_THICKNESS = 1; BG_HLINE_FLOOR_THICKNESS = 4; BG_HLINE_COLOR = 0xFF; BG_HLINES_PER_HEIGHT = 20; BG_HLINE_TIMER = 2; BG_HLINE_BITMAPDATA = new BitmapData(1, 1, false, BG_HLINE_COLOR); BG_COLORS[MAIN_MENU] = [6737151, 10079487, 13311]; BG_COLORS[WORLD_MENU] = [16764006, 16764057, 0xDD6600]; BG_COLORS[CHARACTER_MENU] = [6737151, 10079487, 13311]; BG_COLORS[HEIGHT_MENU] = [6737151, 10079487, 13311]; BG_COLORS[COMPARE_MENU] = [6737151, 10079487, 13311]; BG_COLORS[COMPARE_LIST_MENU] = [6737151, 10079487, 13311]; BG_LINE_COLORS[MAIN_MENU] = 0xFF; BG_LINE_COLORS[WORLD_MENU] = 0xFF8800; BG_LINE_COLORS[CHARACTER_MENU] = 0xFF; BG_LINE_COLORS[HEIGHT_MENU] = 0xFF; BG_LINE_COLORS[COMPARE_MENU] = 0xFF; BG_LINE_COLORS[COMPARE_LIST_MENU] = 0xFF; bgTimer = 0; bgColors = BG_COLORS[MAIN_MENU].concat(); bgLineColor = BG_LINE_COLORS[MAIN_MENU]; bgHeightLines = []; BACKGROUND.mouseEnabled = false; BACKGROUND.mouseChildren = false; BACKGROUND.addChild(BG_HLINE_CLIP); stage.addEventListener(Event.ENTER_FRAME, updateBackground); stage.addEventListener(Event.RESIZE, drawBackground); drawBackground(); i = 0; while (i < characters.length) { comments[characters[i].name] = []; i++; }; comments["Valentine Vixen"]["Cristina"] = "Why...?"; comments["Valentine Vixen"]["Violet Vixen"] = "Don't do anything dangerous, sister."; comments["Valentine Vixen"]["Amber"] = "Hello, Amber!"; comments["Violet Vixen"]["Valentine Vixen"] = "I know, I can handle things by myself."; comments["Violet Vixen"]["Cristina"] = "You leave my sister alone!"; comments["Cristina"]["Valentine Vixen"] = "Get lost, vixen."; comments["Cristina"]["Violet Vixen"] = "Leave me alone!"; comments["Amber"]["Valentine Vixen"] = "Hey, Valentine!"; } public function sortByID(_arg1:Array, _arg2:Boolean=true):void{ var _local3:int; var _local4:int; var _local5:int; _local3 = (_arg2) ? 1 : -1; _local4 = 0; while (_local4 < (_arg1.length - 1)) { _local5 = (_local4 + 1); while (_local5 < _arg1.length) { if ((_arg1[_local4].id * _local3) > (_arg1[_local5].id * _local3)){ swap(_arg1, _local4, _local5); }; _local5++; }; _local4++; }; } public function updateSize(_arg1:Event=null){ var _local2:TextField; var _local3:int; var _local4:Rectangle; var _local5:MovieClip; var _local6:Number; var _local7:Object; var _local8:Number; var _local9:Number; var _local10:Object; var _local11:Object; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Object; var _local17:Number; var _local18:Number; var _local19:Object; var _local20:Number; if (menuMode == MAIN_MENU){ copyClip.destX = (stage.stageWidth - copyClip.width); copyClip.destY = (stage.stageHeight - copyClip.height); doomWorldBtn.graphics.clear(); drawBox(doomWorldBtn, (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2), (((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT), BOX_RADIUS, DOOM_WORLD_COLORS, BOX_ROTATION); doomWorldBtn.destX = MENU_SIDE_MARGIN; doomWorldBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); _local2 = (doomWorldBtn.getChildAt(0) as TextField); _local2.height = (_local2.textHeight + 5); _local2.y = ((((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT) - _local2.height); _local2.width = (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2); _local5 = (doomWorldBtn.getChildAt(1) as doom); (doomWorldBtn.getChildAt(1) as doom).destX = ((doomWorldBtn.getChildAt(1) as doom).destY = ((doomWorldBtn.getChildAt(1) as doom).x = (_local5.y = 0))); _local5.destW = (_local5.destH = (_local5.scaleX = (_local5.scaleY = 1))); setGrid(0, 0, 1, Math.max(1, (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2)), Math.max(1, ((((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT) - _local2.height)), 10, [_local5]); _local5.x = _local5.destX; _local5.y = _local5.destY; _local5.scaleX = _local5.destW; _local5.scaleY = _local5.destH; if (((((((((((isNaN(_local5.destX)) || (isNaN(_local5.destY)))) || (isNaN(_local5.destH)))) || (isNaN(_local5.destW)))) || ((Math.max(1, ((((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT) - _local2.height)) < 20)))) || ((Math.max(1, (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2)) < 20)))){ _local5.scaleX = (_local5.scaleY = (_local5.x = (_local5.y = 0))); }; amberWorldBtn.graphics.clear(); drawBox(amberWorldBtn, (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2), (((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT), BOX_RADIUS, AMBER_WORLD_COLORS, BOX_ROTATION); amberWorldBtn.destX = ((MENU_SIDE_MARGIN + MARGIN) + (((stage.stageWidth - (MENU_SIDE_MARGIN * 2)) - MARGIN) * 0.5)); amberWorldBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); _local2 = (amberWorldBtn.getChildAt(0) as TextField); _local2.height = (_local2.textHeight + 5); _local2.y = ((((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT) - _local2.height); _local2.width = (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2); _local5 = (amberWorldBtn.getChildAt(1) as amber); (amberWorldBtn.getChildAt(1) as amber).destX = ((amberWorldBtn.getChildAt(1) as amber).destY = ((amberWorldBtn.getChildAt(1) as amber).x = (_local5.y = 0))); _local5.destW = (_local5.destH = (_local5.scaleX = (_local5.scaleY = 1))); setGrid(0, 0, 1, Math.max(1, (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2)), Math.max(1, ((((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT) - _local2.height)), 10, [_local5]); _local5.x = _local5.destX; _local5.y = _local5.destY; _local5.scaleX = _local5.destW; _local5.scaleY = _local5.destH; if (((((((((((isNaN(_local5.destX)) || (isNaN(_local5.destY)))) || (isNaN(_local5.destH)))) || (isNaN(_local5.destW)))) || ((Math.max(1, ((((stage.stageHeight - (2 * MENU_TITLE_HEIGHT)) - (3 * MARGIN)) - MENU_OTHER_HEIGHT) - _local2.height)) < 20)))) || ((Math.max(1, (((stage.stageWidth - (2 * MENU_SIDE_MARGIN)) - MARGIN) / 2)) < 20)))){ _local5.scaleX = (_local5.scaleY = (_local5.x = (_local5.y = 0))); }; otherWorldBtn.graphics.clear(); drawBox(otherWorldBtn, (stage.stageWidth - (2 * MENU_SIDE_MARGIN)), MENU_OTHER_HEIGHT, BOX_RADIUS, OTHER_WORLD_COLORS, BOX_ROTATION); otherWorldBtn.destX = MENU_SIDE_MARGIN; otherWorldBtn.destY = (((stage.stageHeight - MENU_TITLE_HEIGHT) - MARGIN) - MENU_OTHER_HEIGHT); _local2 = (otherWorldBtn.getChildAt(0) as TextField); _local2.height = MENU_OTHER_HEIGHT; _local2.width = (stage.stageWidth - (2 * MENU_SIDE_MARGIN)); centerText(_local2, 0, MENU_OTHER_HEIGHT); }; if (menuTitle.visible){ (menuTitle.getChildAt(0) as TextField).width = stage.stageWidth; (menuTitle.getChildAt(1) as TextField).width = stage.stageWidth; }; if (menuMode == WORLD_MENU){ setGrid(MENU_SIDE_MARGIN, MENU_TITLE_HEIGHT, Math.ceil(Math.sqrt(clips.length)), (stage.stageWidth - (2 * MENU_SIDE_MARGIN)), (stage.stageHeight - (2 * MENU_TITLE_HEIGHT)), (MARGIN * 2), clips); _local3 = 0; while (_local3 < names.length) { _local4 = getDestinationBox(clips[_local3]); names[_local3].destX = ((_local4.x + (_local4.width * 0.5)) - (names[_local3].width * 0.5)); names[_local3].destY = _local4.bottom; _local3++; }; backBtn.destX = ((stage.stageWidth - BUTTON_WIDTH) - MARGIN); backBtn.destY = ((stage.stageHeight - BUTTON_HEIGHT) - MARGIN); heightChartBtn.destX = (stage.stageWidth - ((BUTTON_WIDTH + MARGIN) * 2)); heightChartBtn.destY = ((stage.stageHeight - BUTTON_HEIGHT) - MARGIN); }; if (menuMode == CHARACTER_MENU){ _local5 = selectedCharacter.box; _local5.graphics.clear(); _local6 = ((stage.stageWidth - (MARGIN * 3)) * 0.5); drawBox(_local5, _local6, (stage.stageHeight - (MARGIN * 2)), BOX_RADIUS, characterColors(selectedCharacter), BOX_ROTATION); _local5.destX = ((MARGIN * 2) + _local6); _local5.destY = MARGIN; _local5.name_txt.x = MARGIN; _local5.name_txt.width = (_local6 - (2 * MARGIN)); _local5.name_txt.height = MENU_TITLE_HEIGHT; backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); backBtn.destX = ((MARGIN + _local6) - BUTTON_WIDTH); compareBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); compareBtn.destX = (_local6 - (BUTTON_WIDTH * 2)); setGrid(MARGIN, MARGIN, 1, _local6, ((stage.stageHeight - (MARGIN * 3)) - BUTTON_HEIGHT), MARGIN, [selectedCharacter.clip]); _local5.desc_txt.x = MARGIN; _local5.desc_txt.width = ((_local6 - (2 * MARGIN)) - SLIDER_WIDTH); _local5.desc_txt.y = (MENU_TITLE_HEIGHT + MARGIN); _local5.desc_txt.height = Math.min(((stage.stageHeight - (4 * MARGIN)) - MENU_TITLE_HEIGHT), (_local5.desc_txt.textHeight + 5)); _local5.slider.visible = (_local5.down.visible = (_local5.up.visible = ((_local5.desc_txt.textHeight + 5) > _local5.desc_txt.height))); if (!_local5.slider.visible){ _local5.desc_txt.width = (_local6 - (2 * MARGIN)); }; _local5.down.x = (_local5.up.x = (_local6 - ((SLIDER_WIDTH + MARGIN) * 0.5))); _local5.up.y = _local5.desc_txt.y; _local5.down.y = (_local5.desc_txt.y + _local5.desc_txt.height); _local5.slider.x = (_local5.down.x - (SLIDER_WIDTH * 0.5)); _local5.slider.y = (_local5.up.y - (SLIDER_HEIGHT * 0.5)); _local5.desc_txt.scrollV = 0; if ((_local5.desc_txt.textHeight + 5) > _local5.desc_txt.height){ _local5.graphics.beginFill(0x999999); _local5.graphics.drawRect((_local5.up.x - (SLIDER_WIDTH * 0.25)), _local5.up.y, (SLIDER_WIDTH * 0.5), (_local5.down.y - _local5.up.y)); _local5.graphics.endFill(); }; _local5.graphics.beginFill(0xFFFFFF, 0.75); _local5.graphics.drawRoundRect(_local5.desc_txt.x, _local5.desc_txt.y, _local5.desc_txt.width, _local5.desc_txt.height, BUTTON_RADIUS); _local5.graphics.endFill(); }; if (menuMode == COMPARE_LIST_MENU){ _local6 = ((stage.stageWidth - (MARGIN * 3)) * 0.5); setGrid(MARGIN, MARGIN, 1, _local6, ((stage.stageHeight - (MARGIN * 3)) - BUTTON_HEIGHT), MARGIN, [selectedCharacter.clip]); setGrid(((MARGIN * 2) + _local6), MARGIN, Math.ceil((0.5 * Math.sqrt(clips.length))), _local6, (stage.stageHeight - (MARGIN * 2)), MARGIN, clips); _local3 = 0; while (_local3 < names.length) { _local4 = getDestinationBox(clips[_local3]); names[_local3].destX = ((_local4.x + (_local4.width * 0.5)) - (names[_local3].width * 0.5)); names[_local3].destY = _local4.bottom; _local3++; }; backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); backBtn.destX = ((MARGIN + _local6) - BUTTON_WIDTH); heightChartBtn.destX = ((backBtn.destX - MARGIN) - BUTTON_WIDTH); heightChartBtn.destY = backBtn.destY; }; if (menuMode == COMPARE_MENU){ _local6 = ((stage.stageWidth - (MARGIN * 3)) * 0.5); _local8 = (stage.stageWidth - (2 * MARGIN)); _local9 = ((stage.stageHeight - (5 * MARGIN)) - BUTTON_HEIGHT); setGrid(MARGIN, MARGIN, 2, _local8, _local9, MARGIN, [selectedCharacter.clip, secondaryCharacter.clip]); if (selectedCharacter.height > secondaryCharacter.height){ _local10 = selectedCharacter; _local11 = secondaryCharacter; } else { _local10 = secondaryCharacter; _local11 = selectedCharacter; }; _local12 = (_local10.clip.height / _local10.clip.scaleY); _local13 = (_local9 / _local12); _local10.clip.destH = (_local10.clip.destW = _local13); compareCharacterHeights(_local10, _local11); _local10.clip.destY = ((stage.stageHeight - (4 * MARGIN)) - BUTTON_HEIGHT); _local11.clip.destY = _local10.clip.destY; backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); backBtn.destX = ((stage.stageWidth - MARGIN) - BUTTON_WIDTH); heightChartBtn.destX = ((backBtn.destX - MARGIN) - BUTTON_WIDTH); heightChartBtn.destY = backBtn.destY; _local4 = getDestinationBox(selectedCharacter.clip); selectedCharacter.textBox.leave = false; selectedCharacter.textBox.proportion = DEFAULT_PROPORTION; selectedCharacter.textBox.destX = ((_local4.x + (_local4.width * 0.5)) - (selectedCharacter.textBox.width * 0.5)); selectedCharacter.textBox.destY = _local4.bottom; if (!selectedCharacter.textBox.visible){ selectedCharacter.textBox.x = selectedCharacter.textBox.destX; selectedCharacter.textBox.y = stage.stageHeight; selectedCharacter.textBox.visible = true; }; _local4 = getDestinationBox(secondaryCharacter.clip); secondaryCharacter.textBox.leave = false; secondaryCharacter.textBox.proportion = DEFAULT_PROPORTION; secondaryCharacter.textBox.destX = ((_local4.x + (_local4.width * 0.5)) - (secondaryCharacter.textBox.width * 0.5)); secondaryCharacter.textBox.destY = _local4.bottom; if (!secondaryCharacter.textBox.visible){ secondaryCharacter.textBox.x = secondaryCharacter.textBox.destX; secondaryCharacter.textBox.y = stage.stageHeight; secondaryCharacter.textBox.visible = true; }; }; if (menuMode == HEIGHT_MENU){ _local14 = (((stage.stageHeight - (MARGIN * 5)) - MENU_TITLE_HEIGHT) - BUTTON_HEIGHT); _local15 = (stage.stageWidth - (2 * MARGIN)); _local6 = -1; _local5 = null; _local3 = 0; while (_local3 < clips.length) { _local7 = getCharacterByClip(characters, clips[_local3]); if ((((_local6 < 0)) || ((_local6 < _local7.height)))){ _local6 = _local7.height; _local5 = clips[_local3]; }; _local3++; }; _local7 = getCharacterByClip(characters, _local5); _local16 = _local7; _local17 = (_local7.clip.height / _local7.clip.scaleY); _local7.clip.destH = (_local7.clip.destW = (_local14 / _local17)); _local18 = 0; _local3 = 0; while (_local3 < clips.length) { _local19 = getCharacterByClip(characters, clips[_local3]); compareCharacterHeights(_local7, _local19); clips[_local3].destY = ((stage.stageHeight - (4 * MARGIN)) - BUTTON_HEIGHT); _local4 = getDestinationBox(clips[_local3]); names[_local3].destX = ((_local4.x + (_local4.width * 0.5)) - (names[_local3].width * 0.5)); names[_local3].destY = _local4.bottom; _local18 = (_local18 + ((clips[_local3].destW * clips[_local3].width) / clips[_local3].scaleX)); _local3++; }; if (viewAll){ _local20 = Math.min((_local15 / _local18), (_local14 / ((_local16.clip.destH * _local16.clip.height) / _local16.clip.scaleY))); _local3 = 0; while (_local3 < clips.length) { clips[_local3].destW = (clips[_local3].destW * _local20); clips[_local3].destH = clips[_local3].destW; _local4 = getDestinationBox(clips[_local3]); names[_local3].destX = ((_local4.x + (_local4.width * 0.5)) - (names[_local3].width * 0.5)); names[_local3].destY = _local4.bottom; _local3++; }; }; backBtn.destX = ((stage.stageWidth - BUTTON_WIDTH) - MARGIN); backBtn.destY = ((stage.stageHeight - BUTTON_HEIGHT) - MARGIN); allBtn.destX = ((backBtn.destX - MARGIN) - BUTTON_WIDTH); otherBtn.destX = ((allBtn.destX - MARGIN) - BUTTON_WIDTH); amberBtn.destX = ((otherBtn.destX - MARGIN) - BUTTON_WIDTH); doomBtn.destX = ((amberBtn.destX - MARGIN) - BUTTON_WIDTH); doomBtn.destY = (amberBtn.destY = (otherBtn.destY = (allBtn.destY = backBtn.destY))); viewAllBtn.destX = MARGIN; viewAllBtn.destY = MENU_TITLE_HEIGHT; }; } public function sliderAdded(_arg1:Event){ var _local2:MovieClip; _local2 = (_arg1.currentTarget as MovieClip); _local2.addEventListener("mouseDown", sliderPicked); } public function getCharacterByClip(_arg1:Array, _arg2:MovieClip){ var _local3:int; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3].clip == _arg2){ return (_arg1[_local3]); }; _local3++; }; return (null); } public function loadHeightMenu(_arg1:Event=null){ var _local2:MovieClip; var _local3:int; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:TextField; var _local10:TextFormat; if (menuMode == WORLD_MENU){ _local3 = 0; while (_local3 < clips.length) { clips[_local3].removeEventListener("mouseDown", loadCharacterMenu); _local3++; }; }; if (heightChartBtn.visible){ heightChartBtn.leave = true; heightChartBtn.destX = stage.stageWidth; heightChartBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); }; if (menuMode == COMPARE_LIST_MENU){ _local3 = 0; while (_local3 < clips.length) { clips[_local3].removeEventListener("mouseDown", loadCompareMenu); _local3++; }; }; selectedCharacter = null; secondaryCharacter = null; _local2 = null; if (_arg1){ _local2 = (_arg1.currentTarget as MovieClip); }; switch (_local2){ case doomBtn: worldMode = DOOM_WORLD; break; case amberBtn: worldMode = AMBER_WORLD; break; case otherBtn: worldMode = OTHER_WORLD; break; case allBtn: worldMode = ALL_WORLD; break; default: break; }; sortByHeight(characters); clips.length = 0; names.length = 0; _local3 = 0; while (_local3 < characters.length) { if ((((worldMode == ALL_WORLD)) || ((characters[_local3].world == worldMode)))){ clips[clips.length] = characters[_local3].clip; names[names.length] = characters[_local3].textBox; } else { characters[_local3].clip.removeEventListener("mouseDown", selectCharacter); characters[_local3].clip.removeEventListener(MouseEvent.DOUBLE_CLICK, loadCharacterMenu); characters[_local3].clip.leave = true; characters[_local3].proportion = LEAVE_PROPORTION; characters[_local3].clip.destY = (-(stage.stageHeight) * 0.5); characters[_local3].textBox.leave = true; characters[_local3].textBox.proportion = LEAVE_PROPORTION; characters[_local3].textBox.destY = (stage.stageHeight * 1.5); }; _local3++; }; menuMode = HEIGHT_MENU; updateSize(); setHeightChartPos(); _local4 = ((Math.PI * 2) / clips.length); _local6 = (stage.stageWidth * 0.5); _local7 = (stage.stageHeight * 0.5); _local8 = (stage.stageWidth + stage.stageHeight); _local3 = 0; while (_local3 < clips.length) { _local5 = (_local3 * _local4); clips[_local3].leave = false; names[_local3].leave = false; clips[_local3].proportion = DEFAULT_PROPORTION; names[_local3].proportion = DEFAULT_PROPORTION; clips[_local3].addEventListener("mouseDown", selectCharacter, false, 0, true); clips[_local3].addEventListener(MouseEvent.DOUBLE_CLICK, loadCharacterMenu, false, 0, true); if (!clips[_local3].visible){ clips[_local3].x = (_local6 + (Math.cos(_local5) * _local8)); clips[_local3].y = (_local7 + (Math.sin(_local5) * _local8)); clips[_local3].scaleX = clips[_local3].destW; clips[_local3].scaleY = clips[_local3].destH; clips[_local3].visible = true; }; if (!names[_local3].visible){ names[_local3].x = (_local6 - (Math.cos(_local5) * _local8)); names[_local3].y = (_local7 - (Math.sin(_local5) * _local8)); names[_local3].visible = true; }; _local3++; }; menuTitle.leave = false; menuTitle.proportion = DEFAULT_PROPORTION; menuTitle.destX = (menuTitle.destY = 0); _local9 = (menuTitle.getChildAt(1) as TextField); _local10 = new TextFormat(); _local10.color = 0xFF; _local9.defaultTextFormat = _local10; _local9.text = ("Height chart: " + worldMode); _local9 = (menuTitle.getChildAt(0) as TextField); _local10.color = 0; _local9.defaultTextFormat = _local10; _local9.text = ("Height chart: " + worldMode); if (!menuTitle.visible){ menuTitle.x = 0; menuTitle.y = -(MENU_TITLE_HEIGHT); menuTitle.visible = true; }; backBtn.leave = false; backBtn.proportion = DEFAULT_PROPORTION; backBtn.destX = ((stage.stageWidth - MARGIN) - BUTTON_WIDTH); backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); if (!backBtn.visible){ backBtn.x = stage.stageWidth; backBtn.y = backBtn.destY; backBtn.visible = true; }; allBtn.leave = false; allBtn.proportion = DEFAULT_PROPORTION; allBtn.destX = ((backBtn.destX - MARGIN) - BUTTON_WIDTH); allBtn.destY = backBtn.destY; if (!allBtn.visible){ allBtn.x = stage.stageWidth; allBtn.y = allBtn.destY; allBtn.visible = true; }; otherBtn.leave = false; otherBtn.proportion = DEFAULT_PROPORTION; otherBtn.destX = ((allBtn.destX - MARGIN) - BUTTON_WIDTH); otherBtn.destY = allBtn.destY; if (!otherBtn.visible){ otherBtn.x = stage.stageWidth; otherBtn.y = otherBtn.destY; otherBtn.visible = true; }; amberBtn.leave = false; amberBtn.proportion = DEFAULT_PROPORTION; amberBtn.destX = ((otherBtn.destX - MARGIN) - BUTTON_WIDTH); amberBtn.destY = otherBtn.destY; if (!amberBtn.visible){ amberBtn.x = stage.stageWidth; amberBtn.y = amberBtn.destY; amberBtn.visible = true; }; doomBtn.leave = false; doomBtn.proportion = DEFAULT_PROPORTION; doomBtn.destX = ((amberBtn.destX - MARGIN) - BUTTON_WIDTH); doomBtn.destY = amberBtn.destY; if (!doomBtn.visible){ doomBtn.x = stage.stageWidth; doomBtn.y = doomBtn.destY; doomBtn.visible = true; }; viewAllBtn.leave = false; viewAllBtn.proportion = DEFAULT_PROPORTION; viewAllBtn.destX = MARGIN; viewAllBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); if (!viewAllBtn.visible){ viewAllBtn.x = -(BUTTON_WIDTH); viewAllBtn.y = viewAllBtn.destY; viewAllBtn.visible = true; }; sortByID(characters); stage.addEventListener("mouseMove", setHeightChartPos, false, 0, true); menuMode = HEIGHT_MENU; updateSize(); setHeightChartPos(); } public function sliderPicked(_arg1:Event){ var _local2:MovieClip; _local2 = (_arg1.currentTarget as MovieClip); stage.addEventListener("mouseMove", sliderDragged); stage.addEventListener("mouseUp", sliderDropped); } public function makeButton(_arg1:MovieClip, _arg2:String){ var _local3:TextField; var _local4:TextFormat; _local3 = new TextField(); drawBox(_arg1, BUTTON_WIDTH, BUTTON_HEIGHT, BUTTON_RADIUS, BUTTON_COLORS, BUTTON_ROTATION); _arg1.addChild(_local3); _local4 = new TextFormat(); _local4.bold = true; _local4.size = 14; _local4.align = "center"; _local3.selectable = false; _local3.defaultTextFormat = textFormat; _local3.defaultTextFormat = _local4; _local3.text = _arg2; _local3.width = BUTTON_WIDTH; _local3.height = (_local3.textHeight + 5); _local3.y = ((BUTTON_HEIGHT - _local3.height) * 0.5); } public function setGrid(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:uint, _arg5:uint, _arg6:uint, _arg7:Array):void{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:int; var _local14:int; var _local15:int; _local8 = Math.ceil((_arg7.length / Number(_arg3))); _local9 = (_arg4 - (_arg6 * (_arg3 + 1))); _local10 = (_arg5 - (_arg6 * (_local8 + 1))); _local11 = (_local9 / _arg3); _local12 = (_local10 / _local8); _local15 = 0; while (_local15 < _arg7.length) { _local13 = (_local15 % _arg3); _local14 = (_local15 / _arg3); centerItemInBox(_arg7[_local15], ((_arg1 + _arg6) + (_local13 * (_local11 + _arg6))), ((_arg2 + _arg6) + (_local14 * (_local12 + _arg6))), _local11, _local12); _local15++; }; } public function reordered(){ var _local1:int; _local1 = 0; while (_local1 < characters.length) { clips[_local1] = characters[_local1].clip; names[_local1].text = characters[_local1].name; _local1++; }; } public function setHeightChartPos(_arg1:MouseEvent=null){ var _local2:Rectangle; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:int; var _local8:Number; var _local9:Array; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Rectangle; var _local14:Number; _local3 = MENU_SIDE_MARGIN; _local4 = (stage.stageWidth - MENU_SIDE_MARGIN); _local5 = stage.mouseX; _local5 = Math.max(_local5, _local3); _local5 = Math.min(_local5, _local4); _local6 = ((_local5 - _local3) / (_local4 - _local3)); if (_local4 <= _local3){ _local6 = 0; }; _local8 = 0; _local9 = []; _local7 = 0; while (_local7 < clips.length) { _local9[_local7] = ((clips[_local7].destW * clips[_local7].width) / clips[_local7].scaleX); _local8 = (_local8 + _local9[_local7]); _local7++; }; _local10 = MARGIN; _local11 = ((stage.stageWidth - MARGIN) - _local8); if (_local11 >= _local10){ _local12 = _local10; } else { _local12 = (_local10 + (_local6 * (_local11 - _local10))); }; _local8 = 0; _local7 = 0; while (_local7 < clips.length) { _local13 = clips[_local7].getRect(clips[_local7]); if (clips[_local7].scaleX < 0){ _local14 = (_local13.right / (_local13.right - _local13.left)); } else { _local14 = (-(_local13.left) / (_local13.right - _local13.left)); }; if (_local13.right == _local13.left){ _local14 = 0; }; clips[_local7].destX = ((_local12 + _local8) + (_local14 * _local9[_local7])); _local2 = getDestinationBox(clips[_local7]); names[_local7].destX = ((_local2.x + (_local2.width * 0.5)) - (names[_local7].width * 0.5)); names[_local7].destY = _local2.bottom; _local8 = (_local8 + _local9[_local7]); _local2 = getDestinationBox(clips[_local7]); names[_local7].destX = ((_local2.x + (_local2.width * 0.5)) - (names[_local7].width * 0.5)); names[_local7].destY = _local2.bottom; _local7++; }; } public function back(_arg1:Event=null){ switch (menuMode){ case WORLD_MENU: loadMainMenu(); break; case CHARACTER_MENU: loadWorldMenu(); break; case COMPARE_LIST_MENU: loadCharacterMenu(); break; case COMPARE_MENU: loadCompareListMenu(); break; case HEIGHT_MENU: loadWorldMenu(); break; }; } public function loadCharacterMenu(_arg1:Event=null){ var _local2:MovieClip; var _local3:Number; var _local4:int; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Rectangle; _local2 = null; if (_arg1 != null){ _local2 = (_arg1.currentTarget as MovieClip); }; if (menuMode == WORLD_MENU){ _local5 = ((Math.PI * 2) / clips.length); _local6 = (stage.stageWidth + stage.stageHeight); _local8 = (stage.stageWidth * 0.5); _local9 = (stage.stageHeight * 0.5); _local4 = 0; while (_local4 < clips.length) { _local7 = (_local4 * _local5); names[_local4].leave = true; names[_local4].proportion = LEAVE_PROPORTION; names[_local4].destX = (_local8 + (Math.cos((_local7 + Math.PI)) * _local6)); names[_local4].destY = (_local9 + (Math.sin((_local7 + Math.PI)) * _local6)); clips[_local4].removeEventListener("mouseDown", loadCharacterMenu); if (clips[_local4] == _local2){ } else { clips[_local4].leave = true; clips[_local4].proportion = LEAVE_PROPORTION; clips[_local4].destX = (_local8 - (Math.cos(_local7) * _local6)); clips[_local4].destY = (_local9 - (Math.sin(_local7) * _local6)); }; _local4++; }; heightChartBtn.leave = true; heightChartBtn.destX = (stage.stageWidth + BUTTON_WIDTH); menuTitle.leave = true; menuTitle.destY = -(MENU_TITLE_HEIGHT); }; if (menuMode == COMPARE_LIST_MENU){ _local5 = ((Math.PI * 2) / clips.length); _local6 = (stage.stageWidth + stage.stageHeight); _local8 = (stage.stageWidth * 0.5); _local9 = (stage.stageHeight * 0.5); _local4 = 0; while (_local4 < clips.length) { _local7 = (_local4 * _local5); clips[_local4].removeEventListener("mouseDown", loadCompareMenu); clips[_local4].leave = true; clips[_local4].proportion = LEAVE_PROPORTION; names[_local4].leave = true; names[_local4].proportion = LEAVE_PROPORTION; clips[_local4].destX = (_local8 - (Math.cos(_local7) * _local6)); clips[_local4].destY = (_local9 - (Math.sin(_local7) * _local6)); names[_local4].destX = (_local8 + (Math.cos((_local7 + Math.PI)) * _local6)); names[_local4].destY = (_local9 + (Math.sin((_local7 + Math.PI)) * _local6)); _local4++; }; heightChartBtn.leave = true; heightChartBtn.destX = stage.stageWidth; heightChartBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); }; if (menuMode == HEIGHT_MENU){ menuTitle.leave = true; menuTitle.destY = -(MENU_TITLE_HEIGHT); _local5 = ((Math.PI * 2) / clips.length); _local6 = (stage.stageWidth + stage.stageHeight); _local8 = (stage.stageWidth * 0.5); _local9 = (stage.stageHeight * 0.5); if (selectedCharacter != null){ stage.removeEventListener("mouseMove", moveSelectedCharacter); stage.removeEventListener("mouseUp", dropSelectedCharacter); selectedCharacter.clip.filters = []; }; _local4 = 0; while (_local4 < clips.length) { clips[_local4].removeEventListener("mouseDown", selectCharacter); clips[_local4].removeEventListener(MouseEvent.DOUBLE_CLICK, loadCharacterMenu); _local7 = (_local4 * _local5); clips[_local4].leave = true; clips[_local4].proportion = LEAVE_PROPORTION; names[_local4].leave = true; names[_local4].proportion = LEAVE_PROPORTION; clips[_local4].destX = (_local8 - (Math.cos(_local7) * _local6)); clips[_local4].destY = (_local9 - (Math.sin(_local7) * _local6)); names[_local4].destX = (_local8 + (Math.cos((_local7 + Math.PI)) * _local6)); names[_local4].destY = (_local9 + (Math.sin((_local7 + Math.PI)) * _local6)); _local4++; }; stage.removeEventListener("mouseMove", setHeightChartPos); allBtn.destX = (otherBtn.destX = (amberBtn.destX = (doomBtn.destX = stage.stageWidth))); allBtn.destY = (otherBtn.destY = (amberBtn.destY = (doomBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT)))); allBtn.leave = (otherBtn.leave = (amberBtn.leave = (doomBtn.leave = true))); if (selectedCharacter){ trace("Remove character selection display"); }; selectedCharacter = null; viewAllBtn.leave = true; viewAllBtn.destX = -(BUTTON_WIDTH); viewAllBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); if (viewAll){ setViewAll(); }; }; if (((!((_local2 == null))) && (!(isNaN(_local2.id))))){ selectedCharacter = getCharacterByClip(characters, _local2); }; selectedCharacter.clip.leave = false; selectedCharacter.clip.proportion = DEFAULT_PROPORTION; _local3 = ((stage.stageWidth - (MARGIN * 3)) * 0.5); setGrid(MARGIN, MARGIN, 1, _local3, ((stage.stageHeight - (MARGIN * 3)) - BUTTON_HEIGHT), MARGIN, [selectedCharacter.clip]); selectedCharacter.box.leave = false; selectedCharacter.box.proportion = DEFAULT_PROPORTION; selectedCharacter.box.destX = (_local3 + (2 * MARGIN)); selectedCharacter.box.destY = MARGIN; if (!selectedCharacter.box.visible){ selectedCharacter.box.x = stage.stageWidth; selectedCharacter.box.y = selectedCharacter.box.destY; selectedCharacter.box.visible = true; }; compareBtn.leave = false; compareBtn.proportion = DEFAULT_PROPORTION; compareBtn.destX = (((MARGIN + _local3) - (BUTTON_WIDTH * 2)) - MARGIN); compareBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); if (!compareBtn.visible){ compareBtn.x = (stage.stageWidth + BUTTON_WIDTH); compareBtn.y = compareBtn.destY; compareBtn.visible = true; }; backBtn.leave = false; backBtn.proportion = DEFAULT_PROPORTION; backBtn.destX = ((MARGIN + _local3) - BUTTON_WIDTH); backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); if (!backBtn.visible){ backBtn.x = stage.stageWidth; backBtn.y = backBtn.destY; backBtn.visible; }; BG_COLORS[CHARACTER_MENU][1] = selectedCharacter.color; menuMode = CHARACTER_MENU; updateSize(); } public function makeCharacter(_arg1:String, _arg2:String, _arg3:String, _arg4:uint, _arg5:Number, _arg6:MovieClip, _arg7:int):Object{ var _local8:TextField; var _local9:TextFormat; var _local10:MovieClip; var _local11:MovieClip; var _local12:MovieClip; makeIntoItem(_arg6); _arg6.doubleClickEnabled = true; _arg6.mouseEnabled = true; _arg6.id = _arg7; PARENT.addChild(_arg6); _local9 = new TextFormat(); _local10 = new MovieClip(); _local8 = new TextField(); _local9.color = 0; _local9.align = "center"; _local8.defaultTextFormat = _local9; _local8.defaultTextFormat = textFormat; _local8.text = _arg1; _local8.selectable = false; _local8.width = (_local8.textWidth + 5); _local8.height = (_local8.textHeight + 5); _local8.x = (_local8.y = 1); _local10.addChild(_local8); _local8 = new TextField(); _local9.color = _arg4; _local9.align = "center"; _local8.defaultTextFormat = _local9; _local8.defaultTextFormat = textFormat; _local8.text = _arg1; _local8.selectable = false; _local8.width = (_local8.textWidth + 5); _local8.height = (_local8.textHeight + 5); _local10.addChild(_local8); makeIntoItem(_local10); PARENT.addChild(_local10); _local10.cacheAsBitmap = true; _local11 = new MovieClip(); makeIntoItem(_local11); _local9 = new TextFormat(); _local9.color = characterColors({color:_arg4})[2]; _local8 = (_local11.name_txt = new TextField()); _local8.defaultTextFormat = titleFormat; _local8.defaultTextFormat = _local9; _local8.selectable = false; _local8.text = _arg1; _local11.addChild(_local8); _local9 = new TextFormat(); _local9.size = 14; _local8 = (_local11.desc_txt = new TextField()); _local8.defaultTextFormat = textFormat; _local8.defaultTextFormat = _local9; _local8.text = _arg3; _local8.selectable = true; _local8.wordWrap = (_local8.multiline = true); _local11.addChild(_local8); _local12 = (_local11.up = new MovieClip()); _local12.graphics.beginFill(0xCCCCCC); drawArrow(_local12, MARGIN, MARGIN, (-(Math.PI) * 0.5), 0.75); _local12.graphics.endFill(); _local11.addChild(_local12); _local12 = (_local11.down = new MovieClip()); _local12.graphics.beginFill(0xCCCCCC); drawArrow(_local12, MARGIN, MARGIN, (Math.PI * 0.5), 0.75); _local12.graphics.endFill(); _local11.addChild(_local12); _local12 = (_local11.slider = new MovieClip()); drawBox(_local12, SLIDER_WIDTH, SLIDER_HEIGHT, SLIDER_RADIUS, BUTTON_COLORS, BUTTON_ROTATION); _local12.addEventListener(Event.ADDED_TO_STAGE, sliderAdded); _local12.addEventListener(Event.REMOVED_FROM_STAGE, sliderAdded); _local11.addChild(_local12); PARENT.addChild(_local11); _arg6.visible = (_local11.visible = (_local10.visible = false)); _local11.mouseEnabled = false; _local11.mouseChildren = true; return ({name:_arg1, world:_arg2, description:_arg3, color:_arg4, height:_arg5, clip:_arg6, box:_local11, textBox:_local10, id:_arg7}); } public function moveSelectedCharacter(_arg1:Event){ var _local2:Point; _local2 = new Point(stage.mouseX, stage.mouseY); _local2 = selectedCharacter.clip.parent.globalToLocal(_local2); selectedCharacter.clip.x = (selectedCharacter.clip.destX = _local2.x); } public function updateBackground(_arg1:Event=null){ var _local2:int; var _local3:Boolean; var _local4:Object; var _local5:Object; var _local6:Number; var _local7:Number; var _local8:Rectangle; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:int; var _local14:MovieClip; var _local15:MovieClip; bgTimer++; if ((((menuMode == COMPARE_MENU)) || ((menuMode == HEIGHT_MENU)))){ _local4 = null; if (menuMode == COMPARE_MENU){ if (selectedCharacter.height > secondaryCharacter.height){ _local4 = selectedCharacter; } else { _local4 = secondaryCharacter; }; } else { _local6 = 0; _local2 = 0; while (_local2 < characters.length) { _local5 = characters[_local2]; if (!_local5.clip.visible){ } else { if (_local6 < _local5.height){ _local6 = _local5.height; _local4 = _local5; }; }; _local2++; }; }; _local7 = (_local4.clip.height / _local4.clip.scaleY); _local6 = (_local4.clip.destW * _local7); _local8 = (_local4.clip as MovieClip).getBounds((_local4.clip as MovieClip)); _local9 = (Math.abs(_local8.top) / _local8.height); _local10 = (_local6 / (_local4.height / _local9)); _local11 = (_local10 / BG_HLINES_PER_HEIGHT); _local12 = 0; _local13 = 0; _local2 = 0; while (_local2 < bgHeightLines.length) { if (((bgHeightLines[_local2]) && (bgHeightLines[_local2].visible))){ _local12 = (_local2 * _local11); _local13++; } else { break; }; _local2++; }; (_local11 * (bgHeightLines.length - 1)); if ((((_local12 < _local6)) && (!((bgTimer % BG_HLINE_TIMER))))){ _local14 = bgHeightLines[_local13]; if (!_local14){ if (!(bgHeightLines.length % BG_HLINES_PER_HEIGHT)){ _local14 = createHeightLine(BG_HLINE_FLOOR_THICKNESS); } else { if ((bgHeightLines.length % 2)){ _local14 = createHeightLine(BG_HLINE_MID_THICKNESS); } else { _local14 = createHeightLine(BG_HLINE_THICKNESS); }; }; _local14.visible = false; BG_HLINE_CLIP.addChild(_local14); bgHeightLines[bgHeightLines.length] = _local14; }; _local14.destX = 0; _local14.destY = (_local4.clip.destY - (bgHeightLines.length * _local11)); _local14.leave = false; _local14.proportion = DEFAULT_PROPORTION; if (!_local14.visible){ _local14.x = stage.stageWidth; _local14.y = _local14.destY; _local14.visible = true; }; }; _local2 = 0; while (_local2 < _local13) { bgHeightLines[_local2].destX = 0; bgHeightLines[_local2].destY = Math.floor((_local4.clip.y - (_local2 * _local11))); _local2++; }; } else { _local13 = 0; _local2 = 0; while (_local2 < bgHeightLines.length) { if (((((bgHeightLines[_local2]) && (bgHeightLines[_local2].visible))) && (!(bgHeightLines[_local2].leave)))){ _local13++; } else { break; }; _local2++; }; if (((_local13) && (!((bgTimer % BG_HLINE_TIMER))))){ _local15 = bgHeightLines[(_local13 - 1)]; _local15.leave = true; _local15.proportion = LEAVE_PROPORTION; _local15.destX = -(stage.stageWidth); }; }; _local3 = false; _local2 = 0; while (_local2 < BG_NUM_COLORS) { if (bgColors[_local2] != BG_COLORS[menuMode][_local2]){ bgColors[_local2] = adjustColor(bgColors[_local2], BG_COLORS[menuMode][_local2], BG_COLOR_CHANGE_SPEED); _local3 = true; }; _local2++; }; if (_local3){ drawBackground(); }; } public function adjustColor(_arg1:uint, _arg2:uint, _arg3:uint=2):uint{ var _local4:uint; var _local5:uint; var _local6:uint; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:uint; var _local14:uint; var _local15:uint; _local4 = ((_arg1 & 4278190080) >> 24); _local5 = ((_arg1 & 0xFF0000) >> 16); _local6 = ((_arg1 & 0xFF00) >> 8); _local7 = (_arg1 & 0xFF); _local8 = ((_arg2 & 4278190080) >> 24); _local9 = ((_arg2 & 0xFF0000) >> 16); _local10 = ((_arg2 & 0xFF00) >> 8); _local11 = (_arg2 & 0xFF); if ((_local4 + _arg3) < _local8){ _local12 = (_local4 + _arg3); } else { if ((_local4 - _arg3) > _local8){ _local12 = (_local4 - _arg3); } else { _local12 = _local8; }; }; if ((_local5 + _arg3) < _local9){ _local13 = (_local5 + _arg3); } else { if ((_local5 - _arg3) > _local9){ _local13 = (_local5 - _arg3); } else { _local13 = _local9; }; }; if ((_local6 + _arg3) < _local10){ _local14 = (_local6 + _arg3); } else { if ((_local6 - _arg3) > _local10){ _local14 = (_local6 - _arg3); } else { _local14 = _local10; }; }; if ((_local7 + _arg3) < _local11){ _local15 = (_local7 + _arg3); } else { if ((_local7 - _arg3) > _local11){ _local15 = (_local7 - _arg3); } else { _local15 = _local11; }; }; return (((((_local12 << 24) | (_local13 << 16)) | (_local14 << 8)) | _local15)); } public function loadCompareMenu(_arg1:Event=null){ var _local2:MovieClip; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Object; var _local11:Object; var _local12:Number; var _local13:Number; var _local14:Rectangle; _local2 = null; if (_arg1){ _local2 = (_arg1.currentTarget as MovieClip); }; if (_local2){ secondaryCharacter = getCharacterByClip(characters, _local2); }; if (menuMode == COMPARE_LIST_MENU){ _local3 = ((Math.PI * 2) / clips.length); _local4 = (stage.stageWidth + stage.stageHeight); _local5 = (stage.stageWidth * 0.5); _local6 = (stage.stageHeight * 0.5); i = 0; while (i < clips.length) { _local7 = (i * _local3); clips[i].removeEventListener("mouseDown", loadCompareMenu); clips[i].leave = true; clips[i].proportion = LEAVE_PROPORTION; names[i].leave = true; names[i].proportion = LEAVE_PROPORTION; clips[i].destX = (_local5 - (Math.cos(_local7) * _local4)); clips[i].destY = (_local6 - (Math.sin(_local7) * _local4)); names[i].destX = (_local5 + (Math.cos((_local7 + Math.PI)) * _local4)); names[i].destY = (_local6 + (Math.sin((_local7 + Math.PI)) * _local4)); i++; }; }; selectedCharacter.clip.leave = false; secondaryCharacter.clip.leave = false; selectedCharacter.clip.proportion = DEFAULT_PROPORTION; secondaryCharacter.clip.proportion = DEFAULT_PROPORTION; _local8 = (stage.stageWidth - (2 * MARGIN)); _local9 = ((stage.stageHeight - (5 * MARGIN)) - BUTTON_HEIGHT); setGrid(MARGIN, MARGIN, 2, _local8, _local9, MARGIN, [selectedCharacter.clip, secondaryCharacter.clip]); if (selectedCharacter.height > secondaryCharacter.height){ _local10 = selectedCharacter; _local11 = secondaryCharacter; } else { _local10 = secondaryCharacter; _local11 = selectedCharacter; }; _local12 = (_local10.clip.height / _local10.clip.scaleY); _local13 = (_local9 / _local12); _local10.clip.destW = (_local10.clip.destH = _local13); compareCharacterHeights(_local10, _local11); _local10.clip.destY = ((stage.stageHeight - (4 * MARGIN)) - BUTTON_HEIGHT); _local11.clip.destY = _local10.clip.destY; backBtn.leave = false; backBtn.proportion = DEFAULT_PROPORTION; backBtn.destX = ((stage.stageWidth - MARGIN) - BUTTON_WIDTH); backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); if (!backBtn.visible){ backBtn.x = stage.stageWidth; backBtn.y = backBtn.destY; backBtn.visible = true; }; heightChartBtn.leave = false; heightChartBtn.proportion = DEFAULT_PROPORTION; heightChartBtn.destX = ((backBtn.destX - BUTTON_WIDTH) - MARGIN); heightChartBtn.destY = backBtn.destY; if (!heightChartBtn.visible){ heightChartBtn.x = stage.stageWidth; heightChartBtn.y = heightChartBtn.destY; heightChartBtn.visible = true; }; menuMode = COMPARE_MENU; updateSize(); _local14 = getDestinationBox(selectedCharacter.clip); selectedCharacter.textBox.leave = false; selectedCharacter.textBox.proportion = DEFAULT_PROPORTION; selectedCharacter.textBox.destX = ((_local14.x + (_local14.width * 0.5)) - (selectedCharacter.textBox.width * 0.5)); selectedCharacter.textBox.destY = _local14.bottom; if (!selectedCharacter.textBox.visible){ selectedCharacter.textBox.x = selectedCharacter.textBox.destX; selectedCharacter.textBox.y = stage.stageHeight; selectedCharacter.textBox.visible = true; }; _local14 = getDestinationBox(secondaryCharacter.clip); secondaryCharacter.textBox.leave = false; secondaryCharacter.textBox.proportion = DEFAULT_PROPORTION; secondaryCharacter.textBox.destX = ((_local14.x + (_local14.width * 0.5)) - (secondaryCharacter.textBox.width * 0.5)); secondaryCharacter.textBox.destY = _local14.bottom; if (!secondaryCharacter.textBox.visible){ secondaryCharacter.textBox.x = secondaryCharacter.textBox.destX; secondaryCharacter.textBox.y = stage.stageHeight; secondaryCharacter.textBox.visible = true; }; } public function centerText(_arg1:TextField, _arg2:Number, _arg3:Number):void{ _arg1.y = (((_arg3 - _arg2) - _arg1.textHeight) * 0.5); } public function drawArrow(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number=0, _arg5:Number=0.75){ var _local6:Graphics; var _local7:Array; var _local8:Matrix; _local6 = _arg1.graphics; _local7 = [new Point((_arg2 * _arg5), 0), new Point((-(_arg2) * (1 - _arg5)), (_arg3 * 0.5)), new Point(0, 0), new Point((-(_arg2) * (1 - _arg5)), (-(_arg3) * 0.5))]; _local8 = new Matrix(); _local8.rotate(_arg4); _local7[0] = _local8.transformPoint(_local7[0]); _local7[1] = _local8.transformPoint(_local7[1]); _local7[2] = _local8.transformPoint(_local7[2]); _local7[3] = _local8.transformPoint(_local7[3]); _local6.moveTo(_local7[0].x, _local7[0].y); _local6.lineTo(_local7[1].x, _local7[1].y); _local6.lineTo(_local7[2].x, _local7[2].y); _local6.lineTo(_local7[3].x, _local7[3].y); _local6.lineTo(_local7[0].x, _local7[0].y); } public function sliderDragged(_arg1:Event){ var _local2:MovieClip; var _local3:MovieClip; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = selectedCharacter.box; _local3 = _local2.slider; _local3.y = (_local2.mouseY - (SLIDER_HEIGHT * 0.5)); _local3.y = Math.min((_local2.down.y - (SLIDER_HEIGHT * 0.5)), _local3.y); _local3.y = Math.max((_local2.up.y - (SLIDER_HEIGHT * 0.5)), _local3.y); _local4 = (_local2.down.y - (SLIDER_HEIGHT * 0.5)); _local5 = (_local2.up.y - (SLIDER_HEIGHT * 0.5)); _local6 = ((_local3.y - _local5) / (_local4 - _local5)); if (_local2.up.y >= _local2.down.y){ _local6 = 0; }; _local2.desc_txt.scrollV = Math.floor((_local6 * _local2.desc_txt.maxScrollV)); } public function loadCompareListMenu(_arg1:Event=null){ var _local2:int; var _local3:Rectangle; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; secondaryCharacter = null; if (menuMode == CHARACTER_MENU){ selectedCharacter.box.leave = true; selectedCharacter.box.destX = stage.stageWidth; selectedCharacter.box.destY = MARGIN; compareBtn.leave = true; compareBtn.destX = (stage.stageWidth + BUTTON_WIDTH); compareBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); }; if (((selectedCharacter) && (selectedCharacter.textBox.visible))){ selectedCharacter.textBox.leave = true; selectedCharacter.textBox.destX = stage.stageWidth; selectedCharacter.textBox.destY = MARGIN; }; _local4 = ((stage.stageWidth - (MARGIN * 3)) * 0.5); clips.length = 0; names.length = 0; _local5 = ((Math.PI * 2) / (characters.length - 1)); _local7 = (stage.stageWidth + stage.stageHeight); _local8 = (stage.stageWidth * 0.5); _local9 = (stage.stageHeight * 0.5); _local2 = 0; while (_local2 < characters.length) { if (characters[_local2] == selectedCharacter){ } else { characters[_local2].clip.addEventListener("mouseDown", loadCompareMenu, false, 0, true); clips[clips.length] = characters[_local2].clip; names[names.length] = characters[_local2].textBox; characters[_local2].clip.leave = false; characters[_local2].clip.proportion = DEFAULT_PROPORTION; characters[_local2].textBox.leave = false; characters[_local2].textBox.proportion = DEFAULT_PROPORTION; }; _local2++; }; setGrid(((MARGIN * 2) + _local4), MARGIN, Math.ceil((0.5 * Math.sqrt(clips.length))), _local4, (stage.stageHeight - (MARGIN * 2)), MARGIN, clips); _local2 = 0; while (_local2 < names.length) { _local3 = getDestinationBox(clips[_local2]); names[_local2].destX = ((_local3.x + (_local3.width * 0.5)) - (names[_local2].width * 0.5)); names[_local2].destY = _local3.bottom; if (!names[_local2].visible){ _local6 = (_local2 * _local5); characters[_local2].x = (_local8 - (Math.cos(_local6) * _local7)); characters[_local2].y = (_local9 - (Math.sin(_local6) * _local7)); names[_local2].visible = true; }; _local2++; }; _local2 = 0; while (_local2 < clips.length) { if (!clips[_local2].visible){ _local6 = (_local2 * _local5); clips[_local2].x = (_local8 + (Math.cos(_local6) * _local7)); clips[_local2].y = (_local9 + (Math.sin(_local6) * _local7)); clips[_local2].scaleX = clips[_local2].destW; clips[_local2].scaleY = clips[_local2].destH; clips[_local2].visible = true; }; _local2++; }; backBtn.leave = false; backBtn.proportion = DEFAULT_PROPORTION; backBtn.destX = ((MARGIN + _local4) - BUTTON_WIDTH); backBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT); if (!backBtn.visible){ backBtn.x = stage.stageWidth; backBtn.y = backBtn.destY; backBtn.visible = true; }; heightChartBtn.leave = false; heightChartBtn.proportion = DEFAULT_PROPORTION; heightChartBtn.destX = ((backBtn.destX - BUTTON_WIDTH) - MARGIN); heightChartBtn.destY = backBtn.destY; if (!heightChartBtn.visible){ heightChartBtn.x = stage.stageWidth; heightChartBtn.y = heightChartBtn.destY; heightChartBtn.visible = true; }; menuMode = COMPARE_LIST_MENU; updateSize(); } public function drawBackground(_arg1:Event=null){ var _local2:Graphics; var _local3:Matrix; var _local4:int; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:int; var _local13:Bitmap; _local2 = BACKGROUND.graphics; _local3 = new Matrix(); _local3.createGradientBox(stage.stageWidth, stage.stageHeight, BG_ROTATION); _local2.clear(); _local2.beginGradientFill(GradientType.LINEAR, bgColors, BG_ALPHAS, BG_RATIOS, _local3, SpreadMethod.REFLECT); _local2.drawRect(0, 0, stage.stageWidth, stage.stageHeight); _local2.endFill(); _local8 = Math.sin(BG_LINE_ANGLE); _local9 = Math.cos(BG_LINE_ANGLE); _local10 = (_local8 * stage.stageHeight); _local11 = ((stage.stageWidth + _local10) + (2 * BG_LINE_CURVE)); _local12 = Math.ceil((_local11 / BG_LINE_SEPARATION)); _local2.lineStyle(BG_LINE_THICKNESS, bgLineColor, BG_LINE_ALPHA); _local4 = 0; while (_local4 < _local12) { _local6 = ((_local4 * BG_LINE_SEPARATION) - BG_LINE_CURVE); _local7 = (_local6 - _local10); _local5 = 1; _local2.moveTo(_local6, 0); _local2.curveTo((((_local6 + _local7) * 0.5) + (((2 * BG_LINE_CURVE) * _local9) * _local5)), ((stage.stageHeight * 0.5) + (((2 * BG_LINE_CURVE) * _local8) * _local5)), _local7, stage.stageHeight); _local4++; }; _local4 = 0; while (_local4 < bgHeightLines.length) { _local13 = (bgHeightLines[_local4].getChildAt(0) as Bitmap); _local13.width = stage.stageWidth; _local4++; }; } public function swap(_arg1:Array, _arg2:int, _arg3:int):void{ var _local4:*; _local4 = _arg1[_arg2]; _arg1[_arg2] = _arg1[_arg3]; _arg1[_arg3] = _local4; } public function dropSelectedCharacter(_arg1:Event){ var _local2:int; var _local3:MovieClip; var _local4:int; var _local5:int; var _local6:Rectangle; var _local7:Number; var _local8:Rectangle; var _local9:Number; stage.removeEventListener("mouseMove", moveSelectedCharacter); stage.removeEventListener("mouseUp", dropSelectedCharacter); _local3 = selectedCharacter.clip; _local4 = -1; _local2 = 0; while (_local2 < clips.length) { if (clips[_local2] == _local3){ _local4 = _local2; break; }; _local2++; }; if (_local4 < 0){ return; }; clips.splice(_local4, 1); names.splice(_local4, 1); _local5 = 0; _local6 = getDestinationBox(_local3); _local7 = (_local6.x + (_local6.width * 0.5)); _local2 = 0; while (_local2 < clips.length) { _local8 = getDestinationBox(clips[_local2]); _local9 = (_local8.x + (_local8.width * 0.5)); if (_local7 >= _local9){ _local5 = (_local2 + 1); }; _local2++; }; clips.splice(_local5, 0, _local3); names.splice(_local5, 0, selectedCharacter.textBox); if (_local4 != _local5){ _local3.filters = []; selectedCharacter = null; }; setHeightChartPos(null); } public function makeIntoItem(_arg1:MovieClip){ _arg1.sVX = (_arg1.sVY = 0); _arg1.vX = (_arg1.vY = 0); _arg1.vA = 0; _arg1.destX = (_arg1.destY = 0); _arg1.destH = (_arg1.destW = 1); _arg1.destA = 1; _arg1.proportion = DEFAULT_PROPORTION; _arg1.accelerate = false; _arg1.leave = false; _arg1.proportion = DEFAULT_PROPORTION; _arg1.addEventListener(Event.ADDED_TO_STAGE, itemAdded, false, 0, true); _arg1.addEventListener(Event.REMOVED_FROM_STAGE, itemRemoved, false, 0, true); } public function itemAdded(_arg1:Event){ var _local2:MovieClip; _local2 = (_arg1.currentTarget as MovieClip); items.push(_local2); } public function sliderDropped(_arg1:Event){ stage.removeEventListener("mouseMove", sliderDragged); stage.removeEventListener("mouseUp", sliderDropped); } public function selectCharacter(_arg1:Event){ var _local2:MovieClip; var _local3:int; var _local4:int; var _local5:int; _local2 = (_arg1.currentTarget as MovieClip); if (!_local2){ return; }; if (selectedCharacter == null){ selectedCharacter = getCharacterByClip(characters, _local2); _local2.filters = [new GlowFilter(selectedCharacter.color, 32, 32, 1, 2)]; stage.addEventListener("mouseMove", moveSelectedCharacter); stage.addEventListener("mouseUp", dropSelectedCharacter); trace("Display selected character somehow"); } else { if (selectedCharacter){ selectedCharacter.clip.filters = []; trace("Remove character selection display"); }; _local3 = 0; while (_local3 < clips.length) { if (clips[_local3] == _local2){ _local4 = _local3; }; if (clips[_local3] == selectedCharacter.clip){ _local5 = _local3; }; _local3++; }; swap(clips, _local4, _local5); swap(names, _local4, _local5); updateSize(); setHeightChartPos(); selectedCharacter = null; }; } public function loadMainMenu(_arg1:Event=null){ var _local2:TextField; var _local3:TextFormat; var _local4:int; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Rectangle; if (menuMode == WORLD_MENU){ _local5 = ((Math.PI * 2) / clips.length); _local6 = (stage.stageWidth + stage.stageHeight); _local8 = (stage.stageWidth * 0.5); _local9 = (stage.stageHeight * 0.5); _local4 = 0; while (_local4 < clips.length) { _local7 = (_local4 * _local5); clips[_local4].removeEventListener("mouseDown", loadCharacterMenu); clips[_local4].leave = true; clips[_local4].proportion = LEAVE_PROPORTION; names[_local4].leave = true; names[_local4].proportion = LEAVE_PROPORTION; clips[_local4].destX = (_local8 - (Math.cos(_local7) * _local6)); clips[_local4].destY = (_local9 - (Math.sin(_local7) * _local6)); names[_local4].destX = (_local8 + (Math.cos((_local7 + Math.PI)) * _local6)); names[_local4].destY = (_local9 + (Math.sin((_local7 + Math.PI)) * _local6)); _local4++; }; backBtn.leave = true; backBtn.destX = stage.stageWidth; heightChartBtn.leave = true; heightChartBtn.destX = (stage.stageWidth + BUTTON_WIDTH); }; copyClip.leave = false; copyClip.visible = true; copyClip.destX = (stage.stageWidth - copyClip.width); copyClip.destY = (stage.stageHeight - copyClip.height); menuTitle.destX = (menuTitle.destY = 0); _local2 = (menuTitle.getChildAt(0) as TextField); _local3 = new TextFormat(); _local3.color = 0; _local2.defaultTextFormat = _local3; _local2.text = "Doom the wolf's characters"; _local2 = (menuTitle.getChildAt(1) as TextField); _local3.color = 0x444444; _local2.defaultTextFormat = _local3; _local2.text = "Doom the wolf's characters"; doomWorldBtn.destX = MENU_SIDE_MARGIN; doomWorldBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); amberWorldBtn.destX = ((stage.stageWidth - MENU_SIDE_MARGIN) - (((stage.stageWidth - (MENU_SIDE_MARGIN * 2)) - MARGIN) * 0.5)); amberWorldBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); otherWorldBtn.destX = MENU_SIDE_MARGIN; otherWorldBtn.destY = (((stage.stageHeight - MENU_TITLE_HEIGHT) - MARGIN) - MENU_OTHER_HEIGHT); menuTitle.leave = false; menuTitle.proportion = DEFAULT_PROPORTION; if (!menuTitle.visible){ menuTitle.x = 0; menuTitle.y = -(MENU_TITLE_HEIGHT); menuTitle.visible = true; }; doomWorldBtn.leave = false; doomWorldBtn.proportion = DEFAULT_PROPORTION; if (!doomWorldBtn.visible){ doomWorldBtn.x = -(doomWorldBtn.width); doomWorldBtn.y = doomWorldBtn.destY; doomWorldBtn.visible = true; }; amberWorldBtn.leave = false; amberWorldBtn.proportion = DEFAULT_PROPORTION; if (!amberWorldBtn.visible){ amberWorldBtn.x = stage.stageWidth; amberWorldBtn.y = amberWorldBtn.destY; amberWorldBtn.visible = true; }; otherWorldBtn.leave = false; otherWorldBtn.proportion = DEFAULT_PROPORTION; if (!otherWorldBtn.visible){ otherWorldBtn.x = otherWorldBtn.destX; otherWorldBtn.y = stage.stageHeight; otherWorldBtn.visible = true; }; menuMode = MAIN_MENU; updateSize(); } public function compareCharacterHeights(_arg1:Object, _arg2:Object){ var _local3:Rectangle; var _local4:Number; var _local5:Rectangle; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; _local3 = (_arg1.clip as MovieClip).getBounds((_arg1.clip as MovieClip)); _local4 = (Math.abs(_local3.top) / _local3.height); _local5 = (_arg2.clip as MovieClip).getBounds((_arg2.clip as MovieClip)); _local6 = (Math.abs(_local5.top) / _local5.height); _local7 = (_arg1.clip.height / _arg1.clip.scaleY); _local8 = (_local7 * _arg1.clip.destH); _local9 = ((_local8 * _local4) / _arg1.height); _local10 = (_local9 * (_arg2.height / _local6)); _local11 = (_arg2.clip.height / _arg2.clip.scaleY); _local12 = (_local10 / _local11); _arg2.clip.destW = (_arg2.clip.destH = _local12); } public function itemRemoved(_arg1:Event){ var _local2:MovieClip; var _local3:int; _local2 = (_arg1.currentTarget as MovieClip); _local2.leave = false; _local2.proportion = DEFAULT_PROPORTION; _local3 = 0; while (_local3 < items.length) { if (items[_local3] == _local2){ items.splice(_local3, 1); }; _local3++; }; } public function loadWorldMenu(_arg1:Event=null){ var _local2:MovieClip; var _local3:TextFormat; var _local4:TextField; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Rectangle; _local2 = null; if (_arg1 != null){ _local2 = (_arg1.currentTarget as MovieClip); }; _local3 = new TextFormat(); switch (_local2){ case doomWorldBtn: worldMode = DOOM_WORLD; _local3.color = DOOM_WORLD_COLORS[0]; break; case amberWorldBtn: worldMode = AMBER_WORLD; _local3.color = AMBER_WORLD_COLORS[0]; break; case otherWorldBtn: worldMode = OTHER_WORLD; _local3.color = OTHER_WORLD_COLORS[0]; break; }; copyClip.leave = true; copyClip.destX = stage.stageWidth; if (doomWorldBtn.visible){ doomWorldBtn.destX = -(doomWorldBtn.width); amberWorldBtn.destX = stage.stageWidth; otherWorldBtn.destY = stage.stageHeight; doomWorldBtn.leave = true; amberWorldBtn.leave = true; otherWorldBtn.leave = true; }; if (menuMode == CHARACTER_MENU){ selectedCharacter.box.leave = true; selectedCharacter.box.destX = stage.stageWidth; selectedCharacter = null; compareBtn.leave = true; compareBtn.destX = (stage.stageWidth + BUTTON_WIDTH); }; if (menuMode == HEIGHT_MENU){ if (selectedCharacter != null){ stage.removeEventListener("mouseMove", moveSelectedCharacter); stage.removeEventListener("mouseUp", dropSelectedCharacter); selectedCharacter.clip.filters = []; }; _local5 = 0; while (_local5 < clips.length) { clips[_local5].removeEventListener("mouseDown", selectCharacter); clips[_local5].removeEventListener(MouseEvent.DOUBLE_CLICK, loadCharacterMenu); _local5++; }; stage.removeEventListener("mouseMove", setHeightChartPos); allBtn.destX = (otherBtn.destX = (amberBtn.destX = (doomBtn.destX = stage.stageWidth))); allBtn.destY = (otherBtn.destY = (amberBtn.destY = (doomBtn.destY = ((stage.stageHeight - MARGIN) - BUTTON_HEIGHT)))); allBtn.leave = (otherBtn.leave = (amberBtn.leave = (doomBtn.leave = true))); if (selectedCharacter){ trace("Remove character selection display"); }; selectedCharacter = null; viewAllBtn.leave = true; viewAllBtn.destX = -(BUTTON_WIDTH); viewAllBtn.destY = (MENU_TITLE_HEIGHT + MARGIN); if (viewAll){ setViewAll(); }; }; _local4 = (menuTitle.getChildAt(1) as TextField); _local4.defaultTextFormat = _local3; _local4.text = worldMode; _local4.width = stage.stageWidth; _local4 = (menuTitle.getChildAt(0) as TextField); _local3.color = 0; _local4.defaultTextFormat = _local3; _local4.text = worldMode; _local4.width = stage.stageWidth; menuTitle.destX = (menuTitle.destY = 0); menuTitle.leave = false; menuTitle.proportion = DEFAULT_PROPORTION; if (!menuTitle.visible){ menuTitle.y = -(MENU_TITLE_HEIGHT); menuTitle.x = 0; menuTitle.visible = true; }; backBtn.destX = ((stage.stageWidth - BUTTON_WIDTH) - MARGIN); backBtn.destY = ((stage.stageHeight - BUTTON_HEIGHT) - MARGIN); backBtn.leave = false; backBtn.proportion = DEFAULT_PROPORTION; if (!backBtn.visible){ backBtn.x = stage.stageWidth; backBtn.y = backBtn.destY; backBtn.visible = true; }; heightChartBtn.destX = (stage.stageWidth - ((BUTTON_WIDTH + MARGIN) * 2)); heightChartBtn.destY = ((stage.stageHeight - BUTTON_HEIGHT) - MARGIN); heightChartBtn.leave = false; heightChartBtn.proportion = DEFAULT_PROPORTION; if (!heightChartBtn.visible){ heightChartBtn.x = (stage.stageWidth + BUTTON_WIDTH); heightChartBtn.y = heightChartBtn.destY; heightChartBtn.visible = true; }; if (PARENT.getChildIndex(backBtn) < PARENT.getChildIndex(heightChartBtn)){ PARENT.swapChildren(backBtn, heightChartBtn); }; clips.length = 0; names.length = 0; _local5 = 0; while (_local5 < characters.length) { if ((((worldMode == ALL_WORLD)) || ((characters[_local5].world == worldMode)))){ clips[clips.length] = characters[_local5].clip; names[names.length] = characters[_local5].textBox; }; _local5++; }; setGrid(MENU_SIDE_MARGIN, MENU_TITLE_HEIGHT, Math.ceil(Math.sqrt(clips.length)), (stage.stageWidth - (2 * MENU_SIDE_MARGIN)), (stage.stageHeight - (2 * MENU_TITLE_HEIGHT)), (MARGIN * 2), clips); _local6 = ((Math.PI * 2) / clips.length); _local7 = (stage.stageWidth + stage.stageHeight); _local9 = (stage.stageWidth * 0.5); _local10 = (stage.stageHeight * 0.5); _local5 = 0; while (_local5 < clips.length) { clips[_local5].leave = false; clips[_local5].proportion = DEFAULT_PROPORTION; clips[_local5].addEventListener("mouseDown", loadCharacterMenu, false, 0, true); names[_local5].leave = false; names[_local5].proportion = DEFAULT_PROPORTION; if (!clips[_local5].visible){ _local8 = (_local5 * _local6); clips[_local5].x = (_local9 + (Math.cos(_local8) * _local7)); clips[_local5].y = (_local10 + (Math.sin(_local8) * _local7)); clips[_local5].scaleX = clips[_local5].destW; clips[_local5].scaleY = clips[_local5].destH; clips[_local5].visible = true; }; _local11 = getDestinationBox(clips[_local5]); names[_local5].destX = ((_local11.x + (_local11.width * 0.5)) - (names[_local5].width * 0.5)); names[_local5].destY = _local11.bottom; if (!names[_local5].visible){ _local8 = ((_local5 * _local6) + Math.PI); names[_local5].x = (_local9 + (Math.cos(_local8) * _local7)); names[_local5].y = (_local10 + (Math.sin(_local8) * _local7)); names[_local5].visible = true; }; _local5++; }; menuMode = WORLD_MENU; updateSize(); } public function getDestinationBox(_arg1:MovieClip):Rectangle{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Rectangle; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local2 = (_arg1.width / _arg1.scaleX); _local3 = (_arg1.height / _arg1.scaleY); _local4 = (_arg1.destH * _local3); _local5 = (_arg1.destW * _local2); _local6 = _arg1.getRect(_arg1); _local7 = (-(_local6.left) / (_local6.right - _local6.left)); _local8 = (-(_local6.top) / (_local6.bottom - _local6.top)); if (_local6.right == _local6.left){ _local7 = 0; }; if (_local6.top == _local6.bottom){ _local8 = 0; }; _local9 = (_local7 * _local5); _local10 = (_local8 * _local4); return (new Rectangle((_arg1.destX - _local9), (_arg1.destY - _local10), _local5, _local4)); } public function getCharacterByName(_arg1:Array, _arg2:String){ var _local3:int; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3].name == _arg2){ return (_arg1[_local3]); }; _local3++; }; return (null); } public function createHeightLine(_arg1:uint):MovieClip{ var _local2:MovieClip; var _local3:Bitmap; _local2 = new MovieClip(); makeIntoItem(_local2); _local2.cacheAsBitmap = true; _local3 = new Bitmap(BG_HLINE_BITMAPDATA); _local3.height = _arg1; _local3.width = stage.stageWidth; _local2.addChild(_local3); return (_local2); } public function drawBox(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:Array, _arg6:Number=0):void{ var _local7:Graphics; var _local8:Array; var _local9:Array; var _local10:int; var _local11:Matrix; var _local12:Number; var _local13:Number; var _local14:Number; _local7 = _arg1.graphics; _local8 = []; _local9 = []; _local10 = 0; while (_local10 < _arg5.length) { _local8[_local10] = ((0xFF * Number(_local10)) / (_arg5.length - 1)); _local9[_local10] = 1; _local10++; }; if (_arg5.length == 1){ _local8[0] = 0; }; _local11 = new Matrix(); _local11.createGradientBox(_arg2, _arg3, _arg6, 0, 0); _local7.beginGradientFill("linear", _arg5, _local9, _local8, _local11, SpreadMethod.REFLECT); _local7.drawRoundRect(0, 0, _arg2, _arg3, _arg4); _local7.endFill(); _local11 = new Matrix(); _local12 = 0.65; _local13 = (_arg4 * 0.25); _local11.createGradientBox((_arg2 - (2 * _local13)), (_arg3 * _local12), (Math.PI * 0.5), 0, (_arg3 * (1 - _local12))); _local7.beginGradientFill("linear", [0, 0, 0], [0.35, 0.1, 0], [0, 50, 0xFF], _local11, SpreadMethod.REFLECT); _local7.drawRoundRect(_local13, (_arg3 * 0.35), (_arg2 - (2 * _local13)), (_arg3 * _local12), (_arg4 * 2), (_arg4 * 2)); _local7.endFill(); _local14 = 0.15; _local7.beginFill(0xFFFFFF, 0.75); _local7.drawRoundRect(_local13, 0, (_arg2 - (2 * _local13)), (_local14 * _arg3), _arg4, (_arg4 * 0.5)); _local7.endFill(); _local7.beginFill(0xFFFFFF, 0.33); _local7.moveTo(_local13, _arg4); _local7.curveTo((_local13 + (_arg4 * 2)), (_arg3 * 0.5), _local13, (_arg3 - _arg4)); _local7.endFill(); } public function characterColors(_arg1:Object):Array{ var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; var _local6:Number; var _local7:uint; var _local8:uint; _local2 = _arg1.color; _local3 = ((_local2 & 0xFF0000) >> 16); _local4 = ((_local2 & 0xFF00) >> 8); _local5 = (_local2 & 0xFF); _local6 = 102; _local7 = (((Math.max((_local3 - _local6), 68) << 16) | (Math.max((_local4 - _local6), 68) << 8)) | Math.max((_local5 - _local6), 68)); _local8 = (((Math.min((_local3 + _local6), 0xFF) << 16) | (Math.min((_local4 + _local6), 0xFF) << 8)) | Math.min((_local5 + _local6), 0xFF)); return ([_local2, _local8, _local7]); } } }//package characterBios_fla
Section 2
//amber (amber) package { import flash.display.*; public dynamic class amber extends MovieClip { } }//package
Section 3
//azalea (azalea) package { import flash.display.*; public dynamic class azalea extends MovieClip { } }//package
Section 4
//celestina (celestina) package { import flash.display.*; public dynamic class celestina extends MovieClip { } }//package
Section 5
//cristina (cristina) package { import flash.display.*; public dynamic class cristina extends MovieClip { } }//package
Section 6
//demonGirl (demonGirl) package { import flash.display.*; public dynamic class demonGirl extends MovieClip { } }//package
Section 7
//doom (doom) package { import flash.display.*; public dynamic class doom extends MovieClip { } }//package
Section 8
//dragonAmber (dragonAmber) package { import flash.display.*; public dynamic class dragonAmber extends MovieClip { } }//package
Section 9
//estella (estella) package { import flash.display.*; public dynamic class estella extends MovieClip { } }//package
Section 10
//liviana (liviana) package { import flash.display.*; public dynamic class liviana extends MovieClip { } }//package
Section 11
//max (max) package { import flash.display.*; public dynamic class max extends MovieClip { } }//package
Section 12
//nieve (nieve) package { import flash.display.*; public dynamic class nieve extends MovieClip { } }//package
Section 13
//pink (pink) package { import flash.display.*; public dynamic class pink extends MovieClip { } }//package
Section 14
//shedoom (shedoom) package { import flash.display.*; public dynamic class shedoom extends MovieClip { } }//package
Section 15
//tania (tania) package { import flash.display.*; public dynamic class tania extends MovieClip { } }//package
Section 16
//valentine (valentine) package { import flash.display.*; public dynamic class valentine extends MovieClip { } }//package
Section 17
//werewolf (werewolf) package { import flash.display.*; public dynamic class werewolf extends MovieClip { } }//package
Section 18
//violet (violet) package { import flash.display.*; public dynamic class violet extends MovieClip { } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {demonGirl}Uses:1
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClip {nieve}Uses:3
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClip {werewolf}Uses:5
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip {celestina}Uses:7
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip {azalea}Uses:9
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {tania}Uses:11
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClip {pink}Uses:13
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClip {dragonAmber}Uses:15
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClip {amber}Uses:17
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClip {violet}Uses:19
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {estella}Uses:21
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {valentine}Uses:23
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClip {max}Uses:25
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClip {doom}Uses:27
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClip {shedoom}Uses:29
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip {liviana}Uses:31
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClip {cristina}Uses:33

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.




http://swfchan.com/33/163205/info.shtml
Created: 19/10 -2018 22:20:48 Last modified: 19/10 -2018 22:20:48 Server time: 30/04 -2024 00:32:26