Frame 1
kv_v = {c:335, a:0, da:["distralytics.com", "distralytics.co.uk"]};
kv_v.i = 0;
while (kv_v.i < kv_v.da.length) {
System.security.allowDomain(kv_v.da[kv_v.i], (kv_v.c + ".c.") + kv_v.da[kv_v.i], "*." + kv_v.da[kv_v.i]);
kv_v.i++;
}
kv_v.lc = function () {
var _local1 = ((("http://" + kv_v.c) + ".c.") + kv_v.da[kv_v.a % kv_v.da.length]) + kv_v.lurl;
System.security.allowDomain(_local1);
kv_v.l_mcl.loadClip(_local1, kv_v.t_mc);
};
kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_v.lurl = "/control/tracking/tracker.swf?r=" + Math.floor(Math.random() * 10000);
kv_v.t_mc = createEmptyMovieClip("kv_tracker", -16734);
kv_v.l_mcl = new MovieClipLoader();
kv_v.mcl_l = {onLoadError:function () {
kv_v.a++;
kv_v.lc();
}, onLoadStart:function (m) {
System.security.allowDomain(m._url);
}};
kv_v.l_mcl.addListener(kv_v.mcl_l);
kv_v.lc();
stop();
Frame 4
if (com.games.pencilRacer.apps.VersionChecker.meetsRequirements()) {
gotoAndPlay ("continue");
} else {
gotoAndStop ("versionError");
}
_global.soundPanel.Init();
Instance of Symbol 1054 MovieClip [jSound Panel 1.5.1] "sound" in Frame 4
//component parameters
onClipEvent (construct) {
loadFromXML = false;
searchKey = 79;
sndName_array = [];
sndName_array[0] = "music";
sndName_array[1] = "botSkater_Air";
sndName_array[2] = "botSkater_Imp";
sndName_array[3] = "botSkater_Launch";
sndName_array[4] = "kidSkater_Air";
sndName_array[5] = "kidSkater_Imp";
sndName_array[6] = "kidSkater_Launch";
sndName_array[7] = "monkeySkater_Air";
sndName_array[8] = "monkeySkater_Launch";
sndName_array[9] = "monkeySkater_Imp";
file_array = [];
file_array[0] = "music";
file_array[1] = "botSkater_Air";
file_array[2] = "botSkater_Imp";
file_array[3] = "botSkater_Launch";
file_array[4] = "kidSkater_Air";
file_array[5] = "kidSkater_Imp";
file_array[6] = "kidSkater_Launch";
file_array[7] = "monkeySkater_Air";
file_array[8] = "monkeySkater_Launch";
file_array[9] = "monkeySkater_Imp";
group_array = [];
group_array[0] = "global";
group_array[1] = "global";
group_array[2] = "global";
group_array[3] = "global";
group_array[4] = "global";
group_array[5] = "global";
group_array[6] = "global";
group_array[7] = "global";
group_array[8] = "global";
group_array[9] = "global";
mult_array = [];
mult_array[0] = false;
mult_array[1] = false;
mult_array[2] = false;
mult_array[3] = false;
mult_array[4] = false;
mult_array[5] = false;
mult_array[6] = false;
mult_array[7] = false;
mult_array[8] = false;
mult_array[9] = false;
ext_array = [];
ext_array[0] = false;
ext_array[1] = false;
ext_array[2] = false;
ext_array[3] = false;
ext_array[4] = false;
ext_array[5] = false;
ext_array[6] = false;
ext_array[7] = false;
ext_array[8] = false;
ext_array[9] = false;
isSound_array = [];
isSound_array[0] = false;
isSound_array[1] = true;
isSound_array[2] = true;
isSound_array[3] = true;
isSound_array[4] = true;
isSound_array[5] = true;
isSound_array[6] = true;
isSound_array[7] = true;
isSound_array[8] = true;
isSound_array[9] = true;
radGroupSnd_array = [];
radGroupSnd_array[0] = "_level0.music_mc";
radGroupSnd_array[1] = "_level0.snd_mc";
radGroupSnd_array[2] = "_level0.snd_mc";
radGroupSnd_array[3] = "_level0.snd_mc";
radGroupSnd_array[4] = "_level0.snd_mc";
radGroupSnd_array[5] = "_level0.snd_mc";
radGroupSnd_array[6] = "_level0.snd_mc";
radGroupSnd_array[7] = "_level0.snd_mc";
radGroupSnd_array[8] = "_level0.snd_mc";
radGroupSnd_array[9] = "_level0.snd_mc";
vol_array = [];
vol_array[0] = 100;
vol_array[1] = 100;
vol_array[2] = 100;
vol_array[3] = 100;
vol_array[4] = 120;
vol_array[5] = 100;
vol_array[6] = 100;
vol_array[7] = 120;
vol_array[8] = 100;
vol_array[9] = 100;
loops_array = [];
loops_array[0] = 0;
loops_array[1] = 0;
loops_array[2] = 0;
loops_array[3] = 0;
loops_array[4] = 0;
loops_array[5] = 0;
loops_array[6] = 0;
loops_array[7] = 0;
loops_array[8] = 0;
loops_array[9] = 0;
offset_array = [];
offset_array[0] = 0;
offset_array[1] = 0;
offset_array[2] = 0;
offset_array[3] = 0;
offset_array[4] = 0;
offset_array[5] = 0.1;
offset_array[6] = 0;
offset_array[7] = 0;
offset_array[8] = 4;
offset_array[9] = 0.1;
pan_array = [];
pan_array[0] = 0;
pan_array[1] = 0;
pan_array[2] = 0;
pan_array[3] = 0;
pan_array[4] = 0;
pan_array[5] = 0;
pan_array[6] = 0;
pan_array[7] = 0;
pan_array[8] = 0;
pan_array[9] = 0;
dur_array = [];
dur_array[0] = "undefined";
dur_array[1] = "undefined";
dur_array[2] = "undefined";
dur_array[3] = "undefined";
dur_array[4] = "undefined";
dur_array[5] = "undefined";
dur_array[6] = "undefined";
dur_array[7] = "undefined";
dur_array[8] = "undefined";
dur_array[9] = "undefined";
error_array = [];
error_array[0] = false;
error_array[1] = false;
error_array[2] = false;
error_array[3] = false;
error_array[4] = false;
error_array[5] = false;
error_array[6] = false;
error_array[7] = false;
error_array[8] = false;
error_array[9] = false;
Size_array = [];
Size_array[0] = "undefined";
Size_array[1] = "undefined";
Size_array[2] = "undefined";
Size_array[3] = "undefined";
Size_array[4] = "undefined";
Size_array[5] = "undefined";
Size_array[6] = "undefined";
Size_array[7] = "undefined";
Size_array[8] = "undefined";
Size_array[9] = "undefined";
onDemand_array = [];
onDemand_array[0] = false;
onDemand_array[1] = false;
onDemand_array[2] = false;
onDemand_array[3] = false;
onDemand_array[4] = false;
onDemand_array[5] = false;
onDemand_array[6] = false;
onDemand_array[7] = false;
onDemand_array[8] = false;
onDemand_array[9] = false;
stream_array = [];
stream_array[0] = false;
stream_array[1] = false;
stream_array[2] = false;
stream_array[3] = false;
stream_array[4] = false;
stream_array[5] = false;
stream_array[6] = false;
stream_array[7] = false;
stream_array[8] = false;
stream_array[9] = false;
_searchKey = 635188 /* 0x09B134 */;
}
Frame 29
stop();
Frame 35
Frame 40
stop();
Frame 42
stop();
if (_level0.url_id == undefined) {
alert_mc._visible = false;
}
Frame 43
stop();
Frame 44
stop();
Symbol 70 MovieClip Frame 1
stop();
airAnim = false;
Symbol 70 MovieClip Frame 61
airAnim = true;
Symbol 70 MovieClip Frame 98
stop();
Symbol 70 MovieClip Frame 99
airAnim = false;
Symbol 70 MovieClip Frame 169
gotoAndStop (1);
Symbol 70 MovieClip Frame 170
airAnim = false;
Symbol 245 MovieClip Frame 1
stop();
airAnim = false;
Symbol 245 MovieClip Frame 14
airAnim = true;
Symbol 245 MovieClip Frame 187
stop();
Symbol 245 MovieClip Frame 188
airAnim = false;
Symbol 245 MovieClip Frame 263
gotoAndStop (1);
Symbol 245 MovieClip Frame 264
airAnim = false;
Symbol 245 MovieClip Frame 330
gotoAndStop (1);
Symbol 278 MovieClip Frame 1
stop();
airAnim = false;
Symbol 278 MovieClip Frame 114
airAnim = true;
Symbol 278 MovieClip Frame 227
stop();
Symbol 278 MovieClip Frame 228
airAnim = false;
Symbol 278 MovieClip Frame 298
gotoAndStop (1);
Symbol 278 MovieClip Frame 299
airAnim = false;
Symbol 278 MovieClip Frame 326
gotoAndStop (1);
Symbol 281 MovieClip [TemplateLinePoint] Frame 1
#initclip 258
Object.registerClass("TemplateLinePoint", com.games.pencilRacer.objects.template.TemplateLinePoint);
#endinitclip
stop();
Symbol 283 MovieClip [TemplateWheel] Frame 1
#initclip 253
Object.registerClass("TemplateWheel", com.games.pencilRacer.objects.template.TemplateWheel);
#endinitclip
stop();
Symbol 285 MovieClip [TemplateConstraint] Frame 1
#initclip 254
Object.registerClass("TemplateConstraint", com.games.pencilRacer.objects.template.TemplateConstraint);
#endinitclip
Symbol 287 MovieClip [TemplateAngularConstraint] Frame 1
#initclip 255
Object.registerClass("TemplateAngularConstraint", com.games.pencilRacer.objects.template.TemplateAngularConstraint);
#endinitclip
Instance of Symbol 283 MovieClip [TemplateWheel] "wheelRight" in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "hoodRight" in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0.5;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "center" in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "bedLeft" in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0.5;
}
Instance of Symbol 285 MovieClip [TemplateConstraint] in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "hoodRight";
p2 = "bedLeft";
stiffness = 1;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "wheelLeft" in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 285 MovieClip [TemplateConstraint] in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "wheelRight";
p2 = "wheelLeft";
stiffness = 1;
}
Instance of Symbol 287 MovieClip [TemplateAngularConstraint] in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "hoodRight";
p2 = "wheelRight";
p3 = "center";
stiffness = 0.6;
variation = 3;
}
Instance of Symbol 287 MovieClip [TemplateAngularConstraint] in Symbol 288 MovieClip [BotSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "wheelLeft";
p2 = "bedLeft";
p3 = "center";
stiffness = 0.6;
variation = 3;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "wheelRight" in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "hoodRight" in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0.7;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "center" in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "bedLeft" in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0.7;
}
Instance of Symbol 285 MovieClip [TemplateConstraint] in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "hoodRight";
p2 = "bedLeft";
stiffness = 1;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "wheelLeft" in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 285 MovieClip [TemplateConstraint] in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "wheelRight";
p2 = "wheelLeft";
stiffness = 1;
}
Instance of Symbol 287 MovieClip [TemplateAngularConstraint] in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "hoodRight";
p2 = "wheelRight";
p3 = "center";
stiffness = 0.65;
variation = 3;
}
Instance of Symbol 287 MovieClip [TemplateAngularConstraint] in Symbol 289 MovieClip [KidSkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "wheelLeft";
p2 = "bedLeft";
p3 = "center";
stiffness = 0.65;
variation = 3;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "wheelRight" in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "hoodRight" in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0.5;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "center" in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "bedLeft" in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0.5;
}
Instance of Symbol 285 MovieClip [TemplateConstraint] in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "hoodRight";
p2 = "bedLeft";
stiffness = 1;
}
Instance of Symbol 283 MovieClip [TemplateWheel] "wheelLeft" in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
mass = 1;
friction = 0;
}
Instance of Symbol 285 MovieClip [TemplateConstraint] in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "wheelRight";
p2 = "wheelLeft";
stiffness = 1;
}
Instance of Symbol 287 MovieClip [TemplateAngularConstraint] in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "hoodRight";
p2 = "wheelRight";
p3 = "center";
stiffness = 0.6;
variation = 3;
}
Instance of Symbol 287 MovieClip [TemplateAngularConstraint] in Symbol 290 MovieClip [MonkeySkaterGraphicTemplate] Frame 1
//component parameters
onClipEvent (construct) {
p1 = "wheelLeft";
p2 = "bedLeft";
p3 = "center";
stiffness = 0.6;
variation = 3;
}
Symbol 320 Button
on (release) {
trace("!");
getURL ("http://www.addictinggames.com/spotlight/tmopopup.html", "_blank");
}
Symbol 336 MovieClip [Defaults] Frame 1
#initclip 223
Object.registerClass("Defaults", mx.skins.halo.Defaults);
#endinitclip
Symbol 337 MovieClip [UIObjectExtensions] Frame 1
#initclip 224
Object.registerClass("UIObjectExtensions", mx.core.ext.UIObjectExtensions);
#endinitclip
Symbol 338 MovieClip [UIObject] Frame 1
#initclip 225
Object.registerClass("UIObject", mx.core.UIObject);
#endinitclip
stop();
Symbol 341 Button
on (keyPress "<Tab>") {
this.tabHandler();
}
Symbol 342 MovieClip Frame 1
#initclip 226
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
#endinitclip
Symbol 343 MovieClip [FocusRect] Frame 1
#initclip 227
Object.registerClass("FocusRect", mx.skins.halo.FocusRect);
#endinitclip
Symbol 344 MovieClip [FocusManager] Frame 1
#initclip 228
Object.registerClass("FocusManager", mx.managers.FocusManager);
#endinitclip
stop();
Symbol 345 MovieClip [UIComponentExtensions] Frame 1
#initclip 229
Object.registerClass("UIComponentExtensions", mx.core.ext.UIComponentExtensions);
#endinitclip
Symbol 346 MovieClip [UIComponent] Frame 1
#initclip 230
Object.registerClass("UIComponent", mx.core.UIComponent);
#endinitclip
stop();
Symbol 348 MovieClip [BrdrShdw] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "shadowColor");
Symbol 350 MovieClip [BrdrFace] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "buttonColor");
Symbol 353 MovieClip [BrdrBlk] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "borderColor");
Symbol 355 MovieClip [BrdrHilght] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "highlightColor");
Symbol 358 MovieClip [SimpleButton] Frame 1
#initclip 231
Object.registerClass("SimpleButton", mx.controls.SimpleButton);
#endinitclip
stop();
Symbol 361 MovieClip [Border] Frame 1
#initclip 232
Object.registerClass("Border", mx.skins.Border);
#endinitclip
stop();
Symbol 362 MovieClip [RectBorder] Frame 1
#initclip 233
mx.skins.SkinElement.registerElement(mx.skins.RectBorder.symbolName, Object(mx.skins.RectBorder));
Object.registerClass("RectBorder", mx.skins.halo.RectBorder);
#endinitclip
stop();
Symbol 363 MovieClip [TextInput] Frame 1
#initclip 234
Object.registerClass("TextInput", mx.controls.TextInput);
#endinitclip
stop();
Symbol 364 MovieClip [ComboBase] Frame 1
#initclip 235
mx.controls.listclasses.DataSelector.Initialize(Object(mx.controls.ComboBase).prototype);
Object.registerClass("ComboBase", mx.controls.ComboBase);
#endinitclip
stop();
Instance of Symbol 358 MovieClip [SimpleButton] in Symbol 364 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 363 MovieClip [TextInput] in Symbol 364 MovieClip [ComboBase] Frame 2
//component parameters
onClipEvent (initialize) {
editable = true;
password = false;
text = "";
maxChars = null;
restrict = "null";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 365 MovieClip [DataProvider] Frame 1
#initclip 236
Object.registerClass("DataProvider", mx.controls.listclasses.DataProvider);
#endinitclip
stop();
Symbol 366 MovieClip [DataSelector] Frame 1
#initclip 237
Object.registerClass("DataSelector", mx.controls.listclasses.DataSelector);
#endinitclip
stop();
Symbol 367 MovieClip [SelectableRow] Frame 1
#initclip 238
Object.registerClass("SelectableRow", mx.controls.listclasses.SelectableRow);
#endinitclip
stop();
Symbol 368 MovieClip [ButtonSkin] Frame 1
#initclip 239
Object.registerClass("ButtonSkin", mx.skins.halo.ButtonSkin);
#endinitclip
Symbol 369 MovieClip [Button] Frame 1
#initclip 240
Object.registerClass("Button", mx.controls.Button);
#endinitclip
stop();
Instance of Symbol 358 MovieClip [SimpleButton] in Symbol 369 MovieClip [Button] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 370 MovieClip [CustomBorder] Frame 1
#initclip 241
Object.registerClass("CustomBorder", mx.skins.CustomBorder);
mx.skins.SkinElement.registerElement("CustomBorder", mx.skins.CustomBorder);
#endinitclip
Symbol 382 MovieClip [ScrollThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 384 MovieClip [ScrollThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 395 MovieClip [ThumbThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 397 MovieClip [ThumbThemeColor3] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 404 MovieClip [ThumbThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 425 MovieClip [BtnDownArrow] Frame 1
#initclip 242
Object.registerClass("BtnDownArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 426 MovieClip [BtnUpArrow] Frame 1
#initclip 243
Object.registerClass("BtnUpArrow", mx.controls.SimpleButton);
#endinitclip
Symbol 428 MovieClip [HScrollBar] Frame 1
#initclip 244
Object.registerClass("HScrollBar", mx.controls.HScrollBar);
#endinitclip
stop();
Instance of Symbol 369 MovieClip [Button] in Symbol 428 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 358 MovieClip [SimpleButton] in Symbol 428 MovieClip [HScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 429 MovieClip [VScrollBar] Frame 1
#initclip 245
Object.registerClass("VScrollBar", mx.controls.VScrollBar);
#endinitclip
stop();
Instance of Symbol 369 MovieClip [Button] in Symbol 429 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
icon = "";
label = "Button";
labelPlacement = "right";
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 358 MovieClip [SimpleButton] in Symbol 429 MovieClip [VScrollBar] Frame 2
//component parameters
onClipEvent (initialize) {
selected = false;
toggle = false;
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 430 MovieClip [View] Frame 1
#initclip 246
Object.registerClass("View", mx.core.View);
#endinitclip
stop();
Symbol 431 MovieClip [ScrollView] Frame 1
#initclip 247
Object.registerClass("ScrollView", mx.core.ScrollView);
#endinitclip
stop();
Instance of Symbol 428 MovieClip [HScrollBar] in Symbol 431 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 429 MovieClip [VScrollBar] in Symbol 431 MovieClip [ScrollView] Frame 2
//component parameters
onClipEvent (initialize) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Symbol 432 MovieClip [ScrollSelectList] Frame 1
#initclip 248
Object.registerClass("ScrollSelectList", mx.controls.listclasses.ScrollSelectList);
#endinitclip
stop();
Symbol 433 MovieClip [List] Frame 1
#initclip 249
Object.registerClass("List", mx.controls.List);
#endinitclip
stop();
Symbol 439 MovieClip [ComboDownArrowDisabled] Frame 1
#initclip 250
Object.registerClass("ComboDownArrowDisabled", mx.controls.SimpleButton);
#endinitclip
Symbol 441 MovieClip [ComboThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 444 MovieClip [ComboAssets] Frame 1
#initclip 251
mx.controls.ComboBox.prototype.downArrowUpName = "ComboDownArrowUp";
mx.controls.ComboBox.prototype.downArrowDownName = "ComboDownArrowDown";
mx.controls.ComboBox.prototype.downArrowOverName = "ComboDownArrowOver";
mx.controls.ComboBox.prototype.downArrowDisabledName = "ComboDownArrowDisabled";
mx.controls.ComboBox.prototype.wrapDownArrowButton = false;
mx.controls.ComboBox.prototype.dropDownBorderStyle = "solid";
mx.controls.ComboBox.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, {bl:0, tl:0, tr:5, br:5}, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
#endinitclip
Symbol 445 MovieClip [ComboBox] Frame 1
#initclip 252
Object.registerClass("ComboBox", mx.controls.ComboBox);
#endinitclip
stop();
Instance of Symbol 433 MovieClip [List] in Symbol 445 MovieClip [ComboBox] Frame 2
//component parameters
onClipEvent (initialize) {
multipleSelection = false;
rowHeight = 20;
}
Symbol 489 MovieClip [RadioThemeColor1] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 492 MovieClip [RadioButton] Frame 1
#initclip 256
Object.registerClass("RadioButton", com.games.pencilRacer.gui.components.RadioButton);
#endinitclip
stop();
Symbol 502 MovieClip [SubmitTmobile] Frame 1
stop();
Instance of Symbol 445 MovieClip [ComboBox] "state_mc" in Symbol 502 MovieClip [SubmitTmobile] Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 7;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 445 MovieClip [ComboBox] "month_mc" in Symbol 502 MovieClip [SubmitTmobile] Frame 1
//component parameters
onClipEvent (construct) {
data = [];
data[0] = "defaultValue";
data[1] = "defaultValue";
data[2] = "defaultValue";
editable = false;
labels = [];
labels[0] = 1;
labels[1] = 2;
labels[2] = 3;
labels[3] = 4;
rowCount = 12;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 445 MovieClip [ComboBox] "day_mc" in Symbol 502 MovieClip [SubmitTmobile] Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 12;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 445 MovieClip [ComboBox] "year_mc" in Symbol 502 MovieClip [SubmitTmobile] Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 12;
restrict = "";
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
Instance of Symbol 492 MovieClip [RadioButton] "agree_mc" in Symbol 502 MovieClip [SubmitTmobile] Frame 1
//component parameters
onClipEvent (construct) {
group = "defaultValue";
}
Symbol 516 MovieClip [TemplateLine] Frame 1
#initclip 257
Object.registerClass("TemplateLine", com.games.pencilRacer.objects.template.TemplateLine);
#endinitclip
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 517 MovieClip [ramp4Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 518 MovieClip [ramp3Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 519 MovieClip [ramp2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 520 MovieClip [ramp1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 521 MovieClip [railTemplate] Frame 1
//component parameters
onClipEvent (construct) {
friction = 0;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 522 MovieClip [rail4Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 0.98;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 523 MovieClip [rail3Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 0.98;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 524 MovieClip [rail2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 0.98;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 525 MovieClip [quarter2Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 0.9;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 0.9;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 526 MovieClip [quarter1Template] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 527 MovieClip [BoxLongTemplate] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Instance of Symbol 516 MovieClip [TemplateLine] in Symbol 528 MovieClip [BoxTemplate] Frame 1
//component parameters
onClipEvent (construct) {
friction = 1;
acceleration = 0;
}
Symbol 573 MovieClip Frame 1
stop();
Symbol 577 MovieClip [ProgBarCapThemeColor] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 585 MovieClip [ProgBarMiddleThemeColor] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 593 MovieClip [FPS Graph] Frame 1
maxH = 30;
points_array = new Array();
xoff = 0;
drawPoint = function (perc) {
xoff = xoff - 10;
var _local1 = maxH * (perc / 100);
points_array.push({x:10, y:-_local1});
drawPoints();
};
drawPoints = function () {
graph_mc.clear();
graph_mc.lineStyle(1, 65280, 100);
var _local1 = 0;
while (_local1 < points_array.length) {
points_array[_local1].x = points_array[_local1].x - 10;
var _local2 = points_array[_local1].x;
var _local3 = points_array[_local1].y;
if (_local2 < -200) {
points_array.shift();
}
if (_local1 == 0) {
graph_mc.moveTo(_local2, _local3);
}
graph_mc.lineTo(_local2, _local3);
_local1++;
}
graph_mc.endFill();
};
if (!showGraph) {
outline_mc._visible = false;
graph_mc._visible = false;
bg_mc.gotoAndStop(2);
}
function getfps() {
fps = Math.round(count / div);
var _local1 = (fps / targFPS) * 100;
if (_local1 > 100) {
_local1 = 100;
}
if (showGraph) {
drawPoint(_local1);
}
mid_mc._xscale = _local1;
right_mc._x = mid_mc._x + mid_mc._width;
count = 0;
}
div = interval / 1000;
count = 0;
myInt = setInterval(getfps, interval);
getfps();
onEnterFrame = function () {
count++;
};
Symbol 595 MovieClip Frame 1
stop();
Symbol 596 MovieClip Frame 1
var totalBytes = _parent.getBytesTotal();
this.onEnterFrame = function () {
var _local4 = _parent.getBytesLoaded();
var _local3 = (_local4 / totalBytes) * 100;
load_mc.mask_mc._xscale = _local3;
perc_txt.text = Math.round(_local3) + "%";
if (_local3 >= 100) {
_parent.gotoAndPlay("loaded");
delete this.onEnterFrame;
}
};
Symbol 1129 MovieClip [__Packages.com.games.pencilRacer.gui.components.RadioButton] Frame 0
class com.games.pencilRacer.gui.components.RadioButton extends MovieClip
{
static var groups;
var group, _name, onPress, _alpha, broadcastMessage, gotoAndStop, _currentframe;
function RadioButton () {
super();
setGroup(group);
AsBroadcaster.initialize(this);
enable();
}
function setGroup(g) {
if (!groups) {
groups = new Object();
}
if (group) {
delete groups[group][_name];
}
group = g;
if (!groups[group]) {
groups[group] = new Object();
}
groups[group][_name] = this;
return(true);
}
function enable() {
onPress = press;
_alpha = 100;
}
function disable() {
onPress = null;
_alpha = DISABLE_ALPHA;
}
function press() {
activate();
broadcastMessage(EVENT_CLICK, this);
}
function activate() {
enable();
deactivateGroup(group);
select();
}
function deactivate() {
deselect();
}
function select() {
gotoAndStop(2);
}
function deselect() {
gotoAndStop(1);
}
function set selected(val) {
(val ? (activate()) : (deactivate()));
//return(selected);
}
function get selected() {
return(_currentframe == 2);
}
static function initClass() {
groups = new Object();
return(true);
}
static function deactivateGroup(g) {
for (var _local2 in groups[g]) {
groups[g][_local2].deselect();
}
}
static var initialized = initClass();
static var BUFFER_X = 7;
static var EVENT_CLICK = "click";
static var DISABLE_ALPHA = 30;
}
Symbol 469 MovieClip [__Packages.mx.skins.ColoredSkinElement] Frame 0
class mx.skins.ColoredSkinElement
{
var getStyle, _color, onEnterFrame;
function ColoredSkinElement () {
}
function setColor(c) {
if (c != undefined) {
var _local2 = new Color(this);
_local2.setRGB(c);
}
}
function draw(Void) {
setColor(getStyle(_color));
onEnterFrame = undefined;
}
function invalidateStyle(Void) {
onEnterFrame = draw;
}
static function setColorStyle(p, colorStyle) {
if (p._color == undefined) {
p._color = colorStyle;
}
p.setColor = mixins.setColor;
p.invalidateStyle = mixins.invalidateStyle;
p.draw = mixins.draw;
p.setColor(p.getStyle(colorStyle));
}
static var mixins = new mx.skins.ColoredSkinElement();
}
Symbol 1130 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplateObject] Frame 0
class com.games.pencilRacer.objects.template.TemplateObject extends MovieClip
{
function TemplateObject () {
super();
}
var type = "TemplateObject";
}
Symbol 1131 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplatePoint] Frame 0
class com.games.pencilRacer.objects.template.TemplatePoint extends com.games.pencilRacer.objects.template.TemplateObject
{
var type, _x, _y, _width;
function TemplatePoint () {
super();
type = "TemplatePoint";
}
function get pos() {
return(new com.jjcorreia.geom.Vector(_x, _y));
}
function diff(point) {
return(pos.difference(point.__get__pos()()));
}
function distance(point) {
return(diff(point).__get__length());
}
function get radius() {
return(_width / 2);
}
}
Symbol 1132 MovieClip [__Packages.com.jjcorreia.geom.SimpleVector] Frame 0
class com.jjcorreia.geom.SimpleVector
{
var x, y;
function SimpleVector (x, y) {
this.x = x || 0;
this.y = y || 0;
}
}
Symbol 1133 MovieClip [__Packages.com.jjcorreia.geom.Vector] Frame 0
class com.jjcorreia.geom.Vector extends com.jjcorreia.geom.SimpleVector
{
var y, x;
function Vector (x, y) {
super(x, y);
}
function get length() {
return(Math.sqrt((x * x) + (y * y)));
}
function get lengthSq() {
return((x * x) + (y * y));
}
function toPoint() {
return(new flash.geom.Point(x, y));
}
static function min(v0, v1) {
var _local2 = Math.min(v0.x, v1.x);
var _local1 = Math.min(v0.y, v1.y);
return(new com.jjcorreia.geom.Vector(_local2, _local1));
}
static function max(v0, v1) {
var _local2 = Math.max(v0.x, v1.x);
var _local1 = Math.max(v0.y, v1.y);
return(new com.jjcorreia.geom.Vector(_local2, _local1));
}
function copy(v) {
x = v.x;
y = v.y;
}
function setTo(x, y) {
this.x = x;
this.y = y;
}
function add(v) {
return(new com.jjcorreia.geom.Vector(x + v.x, y + v.y));
}
function subtract(that) {
return(new com.jjcorreia.geom.Vector(x - that.x, y - that.y));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function multiply(factor) {
x = x * factor;
y = y * factor;
}
function getMultiply(factor) {
return(new com.jjcorreia.geom.Vector(x * factor, y * factor));
}
function divide(divisor) {
x = x / divisor;
y = y / divisor;
}
function getDivide(divisor) {
return(new com.jjcorreia.geom.Vector(x / divisor, y / divisor));
}
function round() {
x = Math.round(x);
y = Math.round(y);
}
function ceil() {
x = Math.ceil(x);
y = Math.ceil(y);
}
function floor() {
x = Math.floor(x);
y = Math.floor(y);
}
function abs() {
x = Math.abs(x);
y = Math.abs(y);
}
function difference(that) {
return(new com.jjcorreia.geom.Vector(x - that.x, y - that.y));
}
static function distance(a, b) {
var _local1 = new com.jjcorreia.geom.Vector(a.x - b.x, a.y - b.y);
return(_local1.__get__length());
}
function differenceAbs(that) {
return(new com.jjcorreia.geom.Vector(Math.abs(x - that.x), Math.abs(y - that.y)));
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function crossLength(v) {
return((x * v.y) - (y * v.x));
}
function cross(v) {
return(new com.jjcorreia.geom.Vector(x * v.y, y * v.x));
}
function get angle() {
return(Math.atan2(y, x));
}
function get angleDeg() {
return(Math.atan2(y, x) * RTD);
}
function get angle2() {
return(Math.atan2(x, -y));
}
function get angle2_deg() {
return(Math.atan2(x, -y) * RTD);
}
function angleBetween(v) {
return(Math.acos(dot(v) / (length * v.__get__length())));
}
function angleTo_Deg(v) {
return(Math.atan2(y - v.y, x - v.x) * RTD);
}
function angleTo_Rad(v) {
return(Math.atan2(y - v.y, x - v.x));
}
function negate() {
x = -x;
y = -y;
}
function getNegate() {
return(new com.jjcorreia.geom.Vector(-x, -y));
}
function normalize() {
var _local2 = length;
if (_local2 == 0) {
return(undefined);
}
x = x / _local2;
y = y / _local2;
}
function normalizeTo(factor) {
var _local2 = length * factor;
if (_local2 == 0) {
return(undefined);
}
x = x / _local2;
y = y / _local2;
}
function getNormalize() {
var _local2 = length;
if (_local2 == 0) {
return(undefined);
}
return(new com.jjcorreia.geom.Vector(x / _local2, y / _local2));
}
function normal() {
var _local2 = length;
var _local3 = (-y) / _local2;
x = _local3;
y = x / _local2;
}
function getNormal() {
var _local2 = length;
return(new com.jjcorreia.geom.Vector((-y) / _local2, x / _local2));
}
function rotate(radAngle) {
var _local3 = radAngle + angle;
var _local2 = length;
x = Math.cos(_local3) * _local2;
y = Math.sin(_local3) * _local2;
}
function rotateTo(angle) {
var _local2 = length;
x = Math.cos(angle) * _local2;
y = Math.sin(angle) * _local2;
}
function getRotateTo(angle) {
var _local2 = length;
return(new com.jjcorreia.geom.Vector(Math.cos(angle) * _local2, Math.sin(angle) * _local2));
}
function project(v) {
var _local2 = dot(v) / length;
return(new com.jjcorreia.geom.Vector(_local2 * v.x, _local2 * v.y));
}
function getOrientation(v1, v2) {
return(((v1.x - x) * (v1.y - y)) - ((v1.y - y) * (v2.x - x)));
}
function clone() {
return(new com.jjcorreia.geom.Vector(x, y));
}
function getRotateBy($angle) {
var _local3 = $angle + angle;
var _local2 = length;
return(new com.jjcorreia.geom.Vector(Math.cos(_local3) * _local2, Math.sin(_local3) * _local2));
}
function getReflect(normal) {
var _local2 = 2 * dot(normal);
return(new com.jjcorreia.geom.Vector(x - (normal.x * _local2), y - (normal.y * _local2)));
}
function toString() {
return(((("(x=" + x) + ", y=") + y) + ")");
}
static var DTR = (Math.PI/180);
static var RTD = 57.2957795130823;
}
Symbol 1134 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplateWheel] Frame 0
class com.games.pencilRacer.objects.template.TemplateWheel extends com.games.pencilRacer.objects.template.TemplatePoint
{
var type;
function TemplateWheel () {
super();
type = "TemplateWheel";
}
}
Symbol 1135 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplateConstraint] Frame 0
class com.games.pencilRacer.objects.template.TemplateConstraint extends com.games.pencilRacer.objects.template.TemplateObject
{
var type;
function TemplateConstraint () {
super();
type = "TemplateConstraint";
}
}
Symbol 1136 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplateAngularConstraint] Frame 0
class com.games.pencilRacer.objects.template.TemplateAngularConstraint extends com.games.pencilRacer.objects.template.TemplateConstraint
{
var type;
function TemplateAngularConstraint () {
super();
type = "TemplateAngularConstraint";
}
}
Symbol 1137 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplateLine] Frame 0
class com.games.pencilRacer.objects.template.TemplateLine extends com.games.pencilRacer.objects.template.TemplateObject
{
var type, _parent, _x, _y, end_mc, _xscale, _yscale, _rotation;
function TemplateLine () {
super();
type = "TemplateLine";
_parent.object.onLine(this);
}
function get p1() {
var _local2 = new com.jjcorreia.geom.Vector(_x, _y);
return(_local2);
}
function get p2() {
var _local2 = new com.jjcorreia.geom.Vector(end_mc._x, end_mc._y);
_local2.x = _local2.x * (_xscale / 100);
_local2.y = _local2.y * (_yscale / 100);
_local2.rotateTo(_rotation * com.jjcorreia.geom.Vector.DTR);
var _local3 = new com.jjcorreia.geom.Vector(_x, _y);
_local2.plus(_local3);
return(_local2);
}
}
Symbol 1138 MovieClip [__Packages.com.games.pencilRacer.objects.template.TemplateLinePoint] Frame 0
class com.games.pencilRacer.objects.template.TemplateLinePoint extends com.games.pencilRacer.objects.template.TemplatePoint
{
var type;
function TemplateLinePoint () {
super();
type = "TemplateLinePoint";
}
}
Symbol 1139 MovieClip [__Packages.com.games.pencilRacer.gui.components.Tab] Frame 0
class com.games.pencilRacer.gui.components.Tab extends MovieClip
{
static var groups;
var group, title, _xscale, back_mc, _yscale, panel_mc, createEmptyMovieClip, panel, _parent, text_txt, _alpha, broadcastMessage, _x;
function Tab () {
super();
setGroup(group);
setText(title);
init();
}
function init() {
AsBroadcaster.initialize(this);
back_mc._width = back_mc._width * (_xscale / 100);
back_mc._height = back_mc._height * (_yscale / 100);
_xscale = (_yscale = 100);
enable();
}
function addPanel(id) {
panel_mc = createEmptyMovieClip("panel_mc", 1);
panel = new id[undefined](_parent.panels_mc);
return(panel);
}
function hidePanel() {
panel.hide();
}
function showPanel() {
panel.show();
}
function setText(t) {
text_txt.text = t;
text_txt.autoSize = "center";
back_mc._width = (text_txt._width + BUFFER_X) + BUFFER_X;
}
function setGroup(g) {
if (group) {
}
group = g;
if (!groups[group]) {
groups[group] = new Object();
}
if (!groups[group][title]) {
groups[group][title] = this;
}
return(true);
}
function enable() {
back_mc.onPress = com.jjcorreia.utils.Delegate.create(this, activate);
_alpha = 100;
}
function disable() {
back_mc.onPress = null;
_alpha = DISABLE_ALPHA;
}
function activate() {
enable();
deactivateGroup(group);
bringToFront();
broadcastMessage(EVENT_ACTIVATE, this);
}
function deactivate() {
sendToBack();
broadcastMessage(EVENT_DEACTIVATE, this);
}
function bringToFront() {
back_mc.gotoAndStop(1);
showPanel();
}
function sendToBack() {
back_mc.gotoAndStop(2);
hidePanel();
}
function get selected() {
return(back_mc._currentframe == 1);
}
function moveTab(x, startx) {
if (startx) {
_x = startx;
}
var _local2 = back_mc._x;
back_mc._x = x;
text_txt._x = text_txt._x + (x - _local2);
}
static function initClass() {
groups = new Object();
return(true);
}
static function deactivateGroup(g) {
for (var _local2 in groups[g]) {
groups[g][_local2].sendToBack();
}
}
static function spaceGroup(g) {
var _local4;
var _local3;
var _local5;
var _local2 = [];
for (var _local7 in groups[g]) {
_local2.push(groups[g][_local7]);
}
var _local1 = _local2.length - 1;
while (_local1 > -1) {
_local4 = _local2[_local1];
_local3 = _local2[_local1 + 1];
if (_local3) {
_local4.moveTab((_local3.back_mc._x + (_local3._width / 2)) + (_local4._width / 2), _local5);
} else {
_local5 = _local4._x;
}
_local1--;
}
}
static var initialized = initClass();
static var BUFFER_X = 7;
static var EVENT_ACTIVATE = "tab_activate";
static var EVENT_DEACTIVATE = "tab_deactivate";
static var DISABLE_ALPHA = 30;
}
Symbol 1056 MovieClip [__Packages.com.jjcorreia.utils.Delegate] Frame 0
class com.jjcorreia.utils.Delegate extends Object
{
function Delegate () {
super();
}
static function create($target, $method) {
function myFunction() {
var _local2 = arguments.callee;
return(_local2.method.apply(_local2.target, addedParams));
}
var addedParams = arguments.slice(2);
myFunction.addedParams = addedParams;
myFunction.method = $method;
myFunction.target = $target;
return(myFunction);
}
}
Symbol 1140 MovieClip [__Packages.com.games.pencilRacer.gui.components.BasicButton] Frame 0
class com.games.pencilRacer.gui.components.BasicButton extends MovieClip
{
static var groups;
var _x, _y, _width, _xscale, _height, _yscale, onRollOver, lastOver, onRollOut, lastOut, lastPress, onPress, lastRelease, stored_over, stored_out, onDragOut, onMouseDown, enabled, _alpha, onRelease, onMouseUp, gotoAndStop, _currentframe;
function BasicButton () {
super();
enable();
_x = Math.round(_x);
_y = Math.round(_y);
}
static function initClass() {
groups = new Object();
return(true);
}
function init() {
_width = _width * (_xscale / 100);
_height = _height * (_yscale / 100);
_xscale = 100;
_yscale = 100;
}
function enable() {
out();
var oldOver = (onRollOver || (lastOver));
var oldOut = (onRollOut || (lastOut));
if (lastPress) {
onPress = lastPress;
}
if (lastRelease) {
onPress = lastRelease;
}
if (oldOver && (!stored_over)) {
stored_over = function () {
oldOver();
this.over();
};
}
if (oldOut && (!stored_out)) {
stored_out = function () {
oldOut();
this.out();
};
}
onRollOver = com.jjcorreia.utils.Delegate.create(this, (oldOver ? (stored_over) : (over)));
onRollOut = (onDragOut = com.jjcorreia.utils.Delegate.create(this, (oldOut ? (stored_out) : (out))));
onMouseDown = down;
enabled = true;
_alpha = lastAlpha;
}
function disable(alpha) {
lastOver = onRollOver;
lastOut = onRollOut;
lastRelease = onRelease;
lastPress = onPress;
onRollOver = null;
onRollOut = null;
onDragOut = null;
onMouseDown = null;
onMouseUp = null;
enabled = false;
if (alpha != undefined) {
lastAlpha = _alpha;
_alpha = alpha;
}
}
function over() {
gotoAndStop(2);
}
function out() {
gotoAndStop(1);
}
function down() {
if (isOver) {
gotoAndStop(3);
onMouseUp = up;
}
}
function up() {
gotoAndStop((isDown ? 2 : 1));
onMouseUp = null;
}
function get isOver() {
return(_currentframe == 2);
}
function get isDown() {
return(_currentframe == 3);
}
static var initialized = initClass();
static var BUFFER_X = 10;
static var DISABLE_ALPHA = 100;
var lastAlpha = 100;
}
Symbol 1141 MovieClip [__Packages.com.games.pencilRacer.gui.components.VehicleIcon] Frame 0
class com.games.pencilRacer.gui.components.VehicleIcon extends MovieClip
{
var bmp, _width, _height, bmp_mc, vDescription, prev_mc, _quality, gotoAndStop;
function VehicleIcon () {
super();
bmp = new flash.display.BitmapData(_width, _height, true, 0);
bmp_mc.attachBitmap(bmp, 1);
}
function setVehicle(vDescription) {
deselect();
this.vDescription = vDescription;
prev_mc.veh_mc.removeMovieClip();
var _local2 = prev_mc.attachMovie(vDescription + "Graphic", "veh_mc", 1);
prev_mc._xscale = (prev_mc._yscale = 100);
bmp.fillRect(bmp.rectangle, 0);
var _local3 = _quality;
_quality = "BEST";
bmp.draw(prev_mc, prev_mc.transform.matrix, null, null, null, true);
_local2.removeMovieClip();
_quality = _local3;
}
function get vehicle() {
return(vDescription);
}
function select() {
gotoAndStop(2);
}
function deselect() {
gotoAndStop(1);
}
function toString() {
var _local2 = "[ SelectionBox";
_local2 = _local2 + (", vDescription:" + vDescription);
_local2 = _local2 + " ]";
return(_local2);
}
}
Symbol 1142 MovieClip [__Packages.com.games.pencilRacer.gui.components.sliders.NumericalSlider] Frame 0
class com.games.pencilRacer.gui.components.sliders.NumericalSlider extends MovieClip
{
var maxX, press_mc, bar_mc, index, value_txt, desc_txt, min, max, label, _value, onUpdate, disabled, onMouseMove, _xmouse, _visible, _alpha;
function NumericalSlider () {
super();
maxX = bar_mc._width - press_mc._width;
setRange(0, 100);
index = 0;
value_txt.autoSize = "Left";
desc_txt.autoSize = "Left";
position(index);
enable();
}
function setRange($min, $max) {
min = $min;
max = $max;
value = ($min);
}
function setLabel(label) {
desc_txt.text = label;
this.label = label;
}
function set value($val) {
setValue($val);
update();
//return(value);
}
function setValue($val) {
if ($val < min) {
$val = min;
}
if ($val > max) {
$val = max;
}
_value = Math.round($val * 100) / 100;
}
function get value() {
return(_value);
}
function getPercent() {
return(((_value - min) / (max - min)) * 100);
}
function reset() {
position(0);
}
function update($noCall) {
switch (mode) {
case "%" :
value_txt.text = Math.round(getPercent()) + "%";
break;
case "-%" :
value_txt.text = (100 - Math.round(getPercent())) + "%";
break;
case "int" :
_value = Math.round(_value);
value_txt.text = _value;
break;
default :
value_txt.text = _value + suffix;
}
render();
if ($noCall != true) {
onUpdate(_value);
}
}
function render() {
var _local2 = ((value - min) / (max - min)) * maxX;
press_mc._x = _local2;
}
function doDrag() {
if (disabled) {
return(undefined);
}
offX = press_mc._xmouse;
onMouseMove = main_drag;
}
function haltDrag() {
delete onMouseMove;
}
function main_drag() {
value = (((((_xmouse - offX) / stepSize) / maxX) * (max - min)) + min);
updateAfterEvent();
}
function show() {
_visible = true;
}
function hide() {
_visible = false;
}
function disable() {
disabled = true;
_alpha = DISABLE_ALPHA;
haltDrag();
delete press_mc.onPress;
delete press_mc.onRelease;
}
function enable() {
disabled = false;
_alpha = 100;
press_mc.onPress = com.jjcorreia.utils.Delegate.create(this, doDrag);
press_mc.onRelease = (press_mc.onReleaseOutside = com.jjcorreia.utils.Delegate.create(this, haltDrag));
}
var offX = 0;
var stepSize = 1;
var minX = 0;
var suffix = "";
var mode = "value";
static var DISABLE_ALPHA = 50;
}
Symbol 1143 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.TutorialSimpleClip] Frame 0
class com.games.pencilRacer.gui.dialogs.TutorialSimpleClip extends MovieClip
{
var onMouseUp, onMouseDown, draw4Me_btn, continue_btn, play;
function TutorialSimpleClip () {
super();
}
function initPage(num) {
delete onMouseUp;
delete onMouseDown;
delete com.jjcorreia.application.AppBase.__get__clip().onVehicleSelect;
var app = com.jjcorreia.application.AppBase.__get__clip();
switch (num) {
case 0 :
app.togglePhysics(true);
app.setMode(com.games.pencilRacer.config.Modes.PENCIL);
app.simpleVehicle.hide();
app.simpleProps.hide();
app.simpleControl.hide();
app.simpleTools.hide();
draw4Me_btn.onRelease = function () {
var _local2 = new com.jjcorreia.geom.Vector(com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.preDrawn[0][0], com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.preDrawn[0][1]);
app.markRiderStart(_local2);
this._parent.drawLines(com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.preDrawn);
this.enabled = false;
this._alpha = 40;
};
continue_btn.onRelease = function () {
if (com.games.pencilRacer.apps.SpatialDatabase.getTrackCount() == 0) {
var _local2 = new com.jjcorreia.geom.Vector(com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.preDrawn[0][0], com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.preDrawn[0][1]);
app.markRiderStart(_local2);
this._parent.drawLines(com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.preDrawn);
}
this._parent.play();
};
break;
case 1 :
continue_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, play);
break;
case 2 :
app.setMode(com.games.pencilRacer.config.Modes.MOVE);
app.togglePhysics(true);
app.simpleProps.show();
continue_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, play);
break;
case 3 :
app.simpleProps.show();
app.simpleTools.show();
app.togglePhysics(false);
app.setMode(com.games.pencilRacer.config.Modes.PENCIL);
app.drawArtColor = 16750848 /* 0xFF9900 */;
app.stroke = 14;
app.simpleProps.update();
app.simpleTools.update();
continue_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, play);
draw4Me_btn.onRelease = function () {
this._parent.drawLines(com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.artDrawn);
this._parent.drawLines(com.games.pencilRacer.gui.dialogs.TutorialSimpleClip.art2Drawn);
this.enabled = false;
this._alpha = 40;
};
break;
case 4 :
app.togglePhysics(true);
app.setMode(com.games.pencilRacer.config.Modes.PENCIL);
app.stroke = com.games.pencilRacer.apps.Game.DEFAULT_STROKE;
app.simpleProps.update();
app.simpleProps.hide();
app.simpleTools.update();
continue_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, play);
break;
case 5 :
app.setMode(com.games.pencilRacer.config.Modes.MOVE);
app.simpleTools.hide();
app.simpleVehicle.show();
app.onVehicleSelect = com.jjcorreia.utils.Delegate.create(this, play);
continue_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, play);
break;
case 6 :
app.simpleVehicle.hide();
app.simpleControl.show();
continue_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, play);
break;
case 7 :
app.simpleControl.show();
}
}
function drawLines(arr) {
var _local4 = com.jjcorreia.application.AppBase.__get__clip();
var _local7;
var _local1 = 0;
while (_local1 < (arr.length - 1)) {
var _local3 = arr[_local1];
var _local2 = arr[_local1 + 1];
_local7 = new com.jjcorreia.geom.Vector(_local3[0], _local3[1]);
var _local6 = new com.jjcorreia.geom.Vector(_local2[0], _local2[1]);
_local4.addLine(_local7, _local6, null, 0, 1, 0, _local4.physicsEnabled, _local4.stroke);
_local1++;
}
}
function close() {
com.jjcorreia.application.AppBase.__get__clip().togglePhysics(true);
com.jjcorreia.application.AppBase.__get__clip().setMode(com.games.pencilRacer.config.Modes.PENCIL);
com.jjcorreia.application.AppBase.__get__clip().stroke = com.games.pencilRacer.apps.Game.DEFAULT_STROKE;
super.close();
}
static var preDrawn = [[67, 293], [87, 321], [102, 342], [119, 363], [137, 383], [154, 399], [169, 413], [188, 429], [208, 443], [231, 456], [257, 469], [280, 477], [302, 483], [327, 488], [351, 491], [372, 491], [396, 490], [419, 487], [442, 483], [465, 477], [487, 470], [509, 463], [523, 457]];
static var artDrawn = [[378, 266], [400, 269], [420, 281], [435, 298], [443, 319], [444, 342], [437, 364], [423, 382], [404, 395], [382, 400], [359, 397], [338, 387], [322, 371], [313, 350], [311, 328], [316, 305], [332, 284], [355, 269], [378, 266]];
static var art2Drawn = [[345, 348], [364, 360], [386, 359], [407, 351]];
static var art3Drawn = [[352, 304], [361, 304]];
static var art4Drawn = [[403, 307], [414, 308]];
}
Symbol 1144 MovieClip [__Packages.com.jjcorreia.application.AppBase] Frame 0
class com.jjcorreia.application.AppBase extends MovieClip
{
static var gameStarted;
var Prefs, Cursor, Skin, MainLoop, onEnterFrame, currentLevel;
function AppBase ($pref) {
super();
_instance = this;
Prefs = new $pref[undefined]();
Init();
}
function Init() {
Cursor = new com.jjcorreia.input.MouseCursor();
com.jjcorreia.input.KeyManager.init();
com.jjcorreia.application.PauseManager.init();
com.jjcorreia.display.jObject.MainApp = this;
com.jjcorreia.display.jObject.App = this;
timesRun++;
}
function initConfigs() {
}
function Run() {
}
function makeHolders() {
if (!Skin) {
Skin = new com.jjcorreia.application.ui.SkinBase(this);
}
var _local2 = Prefs.holderList_array;
for (var _local3 in _local2) {
Skin.makeHolder.apply(Skin, _local2[_local3]);
}
}
function setMain($newMethod) {
if ($newMethod) {
MainLoop = $newMethod;
}
onEnterFrame = MainLoop;
}
function resume($newMethod) {
setMain($newMethod);
}
function pause() {
delete onEnterFrame;
}
function onLevelStart() {
if (noMoreLevels) {
EndGame();
return(undefined);
}
}
function onPlayGame() {
if (gameStarted) {
return(false);
}
gameStarted = true;
}
function EndGame() {
trace("AppBase.EndGame");
}
function setSkin($val) {
Skin = $val;
com.jjcorreia.display.jObject.Skin = $val;
}
static function get clip() {
return(_instance);
}
function get noMoreLevels() {
return(currentLevel >= (Prefs.totalLevels - 1));
}
function get isLastLevel() {
return(currentLevel == (Prefs.totalLevels - 1));
}
static var _instance = null;
static var timesRun = 0;
}
Symbol 1145 MovieClip [__Packages.com.jjcorreia.display.jObject] Frame 0
class com.jjcorreia.display.jObject extends MovieClip
{
var initialPosition, oID, holder, MainLoop, Main, data, clip, x, y, markedVector, __get__onRelease, __get__onPress, _width, p_bounds;
function jObject ($x, $y, $holder, $Class) {
super();
position($x, $y);
initialPosition = new com.jjcorreia.geom.Vector($x, $y);
Class = $Class;
setHolder($holder);
obstacleID++;
oID = holder.getNextHighestDepth();
MainLoop = Main;
data = new Object();
}
function create() {
if ((!Class) || (clip)) {
return(undefined);
}
clip = holder.attachMovie(Class, (Class + "_") + oID, -100);
setDepth();
saveShapeData();
render();
}
function attach($mc) {
if (clip) {
destroy();
}
setHolder($mc);
create();
}
function setDepth() {
var _local2 = holder.getNextHighestDepth();
clip.swapDepths(_local2);
return(_local2);
}
function saveShapeData() {
}
function position($newX, $newY) {
x = $newX;
y = $newY;
}
function moveStep() {
x = x + vx;
y = y + vy;
}
function render() {
clip._x = x;
clip._y = y;
}
function moveNow($x, $y) {
position($x, $y);
render();
}
function moveNowByDistance($xs, $ys) {
vx = $xs;
vy = $ys;
moveStep();
render();
}
function set _x($val) {
x = $val;
clip._x = $val;
//return(_x);
}
function set _y($val) {
y = $val;
clip._y = $val;
//return(_y);
}
function getPosition() {
return(new com.jjcorreia.geom.Vector(x, y));
}
function markPosition() {
return((markedVector = new com.jjcorreia.geom.Vector(x, y)));
}
function get markedX() {
return(markedVector.x);
}
function get markedY() {
return(markedVector.y);
}
function getDistanceVector($abs) {
var _local2 = getPosition();
return(_local2.difference(markedVector, $abs));
}
function getSpeedVector() {
return(new com.jjcorreia.geom.Vector(vx, vy));
}
function setSpeedVector($v) {
vx = $v.x;
vy = $v.y;
}
function addVelocity($x, $y) {
vx = vx + $x;
vy = vy + $y;
}
function halt() {
vx = 0;
vy = 0;
}
function destroy() {
pause();
remove();
if (pauseEnabled) {
pauseEnabled = false;
com.jjcorreia.application.PauseManager.unregister(this);
}
}
function remove() {
clip.removeMovieClip();
clip.unloadMovie();
delete clip;
}
function setClip($clip) {
clip = $clip;
}
function setHolder($holder) {
holder = ((typeof($holder) == "string") ? (com.jjcorreia.application.ui.SkinBase.getInstance().getHolder($holder)) : ($holder));
if (!holder) {
holder = _root;
if (Class != undefined) {
trace(((("Holder '" + $holder) + "' for ") + Class) + " not found. Attaching to _root");
}
}
}
function resume() {
clip.onEnterFrame = com.jjcorreia.utils.Delegate.create(this, MainLoop);
}
function pause() {
delete clip.onEnterFrame;
}
function setMain($method) {
MainLoop = $method;
resume();
}
function makePauseable() {
pauseEnabled = true;
com.jjcorreia.application.PauseManager.register(this);
}
function set onRelease($method) {
clip.onRelease = $method;
//return(__get__onRelease());
}
function set onPress($method) {
clip.onPress = $method;
//return(__get__onPress());
}
function hide() {
if (!clip._visible) {
return(undefined);
}
clip._visible = false;
}
function show() {
if (clip._visible) {
return(undefined);
}
clip._visible = true;
}
function get isHidden() {
return(!clip._visible);
}
function toggleVisible() {
(isHidden ? (show()) : (hide()));
}
function rotate($val) {
clip._rotation = clip._rotation + $val;
}
function doRotate() {
clip._rotation = clip._rotation + rSpeed;
rSpeed = rSpeed * friction;
}
function get _radius() {
return(_width / 2);
}
function resize($x, $y) {
clip._xscale = $x;
clip._yscale = $y;
}
function get width() {
return(clip._width);
}
function get height() {
return(clip._height);
}
function get rotation() {
return(clip._rotation);
}
function get scaleX() {
return(clip._xscale);
}
function get scaleY() {
return(clip._yscale);
}
function get alpha() {
return(clip._alpha);
}
function get _x() {
return(clip._x);
}
function get _y() {
return(clip._y);
}
function set width($val) {
clip._width = $val;
//return(width);
}
function set height($val) {
clip._height = $val;
//return(height);
}
function set rotation($val) {
clip._rotation = $val;
//return(rotation);
}
function set scaleX($val) {
clip._xscale = $val;
//return(scaleX);
}
function set scaleY($val) {
clip._yscale = $val;
//return(scaleY);
}
function set alpha($val) {
clip._alpha = $val;
//return(alpha);
}
function get bounds() {
p_bounds = clip.getBounds(holder);
return(p_bounds);
}
function get Left() {
return(bounds.xMin);
}
function get Right() {
return(bounds.xMax);
}
function get Top() {
return(bounds.yMin);
}
function get Bottom() {
return(bounds.yMax);
}
function get hitClip() {
return(clip.hit_mc);
}
var vx = 0;
var vy = 0;
var rSpeed = 0;
static var friction = 0.95;
static var gravity = 1;
static var elasticity = 0.1;
var Class = "GameObject";
static var obstacleID = 0;
static var stageWidth = Stage.width;
static var stageRadius = stageWidth / 2;
var pauseEnabled = false;
}
Symbol 1146 MovieClip [__Packages.com.jjcorreia.geom.AABB] Frame 0
class com.jjcorreia.geom.AABB
{
var xMin, yMin, xMax, yMax;
function AABB ($xMin, $yMin, $xMax, $yMax) {
xMin = $xMin;
yMin = $yMin;
xMax = $xMax;
yMax = $yMax;
}
function intersect($bounds) {
if (xMin > $bounds.xMax) {
return(false);
}
if (yMin > $bounds.yMax) {
return(false);
}
if (xMax < $bounds.xMin) {
return(false);
}
if (yMax < $bounds.yMin) {
return(false);
}
return(true);
}
}
Symbol 1061 MovieClip [__Packages.com.jjcorreia.application.PauseManager] Frame 0
class com.jjcorreia.application.PauseManager
{
static var broadcaster, onPause, onResume;
function PauseManager () {
}
static function init() {
broadcaster = new Object();
AsBroadcaster.initialize(broadcaster);
}
static function destroy() {
delete broadcaster;
}
static function pause() {
if (!enabled) {
return(false);
}
active = true;
broadcaster.broadcastMessage("doPause");
onPause();
return(true);
}
static function resume() {
if (!enabled) {
return(false);
}
active = false;
broadcaster.broadcastMessage("doResume");
onResume();
return(true);
}
static function toggle() {
if (!enabled) {
return(false);
}
active = !active;
(active ? (pause()) : (resume()));
return(active);
}
static function register(obj) {
broadcaster.addListener(obj);
}
static function unregister(obj) {
broadcaster.removeListener(obj);
}
static function debug() {
trace("PauseManager listener dump:\r");
var _local5 = broadcaster._listeners.length;
var _local3 = 0;
while (_local3 < _local5) {
var _local1 = broadcaster._listeners[_local3];
var _local2 = "";
for (var _local4 in _local1) {
_local2 = _local2 + (" | " + _local4);
}
trace((" " + _local1) + _local2);
_local3++;
}
}
static var active = false;
static var enabled = true;
}
Symbol 1147 MovieClip [__Packages.com.jjcorreia.application.ui.SkinBase] Frame 0
class com.jjcorreia.application.ui.SkinBase extends MovieClip
{
static var _instance, clip_mc;
var Holders;
function SkinBase ($Clip) {
super();
Init($Clip);
Holders = new Object();
_instance = this;
}
static function Init($Clip) {
clip_mc = $Clip;
com.jjcorreia.display.jObject.SkinClip = $Clip;
}
function makeHolder($name, $depth, $x, $y, $clip) {
if (!$clip) {
$clip = clip_mc;
}
var _local2 = $clip.createEmptyMovieClip($name + "Holder", $depth);
if ($x != undefined) {
_local2._x = $x;
}
if ($y != undefined) {
_local2._y = $y;
}
registerHolder(_local2);
return(_local2);
}
function makeEmptyHolder($clip, $x, $y) {
var _local2 = $clip.getNextHighestDepth();
return(makeHolder("mc" + _local2, _local2, 0, 0, $clip));
}
function registerHolder($holder) {
Holders[$holder._name] = $holder;
}
function unregisterHolder($holder, $remove) {
if ($remove) {
$holder.removeMovieClip();
}
delete Holders[$holder._name];
}
function removeHolders() {
for (var _local2 in Holders) {
unregisterHolder(Holders[_local2], true);
}
}
function HideAll() {
for (var _local2 in Holders) {
Holders[_local2]._visible = false;
}
}
function ShowAll() {
for (var _local2 in Holders) {
Holders[_local2]._visible = true;
}
}
function get clip() {
return(clip_mc);
}
static function getInstance() {
return(_instance);
}
function getHolder($name) {
return(Holders[$name + "Holder"]);
}
}
Symbol 1148 MovieClip [__Packages.com.jjcorreia.input.MouseCursor] Frame 0
class com.jjcorreia.input.MouseCursor extends com.jjcorreia.display.jObject
{
var holder, clip, __get__onMouseMove, x, y, render, create, mouseListener, __get__onMouseWheel, __get__onMouseDown, __get__onMouseUp, boundObject;
function MouseCursor () {
super();
holder = _root;
}
function resume() {
onMouseMove = (Main);
}
function pause() {
delete clip.onMouseMove;
}
function get isRunning() {
return(clip.onMouseMove != null);
}
function set onMouseMove($method) {
clip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, $method);
//return(__get__onMouseMove());
}
function Main() {
x = holder._xmouse;
y = holder._ymouse;
render();
updateAfterEvent();
}
function setClip($holder, $clip) {
super(x, y, $holder, $clip);
create();
clip.cacheAsBitmap = true;
onMouseMove = (Main);
Mouse.hide();
__get__onMouseMove()();
init();
}
function init() {
}
function set onMouseWheel($val) {
mouseListener = new Object();
mouseListener.objRef = this;
mouseListener.onMouseWheel = $val;
Mouse.addListener(mouseListener);
//return(__get__onMouseWheel());
}
function get _x() {
return(holder._xmouse);
}
function get _y() {
return(holder._ymouse);
}
function getAngleFromPoint($x, $y) {
return(com.jjcorreia.math.math2D.Trig.getAngle_deg2(_x, _y, $x, $y));
}
function getPosition() {
return(new com.jjcorreia.geom.Vector(holder._xmouse, holder._ymouse));
}
function set onMouseDown($method) {
clip.onMouseDown = $method;
//return(__get__onMouseDown());
}
function set onMouseUp($method) {
clip.onMouseUp = $method;
//return(__get__onMouseUp());
}
function bindObject($object) {
boundObject = $object;
}
function unbindObject() {
delete boundObject;
}
function get isBusy() {
return(boundObject != undefined);
}
function hide() {
super.hide();
Mouse.show();
}
function show() {
super.show();
Mouse.hide();
}
function destroy() {
Mouse.show();
super.destroy();
}
var isDown = false;
}
Symbol 1149 MovieClip [__Packages.com.jjcorreia.math.math2D.Trig] Frame 0
class com.jjcorreia.math.math2D.Trig
{
function Trig () {
}
static function init() {
Math.prototype.getRadians = getRadians;
Math.prototype.getDegrees = getDegrees;
Math.prototype.getXYforces = getXYforces;
Math.prototype.placeOnArc = placeOnArc;
}
static function getRadians($num) {
return($num * dtr);
}
static function getDegrees($num) {
return($num / dtr);
}
static function getXYforces($force, $angleRad) {
var _local1 = $force * Math.sin($angleRad);
var _local2 = $force * Math.cos($angleRad);
return(new com.jjcorreia.geom.Vector(_local1, -_local2));
}
static function get2Dforces($force, $angle) {
$angle = $angle * dtr;
var _local3 = $force * Math.sin($angle);
var _local2 = $force * Math.cos($angle);
return(new com.jjcorreia.geom.Vector(_local3, _local2));
}
static function placeOnArc($x, $y, $radius, $rotation, $offset) {
var _local1 = ($rotation + $offset) * com.jjcorreia.geom.Vector.DTR;
var _local3 = Math.sin(_local1);
var _local2 = Math.cos(_local1);
var _local5 = $x + ($radius * _local3);
var _local4 = $y + ((-$radius) * _local2);
return(new com.jjcorreia.geom.Vector(_local5, _local4));
}
static function getAngle($x_leg, $y_leg) {
return(Math.atan2($x_leg, -$y_leg));
}
static function getAngle2(startX, startY, endX, endY) {
var _local1 = startX - endX;
var _local2 = startY - endY;
return(Math.atan2(_local1, -_local2));
}
static function getAngle_deg($x_leg, $y_leg) {
return(Math.atan2($x_leg, -$y_leg) * rad2Deg);
}
static function getAngle_deg2(startX, startY, endX, endY) {
var _local1 = startX - endX;
var _local2 = startY - endY;
return(Math.atan2(_local1, -_local2) * rad2Deg);
}
static function getHypotSQ(startX, startY, endX, endY) {
var _local2 = startX - endX;
var _local1 = startY - endY;
var _local3 = Math.abs((_local2 * _local2) + (_local1 * _local1));
return(_local3);
}
static function getHypot(startX, startY, endX, endY) {
return(Math.sqrt(getHypotSQ(startX, startY, endX, endY)));
}
static function speedCalc(x_leg, y_leg, hypotenuse, $xSpeed, $ySpeed) {
var _local2 = x_leg / hypotenuse;
var _local1 = y_leg / hypotenuse;
var _local4 = -((_local2 * $xSpeed) + (_local1 * $xSpeed));
var _local3 = -((_local2 * $ySpeed) - (_local1 * $ySpeed));
var _local6 = (_local2 * _local4) + (_local1 * _local3);
var _local5 = -((_local2 * _local3) - (_local1 * _local4));
return({vx:_local6, vy:_local5});
}
static function speedCalc2($x_leg, $y_leg, hypotenuse, $vx0, $vy0, $vx1, $vy1) {
var _local2 = $x_leg / hypotenuse;
var _local1 = $y_leg / hypotenuse;
var _local5 = ((_local2 * $vx1) + (_local1 * $vy1)) - ((_local2 * $vx0) + (_local1 * $vy0));
var _local4 = _local2 * _local5;
var _local3 = _local1 * _local5;
var _local14 = $vx0 + _local4;
var _local12 = $vy0 + _local3;
var _local13 = $vx1 - _local4;
var _local11 = $vy1 - _local3;
return({vx0:_local14, vy0:_local12, vx1:_local13, vy1:_local11});
}
static var dtr = (Math.PI/180);
static var rad2Deg = 57.2957795130823;
}
Symbol 1150 MovieClip [__Packages.com.jjcorreia.input.KeyManager] Frame 0
class com.jjcorreia.input.KeyManager
{
static var keyCodes, cmd_array, macro_array, macroPresses_array, downKeys_array, keyListener, lastKey, schedule_int, macro_int;
function KeyManager () {
}
static function init() {
keyCodes = new Object();
cmd_array = new Array();
macro_array = new Array();
macroPresses_array = new Array();
downKeys_array = new Array();
com.jjcorreia.input.KeyManagerConfig.init();
Key.removeListener(keyListener);
keyListener = new Object();
keyListener.onKeyDown = com.jjcorreia.utils.Delegate.create(com.jjcorreia.input.KeyManager, keyDown);
keyListener.onKeyUp = com.jjcorreia.utils.Delegate.create(com.jjcorreia.input.KeyManager, keyUp);
resume();
return(true);
}
static function keyDown() {
var _local1 = Key.getCode();
if (!(isDown && (_local1 == lastKey))) {
macroPresses_array.push(_local1);
checkMacros();
loopMacro();
}
var _local2 = cmd_array[_local1];
isDown = true;
lastKey = _local1;
if ((_local2.isDown && (!_local2.repeat)) || (!_local2)) {
return(undefined);
}
if (!_local2.isDown) {
downKeys_array.push(_local1);
}
_local2.Down();
}
static function keyUp() {
clearInterval(schedule_int);
var _local1 = 0;
while (_local1 < downKeys_array.length) {
var _local2 = downKeys_array[_local1];
if (!Key.isDown(_local2)) {
downKeys_array.splice(_local1, 1);
var _local3 = cmd_array[_local2];
_local3.Up();
}
_local1++;
}
if (downKeys_array.length > 0) {
clearInterval(schedule_int);
schedule_int = setInterval(com.jjcorreia.input.KeyManager, "keyUp", 100);
}
isDown = false;
}
static function clearMacroList() {
clearInterval(macro_int);
macroPresses_array = new Array();
}
static function loopMacro() {
clearInterval(macro_int);
if (macroPresses_array.length > 0) {
macro_int = setInterval(com.jjcorreia.input.KeyManager, "clearMacroList", macroLife);
}
}
static function checkMacros() {
if (macroPresses_array.length > 1) {
var _local3 = macroPresses_array.length;
for (var _local6 in macro_array) {
var _local1 = macro_array[_local6];
var _local2 = _local1.length;
if (_local3 >= _local2) {
var _local4 = _local1.ID;
var _local5 = macroPresses_array.slice(_local3 - _local2, _local3).join("_");
if (_local5 == _local4) {
_local1.Run();
return(undefined);
}
}
}
}
}
static function bindKey($key, $Class, $upMethod, $downMethod, $repeatAble) {
var _local3 = arguments.slice(5);
var _local2 = getKeyCode($key);
if (_local2 != undefined) {
cmd_array[_local2] = new com.jjcorreia.input.KeyObject(_local2, $Class, $upMethod, $downMethod, $repeatAble, _local3);
}
}
static function unbindKey($key) {
delete cmd_array[getKeyCode($key)];
}
static function bindMacro($macro, $Class, $Method) {
var _local5 = arguments.slice(3);
$macro = $macro.split(" ");
var _local2 = 0;
while (_local2 < $macro.length) {
$macro[_local2] = getKeyCode($macro[_local2]);
_local2++;
}
var _local4 = $macro.join("_");
macro_array[_local4] = new com.jjcorreia.input.KeyMacro($macro, $Class, $Method, _local5);
}
static function unbindMacro($macro) {
$macro = $macro.split("");
var _local1 = 0;
while (_local1 < $macro.length) {
$macro[_local1] = getKeyCode($macro[_local1]);
_local1++;
}
var _local3 = $macro.join("_");
delete macro_array[_local3];
}
static function pause() {
clearMacroList();
Key.removeListener(keyListener);
}
static function resume() {
Key.addListener(keyListener);
}
static function destroy() {
pause();
delete keyListener;
}
static function getKeyCode($key) {
return(keyCodes[$key]);
}
static function setCode($key, $val) {
keyCodes[$key] = $val;
}
static function setMacroLife($val) {
macroLife = $val;
}
static var macroLife = 1000;
static var isDown = false;
static var initialized = init();
}
Symbol 1151 MovieClip [__Packages.com.jjcorreia.input.KeyManagerConfig] Frame 0
class com.jjcorreia.input.KeyManagerConfig
{
function KeyManagerConfig () {
}
static function init() {
setCode("BACKSPACE", 8);
setCode("TAB", 9);
setCode("ENTER", 13);
setCode("SHIFT", 16);
setCode("CONTROL", 17);
setCode("PAUSE", 19);
setCode("BREAK", 19);
setCode("CAPSLOCK", 20);
setCode("ESCAPE", 27);
setCode(" ", 32);
setCode("SPACE", 32);
setCode("PGUP", 33);
setCode("PGDN", 34);
setCode("END", 35);
setCode("HOME", 36);
setCode("LEFT", 37);
setCode("UP", 38);
setCode("RIGHT", 39);
setCode("DOWN", 40);
setCode("INSERT", 45);
setCode("DELETE", 46);
setCode("DELETEKEY", 46);
setCode("DEL", 46);
setCode("0", 48);
setCode("1", 49);
setCode("2", 50);
setCode("3", 51);
setCode("4", 52);
setCode("5", 53);
setCode("6", 54);
setCode("7", 55);
setCode("8", 56);
setCode("9", 57);
setCode(":", 58);
setCode(";", 59);
setCode("<", 60);
setCode("=", 61);
setCode(">", 62);
setCode("?", 63);
setCode("@", 64);
setCode("A", 65);
setCode("B", 66);
setCode("C", 67);
setCode("D", 68);
setCode("E", 69);
setCode("F", 70);
setCode("G", 71);
setCode("H", 72);
setCode("I", 73);
setCode("J", 74);
setCode("K", 75);
setCode("L", 76);
setCode("M", 77);
setCode("N", 78);
setCode("O", 79);
setCode("P", 80);
setCode("Q", 81);
setCode("R", 82);
setCode("S", 83);
setCode("T", 84);
setCode("U", 85);
setCode("V", 86);
setCode("W", 87);
setCode("X", 88);
setCode("Y", 89);
setCode("Z", 90);
setCode("Num0", 96);
setCode("Num1", 97);
setCode("Num2", 98);
setCode("Num3", 99);
setCode("Num4", 100);
setCode("Num5", 101);
setCode("Num6", 102);
setCode("Num7", 103);
setCode("Num8", 104);
setCode("Num9", 105);
setCode("Num*", 106);
setCode("Num+", 107);
setCode("Num.", 110);
setCode("Num/", 111);
setCode("NumLock", 144);
setCode("{", 219);
setCode("[", 219);
setCode("|", 220);
setCode("\\", 220);
setCode("}", 221);
setCode("]", 221);
setCode("~", 192);
setCode("`", 192);
setCode("+", 187);
setCode("=", 187);
setCode("<", 188);
setCode(",", 188);
setCode("_", 189);
setCode("-", 189);
setCode("?", 191);
setCode("/", 191);
return(true);
}
static function setCode($key, $val) {
com.jjcorreia.input.KeyManager.setCode($key, $val);
}
}
Symbol 1152 MovieClip [__Packages.com.jjcorreia.input.KeyObject] Frame 0
class com.jjcorreia.input.KeyObject
{
var key, up, down, Class, addedParams, __get__repeatable;
function KeyObject ($key, $Class, $upMethod, $downMethod, $repeatAble, $addedParams) {
key = $key;
up = $upMethod;
down = $downMethod;
repeatable = ($repeatAble);
Class = $Class;
addedParams = $addedParams;
}
function set repeatable($val) {
if ($val || (!$val)) {
repeat = $val;
}
//return(__get__repeatable());
}
function Up() {
isDown = false;
up.apply(Class, addedParams);
}
function Down() {
isDown = true;
down.apply(Class, addedParams);
}
var repeat = true;
var isDown = false;
}
Symbol 1153 MovieClip [__Packages.com.jjcorreia.input.KeyMacro] Frame 0
class com.jjcorreia.input.KeyMacro extends com.jjcorreia.input.KeyObject
{
var keys, Method, Class, __set__repeatable, length, ID, addedParams;
function KeyMacro ($keys, $Class, $Method, $addedParams) {
super();
keys = $keys;
Method = $Method;
Class = $Class;
__set__repeatable(false);
length = $keys.length;
ID = $keys.join("_");
addedParams = $addedParams;
}
function getMacroKey($id) {
return(keys[$id]);
}
function Run() {
Method.apply(Class, addedParams);
}
}
Symbol 1059 MovieClip [__Packages.com.jjcorreia.application.config.PrefsBase] Frame 0
class com.jjcorreia.application.config.PrefsBase
{
static var classProps, extraProps, myURL, myFile, myDir, ClassPath, GameID, levelProps, onConfigsLoad;
var stageW, stageH, holderList_array;
function PrefsBase ($useExtPrefs) {
if ($useExtPrefs != false) {
var _local2 = 0;
while (_local2 < classProps.length) {
parseClassProperties(classProps[_local2]);
_local2++;
}
for (var _local3 in extraProps) {
this["parse" + _local3](extraProps[_local3]);
}
}
stageW = Stage.width;
stageH = Stage.height;
}
static function InitClass() {
myURL = com.jjcorreia.utils.FileInfo.getFormattedURL();
myFile = com.jjcorreia.utils.FileInfo.getFileName();
myDir = com.jjcorreia.utils.FileInfo.getDirectory();
return(true);
}
function addHolder($name, $depth) {
holderList_array.push([$name, $depth]);
}
static function parseConfigXML($my_xml) {
if (!extraProps) {
extraProps = new Object();
}
var _local7 = $my_xml.firstChild.childNodes;
var _local6 = 0;
while (_local6 < _local7.length) {
var _local2 = _local7[_local6];
switch (_local2.nodeName) {
case "ClassPreferences" :
if (!ClassPath) {
ClassPath = _local2.attributes.Path;
}
if (!GameID) {
GameID = _local2.attributes.GameID;
}
if (!classProps) {
classProps = new Array();
}
classProps.push(_local2.childNodes);
break;
case "LevelData" :
if (!levelProps) {
levelProps = new Array();
}
var _local3 = 0;
while (_local3 < _local2.childNodes.length) {
var _local4 = _local2.childNodes[_local3];
var _local5 = _local4.attributes;
var _local1 = Number(_local5.level) - 1;
if (!isNaN(_local1)) {
if (levelProps.length < (_local1 + 1)) {
levelProps.concat(new Array((_local1 + 1) - levelProps.length));
}
levelProps[_local1] = _local4;
} else {
levelProps.push(_local4);
}
_local3++;
}
break;
default :
extraProps[_local2.nodeName] = _local2;
}
_local6++;
}
onConfigsLoad();
}
function parseClassProperties($nodes) {
if (!$nodes) {
queueParse = true;
return(undefined);
}
queueParse = false;
var i = 0;
while (i < $nodes.length) {
var cNode = $nodes[i];
var cAtts = cNode.attributes;
var usePath = ((cAtts.usePath == "false") ? false : true);
var ClassName = ((((!usePath) || (!ClassPath)) || (!GameID)) ? (cAtts.Class) : ((((ClassPath + ".") + GameID) + ".") + cAtts.Class));
var Class = eval (ClassName);
var classProperties = cNode.childNodes;
if (debugPrefs) {
trace(newline + ClassName);
}
var classPresent = (Class != undefined);
if (!classPresent) {
if (debugPrefs) {
trace((" " + ClassName) + " class not found");
}
} else {
var j = 0;
while (j < classProperties.length) {
var ccNode = classProperties[j];
var Atts = ccNode.attributes;
var ccProperty = Atts.name;
var cctype = Atts.type;
var nodeVal = Atts.value;
var itemType = cctype.toLowerCase();
switch (itemType) {
case "number" :
nodeVal = Number(nodeVal);
break;
case "array" :
nodeVal = nodeVal.split(",");
break;
case "boolean" :
nodeVal = ((nodeVal == "true") ? true : false);
}
if (debugPrefs) {
trace((((((" " + ccProperty) + " = ") + nodeVal) + " (") + typeof(nodeVal)) + ")");
}
if (nodeVal != undefined) {
Class[ccProperty] = nodeVal;
}
j++;
}
}
i++;
}
if (debugPrefs) {
trace(newline);
}
}
static function set Directory($val) {
//return(Directory);
}
static function get File() {
return(com.jjcorreia.utils.FileInfo.__get__File());
}
static function get Directory() {
return(com.jjcorreia.utils.FileInfo.__get__Directory());
}
static function get URL() {
return(com.jjcorreia.utils.FileInfo.__get__URL());
}
function getClassPath() {
if (!ClassPath) {
return("");
}
if (!GameID) {
return(ClassPath);
}
return((ClassPath + ".") + GameID);
}
var totalLevels = 1;
var totalPlayers = 1;
var level = 0;
var vsComp = false;
static var configFile = "Inits.xml";
static var queueParse = false;
static var classInitialized = InitClass();
static var debugPrefs = false;
}
Symbol 1055 MovieClip [__Packages.com.jjcorreia.assets.runtimeAsset] Frame 0
class com.jjcorreia.assets.runtimeAsset
{
var _file, _Loaded, _Used, clip, my_mcl, onLoadComplete;
function runtimeAsset ($file, $hostDir, $subDir) {
if ($subDir == undefined) {
$subDir = "";
}
_file = ((!$hostDir) ? ((com.jjcorreia.application.config.PrefsBase.__get__Directory() + $subDir) + $file) : (($hostDir + $subDir) + $file));
_Loaded = false;
_Used = false;
}
function load($clip) {
if ($clip) {
clip = $clip;
}
newLoader();
}
function flagAsLoaded() {
_Loaded = true;
}
function newLoader() {
my_mcl = new MovieClipLoader();
my_mcl.addListener(this);
my_mcl.loadClip(file, clip);
}
function loadComplete($target) {
flagAsLoaded();
onLoadComplete($target);
}
function destroy() {
_Loaded = false;
my_mcl.removeListener(this);
remove();
}
function remove() {
clip.removeMovieClip();
clip.unloadMovie();
delete clip;
}
function get file() {
return(_file);
}
function get isLoaded() {
return(_Loaded);
}
function get Loaded() {
return(_Loaded);
}
function get loaded() {
return(_Loaded);
}
function get x() {
return(clip._x);
}
function get y() {
return(clip._y);
}
static var folder = "runtimeAssets/";
static var xmlFolder = folder + "XML/";
static var picFolder = folder + "Pics/";
static var audioFolder = folder + "Audio/";
static var swfFolder = folder + "SWFs/";
static var skinFolder = folder + "Skins/";
}
Symbol 1057 MovieClip [__Packages.com.jjcorreia.assets.RuntimeXML] Frame 0
class com.jjcorreia.assets.RuntimeXML extends com.jjcorreia.assets.runtimeAsset
{
var Class, parseMethod, xml, intervalID, __get__file, onLoadProgress, flagAsLoaded, onLoadComplete, __get__loaded;
function RuntimeXML ($file, $Class, $parseMethod, $hostDir, $subDir) {
super($file, $hostDir, (($subDir == undefined) ? (com.jjcorreia.assets.runtimeAsset.xmlFolder) : ($subDir)));
Class = $Class;
parseMethod = $parseMethod;
}
function newLoader() {
xml = new XML();
xml.ignoreWhite = ignoreWhite;
xml.onLoad = com.jjcorreia.utils.Delegate.create(this, loadComplete);
clearInterval(intervalID);
intervalID = setInterval(this, "checkProgress", 50);
xml.load(__get__file());
}
function checkProgress() {
var _local2 = xml.getBytesLoaded();
if (_local2) {
var _local3 = xml.getBytesTotal();
var _local4 = Math.floor((_local2 / _local3) * 100);
onLoadProgress(_local2, _local3);
}
}
function loadComplete() {
clearInterval(intervalID);
checkProgress();
flagAsLoaded();
parseMethod.apply(Class, [xml]);
onLoadComplete();
}
function getBytesLoaded() {
return(xml.getBytesLoaded());
}
function getBytesTotal() {
return(xml.getBytesTotal());
}
function toString() {
var _local2 = "[ RuntimeXML";
_local2 = _local2 + (" file: " + __get__file());
_local2 = _local2 + (" loaded: " + __get__loaded());
_local2 = _local2 + " ]";
return(_local2);
}
var ignoreWhite = true;
}
Symbol 1058 MovieClip [__Packages.com.jjcorreia.utils.FileInfo] Frame 0
class com.jjcorreia.utils.FileInfo
{
static var myURL, myFile, myDir;
function FileInfo () {
}
static function initClass() {
myURL = getFormattedURL();
myFile = getFileName();
myDir = getDirectory();
return(true);
}
static function set directory($val) {
//return(directory);
}
static function get file() {
return(myFile);
}
static function get File() {
return(myFile);
}
static function get directory() {
return(myDir);
}
static function get Directory() {
return(myDir);
}
static function get URL() {
return(myURL);
}
static function getFormattedURL() {
return(unescape(_url.split("\\").join("/")));
}
static function getFullDomain() {
var _local1 = getFormattedURL();
var _local5 = _local1.substr(0, _local1.indexOf(":"));
switch (_local5) {
case "file" :
return("HDD");
case "http" :
var _local3 = _local1.indexOf("//") + 2;
var _local2 = _local1.indexOf("/", _local3);
if (_local2 == -1) {
_local2 = _local1.length;
}
var _local4 = _local1.substring(_local3, _local2);
return(_local4);
}
return(null);
}
static function getDomainName() {
var _local1 = getFullDomain();
if (_local1 == "HDD") {
return(_local1);
}
var _local2 = _local1.split(".");
var _local3 = _local2[_local2.length - 2];
return(_local3);
}
static function getDomain() {
var _local2 = getFullDomain();
if (_local2 == "HDD") {
return(_local2);
}
var _local1 = _local2.split(".");
return((_local1[_local1.length - 2] + ".") + _local1[_local1.length - 1]);
}
static function getFileName() {
var _local1 = myURL.split("/");
return(unescape(_local1[_local1.length - 1]));
}
static function getDirectory() {
var _local1 = myURL.lastIndexOf("/");
return(unescape(myURL.substr(0, _local1 + 1)));
}
static function getFlashMajorVersion() {
var _local1 = getVersion();
if ((!_local1) || (_local1.length == 0)) {
return(5);
}
var _local2 = _local1.split(",");
var _local3 = _local2[0].indexOf(" ");
return(Number(_local2[0].substr(_local3)));
}
static function getOS() {
var _local1 = System.capabilities.version;
if ((!_local1) || (_local1.length == 0)) {
return(null);
}
return(_local1.substr(0, 3));
}
static var classInitialized = initClass();
}
Symbol 1154 MovieClip [__Packages.com.games.pencilRacer.config.PreferencesGame] Frame 0
class com.games.pencilRacer.config.PreferencesGame extends com.jjcorreia.application.config.PrefsBase
{
static var _artColors;
var holderList_array, shapes, track;
function PreferencesGame () {
super();
holderList_array = [["bg", 5], ["bgPaper", 6], ["tutorial", 12], ["shapes", 99], ["assets", 100], ["preview", 101], ["info", 102], ["grid", 103], ["gui", 500], ["gui_expert", 501], ["gui_simple", 502], ["gui2", 503], ["disabler", 509], ["modals", 510], ["cursor", 550], ["tips", 560]];
_artColors = createArtColors();
init();
}
function init() {
}
function getCurrentShapeName() {
return(shapes[shape]);
}
function getPremadeTrackID() {
return(track[trackPart]);
}
static function getArtColors() {
return(_artColors);
}
static function createArtColors() {
var _local10 = new Array();
var _local15 = 16777215 /* 0xFFFFFF */;
var _local12 = 13056;
var _local11 = 3277056 /* 0x320100 */;
var _local16 = 10027263 /* 0x9900FF */;
var _local14 = 51;
var _local13 = 10026753 /* 0x98FF01 */;
var _local9 = [];
var _local6 = [];
var _local8 = [];
var _local2 = _local15;
var _local7 = _local15;
var _local5 = 16711680 /* 0xFF0000 */;
var _local4 = 0;
while (_local4 < 12) {
_local9.push(_local5);
_local5 = _local5 + 4369;
_local4++;
}
_local5 = 65280;
_local4 = 0;
while (_local4 < 12) {
_local6.push(_local5);
_local5 = _local5 + 1114129;
_local4++;
}
_local5 = 255;
_local4 = 0;
while (_local4 < 12) {
_local8.push(_local5);
_local5 = _local5 + 1118464;
_local4++;
}
var _local3 = 0;
while (_local3 < 12) {
var _local1 = 0;
while (_local1 < 21) {
if (_local1 > 0) {
if (_local1 == 18) {
_local2 = _local8[_local3];
} else if (_local1 == 19) {
_local2 = _local6[_local3];
} else if (_local1 == 20) {
_local2 = _local9[_local3];
} else if (((_local1 % 6) == 0) && (_local1 > 0)) {
_local2 = _local2 - _local11;
} else if (_local1 == 17) {
if (_local3 == 11) {
_local2 = 153;
} else if (_local3 == 10) {
_local2 = 4505;
} else if (_local3 == 9) {
_local2 = 8840;
}
} else {
_local2 = _local2 - _local12;
}
}
_local10.push(_local2);
_local1++;
}
if (_local3 == 5) {
_local7 = _local7 - _local13;
} else {
_local7 = _local7 - _local14;
}
_local2 = _local7;
_local3++;
}
_local10.reverse();
return(_local10);
}
static var SHAPE_SIZE = 100;
static var SIZE_TRACK = 150;
static var COLOR_BG = 16777215;
static var COLOR_TRACK = 0;
static var COLOR_ART = 26112;
static var VERSION = 2;
static var MIN_DRAW_DISTANCE = 10;
static var DRAW_LENGTH_MIN = 3;
static var ANGLE_DEVIATION_MIN = 5;
static var MAX_PENCIL_DISTANCE = 100;
static var NUDGE_SPEED = 2;
static var DEFAULT_STROKE = 5;
static var BOUNDRY_SIZE = 15000;
var shape = 0;
var trackPart = 0;
}
Symbol 1155 MovieClip [__Packages.com.games.pencilRacer.apps.Game] Frame 0
class com.games.pencilRacer.apps.Game extends com.jjcorreia.application.AppBase
{
var _quality, drawArea, checkMouseDown, cookie, MainLoop, Skin, skin, makeHolders, Prefs, Cursor, assetsClip, shapesClip, linesClip, previewClip, guiClip, guiSimpleClip, gridClip, camera, camera2, dash, bgPaper, simulating, inModal, startPoint, riderStart, lineCount, onMouseDown, onMouseUp, riderIcon, vehicle, helpBox, tutorial, pLoader, saveStrDisplay, share, mouseListener, tabBar, selectionList, simpleTools, simpleVehicle, simpleProps, simpleControl, playBar, navigator, controlBar, menuBar, vehicleString, vehicleDesc, vehicleClass, onVehicleSelect, lineWarn, scrollRect, lastPos, pEngine, flagIcon, onEnterFrame, onMouseMove, lastMode, markedPoint, mode, selectionBox, selectedPointSquare, s0, s1, lineRoll, _xmouse, _ymouse, lastCursorPos;
function Game (prefs) {
super(prefs || (com.games.pencilRacer.config.PreferencesDefault));
com.games.pencilRacer.backend.BackendPrefs.init();
_root.tabChildren = false;
_quality = "HIGH";
Stage.align = "TL";
Stage.scaleMode = "noScale";
var _local4 = com.games.pencilRacer.config.PreferencesGame.BOUNDRY_SIZE;
drawArea = new flash.geom.Rectangle(-_local4, -_local4, _local4 * 2, _local4 * 2);
init();
run();
checkExternalLoad();
}
function init() {
var _local13 = com.jjcorreia.utils.FileInfo.getOS();
checkMouseDown = ((_local13 == "WIN") ? (checkMouseDownWIN) : (checkMouseDownMAC));
cookie = new com.jjcorreia.utils.prefs.jCookie("AGPencilRacer_1_0", "/");
cookie.save("VERSION", com.games.pencilRacer.config.PreferencesGame.VERSION);
var _local4 = cookie.load("domains", []);
var _local5 = com.jjcorreia.utils.FileInfo.getFullDomain();
var _local6 = false;
for (var _local7 in _local4) {
if (_local4[_local7] == _local5) {
_local6 = true;
break;
}
}
if (!_local6) {
_local4.push(_local5);
}
cookie.save("domains", _local4);
var _local11 = cookie.load("globalMute", false);
var _local12 = cookie.load("soundMuted", false);
var _local14 = cookie.load("musicMuted", false);
if (_local11) {
_global.soundPanel.toggleGlobalMute();
}
if (_local12) {
_global.soundPanel.toggleSound();
}
if (_local14) {
_global.soundPanel.toggleMusic();
}
MainLoop = main;
Skin = new com.games.pencilRacer.gui.Interface(_root, this);
skin = Skin;
makeHolders();
setVehicle(Prefs.vehicles[0], Prefs.vehDesc()[0]);
initUI();
Cursor = new com.games.pencilRacer.input.GameCursor();
Cursor.setClip(Skin.getHolder("cursor"), "Cursor");
assetsClip = Skin.getHolder("assets");
assetsClip.createEmptyMovieClip("pressClip", 0);
shapesClip = assetsClip.createEmptyMovieClip("shapes", 1);
linesClip = assetsClip.createEmptyMovieClip("lines", 3);
previewClip = Skin.getHolder("preview");
guiClip = Skin.getHolder("gui");
guiSimpleClip = Skin.getHolder("gui_simple");
gridClip = Skin.getHolder("grid");
initGuiMode();
setBGColor(bgColor);
showBGPaper(useBGpaper);
camera = new com.games.pencilRacer.objects.Camera(assetsClip);
camera2 = new com.games.pencilRacer.objects.Camera(previewClip);
dash = new com.senocular.drawing.DashedLine(previewClip, 1, 3);
com.games.pencilRacer.apps.Zoom.init([camera.clip, camera2.clip], this);
enbableBindings();
var _local10 = cookie.load("rc", 0);
cookie.save("rc", _local10 + 1);
var _local9 = (simpleMode ? "simpleTutorial" : "tutorial");
var _local8 = Number(cookie.load(_local9, 0));
if (_local8 < 3) {
guiClip._visible = false;
guiSimpleClip._visible = false;
new com.jjcorreia.utils.Delay(0.15, this, showTutorial);
_local8++;
cookie.save(_local9, _local8);
} else {
new com.games.pencilRacer.gui.dialogs.TutorialReminder(simpleMode);
}
_global.soundPanel.start(com.games.pencilRacer.config.SoundConfig.MUSIC_LOOP);
_root.fps_mc.swapDepths(999999);
_root.waterLogo_mc.swapDepths(Skin.getHolder("tutorial").getDepth() - 1);
}
function showBGPaper(val) {
useBGpaper = val;
if (val) {
if (!bgPaper) {
bgPaper = new com.games.pencilRacer.gui.BackgroundPaper();
}
} else {
bgPaper.destroy();
delete bgPaper;
}
}
function showProperGui() {
if (simpleMode) {
guiClip._visible = false;
guiSimpleClip._visible = true;
com.jjcorreia.gui.ToolTip.sleepDelay = 500;
} else {
guiSimpleClip._visible = false;
guiClip._visible = true;
com.jjcorreia.gui.ToolTip.sleepDelay = 300;
}
}
function initGuiMode() {
showProperGui();
com.jjcorreia.gui.ToolTip.init(Skin.getHolder("tips"), (simpleMode ? 100 : 650));
com.jjcorreia.gui.ToolTip.maxWidth = 350;
skin.init(this);
cookie.save("simpleMode", simpleMode);
}
function getCurrentGUI() {
return((simpleMode ? (guiSimpleClip) : (guiClip)));
}
function checkExternalLoad() {
if (_level0.url_id != undefined) {
var _local2 = new com.games.pencilRacer.gui.dialogs.LoadConfirmation(com.jjcorreia.utils.Delegate.create(this, loadExternalTrack, _level0.url_id));
}
}
function run() {
simulating = false;
inModal = false;
com.games.pencilRacer.apps.SpatialDatabase.init();
com.games.pencilRacer.objects.Line.initClass();
setMode(com.games.pencilRacer.config.Modes.PENCIL);
startPoint = null;
riderStart = null;
updatePreview();
panTo(0, 0);
setColor(0);
lineCount.display();
onMouseDown = MouseDown;
onMouseUp = MouseUp;
}
function reset(skipRun) {
if (riderIcon) {
riderIcon.destroy();
delete riderIcon;
}
closeTutorial();
clearFlag();
if (vehicle) {
vehicle.destroy();
delete vehicle;
}
var _local2 = com.games.pencilRacer.apps.SpatialDatabase.getAll();
for (var _local3 in _local2) {
removeLine(_local2[_local3]);
}
if (skipRun != true) {
run();
}
}
function newTrack() {
var _local2 = new com.games.pencilRacer.gui.dialogs.Confirmation(com.jjcorreia.utils.Delegate.create(this, reset));
}
function showOptions() {
var _local1 = new com.games.pencilRacer.gui.dialogs.Options();
}
function showCredits() {
helpBox.close();
var _local2 = new com.games.pencilRacer.gui.dialogs.Credits();
}
function showTutorial() {
closeTutorial();
com.jjcorreia.input.KeyManager.pause();
if (simpleMode) {
tutorial = new com.games.pencilRacer.gui.dialogs.TutorialSimple();
} else {
tutorial = new com.games.pencilRacer.gui.dialogs.Tutorial();
}
com.games.pencilRacer.apps.Zoom.zoomTo(com.games.pencilRacer.apps.Zoom.DEFAULT_EDIT);
panTo(0, 0);
showProperGui();
}
function closeTutorial() {
if (tutorial) {
tutorial.close();
delete tutorial;
com.jjcorreia.input.KeyManager.resume();
}
showEditUI();
}
function showHelp() {
if (helpBox) {
helpBox.close();
}
delete helpBox;
if (simpleMode) {
helpBox = new com.games.pencilRacer.gui.dialogs.HelpSimple();
} else {
helpBox = new com.games.pencilRacer.gui.dialogs.Help(0, 0);
}
}
function showOpenDialog() {
if (pLoader) {
pLoader.destroy();
}
pLoader = new com.games.pencilRacer.gui.dialogs.PasteLoad(200, 200);
}
function loadExternalTrack(url_id) {
if (url_id) {
_level0.url_id = url_id;
}
var _local1 = new com.games.pencilRacer.backend.Loader(_level0.url_id);
}
function shareGame() {
saveStrDisplay = new com.games.pencilRacer.gui.dialogs.SaveStringDisplay(200, 200, save.data, "chooseShare");
}
function saveGame() {
saveStrDisplay = new com.games.pencilRacer.gui.dialogs.SaveStringDisplay(200, 200, save.data);
}
function loadSave(str, title) {
setTitle(title);
reset();
var _local2 = new com.games.pencilRacer.gui.dialogs.LoadProgress();
var _local3 = new com.games.pencilRacer.apps.saves.DefaultSave(str, _local2, _level0.url_id != undefined);
delete _level0.url_id;
}
function submit(option) {
saveStrDisplay.close();
switch (option) {
case com.games.pencilRacer.gui.dialogs.AbstractShare.FRIEND :
share = new com.games.pencilRacer.gui.dialogs.ShareFriend();
break;
case com.games.pencilRacer.gui.dialogs.AbstractShare.GALLERY :
share = new com.games.pencilRacer.gui.dialogs.ShareGallery(false);
break;
case com.games.pencilRacer.gui.dialogs.AbstractShare.ALL :
share = new com.games.pencilRacer.gui.dialogs.ShareAll();
break;
case com.games.pencilRacer.gui.dialogs.AbstractShare.CODE :
share = new com.games.pencilRacer.gui.dialogs.ShareGallery(true);
}
}
function enbableBindings() {
mouseListener = new Object();
mouseListener.onMouseWheel = function ($delta) {
com.jjcorreia.application.AppBase.__get__clip().onMouseWheel($delta);
};
Mouse.addListener(mouseListener);
com.jjcorreia.input.KeyManager.init();
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.MOVE_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.MOVE, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.LINE_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.LINE, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.PENCIL_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.PENCIL, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.PAN_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.PAN, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.ZOOM_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.ZOOM, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.POINT_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.POINT, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.ERASE_KEY, this, null, setMode, false, com.games.pencilRacer.config.Modes.ERASE, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey("N", this, null, setMode, false, com.games.pencilRacer.config.Modes.LINE, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey("D", this, null, setMode, false, com.games.pencilRacer.config.Modes.PENCIL, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey("P", this, null, setMode, false, com.games.pencilRacer.config.Modes.PENCIL, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey("M", this, null, setMode, false, com.games.pencilRacer.config.Modes.ZOOM, tabBar.clip.art_tab);
com.jjcorreia.input.KeyManager.bindKey("DEL", this, null, removeSelectedLines, false);
com.jjcorreia.input.KeyManager.bindKey("SPACE", this, tempPanOff, tempPanOn, false);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.SIMULATE_KEY, this, null, executeLevel, false);
com.jjcorreia.input.KeyManager.bindKey("UP", this, null, nudgeSelection, true, "UP");
com.jjcorreia.input.KeyManager.bindKey("DOWN", this, null, nudgeSelection, true, "DOWN");
com.jjcorreia.input.KeyManager.bindKey("LEFT", this, null, nudgeSelection, true, "LEFT");
com.jjcorreia.input.KeyManager.bindKey("RIGHT", this, null, nudgeSelection, true, "RIGHT");
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.SAVE_KEY, this, saveGame);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.LOAD_KEY, this, showOpenDialog, null, false);
}
function nudgeSelection(direction) {
var _local3 = 0;
var _local2 = 0;
switch (direction) {
case "UP" :
_local2 = -com.games.pencilRacer.config.PreferencesGame.NUDGE_SPEED;
break;
case "DOWN" :
_local2 = com.games.pencilRacer.config.PreferencesGame.NUDGE_SPEED;
break;
case "LEFT" :
_local3 = -com.games.pencilRacer.config.PreferencesGame.NUDGE_SPEED;
break;
case "RIGHT" :
_local3 = com.games.pencilRacer.config.PreferencesGame.NUDGE_SPEED;
}
for (var _local4 in selectionList) {
selectionList[_local4].nudge(_local3, _local2);
}
}
function initUI() {
simpleTools = new com.games.pencilRacer.gui.palettes.ToolsSimple();
simpleVehicle = new com.games.pencilRacer.gui.palettes.VehiclesSimple();
simpleProps = new com.games.pencilRacer.gui.palettes.PropertiesSimple();
simpleControl = new com.games.pencilRacer.gui.palettes.ControlPaletteSimple();
lineCount = new com.games.pencilRacer.gui.palettes.LineCount(0, 0);
playBar = new com.games.pencilRacer.gui.palettes.PlaybackBar();
}
function hideEditUI() {
if (simpleMode) {
simpleTools.hide();
simpleVehicle.hide();
simpleProps.hide();
simpleControl.hide();
} else {
navigator.hide();
tabBar.hide();
controlBar.hide();
menuBar.hide();
}
lineCount.hide();
}
function showEditUI() {
if (simpleMode) {
simpleTools.show();
simpleVehicle.show();
simpleProps.show();
simpleControl.show();
} else {
navigator.show();
tabBar.show();
controlBar.show();
menuBar.show();
}
lineCount.show();
}
function updatePreview() {
}
function togglePhysics(value) {
physicsEnabled = value;
simpleTools.selected = !value;
simpleTools.update();
simpleProps.update();
displayCursorTool();
}
function setVehicle(type, description, skip) {
vehicleString = type;
vehicleDesc = description;
vehicleClass = eval (("com.games.pencilRacer.objects.vehicles." + type) + "Vehicle");
clearFlag();
tabBar.selectVehicle(type);
simpleVehicle.selectVehicle(type, description);
onVehicleSelect();
return(vehicleClass != undefined);
}
function validateTrack() {
if (lineWarn) {
lineWarn.destroy();
delete lineWarn;
}
if (com.games.pencilRacer.apps.SpatialDatabase.getTrackCount() == 0) {
lineWarn = new com.games.pencilRacer.gui.dialogs.LineWarning();
return(false);
}
return(true);
}
function executeLevel() {
if (inModal) {
return(undefined);
}
if (simulating) {
stopLevel();
return(undefined);
}
if (!validateTrack()) {
return(undefined);
}
closeTutorial();
var _local4 = new flash.geom.Rectangle(0, 0, Stage.width, Stage.height);
scrollRect = _local4;
simulating = true;
lastPos = camera.getPosition();
com.games.pencilRacer.apps.Zoom.simulationZoom();
clearSelection();
hideEditUI();
playBar.show();
var _local2 = com.games.pencilRacer.apps.SpatialDatabase.getAll();
for (var _local3 in _local2) {
_local2[_local3].simulateMode();
}
pEngine = new com.games.pencilRacer.apps.Physics();
if (vehicle) {
vehicle.destroy();
delete vehicle;
}
vehicle = new this.vehicleClass(riderStart);
if (flagIcon) {
vehicle.applyType(flagIcon.data);
}
pause();
dash.clear();
onEnterFrame = main_simulate;
onMouseMove = main_simulate;
main_simulate();
Cursor.hide();
}
function stopLevel() {
_global.soundPanel.stopAllSounds();
var _local3 = com.games.pencilRacer.apps.SpatialDatabase.getAll();
for (var _local4 in _local3) {
_local3[_local4].editMode();
}
scrollRect = null;
simulating = false;
com.games.pencilRacer.apps.Zoom.editZoom();
panTo(lastPos.x, lastPos.y);
delete onEnterFrame;
vehicle.pause();
vehicle.clip.onMouseMove = null;
showEditUI();
playBar.hide();
pause();
Cursor.show();
Skin.doCursorCheck();
updatePreview();
simpleTools.update();
simpleControl.update();
}
function revertMode() {
setMode(lastMode);
}
function tempPanOn() {
setMode(com.games.pencilRacer.config.Modes.PAN);
}
function tempPanOff() {
stopPan();
revertMode();
}
function startPan() {
markedPoint = cursorPos;
resume(main_pan);
}
function stopPan() {
pause();
}
function panTo(x, y) {
camera.moveTo(x, y);
camera2.moveTo(x, y);
navigator.drawViewBox([camera.clip]);
}
function panToCenter(x, y) {
panTo(x + (Stage.width / 2), y + (Stage.height / 2));
}
function setTitle(title) {
if (title.length == 0) {
return(undefined);
}
trace("setTitle " + title);
this.title = title;
}
function setBGColor($color) {
if (isNaN($color)) {
return(undefined);
}
bgColor = $color;
var _local2 = Skin.getHolder("bg");
_local2.clear();
_local2.beginFill($color);
_local2.lineTo(Stage.width, 0);
_local2.lineTo(Stage.width, Stage.height);
_local2.lineTo(0, Stage.height);
_local2.lineTo(0, 0);
_local2.endFill();
}
function removeSelectedLines() {
for (var _local3 in selectionList) {
var _local2 = selectionList[_local3];
removeLine(_local2);
}
pause();
clearSelection();
updatePreview();
}
function removeLine(obj) {
if (!obj) {
return(undefined);
}
if (obj.Class == "Line") {
lineCount.subtract();
}
obj.destroy();
}
function onMouseWheel($delta) {
com.games.pencilRacer.apps.Zoom.onMouseWheel($delta);
}
function setMode($mode, tab, noDeselect) {
if ((mode != $mode) && (noDeselect != true)) {
delete startPoint;
clearSelection();
}
if (tab) {
physicsEnabled = !tab.selected;
}
lastMode = mode;
Cursor.show();
pause();
dash.clear();
mode = $mode;
displayCursorTool();
tabBar.display(mode);
simpleTools.display(mode);
if ((mode == com.games.pencilRacer.config.Modes.SHAPES) && (simpleMode)) {
new com.games.pencilRacer.gui.dialogs.ShapesSimpleDialog();
}
if ((mode == com.games.pencilRacer.config.Modes.TRACK) && (simpleMode)) {
new com.games.pencilRacer.gui.dialogs.TrackPartsDialog();
}
Skin.doCursorCheck();
}
function displayCursorTool() {
Cursor.clip.gotoAndStop(mode);
Cursor.clip.artIndicator_mc._visible = !physicsEnabled;
var _local2 = new flash.geom.ColorTransform();
_local2.redOffset = (physicsEnabled ? 60 : 85);
_local2.greenOffset = (physicsEnabled ? 95 : 110);
_local2.blueOffset = (physicsEnabled ? 110 : 60);
Cursor.clip.c_mc.transform.colorTransform = _local2;
Cursor.clip.b_mc.transform.colorTransform = _local2;
Cursor.clip.filters = [new flash.filters.DropShadowFilter(2, 45, 0, 0.4, 2, 2, 1, 2)];
}
function MouseDown() {
if ((!canStartDraw) || (simulating)) {
return(false);
}
switch (mode) {
case com.games.pencilRacer.config.Modes.MOVE :
markStart(true);
resume(main_moveWait);
break;
case com.games.pencilRacer.config.Modes.POINT :
checkPointEdit();
break;
case com.games.pencilRacer.config.Modes.PENCIL :
markStart();
resume(main_draw);
break;
case com.games.pencilRacer.config.Modes.LINE :
break;
case com.games.pencilRacer.config.Modes.PEN :
break;
case com.games.pencilRacer.config.Modes.PAN :
startPan();
break;
case com.games.pencilRacer.config.Modes.ERASE :
resume(main_erase);
break;
case com.games.pencilRacer.config.Modes.SHAPES :
var _local2 = new com.games.pencilRacer.objects.CustomShape(cursorPos, Prefs.getCurrentShapeName());
setMode(com.games.pencilRacer.config.Modes.MOVE);
break;
case com.games.pencilRacer.config.Modes.TRACK :
_local2 = new com.games.pencilRacer.objects.CustomTrack(cursorPos, Prefs.getPremadeTrackID());
setMode(com.games.pencilRacer.config.Modes.MOVE);
}
return(true);
}
function MouseUp() {
switch (mode) {
case com.games.pencilRacer.config.Modes.MOVE :
pause();
if (selectionList.length == 0) {
selectionList = [];
var _local3 = com.games.pencilRacer.apps.SpatialDatabase.getLinesBetween(startPoint, cursorPos, physicsEnabled);
var _local4 = selectionBox.getRect();
for (var _local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2.type == com.games.pencilRacer.objects.Line.TYPE_HIDDEN) {
continue;
}
if (_local4.containsPoint(_local2.__get__startPoint()) || (_local4.containsPoint(_local2.__get__endPoint()))) {
selectObject(_local2, false);
}
}
if (selectionList.length > 0) {
displayLineData(selectionList[0]);
}
selectionBox.destroy();
delete selectionBox;
updatePreview();
} else {
updatePreview();
}
break;
case com.games.pencilRacer.config.Modes.POINT :
if (selectedPointSquare) {
pause();
}
break;
case com.games.pencilRacer.config.Modes.PENCIL :
pause();
dash.clear();
lastAngle = -1000;
break;
case com.games.pencilRacer.config.Modes.LINE :
if (startPoint) {
markEnd();
} else if (canStartDraw) {
markStart();
resume(main_dashes);
}
break;
case com.games.pencilRacer.config.Modes.ZOOM :
if (canStartDraw) {
com.games.pencilRacer.apps.Zoom.clickZoom();
}
break;
case com.games.pencilRacer.config.Modes.PAN :
stopPan();
break;
case com.games.pencilRacer.config.Modes.ERASE :
pause();
}
}
function onShapePress(shape) {
switch (mode) {
case com.games.pencilRacer.config.Modes.MOVE :
if (objectSelected(shape)) {
dragSelection();
} else {
clearSelection();
selectObject(shape, false);
dragSelection();
}
break;
case com.games.pencilRacer.config.Modes.ERASE :
removeLine(shape);
}
}
function onLinePress(line) {
onLineRollOut();
if ((line.__get__physics() && (!physicsEnabled)) || ((!line.__get__physics()) && (physicsEnabled))) {
return(undefined);
}
switch (mode) {
case com.games.pencilRacer.config.Modes.MOVE :
if (objectSelected(line)) {
(Key.isDown(16) ? (deselectLine(line)) : (dragSelection()));
} else if (Key.isDown(16)) {
selectObject(line, true);
} else {
clearSelection();
selectObject(line, true);
dragSelection();
}
break;
case com.games.pencilRacer.config.Modes.POINT :
if (objectSelected(line)) {
} else if ((!s0) || (!checkPointEdit())) {
clearSelection();
selectObject(line, true);
line.editPointsMode();
s0.destroy();
s1.destroy();
s0 = new com.games.pencilRacer.gui.PointSquare(line.p1, line, true);
s1 = new com.games.pencilRacer.gui.PointSquare(line.p2, line, false);
}
checkPointEdit();
break;
case com.games.pencilRacer.config.Modes.ERASE :
removeLine(line);
}
}
function onLineRoll(line) {
if (physicsEnabled) {
onLineRollOut();
lineRoll = new com.games.pencilRacer.gui.palettes.LineRoll(_xmouse, _ymouse, line);
}
}
function onLineRollOut() {
if (lineRoll) {
lineRoll.destroy();
delete lineRoll;
}
}
function checkPointEdit() {
var _local3 = selectionList[0];
var _local2 = Cursor.getPosition();
var _local5 = com.jjcorreia.geom.Vector.distance(_local2, _local3.p1);
var _local4 = com.jjcorreia.geom.Vector.distance(_local2, _local3.p2);
if (s0.clip.hitTest(_local2.x, _local2.y)) {
selectedPointSquare = s0;
resume(main_movePoint);
return(true);
}
if (s1.clip.hitTest(_local2.x, _local2.y)) {
selectedPointSquare = s1;
resume(main_movePoint);
return(true);
}
return(false);
}
function endPointEdit() {
if (s0) {
s0.destroy();
delete s0;
s1.destroy();
delete s1;
delete selectedPointSquare;
selectionList[0].draw();
}
}
function createSelBox(p) {
if (selectionBox) {
selectionBox.destroy();
selectionBox = null;
}
selectionBox = new com.games.pencilRacer.gui.SelectionBox(p);
}
function objectSelected(obj, $show) {
for (var _local4 in selectionList) {
var _local2 = selectionList[_local4];
if (_local2 == obj) {
return(true);
}
}
return(false);
}
function clearSelection() {
endPointEdit();
for (var _local2 in selectionList) {
if (mode == com.games.pencilRacer.config.Modes.POINT) {
selectionList[_local2].leavePointsMode();
}
selectionList[_local2].deselect();
}
selectionList = [];
selectionBox.destroy();
tabBar.clearLineData();
}
function selectObject(obj, update) {
selectionList.push(obj);
obj.select();
if (update != false) {
displayLineData(com.games.pencilRacer.objects.Line(obj));
}
}
function displayLineData(line) {
(simpleMode ? (simpleProps.displayLineData(line)) : (tabBar.displayLineData(line)));
}
function deselectLine(line) {
if (lastMode == com.games.pencilRacer.config.Modes.POINT) {
line.leavePointsMode();
}
line.deselect();
for (var _local3 in selectionList) {
if (selectionList[_local3] == line) {
selectionList.splice(Number(_local3), 1);
break;
}
}
}
function selectLineGroup(lines) {
for (var _local3 in lines) {
selectObject(lines[_local3]);
}
displayLineData(line);
}
function dragSelection() {
lastCursorPos = cursorPos;
for (var _local2 in selectionList) {
selectionList[_local2].onDragStart();
}
resume(main_drag);
}
function setStroke(c) {
if (isNaN(c.__get__value())) {
return(undefined);
}
stroke = c.value;
for (var _local2 in selectionList) {
selectionList[_local2].stroke = stroke;
selectionList[_local2].draw();
}
}
function setFriction(c) {
if (isNaN(c.__get__value())) {
return(undefined);
}
for (var _local3 in selectionList) {
selectionList[_local3].setFriction(1 - c.__get__value());
}
}
function setAccel(c) {
if (isNaN(c.__get__value())) {
return(undefined);
}
for (var _local3 in selectionList) {
selectionList[_local3].setAccel(c.__get__value());
}
}
function setColor(color) {
if (isNaN(color)) {
return(undefined);
}
for (var _local4 in selectionList) {
var _local2 = selectionList[_local4];
_local2.redraw(color);
}
}
function setLinePhysics($setting) {
for (var _local4 in selectionList) {
var _local2 = selectionList[_local4];
_local2.__set__physics($setting);
}
}
function checkStartFlag(startPoint) {
if (((leaveFlag != true) && (physicsEnabled)) && (com.games.pencilRacer.apps.SpatialDatabase.getTrackCount() == 0)) {
markRiderStart(startPoint);
}
}
function markStart(leaveFlag) {
if (!canDraw) {
return(false);
}
startPoint = cursorPos;
checkStartFlag(startPoint);
return(true);
}
function markEnd() {
if (!canDraw) {
return(undefined);
}
pause();
if (!startPoint) {
return(undefined);
}
var _local4 = cursorPos;
var _local5 = com.jjcorreia.geom.Vector.distance(startPoint, _local4);
if (_local5 < com.games.pencilRacer.config.PreferencesGame.DRAW_LENGTH_MIN) {
previewClip.clear();
return(undefined);
}
var _local2;
var _local3;
if (simpleMode) {
_local2 = simpleProps.friction;
_local3 = simpleProps.acceleration;
} else {
_local2 = tabBar.friction;
_local3 = tabBar.acceleration;
}
addLine(startPoint, _local4, null, 0, _local2, _local3, physicsEnabled, stroke);
startPoint = null;
previewClip.clear();
}
function markRiderStart($p) {
riderStart = $p.clone();
if (!riderIcon) {
riderIcon = new com.games.pencilRacer.gui.RiderIcon(riderStart);
} else {
riderIcon.moveNow(riderStart.x, riderStart.y);
}
}
function markFlag() {
flagIcon.destroy();
flagIcon = new com.games.pencilRacer.gui.FlagIcon(vehicle.getCenter(), vehicle.describeType());
}
function clearFlag() {
if (flagIcon) {
flagIcon.destroy();
delete flagIcon;
simpleTools.update();
simpleControl.update();
}
}
function addLine($start, $end, $color, $type, $friction, $acceleration, $physics, $stroke, noInit) {
if (lineCount.maxedOut) {
return(undefined);
}
var _local2 = (($color != undefined) ? ($color) : ((physicsEnabled ? (drawColor) : (drawArtColor))));
var _local3 = new com.games.pencilRacer.objects.Line($start, $end, _local2, $type, $friction, $acceleration, $physics, $stroke, noInit);
updatePreview();
lineCount.add();
return(_local3);
}
function checkMouseDownWIN() {
if (!Key.isDown(1)) {
MouseUp();
return(false);
}
return(true);
}
function checkMouseDownMAC() {
return(true);
}
function checkBorders() {
if (_xmouse < 50) {
panTo(camera.x + 1, camera.y);
}
}
function main() {
if (checkMouseDown()) {
var _local2 = previewClip;
_local2.clear();
_local2.lineStyle(2, 0, 100, true);
_local2.moveTo(startPoint.x, startPoint.y);
_local2.lineTo(_local2._xmouse, _local2._ymouse);
}
updateAfterEvent();
}
function main_dashes() {
var _local2 = previewClip;
dash.clear();
dash.lineStyle(0, 0, 100, false, "none", "square");
dash.moveTo(startPoint.x, startPoint.y);
dash.lineTo(_local2._xmouse, _local2._ymouse);
updateAfterEvent();
}
function main_draw() {
if (checkMouseDown()) {
var _local4 = startPoint.subtract(cursorPos);
var _local3 = com.jjcorreia.geom.Vector.distance(startPoint, cursorPos);
var _local2 = _local4.__get__angleDeg();
while (_local2 > 360) {
_local2 = _local2 - 360;
}
while (_local2 < 0) {
_local2 = _local2 + 360;
}
main();
if ((Math.abs(lastAngle - _local2) >= com.games.pencilRacer.config.PreferencesGame.ANGLE_DEVIATION_MIN) || (_local3 > com.games.pencilRacer.config.PreferencesGame.MAX_PENCIL_DISTANCE)) {
if (_local3 > com.games.pencilRacer.config.PreferencesGame.MIN_DRAW_DISTANCE) {
lastAngle = _local2;
markEnd();
markStart();
resume();
}
}
}
}
function main_erase() {
var _local3 = com.games.pencilRacer.apps.SpatialDatabase.getTile(cursorPos, physicsEnabled);
var _local4 = false;
for (var _local5 in _local3) {
var _local2 = _local3[_local5];
if (com.jjcorreia.geom.SegmentMath.circleLine(cursorPos, 4, _local2.p1, _local2.p2)) {
removeLine(_local2);
_local4 = true;
}
}
if (_local4) {
updatePreview();
}
}
function main_pan() {
panTo(_xmouse - (markedPoint.x * com.games.pencilRacer.apps.Zoom.value), _ymouse - (markedPoint.y * com.games.pencilRacer.apps.Zoom.value));
}
function main_movePoint() {
var _local2 = previewClip;
selectedPointSquare.moveNow(_local2._xmouse, _local2._ymouse);
}
function main_simulate() {
var _local2 = vehicle.getCenter();
_local2.negate();
_local2.multiply(com.games.pencilRacer.apps.Zoom.value);
panTo(_local2.x + (Stage.width / 2), _local2.y + (Stage.height / 2));
}
function main_moveWait() {
var _local2 = previewClip;
if ((Math.abs(_local2._xmouse - startPoint.x) > 10) || (Math.abs(_local2._ymouse - startPoint.y) > 10)) {
pause();
clearSelection();
createSelBox(startPoint);
resume(main_drawBounds);
}
}
function main_drawBounds() {
selectionBox.draw(cursorPos);
}
function main_drag() {
var _local2 = cursorPos.difference(lastCursorPos);
lastCursorPos = cursorPos;
for (var _local3 in selectionList) {
selectionList[_local3].nudge(_local2.x, _local2.y);
}
}
function pause() {
delete onMouseMove;
}
function resume($newMethod) {
if ($newMethod) {
MainLoop = $newMethod;
}
onMouseMove = MainLoop;
}
function goModal() {
inModal = true;
pause();
Cursor.hide();
com.jjcorreia.input.KeyManager.pause();
Skin.pause();
delete onMouseDown;
delete onMouseUp;
}
function endModal() {
inModal = false;
Cursor.show();
com.jjcorreia.input.KeyManager.resume();
Skin.resume();
onMouseDown = MouseDown;
onMouseUp = MouseUp;
}
function get canDraw() {
return(!simulating);
}
function getWithinBounds() {
return(drawArea.containsPoint(cursorPoint));
}
function get canStartDraw() {
var _local2 = getCurrentGUI();
return((!_local2.hitTest(_xmouse, _ymouse, true)) && (!simulating));
}
function get cursorPoint() {
return(camera.getCursorPoint());
}
function get cursorPos() {
return(camera.getCursorPos());
}
var bgColor = com.games.pencilRacer.config.PreferencesGame.COLOR_BG;
var drawColor = com.games.pencilRacer.config.PreferencesGame.COLOR_TRACK;
var drawArtColor = com.games.pencilRacer.config.PreferencesGame.COLOR_ART;
var stroke = com.games.pencilRacer.config.PreferencesGame.DEFAULT_STROKE;
var title = "";
var physicsEnabled = true;
var simpleMode = true;
var useBGpaper = true;
var lastAngle = -1000;
}
Symbol 1156 MovieClip [__Packages.com.games.pencilRacer.objects.Camera] Frame 0
class com.games.pencilRacer.objects.Camera
{
var x, y, clip;
function Camera (clip) {
x = 0;
y = 0;
this.clip = clip;
}
function moveTo(x, y) {
this.x = x;
this.y = y;
render();
}
function render() {
clip._x = x;
clip._y = y;
}
function getPosition() {
return(new com.jjcorreia.geom.Vector(x, y));
}
function getCursorPos() {
return(new com.jjcorreia.geom.Vector(clip._xmouse, clip._ymouse));
}
function getCursorPoint() {
return(new flash.geom.Point(clip._xmouse, clip._ymouse));
}
function toString() {
var _local2 = "[ Camera";
_local2 = _local2 + (", x:" + x);
_local2 = _local2 + (", y:" + y);
_local2 = _local2 + " ]";
return(_local2);
}
}
Symbol 1157 MovieClip [__Packages.com.games.pencilRacer.apps.Physics] Frame 0
class com.games.pencilRacer.apps.Physics
{
var particles, constraints, angularConstraints, grav, objToP1, d, maxV, minV;
function Physics () {
particles = [];
constraints = [];
angularConstraints = [];
grav = new com.jjcorreia.physics.VectorForce(false, 0, GRAVITY);
objToP1 = new com.jjcorreia.geom.Vector();
d = new com.jjcorreia.geom.Vector();
maxV = new com.jjcorreia.geom.Vector();
minV = new com.jjcorreia.geom.Vector();
}
function addConstraint(c) {
constraints.push(c);
}
function addAngularConstraint(c) {
angularConstraints.push(c);
}
function addParticle(p) {
particles.push(p);
}
function main(vehicle) {
if (!Key.isDown(32)) {
integrate();
}
var _local2;
_local2 = 0;
while (_local2 < _iterations) {
satisfyConstraints();
checkCollisions(vehicle);
satisfyConstraints2();
_local2++;
}
render();
}
function integrate() {
for (var _local3 in particles) {
var _local2 = particles[_local3];
_local2.addForce(grav);
_local2.integrate(timeFactor);
}
}
function checkCollisions(vehicle) {
var _local6 = objToP1;
var _local8 = d;
var _local3;
var _local2;
for (var _local21 in particles) {
_local3 = particles[_local21];
var _local11 = _local3.__get__radius();
var _local5 = _local3.curr;
var _local18 = com.games.pencilRacer.apps.SpatialDatabase.getCollidableObjects2(_local5.x, _local5.y, _local11);
for (var _local20 in _local18) {
_local2 = _local18[_local20];
_local6.x = _local5.x - _local2.p1.x;
_local6.y = _local5.y - _local2.p1.y;
var _local4 = _local6.dot(_local2.P1ToP2) / _local2.P1ToP2.__get__lengthSq();
if ((_local4 > 0) && (_local4 < 1)) {
var _local10 = _local2.cos;
var _local9 = _local2.sin;
var _local13 = _local3.prev.x - _local2.x;
var _local12 = _local3.prev.y - _local2.y;
var _local14 = (_local10 * _local12) - (_local9 * _local13);
if (_local14 > 0) {
var _local16 = _local5.x - _local2.x;
var _local17 = _local5.y - _local2.y;
var _local7 = (_local10 * _local17) - (_local9 * _local16);
if (_local7 < _local11) {
_local8.x = _local6.x - (_local2.P1ToP2.x * _local4);
_local8.y = _local6.y - (_local2.P1ToP2.y * _local4);
_local8.multiply((_local11 - _local7) / _local7);
_local3.collide(_local8, _local2.normal);
vehicle.collide();
var _local15 = Math.max(Math.min((1 - _local2.friction) + _local3.friction, 1), 0);
_local3.collisionFriction = 1 - _local15;
_local3.addForce(_local2.accForce);
}
}
}
}
}
}
function satisfyConstraints() {
for (var _local2 in angularConstraints) {
angularConstraints[_local2].satisfy();
}
for (var _local2 in constraints) {
constraints[_local2].satisfy();
}
}
function satisfyConstraints2() {
for (var _local2 in constraints) {
constraints[_local2].satisfy2();
}
}
function removeConstraint(c) {
var _local2 = 0;
while (_local2 < constraints.length) {
if (constraints[_local2] == c) {
constraints.splice(_local2, 1);
return(undefined);
}
_local2++;
}
}
function render() {
for (var _local2 in particles) {
particles[_local2].updateMC();
}
}
function setIterations(value) {
_iterations = value;
}
var GRAVITY = 0.18;
static var DEFAULT_ITERATIONS = 3;
var CONSTRAINT_ITERATIONS = 0;
var _iterations = DEFAULT_ITERATIONS;
var timeFactor = 1;
var lastTime = 0;
}
Symbol 1158 MovieClip [__Packages.com.jjcorreia.physics.VectorForce] Frame 0
class com.jjcorreia.physics.VectorForce
{
var fvx, fvy, _useMass, value, __get__vx, __get__vy, __get__useMass;
function VectorForce (useMass, vx, vy) {
fvx = vx;
fvy = vy;
_useMass = useMass;
value = new com.jjcorreia.geom.Vector(vx, vy);
}
function set vx(x) {
fvx = x;
value.x = x;
//return(__get__vx());
}
function set vy(y) {
fvy = y;
value.y = y;
//return(__get__vy());
}
function set useMass(b) {
_useMass = b;
//return(__get__useMass());
}
function getValue(invMass) {
if (_useMass) {
value.setTo(fvx * invMass, fvy * invMass);
}
return(value);
}
function plus(v) {
fvx = fvx + v.fvx;
fvy = fvy + v.fvy;
}
function toString() {
return(((("(fvx:" + fvx) + ", fvy:") + fvy) + ")");
}
}
Symbol 1159 MovieClip [__Packages.com.jjcorreia.physics.constraints.AbstractConstraint] Frame 0
class com.jjcorreia.physics.constraints.AbstractConstraint
{
var p1, p2, restLength, restLengthSq, stiffness, sumInvMass;
function AbstractConstraint (p1, p2, restLength, stiffness) {
this.p1 = p1;
this.p2 = p2;
this.restLength = restLength || (getDistance());
restLengthSq = this.restLength * restLengthSq;
this.stiffness = stiffness || (DEFAULT_STIFFNESS);
sumInvMass = p1.invMass + p2.invMass;
}
function getDistance() {
return(com.jjcorreia.geom.Vector.distance(p1.curr, p2.curr));
}
function get angle_deg() {
return(p1.curr.angleTo_Deg(p2.curr));
}
function getAngleDeg() {
return(p1.curr.angleTo_Deg(p2.curr));
}
function collisionCorrection(p, force) {
}
function satisfy() {
}
static var DEFAULT_STIFFNESS = 1;
var drawColor = 16711680;
}
Symbol 1160 MovieClip [__Packages.com.jjcorreia.physics.particles.AbstractParticle] Frame 0
class com.jjcorreia.physics.particles.AbstractParticle
{
var curr, prev, forces, forceList, _velocity, constraintList, relatedParticles, collisionForce, invMass;
function AbstractParticle (x, y, mass, elasticity, friction) {
curr = new com.jjcorreia.geom.Vector(x, y);
prev = curr.clone();
this.mass = (mass || 1);
this.friction = friction || 0;
forces = new com.jjcorreia.geom.Vector(0, 0);
forceList = new Array();
clearForces();
_velocity = new com.jjcorreia.geom.Vector(0, 0);
constraintList = [];
relatedParticles = [];
}
function addConstraint(c) {
constraintList.push(c);
var _local4 = false;
var _local3 = false;
for (var _local5 in relatedParticles) {
if (c.p1 != relatedParticles[_local5]) {
_local4 = true;
}
if (c.p2 != relatedParticles[_local5]) {
_local3 = true;
}
}
if ((!_local4) && (c.p1 != this)) {
relatedParticles.push(c.p1);
}
if ((!_local3) && (c.p2 != this)) {
relatedParticles.push(c.p2);
}
}
function shareForce(v) {
for (var _local3 in constraintList) {
var _local3 = constraintList[_local3];
_local3.collisionCorrection(this, v);
}
}
function shareForce2(v) {
var _local4 = new com.jjcorreia.physics.VectorForce(true, force.x, force.y);
for (var _local3 in relatedParticles) {
relatedParticles[_local3].curr.plus(v);
}
}
function collide(v) {
curr.plus(v);
collisionForce = v;
}
function integrate(timeStep) {
var _local3 = timeStep * timeStep;
accumulateForces();
var _local5 = collisionFriction * _local3;
var _local4 = forces.getMultiply(_local3);
var _local2 = getVelocity();
_local2.plus(_local4);
_local2.multiply(_local5);
prev.copy(curr);
curr.plus(_local2);
clearForces();
}
function addForce(force) {
forceList.push(force);
}
function accumulateForces() {
var _local3 = forceList.length;
var _local2 = 0;
while (_local2 < _local3) {
forces.plus(forceList[_local2].getValue(invMass));
_local2++;
}
}
function clearForces() {
forceList = [];
forces.setTo(0, 0);
collisionFriction = 1;
}
function get velocity() {
return(_velocity);
}
function getVelocity() {
_velocity.setTo(curr.x - prev.x, curr.y - prev.y);
return(_velocity);
}
function get angle() {
return(curr.angleTo_Deg(prev));
}
function set mass(v) {
_mass = v;
invMass = 1 / _mass;
//return(mass);
}
function get mass() {
return(_mass);
}
static function duplicate(p0, p1) {
}
function toString() {
var _local2 = "[ AbstractParticle";
_local2 = _local2 + (", curr:" + curr);
_local2 = _local2 + (", prev:" + prev);
_local2 = _local2 + " ]";
return(_local2);
}
var friction = 0;
var collisionFriction = 1;
var _mass = 1;
var elasticity = 1;
var DAMPING = 0.9987;
}
Symbol 1161 MovieClip [__Packages.com.jjcorreia.physics.constraints.Constraint] Frame 0
class com.jjcorreia.physics.constraints.Constraint extends com.jjcorreia.physics.constraints.AbstractConstraint
{
var minLength, restLength, maxLength, p2, p1, sumInvMass, stiffness;
function Constraint (p1, p2, restLength, stiffness) {
super(p1, p2, restLength, stiffness);
p1.addConstraint(this);
p2.addConstraint(this);
minLength = this.restLength * 0.5;
maxLength = this.restLength * 2;
}
function satisfy() {
var _local3 = p1.curr.x - p2.curr.x;
var _local2 = p1.curr.y - p2.curr.y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local5 = (_local4 - restLength) / (_local4 * sumInvMass);
if ((_local4 > minLength) && (_local4 < maxLength)) {
_local5 = _local5 * stiffness;
}
_local3 = _local3 * _local5;
_local2 = _local2 * _local5;
p1.curr.x = p1.curr.x - (_local3 * p1.invMass);
p1.curr.y = p1.curr.y - (_local2 * p1.invMass);
p2.curr.x = p2.curr.x + (_local3 * p2.invMass);
p2.curr.y = p2.curr.y + (_local2 * p2.invMass);
return(true);
}
function shareForce(v, p) {
}
var overStrained = false;
var broken = false;
}
Symbol 1162 MovieClip [__Packages.com.jjcorreia.physics.constraints.AngularConstraint] Frame 0
class com.jjcorreia.physics.constraints.AngularConstraint extends com.jjcorreia.physics.constraints.AbstractConstraint
{
var p3, minAng, maxAng, rest13, rest23, restLength, p1, p2, stiffness;
function AngularConstraint (p1, p2, p3, variation, stiffness) {
super(p1, p2, null, stiffness);
this.p3 = p3;
var _local3 = getCurrentAngle();
var _local4 = (variation * 0.5) * DTR;
minAng = _local3 - _local4;
maxAng = _local3 + _local4;
rest13 = com.jjcorreia.geom.Vector.distance(p1.curr, p3.curr);
rest23 = com.jjcorreia.geom.Vector.distance(p2.curr, p3.curr);
restLength = com.jjcorreia.geom.Vector.distance(p1.curr, p2.curr);
}
function satisfy() {
var _local8 = p1.curr;
var _local7 = p2.curr;
var _local6 = p3.curr;
var _local13 = _local8.x;
var _local11 = _local8.y;
var _local12 = _local7.x;
var _local18 = _local7.y;
var _local10 = _local6.x;
var _local9 = _local6.y;
var _local5 = Math.atan2(_local11 - _local9, _local13 - _local10);
var _local4 = Math.atan2(_local18 - _local9, _local12 - _local10);
var _local2 = _local4 - _local5;
while (_local2 > Math.PI) {
_local2 = _local2 - PI2;
}
while (_local2 < -3.14159265358979) {
_local2 = _local2 + PI2;
}
var _local3 = 0;
if (_local2 < minAng) {
_local3 = minAng - _local2;
} else if (_local2 > maxAng) {
_local3 = maxAng - _local2;
}
_local3 = _local3 * (0.5 * stiffness);
_local5 = _local5 - _local3;
_local4 = _local4 + _local3;
var _local22 = _local10 + (Math.cos(_local5) * rest13);
var _local20 = _local9 + (Math.sin(_local5) * rest13);
var _local17 = (_local13 - _local22) * 0.5;
var _local15 = (_local11 - _local20) * 0.5;
var _local21 = _local10 + (Math.cos(_local4) * rest23);
var _local19 = _local9 + (Math.sin(_local4) * rest23);
var _local16 = (_local12 - _local21) * 0.5;
var _local14 = (_local18 - _local19) * 0.5;
_local8.x = _local8.x - _local17;
_local8.y = _local8.y - _local15;
_local7.x = _local7.x - _local16;
_local7.y = _local7.y - _local14;
_local6.x = _local6.x + (_local17 + _local16);
_local6.y = _local6.y + (_local15 + _local14);
return(true);
}
function getCurrentAngle() {
var _local2 = Math.atan2(p2.curr.y - p3.curr.y, p2.curr.x - p3.curr.x) - Math.atan2(p1.curr.y - p3.curr.y, p1.curr.x - p3.curr.x);
while (_local2 > Math.PI) {
_local2 = _local2 - PI2;
}
while (_local2 < -3.14159265358979) {
_local2 = _local2 + PI2;
}
return(_local2);
}
var drawColor = 3342489;
var PI2 = (Math.PI*2);
var DTR = (Math.PI/180);
var RTD = 57.2957795130823;
}
Symbol 1163 MovieClip [__Packages.com.jjcorreia.physics.particles.CircleParticle] Frame 0
class com.jjcorreia.physics.particles.CircleParticle extends com.jjcorreia.physics.particles.AbstractParticle
{
var tan, rim, _radius, __set__mass, curr, __get__mass, elasticity, friction, prev, forces, _velocity;
function CircleParticle (x, y, radius, mass, elasticity, friction) {
super(x, y, mass, elasticity, friction);
this.radius = (radius);
tan = new com.jjcorreia.geom.Vector();
rim = new com.jjcorreia.physics.particles.RimParticle(radius);
trace(rim);
}
function get radius() {
return(_radius);
}
function set radius(r) {
_radius = r;
rim.__set__radius(r);
//return(radius);
}
function scaleMassToRadius() {
__set__mass(Math.PI * (radius * radius));
}
function integrate(timeStep) {
super.integrate(timeStep);
rim.integrate(timeStep);
}
function clone() {
var _local2 = new com.jjcorreia.physics.particles.CircleParticle(curr.x, curr.y, radius, __get__mass(), elasticity, friction);
_local2.prev = prev.clone();
_local2.forces = forces.clone();
return(_local2);
}
static function duplicate(p0, p1) {
p1.curr = p0.curr.clone();
p1.prev = p0.prev.clone();
p1.__set__radius(p0.radius);
p1.__set__mass(p0.mass);
p1.friction = p0.friction;
p1.forces = p0.forces.clone();
}
function setTo(p0) {
curr = p0.curr.clone();
prev = p0.prev.clone();
radius = (p0.radius);
__set__mass(p0.mass);
friction = p0.friction;
forces = p0.forces.clone();
}
function collide(v, normal) {
super.collide(v);
tan.setTo(-rim.curr.y, rim.curr.x);
tan.normalize();
var _local3 = tan.getMultiply(rim.speed);
var _local5 = _velocity.add(_local3);
var _local4 = _local5.crossLength(normal);
tan.multiply(_local4);
rim.prev.copy(rim.curr.subtract(tan));
}
function toString() {
var _local2 = "[ CircleParticle";
_local2 = _local2 + (", curr:" + curr);
_local2 = _local2 + (", prev:" + prev);
_local2 = _local2 + (", radius:" + radius);
_local2 = _local2 + (", mass:" + __get__mass());
_local2 = _local2 + " ]";
return(_local2);
}
}
Symbol 1164 MovieClip [__Packages.com.jjcorreia.physics.particles.RimParticle] Frame 0
class com.jjcorreia.physics.particles.RimParticle extends com.jjcorreia.physics.particles.AbstractParticle
{
var speed, angularVelocity, maxTorque, wr, curr, prev, __get__radius;
function RimParticle (radius) {
super(radius || 0, 0);
var _local3 = radius || 0;
speed = 0;
angularVelocity = 0;
maxTorque = 99999 /* 0x01869F */;
wr = _local3;
}
function init(r) {
var _local2 = r || 0;
curr.setTo(_local2, 0);
prev.setTo(_local2, 0);
wr = _local2;
}
function set radius(r) {
init(r);
//return(__get__radius());
}
function integrate(timeStep) {
speed = Math.max(-maxTorque, Math.min(maxTorque, speed + angularVelocity));
var _local3 = -curr.y;
var _local2 = curr.x;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local4 != 0) {
_local3 = _local3 / _local4;
_local2 = _local2 / _local4;
}
curr.x = curr.x + (speed * _local3);
curr.y = curr.y + (speed * _local2);
var _local10 = prev.x;
var _local9 = prev.y;
var _local8 = (prev.x = curr.x);
var _local7 = (prev.y = curr.y);
curr.x = curr.x + (damping * (_local8 - _local10));
curr.y = curr.y + (damping * (_local7 - _local9));
var _local6 = Math.sqrt((curr.x * curr.x) + (curr.y * curr.y));
var _local5 = _local6 - wr;
if (_local6 != 0) {
_local5 = _local5 / _local6;
}
curr.x = curr.x - (curr.x * _local5);
curr.y = curr.y - (curr.y * _local5);
}
function toString() {
var _local2 = "[ RimParticle";
_local2 = _local2 + (", curr:" + curr);
_local2 = _local2 + (", prev:" + prev);
_local2 = _local2 + " ]";
return(_local2);
}
static var damping = 1;
}
Symbol 1165 MovieClip [__Packages.com.games.pencilRacer.objects.Line] Frame 0
class com.games.pencilRacer.objects.Line extends com.jjcorreia.display.jObject
{
var id, p1, p2, P1ToP2, normal, accForce, type, friction, acceleration, stroke, color, _physics, graphics, orientGraphic, pressGraphic, endX, endY, angle, cos, sin, length, getPosition, moveNow, x, y, regData;
function Line (p1, p2, color, type, friction, acceleration, physics, stroke, noInit) {
super(p1.x, p1.y, com.jjcorreia.display.jObject.App.linesClip, "Line");
totalObjects++;
id = totalObjects;
this.p1 = p1;
this.p2 = p2;
P1ToP2 = new com.jjcorreia.geom.Vector();
normal = new com.jjcorreia.geom.Vector();
accForce = new com.jjcorreia.physics.VectorForce(false, 0, 0);
this.type = type || (TYPE_NORMAL);
this.friction = ((friction == undefined) ? 1 : (friction));
this.acceleration = acceleration || 0;
this.stroke = stroke || 3;
this.color = color;
_physics = ((physics == undefined) ? true : (physics));
if (noInit) {
return;
}
init();
}
static function initClass() {
totalObjects = 0;
}
function init() {
update();
if (type != TYPE_HIDDEN) {
graphics = new com.games.pencilRacer.display.LineGraphic();
orientGraphic = new com.games.pencilRacer.display.LineOrientGraphic(this, true);
pressGraphic = new com.games.pencilRacer.display.LinePressGraphic(this, true);
}
draw();
initPress();
}
function simulateMode() {
graphics.simulateMode();
orientGraphic.hide();
pressGraphic.hide();
pressGraphic.__set__onPress(null);
delete pressGraphic.clip.onRollOver;
delete pressGraphic.clip.onRollOut;
}
function editMode() {
graphics.editMode(this);
orientGraphic.show();
pressGraphic.show();
initPress();
}
function initPress() {
pressGraphic.__set__onPress(com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.onLinePress, this));
pressGraphic.clip.onRollOver = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.onLineRoll, this);
pressGraphic.clip.onRollOut = (pressGraphic.clip.onDragOut = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.onLineRollOut, this));
}
function update(color) {
P1ToP2.x = p2.x - p1.x;
P1ToP2.y = p2.y - p1.y;
endX = P1ToP2.x;
endY = P1ToP2.y;
angle = p1.angleTo_Rad(p2);
cos = Math.cos(angle);
sin = Math.sin(angle);
length = P1ToP2.length;
normal = P1ToP2.getNormal();
calcAcceleration();
if (color) {
draw(color);
}
register();
}
function recalc() {
var _local2 = getPosition().difference(p1);
p1.plus(_local2);
p2.plus(_local2);
update();
draw();
}
function onDragStart() {
}
function redraw(color) {
if (color != undefined) {
this.color = color;
}
draw(this.color);
}
function draw(color) {
if (type != TYPE_HIDDEN) {
graphics.draw(this, color);
orientGraphic.draw(this);
pressGraphic.draw(this);
}
}
function editPointsMode() {
simulateMode();
draw(COLOR_POINTMODE);
deselect();
}
function leavePointsMode() {
editMode();
draw();
}
function nudge(dx, dy) {
moveNow(x + dx, y + dy);
recalc();
}
function select() {
graphics.highlight();
}
function deselect() {
graphics.dehighlight();
}
function checkBounds(p, radius) {
return((p.x >= (p1.x - radius)) && (p.x <= (p2.x + radius)));
}
function unregister(physics) {
if (regData) {
com.games.pencilRacer.apps.SpatialDatabase.unregister(this, regData, physics);
}
}
function register() {
unregister(_physics);
regData = com.games.pencilRacer.apps.SpatialDatabase.register(this, _physics);
}
function calcAcceleration() {
accForce.__set__vx(normal.y * acceleration);
accForce.__set__vy((-normal.x) * acceleration);
}
function setAccel(acceleration) {
this.acceleration = acceleration;
calcAcceleration();
draw();
}
function setFriction(friction) {
this.friction = friction;
draw();
}
function set physics($val) {
unregister(_physics);
_physics = $val;
graphics.clip.accel_mc._visible = _physics;
register();
draw();
//return(physics);
}
function get physics() {
return(_physics);
}
function get startPoint() {
return(new flash.geom.Point(p1.x, p1.y));
}
function get endPoint() {
return(new flash.geom.Point(p2.x, p2.y));
}
function destroy() {
graphics.destroy();
orientGraphic.destroy();
pressGraphic.destroy();
com.games.pencilRacer.apps.SpatialDatabase.unregister(this, regData, true);
super.destroy();
}
function toString() {
var _local2 = "[ Line";
_local2 = _local2 + (", p1:" + p1);
_local2 = _local2 + (", p2:" + p2);
_local2 = _local2 + (", id:" + id);
_local2 = _local2 + " ]";
return(_local2);
}
static var totalObjects = 0;
static var TYPE_NORMAL = 0;
static var TYPE_SHAPE = 1;
static var TYPE_TRACK = 2;
static var TYPE_HIDDEN = 3;
static var COLOR_POINTMODE = 65280;
}
Symbol 1166 MovieClip [__Packages.com.games.pencilRacer.display.LineGraphic] Frame 0
class com.games.pencilRacer.display.LineGraphic extends com.jjcorreia.display.jObject
{
static var gFilter;
var create, clip, moveNow;
function LineGraphic (holder, line, noDraw) {
super(0, 0, (holder ? (holder) : (com.jjcorreia.display.jObject.App.linesClip)), "blank");
create();
init();
if (line && (noDraw != true)) {
draw(line);
}
}
function init() {
}
function simulateMode(line) {
clip.arrow._visible = false;
clip.fricArrow_mc._visible = false;
}
function editMode(line) {
if (line.__get__physics()) {
clip.arrow._visible = true;
clip.fricArrow_mc._visible = true;
}
}
function draw(line, color) {
moveNow(line.p1.x, line.p1.y);
clip.clear();
var _local4 = new flash.geom.ColorTransform();
_local4.greenOffset = 50 + (155 * line.acceleration);
var _local9 = _local4.rgb;
if (line.__get__physics() && (line.acceleration > 0)) {
var _local6 = (line.acceleration * 10) + 4;
var _local7 = _local6;
var _local3 = clip.attachMovie("arrow", "arrow", 1);
_local3._x = line.P1ToP2.x;
_local3._y = line.P1ToP2.y;
_local3._rotation = line.angle * com.jjcorreia.geom.Vector.RTD;
_local3.transform.colorTransform = _local4;
_local3._width = Math.min(_local3._width, line.length);
_local3.clip_mc._xscale = (_local3.clip_mc._yscale = 50 + (line.acceleration * 100));
} else {
clip.arrow.removeMovieClip();
}
if (line.__get__physics() && (line.friction < 1)) {
_local4.greenOffset = 0;
_local4.redOffset = 255 - (100 * line.friction);
var _local5 = clip.attachMovie("arrow", "fricArrow_mc", 2);
_local5._x = line.P1ToP2.x;
_local5._y = line.P1ToP2.y;
_local5._rotation = 90 + (line.angle * com.jjcorreia.geom.Vector.RTD);
_local5.transform.colorTransform = _local4;
_local5.clip_mc._xscale = (_local5.clip_mc._yscale = 100 - (line.friction * 50));
} else {
clip.fricArrow_mc.removeMovieClip();
}
clip.lineStyle((line.__get__physics() ? (STROKE) : (line.stroke)), (color ? (color) : (line.color)), ALPHA, false, "normal", "round", "round");
clip.moveTo(0, 0);
clip.lineTo(line.P1ToP2.x, line.P1ToP2.y);
}
function drawOrient(line) {
var _local4 = line.normal.x * com.games.pencilRacer.display.LineOrientGraphic.OFFSET;
var _local3 = line.normal.y * com.games.pencilRacer.display.LineOrientGraphic.OFFSET;
clip.lineStyle(com.games.pencilRacer.display.LineOrientGraphic.STROKE, com.games.pencilRacer.display.LineOrientGraphic.COLOR);
clip.moveTo(_local4, _local3);
clip.lineTo(_local4 + line.P1ToP2.x, _local3 + line.P1ToP2.y);
}
function drawPress(line) {
clip.lineStyle(com.games.pencilRacer.display.LinePressGraphic.STROKE, com.games.pencilRacer.display.LinePressGraphic.COLOR, com.games.pencilRacer.display.LinePressGraphic.ALPHA, false, "none");
clip.moveTo(0, 0);
clip.lineTo(line.P1ToP2.x, line.P1ToP2.y);
}
function highlight() {
clip.filters = [gFilter];
}
function dehighlight() {
clip.filters = [];
}
function clear() {
clip.clear();
}
function toString() {
var _local1 = "[ LineGraphic";
_local1 = _local1 + " ]";
return(_local1);
}
static function initClass() {
gFilter = new flash.filters.GlowFilter(16711680, 1, 6, 6);
return(true);
}
static var STROKE = 3;
static var ALPHA = 100;
static var initialized = initClass();
}
Symbol 1167 MovieClip [__Packages.com.games.pencilRacer.display.LineOrientGraphic] Frame 0
class com.games.pencilRacer.display.LineOrientGraphic extends com.games.pencilRacer.display.LineGraphic
{
var clip, moveNow;
function LineOrientGraphic (line, noDraw) {
super(com.jjcorreia.display.jObject.App.assetsClip.guides, line, noDraw);
}
function init() {
}
function draw(line) {
clip.clear();
if (line.__get__physics()) {
moveNow(line.p1.x, line.p1.y);
var _local4 = line.normal.x * OFFSET;
var _local3 = line.normal.y * OFFSET;
var _local6 = _local4 + line.endX;
var _local5 = _local3 + line.endY;
clip.lineStyle(STROKE, COLOR);
clip.moveTo(_local4, _local3);
clip.lineTo(_local6, _local5);
}
}
static var COLOR = 16711680;
static var STROKE = 1.5;
static var OFFSET = 3.5;
}
Symbol 1168 MovieClip [__Packages.com.games.pencilRacer.display.LinePressGraphic] Frame 0
class com.games.pencilRacer.display.LinePressGraphic extends com.games.pencilRacer.display.LineGraphic
{
var moveNow, clip;
function LinePressGraphic (line, noDraw) {
super(com.jjcorreia.display.jObject.App.assetsClip.pressClip, line, noDraw);
}
function init() {
}
function draw(line) {
moveNow(line.p1.x, line.p1.y);
clip.clear();
clip.lineStyle(STROKE, COLOR, ALPHA, false, "none");
clip.moveTo(0, 0);
clip.lineTo(line.endX, line.endY);
}
static var STROKE = 10;
static var ALPHA = 0;
static var COLOR = 0;
}
Symbol 1169 MovieClip [__Packages.com.games.pencilRacer.gui.PointSquare] Frame 0
class com.games.pencilRacer.gui.PointSquare extends com.jjcorreia.display.jObject
{
var pointLink, line, isStart, create, resume, holder, __set__scaleX, __set__scaleY;
function PointSquare (pos, line, isStart) {
super(pos.x, pos.y, "assets", "PointSquare");
pointLink = pos;
this.line = line;
this.isStart = isStart;
create();
resume();
}
function moveNow(x, y) {
super.moveNow(x, y);
pointLink.x = x;
pointLink.y = y;
if (isStart) {
line.moveNow(x, y);
}
line.update(com.games.pencilRacer.objects.Line.COLOR_POINTMODE);
}
function Main() {
var _local2 = 100 / holder._xscale;
__set__scaleX(100 * _local2);
__set__scaleY(100 * _local2);
}
function toString() {
var _local1 = "[ PointSquare";
_local1 = _local1 + " ]";
return(_local1);
}
}
Symbol 1170 MovieClip [__Packages.com.games.pencilRacer.apps.SpatialDatabase] Frame 0
class com.games.pencilRacer.apps.SpatialDatabase
{
static var table, table_art, list, lines, trackCount, totalW, totalH, minW, minH, returnGroup;
function SpatialDatabase () {
}
static function init() {
table = new Object();
table_art = new Object();
list = new Array();
lines = new Object();
trackCount = 0;
totalW = -Infinity;
totalH = -Infinity;
minW = Infinity;
minH = Infinity;
returnGroup = new com.games.pencilRacer.apps.database.CellGroup();
}
static function getDimensions() {
return(new com.jjcorreia.geom.Vector((totalW * GRID_SIZE) - (minW * GRID_SIZE), (totalH * GRID_SIZE) - (minH * GRID_SIZE)));
}
static function correctToZero() {
}
static function register(obj, physics) {
var _local3 = new Array();
if (obj.Class == "Line") {
var _local6 = com.games.pencilRacer.objects.Line(obj);
var _local1;
var _local2;
var _local5 = getLineSubdivision(_local6);
for (var _local4 in _local5) {
_local1 = getLocation(_local5[_local4]);
if (((!_local2) || (_local1.x != _local2.x)) || (_local1.y != _local2.y)) {
_local3.push(_local1);
_local2 = _local1;
}
}
for (var _local4 in _local3) {
saveToTile(_local6, _local3[_local4], physics);
}
if (physics && (!lines[_local6.id])) {
trackCount++;
}
} else {
_local3.push(new com.games.pencilRacer.apps.database.CellLocation());
var _local9 = com.games.pencilRacer.objects.CustomShape(obj);
saveToTile(_local9, _local3[0], false);
}
lines[obj.id] = obj;
return(_local3);
}
static function unregister(obj, $tilePoints, physics) {
var _local1;
var _local2;
for (var _local6 in $tilePoints) {
_local1 = $tilePoints[_local6];
_local2 = getCell(_local1, physics);
_local2.remove(obj);
}
if (physics && (lines[obj.id])) {
trackCount--;
}
delete lines[obj.id];
}
static function saveToTile(line, location, physics) {
var _local2 = ((physics == false) ? (table_art) : (table));
var _local1 = location.x;
var _local3 = location.y;
if (!_local2[_local1]) {
_local2[_local1] = new com.games.pencilRacer.apps.database.Cell();
}
if (!_local2[_local1][_local3]) {
_local2[_local1][_local3] = new com.games.pencilRacer.apps.database.Cell(line);
} else {
_local2[_local1][_local3].push(line);
}
totalW = Math.max(totalW, _local1);
totalH = Math.max(totalH, _local3);
minW = Math.min(minW, _local1);
minH = Math.min(minH, _local3);
}
static function getCell(p, physics) {
var _local1 = ((physics == false) ? (table_art) : (table));
return(_local1[p.x][p.y]);
}
static function getTile(p, physics) {
var _local1 = getLocation(p);
return(getCell(_local1, physics));
}
static function getLocation(p) {
var _local2 = Math.floor(p.x / GRID_SIZE);
var _local1 = Math.floor(p.y / GRID_SIZE);
return(new com.games.pencilRacer.apps.database.CellLocation(_local2, _local1));
}
static function getLocation2(x, y) {
var _local2 = Math.floor(x / GRID_SIZE);
var _local1 = Math.floor(y / GRID_SIZE);
return(new com.games.pencilRacer.apps.database.CellLocation(_local2, _local1));
}
static function getLinesBetween(p0, p1, physics) {
var _local8 = ((physics == false) ? (table_art) : (table));
var _local13 = getLocation(p0);
var _local12 = getLocation(p1);
var _local10 = Math.min(_local13.x, _local12.x);
var _local7 = Math.min(_local13.y, _local12.y);
var _local11 = Math.max(_local13.x, _local12.x) + 1;
var _local9 = Math.max(_local13.y, _local12.y) + 1;
var _local5 = {};
var _local3 = 0;
var _local4 = _local10;
while ((_local4 < _local11) && (_local3 < MAX_SELECT)) {
var _local2 = _local7;
while ((_local2 < _local9) && (_local3 < MAX_SELECT)) {
var _local1 = _local8[_local4][_local2];
for (var _local6 in _local1) {
_local5[_local1[_local6].id] = _local1[_local6];
_local3++;
}
_local2++;
}
_local4++;
}
return(_local5);
}
static function getCollidableLinesBetween(p0, p1) {
var _local6 = getLocation(p0);
var _local5 = getLocation(p1);
var _local4 = {};
var _local3 = _local6.x;
while (_local3 < (_local5.x + 1)) {
var _local2 = _local6.y;
while (_local2 < (_local5.y + 1)) {
var _local1 = table[_local3][_local2];
for (var _local7 in _local1) {
_local4[_local1[_local7].id] = _local1[_local7];
}
_local2++;
}
_local3++;
}
return(_local4);
}
static function getTileArea($x, $y) {
var _local4 = getLocation2($x, $y);
var _local1 = returnGroup;
_local1.length = 0;
var _local3 = _local4.x;
var _local2 = _local4.y;
_local1.push(table[_local3 - 1][_local2 - 1]);
_local1.push(table[_local3][_local2 - 1]);
_local1.push(table[_local3 + 1][_local2 - 1]);
_local1.push(table[_local3 - 1][_local2]);
_local1.push(table[_local3][_local2]);
_local1.push(table[_local3 + 1][_local2]);
_local1.push(table[_local3 - 1][_local2 + 1]);
_local1.push(table[_local3][_local2 + 1]);
_local1.push(table[_local3 + 1][_local2 + 1]);
return(_local1);
}
static function getCollidableObjects(x, y) {
var _local6;
var _local1;
var _local2;
var _local4 = getTileArea(x, y);
var _local3 = {};
for (var _local5 in _local4) {
_local1 = _local4[_local5];
if (_local1) {
for (_local2 in _local1) {
_local3[_local1[_local2].id] = _local1[_local2];
}
}
}
return(_local3);
}
static function getCollidableObjects2(x, y, radius) {
var _local17;
var _local1;
var _local4;
var _local14 = getLocation2(x - radius, y - radius);
var _local12 = getLocation2(x - radius, y + radius);
var _local11 = getLocation2(x + radius, y - radius);
var _local16 = getLocation2(x + radius, y + radius);
var _local8 = table[_local14.x][_local14.y];
var _local7 = table[_local12.x][_local12.y];
var _local10 = table[_local11.x][_local11.y];
var _local9 = table[_local16.x][_local16.y];
var _local2 = [_local8];
if (_local7 != _local8) {
_local2.push(_local7);
}
if ((_local10 != _local7) && (_local10 != _local8)) {
_local2.push(_local10);
}
if (((_local9 != _local10) && (_local9 != _local7)) && (_local9 != _local8)) {
_local2.push(_local9);
}
var _local3 = {};
for (var _local6 in _local2) {
_local1 = _local2[_local6];
for (_local4 in _local1) {
_local3[_local1[_local4].id] = _local1[_local4];
}
}
return(_local3);
}
static function getAll() {
return(lines);
}
static function getTrackCount() {
return(trackCount);
}
static function getLineSubdivision(line) {
var _local2;
var _local6 = com.jjcorreia.geom.Vector.distance(line.p1, line.p2);
var _local5 = Math.round(_local6 / RAY_STEPS);
var _local4 = new Array(_local5);
_local4.push(line.p1);
var _local1 = 1;
while (_local1 < _local5) {
_local2 = new com.jjcorreia.geom.Vector((-RAY_STEPS) * _local1, 0);
_local2.rotate(line.angle);
_local2.plus(line.p1);
_local4[_local1] = _local2;
_local1++;
}
_local4.push(line.p2);
return(_local4);
}
static function drawGrid() {
var _local2 = com.jjcorreia.application.AppBase.__get__clip().gridClip;
_local2.clear();
_local2.lineStyle(0, 10066329, 100, true);
var _local6 = (totalW + 1) * GRID_SIZE;
var _local5 = (totalH + 1) * GRID_SIZE;
var _local1 = 0;
while (_local1 < (totalW + 2)) {
var _local4 = _local1 * GRID_SIZE;
_local2.moveTo(_local4, 0);
_local2.lineTo(_local4, _local5);
_local1++;
}
_local1 = 0;
while (_local1 < (totalH + 2)) {
var _local3 = _local1 * GRID_SIZE;
_local2.moveTo(0, _local3);
_local2.lineTo(_local6, _local3);
_local1++;
}
}
static var GRID_SIZE = 50;
static var RAY_STEPS = 10;
static var MAX_SELECT = 200;
}
Symbol 1171 MovieClip [__Packages.com.games.pencilRacer.apps.database.CellGroup] Frame 0
class com.games.pencilRacer.apps.database.CellGroup extends Array
{
function CellGroup (value) {
super(value);
}
}
Symbol 1172 MovieClip [__Packages.com.games.pencilRacer.apps.database.CellLocation] Frame 0
class com.games.pencilRacer.apps.database.CellLocation
{
var x, y;
function CellLocation (x, y) {
this.x = x || 0;
this.y = y || 0;
}
function toString() {
var _local2 = "[CellLocation";
_local2 = _local2 + (" x: " + x);
_local2 = _local2 + (" y: " + y);
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 1173 MovieClip [__Packages.com.games.pencilRacer.objects.CustomShape] Frame 0
class com.games.pencilRacer.objects.CustomShape extends com.jjcorreia.display.jObject
{
static var gFilter;
var id, type, shape, create, clip, __set__onPress, x, y, s0, __get__scaleX, s1, getPosition, __get__scaleY, __set__scaleX, __set__scaleY, regData;
function CustomShape (pos, shape) {
super(Math.round(pos.x), Math.round(pos.y), com.jjcorreia.display.jObject.App.shapesClip, "blank");
com.games.pencilRacer.objects.Line.totalObjects++;
id = com.games.pencilRacer.objects.Line.totalObjects;
type = com.games.pencilRacer.objects.Line.TYPE_SHAPE;
this.shape = shape;
create();
clip.attachMovie(shape + "Graphic", "graphic", 0);
init();
register();
}
static function initClass() {
gFilter = new flash.filters.GlowFilter(16711680, 1, 4, 4);
return(true);
}
function init() {
clip.cacheAsBitmap = true;
trace(defaultSize);
var _local5 = defaultSize / clip.graphic._width;
var _local4 = defaultSize / clip.graphic._height;
var _local3 = Math.min(_local5, _local4);
var _local2 = (clip.graphic._xscale = clip.graphic._xscale * _local3);
clip.graphic._xscale = _local2;
clip.graphic._yscale = _local2;
editMode();
}
function update() {
}
function simulateMode() {
__set__onPress(null);
}
function editMode() {
__set__onPress(com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.onShapePress, this));
}
function nudge(dx, dy) {
moveNow(x + dx, y + dy);
}
function moveNow(x, y) {
super.moveNow(x, y);
updatePoints();
}
function updatePoints() {
if (s0) {
var _local2 = clip.graphic.getBounds(clip);
var _local5 = clip._rotation * com.jjcorreia.geom.Vector.DTR;
var _local6 = __get__scaleX() / 100;
var _local4 = new com.jjcorreia.geom.Vector(_local2.xMin, _local2.yMin);
var _local3 = new com.jjcorreia.geom.Vector(_local2.xMax, _local2.yMax);
_local4.multiply(_local6);
_local3.multiply(_local6);
_local4.rotate(_local5);
_local3.rotate(_local5);
s0.moveNow(_local4.x + x, _local4.y + y);
s1.moveNow(_local3.x + x, _local3.y + y);
}
}
function removePoints() {
if (s0) {
s0.destroy();
}
if (s1) {
s1.destroy();
}
delete s0;
delete s1;
}
function drawBox() {
var _local3 = clip.createEmptyMovieClip("box", 1);
var _local2 = clip.graphic.getBounds(clip);
_local3.lineStyle(0, 65280);
_local3.moveTo(_local2.xMin, _local2.yMin);
_local3.lineTo(_local2.xMax, _local2.yMin);
_local3.lineTo(_local2.xMax, _local2.yMax);
_local3.lineTo(_local2.xMin, _local2.yMax);
_local3.lineTo(_local2.xMin, _local2.yMin);
}
function select() {
drawBox();
removePoints();
s0 = new com.games.pencilRacer.gui.PointSquare(getPosition(), this, false);
s1 = new com.games.pencilRacer.gui.PointSquare(getPosition(), this, false);
s0.clip.onRollOver = function () {
if (com.jjcorreia.display.jObject.App.mode != com.games.pencilRacer.config.Modes.ROTATE) {
com.jjcorreia.display.jObject.App.setMode(com.games.pencilRacer.config.Modes.ROTATE, null, true);
}
};
s0.clip.onRollOut = function () {
com.jjcorreia.display.jObject.App.setMode(com.jjcorreia.display.jObject.App.lastMode, null, true);
};
s1.clip.onRollOver = function () {
if (com.jjcorreia.display.jObject.App.mode != com.games.pencilRacer.config.Modes.SCALE) {
com.jjcorreia.display.jObject.App.setMode(com.games.pencilRacer.config.Modes.SCALE, null, true);
}
};
s1.clip.onRollOut = function () {
com.jjcorreia.display.jObject.App.setMode(com.jjcorreia.display.jObject.App.lastMode, null, true);
};
s0.clip.onPress = com.jjcorreia.utils.Delegate.create(this, startRotate);
s1.clip.onPress = com.jjcorreia.utils.Delegate.create(this, startScale);
updatePoints();
}
function deselect() {
clip.box.removeMovieClip();
removePoints();
}
function startScale() {
var _local2 = getPosition().subtract(s1.getPosition()).__get__length();
s1.clip.nd = _local2;
s1.clip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, doScale);
s1.clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, stopScale);
delete s1.clip.onRollOver;
delete s1.clip.onRollOut;
}
function stopScale() {
delete s1.clip.onMouseMove;
delete s1.clip.onMouseUp;
com.jjcorreia.display.jObject.App.setMode(com.jjcorreia.display.jObject.App.lastMode, null, true);
select();
}
function doScale() {
s1.x = clip._parent._xmouse;
s1.y = clip._parent._ymouse;
var _local3 = getPosition().subtract(s1.getPosition()).__get__length();
var _local2 = _local3 / s1.clip.nd;
var _local5 = __get__scaleX() * _local2;
var _local4 = __get__scaleY() * _local2;
__set__scaleX(Math.min(Math.max(_local5, 20), 800));
__set__scaleY(Math.min(Math.max(_local4, 20), 800));
s1.clip.nd = _local3;
updatePoints();
}
function startRotate() {
var _local4 = getPosition();
var _local3 = s0.getPosition();
var _local2 = _local4.angleTo_Deg(_local3);
s0.clip.angle = _local2;
s0.clip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, doRotate);
s0.clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, stopRotate);
delete s0.clip.onRollOver;
delete s0.clip.onRollOut;
}
function stopRotate() {
delete s0.clip.onMouseMove;
delete s0.clip.onMouseUp;
com.jjcorreia.display.jObject.App.setMode(com.jjcorreia.display.jObject.App.lastMode, null, true);
select();
}
function doRotate() {
s0.x = clip._parent._xmouse;
s0.y = clip._parent._ymouse;
var _local4 = getPosition();
var _local3 = s0.getPosition();
var _local2 = _local4.angleTo_Deg(_local3);
clip._rotation = clip._rotation + (_local2 - s0.clip.angle);
s0.clip.angle = _local2;
updatePoints();
}
function unregister() {
if (regData) {
com.games.pencilRacer.apps.SpatialDatabase.unregister(this, regData, false);
}
}
function register() {
unregister();
regData = com.games.pencilRacer.apps.SpatialDatabase.register(this, false);
}
function destroy() {
removePoints();
com.games.pencilRacer.apps.SpatialDatabase.unregister(this, regData, false);
super.destroy();
}
function toString() {
var _local2 = "[ CustomShape";
_local2 = _local2 + (", id:" + id);
_local2 = _local2 + " ]";
return(_local2);
}
function getDescription() {
var _local2 = "[ CustomShape";
_local2 = _local2 + (", id:" + id);
_local2 = _local2 + " ]";
return(_local2);
}
static var ini = initClass();
var defaultSize = com.games.pencilRacer.config.PreferencesGame.SHAPE_SIZE;
}
Symbol 1174 MovieClip [__Packages.com.games.pencilRacer.config.Modes] Frame 0
class com.games.pencilRacer.config.Modes
{
function Modes () {
}
static var MOVE = "move";
static var LINE = "line";
static var PENCIL = "pencil";
static var PEN = "pen";
static var ZOOM = "zoom";
static var POINT = "point";
static var ERASE = "erase";
static var PAN = "pan";
static var SHAPES = "shapes";
static var TRACK = "track";
static var SCALE = "scale";
static var ROTATE = "rotate";
static var MOVE_KEY = "V";
static var LINE_KEY = "L";
static var PENCIL_KEY = "Y";
static var PEN_KEY = "P";
static var ZOOM_KEY = "Z";
static var POINT_KEY = "A";
static var ERASE_KEY = "E";
static var PAN_KEY = "H";
static var TRACK_PANEL_KEY = "1";
static var ART_PANEL_KEY = "2";
static var VEHICLES_PANEL_KEY = "3";
static var SHAPES_PANEL_KEY = "4";
static var SELECTION_PANEL_KEY = "5";
static var SIMULATE_KEY = "ENTER";
static var SAVE_KEY = "S";
static var LOAD_KEY = "O";
}
Symbol 1175 MovieClip [__Packages.com.games.pencilRacer.apps.database.Cell] Frame 0
class com.games.pencilRacer.apps.database.Cell extends Array
{
var splice;
function Cell (value, x, y) {
super(value);
}
function remove(obj) {
for (var _local3 in this) {
if (this[_local3] == obj) {
splice(Number(_local3), 1);
break;
}
}
}
}
Symbol 1176 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.Vehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.Vehicle extends com.jjcorreia.display.jObject
{
var points, constraints, totalPoints, totalConstraints, state, resume, queuedDescription, onInit, temp, clip, Class, getPosition, currImpactSound, mainWheel, x, y;
function Vehicle ($pos, $linkage, useTemplate) {
super($pos.x + START_OFF_X, $pos.y + START_OFF_Y, "assets", ($linkage ? ($linkage) : "blank"));
points = new Object();
constraints = new Object();
totalPoints = 0;
totalConstraints = 0;
this.useTemplate = useTemplate || false;
state = new com.games.pencilRacer.objects.vehicles.VehicleState();
}
function templateInit() {
parseTemplate();
init();
resume();
}
function init() {
if (queuedDescription) {
applyType(queuedDescription);
}
com.jjcorreia.display.jObject.App.pEngine.setIterations(iterations);
state.broadcaster.addListener(this);
state.init();
onInit();
}
function attachTemplate(t) {
temp = clip.attachMovie((t ? (t) : (Class)) + "Template", "temp", 1);
temp._visible = false;
}
function removeTemplate() {
temp.removeMovieClip();
}
function parseTemplate() {
var _local13 = getPosition();
var _local4;
var _local5;
var _local14;
var _local7 = [];
var _local8 = [];
var _local9 = [];
for (var _local3 in temp) {
var _local6 = temp[_local3];
switch (_local6.type) {
case "TemplateConstraint" :
_local8.push(_local6);
break;
case "TemplateWheel" :
_local7.push(_local6);
break;
case "TemplateAngularConstraint" :
_local9.push(_local6);
}
}
for (var _local3 in _local7) {
_local5 = _local7[_local3];
_local14 = addWheel(_local5._name, _local13.add(_local5.__get__pos()), _local5.__get__radius(), _local5.mass, _local5.friction);
}
for (var _local3 in _local8) {
_local4 = _local8[_local3];
var _local12 = points[_local4.p1];
var _local11 = points[_local4.p2];
constrain(_local12.pos, _local11.pos, null, _local4.stiffness, _local4.p1, _local4.p2);
}
for (var _local3 in _local9) {
var _local2 = _local9[_local3];
var _local12 = points[_local2.p1];
var _local11 = points[_local2.p2];
var _local10 = points[_local2.p3];
constrainAngular(_local12.pos, _local11.pos, _local10.pos, null, _local2.variation, _local2.stiffness, _local2.p1, _local2.p2, _local2.p3);
}
removeTemplate();
hideParticles();
}
function soundDone() {
soundPlaying = false;
}
function vehicle_impact(speedDiff) {
_global.soundPanel.stopSound(sound_id + com.games.pencilRacer.config.SoundConfig.SUFFIX_AIR);
var _local5 = Math.min(100, Math.round(((-speedDiff) / 50) * 100));
var _local4 = ((speedDiff < -90) ? 2 : 1);
var _local3 = (sound_id + com.games.pencilRacer.config.SoundConfig.SUFFIX_IMPACT) + _local4;
if (multipleImpactSounds || (!soundPlaying)) {
currImpactSound = _local3;
playSound(_local3, _local5);
}
}
function vehicle_start() {
playSound(sound_id + com.games.pencilRacer.config.SoundConfig.SUFFIX_START);
soundPlaying = false;
}
function vehicle_air() {
playSound(sound_id + com.games.pencilRacer.config.SoundConfig.SUFFIX_AIR);
}
function vehicle_accel(speedDiff) {
}
function playSound(sound, volume) {
trace("playSound " + sound);
if (!sound) {
return(undefined);
}
var _local4 = (volume ? (volume) : (_global.soundPanel.getSoundVolume(sound)));
soundPlaying = true;
var _local5 = _global.soundPanel.start(sound, {vol:_local4, onSoundComplete:com.jjcorreia.utils.Delegate.create(this, soundDone)});
}
function Main() {
com.jjcorreia.display.jObject.App.pEngine.main(this);
state.trackSpeedChanges(mainWheel.pos);
state.trackAirTime();
}
function collide() {
state.markCollisionEvent();
}
function getCenter() {
var _local4 = 0;
var _local3 = 0;
for (var _local5 in points) {
var _local2 = points[_local5].pos.curr;
_local4 = _local4 + _local2.x;
_local3 = _local3 + _local2.y;
}
return(new com.jjcorreia.geom.Vector(_local4 / totalPoints, _local3 / totalPoints));
}
function getBounds() {
var _local8 = Infinity;
var _local6 = -Infinity;
var _local7 = Infinity;
var _local5 = -Infinity;
for (var _local4 in points) {
var _local2 = points[_local4].pos.curr;
var _local3 = points[_local4].pos.velocity;
_local8 = Math.min(_local8, _local2.x + _local3.x);
_local6 = Math.max(_local6, _local2.x + _local3.x);
_local7 = Math.min(_local7, _local2.y + _local3.y);
_local5 = Math.max(_local5, _local2.y + _local3.y);
}
return({minX:_local8, maxX:_local6, minY:_local7, maxY:_local5});
}
function describeType() {
var _local3 = [];
for (var _local4 in points) {
var _local2 = points[_local4];
_local3.push(_local2.pos.clone());
}
return(_local3);
}
function applyType(description) {
if (totalPoints == 0) {
queuedDescription = description;
return(undefined);
}
var _local4 = 0;
for (var _local6 in points) {
var _local3 = points[_local6].pos;
var _local2 = description[_local4];
_local4++;
_local3.setTo(_local2);
}
queuedDescription = null;
}
function destroy() {
for (var _local3 in points) {
points[_local3].destroy();
}
super.destroy();
}
function paint() {
clip.clear();
clip.lineStyle(1, 16711680);
for (var _local6 in points) {
var _local3 = points[_local6];
_local3.moveNow(_local3.pos.curr.x, _local3.pos.curr.y);
}
for (var _local6 in constraints) {
var _local2 = constraints[_local6];
clip.lineStyle(0, _local2.drawColor);
var _local5 = _local2.p1.curr;
var _local4 = _local2.p2.curr;
clip.moveTo(_local5.x - x, _local5.y - y);
clip.lineTo(_local4.x - x, _local4.y - y);
}
}
function hideParticles() {
for (var _local2 in points) {
points[_local2].hide();
}
}
function syncParticleRotation(mc, id) {
var _local2 = getParticle(id);
mc._rotation = _local2.rim.curr.angleDeg;
}
function syncGraphicParticle(mc, id, rotate) {
var _local2 = getParticle(id);
mc._x = _local2.curr.x - x;
mc._y = _local2.curr.y - y;
if (rotate) {
var _local4 = _local2.rim.curr.__get__angleDeg();
mc._rotation = _local4;
}
}
function syncGraphicConstraint(mc, id) {
mc._rotation = getConstraint(id).getAngleDeg();
}
function addWheel(name, $pos, $radius, mass, friction) {
var _local3 = com.games.pencilRacer.objects.Wheel;
var _local2 = new _local3[undefined]($pos, $radius, null, null, mass, friction);
points[(name ? (name) : (totalPoints))] = _local2;
if (!mainWheel) {
mainWheel = _local2;
}
com.jjcorreia.display.jObject.App.pEngine.addParticle(_local2.pos);
totalPoints++;
return(_local2);
}
function constrain($p1, $p2, $restLength, stiffness, n0, n1) {
var _local2 = new com.jjcorreia.physics.constraints.Constraint($p1, $p2, $restLength, stiffness);
constraints[((n0 && (n1)) ? ((n0 + "~") + n1) : (totalPoints))] = _local2;
com.jjcorreia.display.jObject.App.pEngine.addConstraint(_local2);
totalConstraints++;
return(_local2);
}
function constrainAngular(p1, p2, p3, $restLength, variation, stiffness, n0, n1, n2) {
var _local2 = new com.jjcorreia.physics.constraints.AngularConstraint(p1, p2, p3, variation, stiffness);
constraints[(((n0 && (n1)) && (n2)) ? ((((n0 + "~") + n1) + "~") + n2) : (totalPoints))] = _local2;
com.jjcorreia.display.jObject.App.pEngine.addAngularConstraint(_local2);
totalConstraints++;
return(_local2);
}
function getConstraint(id) {
return(constraints[id]);
}
function getParticleSpeed(id) {
return(points[id].pos.velocity);
}
function getParticle(id) {
return(points[id].pos);
}
function pause() {
super.pause();
for (var _local4 in clip) {
clip[_local4].stop();
for (var _local3 in clip[_local4]) {
clip[_local4][_local3].stop();
}
}
}
static var START_OFF_X = 5;
static var START_OFF_Y = -20;
var iterations = com.games.pencilRacer.apps.Physics.DEFAULT_ITERATIONS;
var useTemplate = false;
var sound_id = "";
var multipleImpactSounds = false;
var soundPlaying = false;
}
Symbol 1177 MovieClip [__Packages.com.games.pencilRacer.objects.Mass] Frame 0
class com.games.pencilRacer.objects.Mass extends com.jjcorreia.display.jObject
{
var pos, x, y, render;
function Mass ($x, $y, $holder, $Class) {
super($x, $y, $holder, $Class);
pos = new com.jjcorreia.physics.particles.CircleParticle(x, y);
}
function updateMC() {
x = pos.curr.x;
y = pos.curr.y;
render();
}
var friction = 1;
}
Symbol 1178 MovieClip [__Packages.com.games.pencilRacer.objects.Wheel] Frame 0
class com.games.pencilRacer.objects.Wheel extends com.games.pencilRacer.objects.Mass
{
var create, clip, __set__width, __set__height, __get__width, pos;
function Wheel ($pos, $radius, $frame, $linkage, mass, friction) {
super($pos.x, $pos.y, "assets", ($linkage ? ($linkage) : "Wheel"));
create();
if ($frame) {
clip.gotoAndStop($frame);
}
if ($radius) {
__set__width(__set__height($radius * 2));
}
var _local3 = __get__width() / 2;
pos.__set__radius(_local3);
if (mass > 0) {
pos.__set__mass(mass);
} else {
pos.__set__mass((Math.PI * (_local3 * _local3)) / 5);
}
if (friction) {
pos.friction = friction;
}
}
function toString() {
var _local2 = "[ Wheel";
_local2 = _local2 + (", pos:" + pos);
_local2 = _local2 + " ]";
return(_local2);
}
}
Symbol 1179 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.VehicleState] Frame 0
class com.games.pencilRacer.objects.vehicles.VehicleState extends Object
{
var lastSpeed, lastSpeedAbs, timeSinceCollision, inAir, broadcaster, lastCollisionTime;
function VehicleState () {
super();
lastSpeed = new com.jjcorreia.geom.Vector();
lastSpeedAbs = 0;
timeSinceCollision = 0;
inAir = false;
broadcaster = this;
AsBroadcaster.initialize(broadcaster);
}
function init() {
broadcaster.broadcastMessage(START_EVENT);
}
function trackSpeedChanges(pos) {
var _local7 = pos.curr.x - pos.prev.x;
var _local6 = pos.curr.y - pos.prev.y;
var _local3 = lastSpeed;
_local3.x = _local7;
_local3.y = _local6;
var _local5 = _local3.__get__lengthSq();
var _local2 = _local5 - lastSpeedAbs;
lastSpeedAbs = _local5;
if (_local2 < (-impactThreshold)) {
broadcaster.broadcastMessage(IMPACT_EVENT, _local2);
} else if (_local2 > accelThreshold) {
broadcaster.broadcastMessage(ACCEL_EVENT, _local2);
}
}
function trackAirTime() {
timeSinceCollision = getTimer() - lastCollisionTime;
if ((timeSinceCollision > airTimeThreshold) && (!inAir)) {
broadcaster.broadcastMessage(AIR_EVENT);
inAir = true;
}
}
function markCollisionEvent() {
lastCollisionTime = getTimer();
if (inAir) {
inAir = false;
broadcaster.broadcastMessage(POST_AIR_EVENT);
}
}
static var POST_AIR_EVENT = "vehicle_post_air";
static var IMPACT_EVENT = "vehicle_impact";
static var ACCEL_EVENT = "vehicle_accel";
static var AIR_EVENT = "vehicle_air";
static var START_EVENT = "vehicle_start";
var impactThreshold = 5;
var accelThreshold = 30;
var airTimeThreshold = 500;
}
Symbol 1180 MovieClip [__Packages.com.games.pencilRacer.config.SoundConfig] Frame 0
class com.games.pencilRacer.config.SoundConfig
{
function SoundConfig () {
}
static var SUFFIX_START = "_Launch";
static var SUFFIX_IMPACT = "_Imp";
static var SUFFIX_AIR = "_Air";
static var MUSIC_LOOP = "music";
}
Symbol 1181 MovieClip [__Packages.com.games.pencilRacer.gui.RiderIcon] Frame 0
class com.games.pencilRacer.gui.RiderIcon extends com.jjcorreia.display.jObject
{
var create, __set__onPress, clip, offX, offY, setMain, pause, moveNow, getPosition;
function RiderIcon ($pos) {
super($pos.x, $pos.y, "assets", "RiderIcon");
create();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
__set__onPress(com.jjcorreia.utils.Delegate.create(this, drag));
clip.onRollOver = com.jjcorreia.utils.Delegate.create(this, onOver);
clip.onRollOut = com.jjcorreia.utils.Delegate.create(this, onOut);
com.jjcorreia.gui.ToolTip.registerTip(clip, com.games.pencilRacer.config.TipText.RIDER_ICON);
}
function onOver() {
com.jjcorreia.display.jObject.App.Cursor.hide();
com.jjcorreia.display.jObject.App.Cursor.pause();
}
function onOut() {
com.jjcorreia.display.jObject.App.Cursor.show();
com.jjcorreia.display.jObject.App.Cursor.resume();
com.jjcorreia.display.jObject.App.Cursor.Main();
}
function drag() {
offX = clip._xmouse;
offY = clip._ymouse;
com.jjcorreia.display.jObject.App.setMode(null);
setMain(main_drag);
clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, endDrag);
onOver();
}
function endDrag() {
pause();
clip.onMouseUp = null;
com.jjcorreia.display.jObject.App.revertMode();
onOut();
}
function main_drag() {
moveNow(com.jjcorreia.display.jObject.App.linesClip._xmouse - offX, com.jjcorreia.display.jObject.App.linesClip._ymouse - offY);
com.jjcorreia.display.jObject.App.markRiderStart(getPosition());
}
function toString() {
var _local1 = "[ RiderIcon";
_local1 = _local1 + " ]";
return(_local1);
}
}
Symbol 1062 MovieClip [__Packages.com.jjcorreia.utils.Timer] Frame 0
class com.jjcorreia.utils.Timer
{
var totalSeconds, lastTime, time_int, elapsed_secs, remaining_secs, onTick, onTimeUp, __get__speed;
function Timer (time) {
setTime(time || 0);
reset();
com.jjcorreia.application.PauseManager.register(this);
}
function setTime($time) {
totalSeconds = $time;
}
function start() {
lastTime = getTimer();
reset();
resume();
}
function resume() {
pause();
time_int = ((totalSeconds > 0) ? (setInterval(com.jjcorreia.utils.Delegate.create(this, tickTimer), timerSpeed)) : (setInterval(com.jjcorreia.utils.Delegate.create(this, tickTimerInf), timerSpeed)));
running = true;
}
function pause() {
clearInterval(time_int);
running = false;
}
function doPause() {
pause();
}
function doResume() {
resume();
}
function reset() {
pause();
elapsed_secs = 0;
remaining_secs = totalSeconds;
}
function tickTimer() {
var _local2 = (getTimer() - lastTime) / 1000;
lastTime = getTimer();
elapsed_secs = elapsed_secs + _local2;
remaining_secs = totalSeconds - elapsed_secs;
onTick();
if (remaining_secs <= 0) {
timeUp();
}
}
function tickTimerInf() {
var _local2 = (getTimer() - lastTime) / 1000;
lastTime = getTimer();
elapsed_secs = elapsed_secs + _local2;
onTick();
}
function timeUp() {
pause();
remaining_secs = 0;
onTimeUp();
}
function get secondsLeft() {
return(remaining_secs);
}
function set speed($val) {
timerSpeed = $val;
//return(__get__speed());
}
function destroy() {
if (!destroyed) {
destroyed = true;
pause();
com.jjcorreia.application.PauseManager.unregister(this);
}
}
var timerSpeed = 1000;
var running = false;
var destroyed = false;
var Class = "Timer";
}
Symbol 1063 MovieClip [__Packages.com.jjcorreia.utils.Delay] Frame 0
class com.jjcorreia.utils.Delay extends com.jjcorreia.utils.Timer
{
var ClassObject, onTimeUp, timerSpeed, addedParams, start, elapsed_secs, remaining_secs, totalSeconds, onTick, pause, destroy;
function Delay ($time, $Class, $timeUp) {
super($time);
ClassObject = $Class;
onTimeUp = $timeUp;
timerSpeed = $time * 1000;
addedParams = arguments.slice(3);
start();
}
function tickTimer() {
elapsed_secs = elapsed_secs + (timerSpeed / 1000);
remaining_secs = totalSeconds - elapsed_secs;
onTick();
if (remaining_secs <= 0) {
timeUp();
}
}
function timeUp() {
pause();
remaining_secs = 0;
onTimeUp.apply(ClassObject, addedParams);
destroy();
}
function displayTime() {
}
var Class = "Delay";
}
Symbol 1182 MovieClip [__Packages.com.jjcorreia.gui.ToolTip] Frame 0
class com.jjcorreia.gui.ToolTip extends MovieClip
{
static var _instance, holderClip, imageBG, mouseListener, msgObject, dsF, libClip, sleepTimer, tipData, myTimer;
var image, msg, bg, _textOffsetX, w, _textOffsetY, h, cacheAsBitmap, _cursorOffsetX, _cursorOffsetY, _screenPaddingX, _screenPaddingY, _txtColor, _txtSize, _maxWidth, _bgColor, _strokeColor, _strokeSize, _tipDelay, _sleepDelay, _cornerRadius, _hasShadow, _type, _imageBG;
function ToolTip (data, prefs) {
super();
if (data instanceof MovieClip) {
hasImage = true;
image = data;
} else {
msg = data;
}
setPrefs(prefs);
mainInit();
}
function mainInit() {
if (_instance) {
hideTip();
}
var _local2 = holderClip.getNextHighestDepth();
bg = holderClip.createEmptyMovieClip("tip_" + _local2, _local2);
makeFiller();
drawBG(w + (_textOffsetX * 2), h + (_textOffsetY * 2));
positionByMouse();
tipDisabled = false;
_instance = this;
cacheAsBitmap = true;
bg.onMouseDown = hideTip;
if (followMouse) {
bg.onMouseMove = com.jjcorreia.utils.Delegate.create(this, positionByMouse);
}
}
function positionByMouse() {
bg._x = holderClip._xmouse + _cursorOffsetX;
bg._y = holderClip._ymouse + _cursorOffsetY;
var _local3 = Stage.width - (bg._x + bg._width);
var _local2 = Stage.height - (bg._y + bg._height);
if (_local3 < _screenPaddingX) {
bg._x = bg._x + (_local3 - _screenPaddingX);
}
if (_local2 < _screenPaddingY) {
bg._y = bg._y + (_local2 - _screenPaddingY);
}
}
function makeFiller() {
var _local2 = bg.createTextField("text", 1, 0, 0, 100, 50);
_local2.autoSize = "Left";
_local2.multiline = true;
_local2.selectable = false;
_local2.html = true;
var _local3 = new TextFormat();
_local3.font = "Verdana";
_local3.color = _txtColor;
_local3.size = _txtSize;
_local2.setNewTextFormat(_local3);
_local2.htmlText = msg;
_local2._x = _textOffsetX;
_local2._y = _textOffsetY;
if (_local2._width > _maxWidth) {
_local2._width = _maxWidth;
_local2.wordWrap = true;
}
w = _local2._width;
h = _local2._height;
}
function setPrefs(prefs) {
_bgColor = bgColor;
_strokeColor = strokeColor;
_strokeSize = strokeSize;
_txtColor = txtColor;
_txtSize = txtSize;
_tipDelay = tipDelay;
_sleepDelay = sleepDelay;
_cursorOffsetX = cursorOffsetX;
_cursorOffsetY = cursorOffsetY;
_textOffsetX = textOffsetX;
_textOffsetY = textOffsetY;
_cornerRadius = cornerRadius;
_hasShadow = hasShadow;
_maxWidth = maxWidth;
_screenPaddingX = screenPaddingX;
_screenPaddingY = screenPaddingY;
_type = type;
_imageBG = imageBG;
for (var _local3 in prefs) {
this["_" + _local3] = prefs[_local3];
}
}
function destroy() {
bg.removeMovieClip();
_instance = null;
}
static function init(container, tipDelay) {
mouseListener = new Object();
mouseListener.onMouseDown = function () {
com.jjcorreia.gui.ToolTip.hideTip();
};
restoreDefaults();
setParent(container);
com.jjcorreia.gui.ToolTip.tipDelay = (tipDelay ? (tipDelay) : (DEFAULT_DELAY));
msgObject = new Object();
var _local2 = 0;
var _local7 = 45;
var _local10 = 0.8;
var _local6 = 3;
var _local5 = 3;
var _local3 = 3;
var _local8 = 0.5;
var _local4 = false;
var _local9 = false;
var _local1 = 1;
dsF = new flash.filters.DropShadowFilter(_local3, _local7, _local2, _local10, _local6, _local5, _local8, _local1, _local4, _local9);
}
static function useLibraryClip(container) {
useLibrary = true;
libClip = container;
}
function drawBG(w, h) {
bg.beginFill(_bgColor);
if (_strokeSize > -1) {
bg.lineStyle(_strokeSize, _strokeColor, 1, true);
}
bg.moveTo(0, 0);
bg.lineTo(w, 0);
bg.lineTo(w, h);
bg.lineTo(0, h);
bg.lineTo(0, 0);
bg.endFill();
if (_hasShadow) {
bg.filters = [dsF];
}
}
static function setParent(container) {
holderClip = container;
}
static function restoreDefaults() {
bgColor = DEFAULT_BGCOLOR;
strokeColor = DEFAULT_STROKECOLOR;
strokeSize = DEFAULT_STROKESIZE;
txtColor = DEFAULT_COLOR;
txtSize = DEFAULT_TXTSIZE;
tipDelay = DEFAULT_DELAY;
cursorOffsetX = DEFAULT_COFFSETX;
cursorOffsetY = DEFAULT_COFFSETY;
textOffsetX = DEFAULT_OFFSET;
textOffsetY = DEFAULT_OFFSET;
cornerRadius = DEFAULT_CORNER;
hasShadow = DEFAULT_SHADOW;
sleepDelay = DEFAULT_SLEEPDELAY;
maxWidth = DEFAULT_MAXWIDTH;
screenPaddingX = SCREEN_PADDING;
screenPaddingY = SCREEN_PADDING;
type = TYPE;
imageBG = null;
}
static function setShadow(dsF) {
com.jjcorreia.gui.ToolTip.dsF = dsF;
}
static function setOffset(x, y) {
textOffsetX = x;
textOffsetY = y;
}
static function hint(tipData) {
if (sleepTimer != null) {
sleepTimer.pause();
sleepTimer = null;
}
if (!tipDisabled) {
var _local2 = new com.jjcorreia.gui.ToolTip(tipData.data, tipData.prefs);
} else {
com.jjcorreia.gui.ToolTip.tipData = tipData;
myTimer = new com.jjcorreia.utils.Timer(tipDelay / 1000);
myTimer.timerSpeed = 30;
myTimer.onTimeUp = dispTip;
myTimer.start();
Mouse.addListener(mouseListener);
}
}
static function dispTip() {
myTimer = null;
var _local1 = new com.jjcorreia.gui.ToolTip(tipData.data, tipData.prefs);
}
function activeMouseTrack() {
}
static function sleepTip() {
tipDisabled = true;
sleepTimer = null;
}
static function hideTip() {
Mouse.removeListener(mouseListener);
if (myTimer != null) {
myTimer.pause();
myTimer = null;
}
if (_instance != null) {
_instance.destroy();
}
sleepTimer = new com.jjcorreia.utils.Timer(sleepDelay / 1000);
sleepTimer.timerSpeed = 30;
sleepTimer.onTimeUp = sleepTip;
sleepTimer.start();
}
static function registerTip(clip, message, prefs) {
function display() {
if (tipData.originalOver) {
tipData.originalOver();
}
com.jjcorreia.gui.ToolTip.hint(tipData);
}
function out() {
if (tipData.originalOut) {
tipData.originalOut();
}
com.jjcorreia.gui.ToolTip.hideTip();
}
var tipData = msgObject[clip];
if (!tipData) {
tipData = new Object();
tipData.originalOver = clip.onRollOver;
tipData.originalOut = clip.onRollOut;
}
if (message) {
tipData.data = message;
}
if (prefs) {
tipData.prefs = prefs;
}
msgObject[clip] = tipData;
clip.onRollOver = display;
clip.onRollOut = (clip.onDragOut = out);
}
static function unregister(clip) {
var _local2 = msgObject[clip];
clip.onRollOver = _local2.originalOver;
clip.onRollOut = _local2.originalOut;
delete clip.onDragOut;
delete msgObject[clip];
}
static var DEFAULT_OFFSET = 3;
static var DEFAULT_MAXWIDTH = 250;
static var DEFAULT_DELAY = 500;
static var DEFAULT_COFFSETX = 15;
static var DEFAULT_COFFSETY = 0;
static var DEFAULT_TXTSIZE = 11;
static var DEFAULT_COLOR = 0;
static var DEFAULT_STROKECOLOR = 0;
static var DEFAULT_STROKESIZE = 0;
static var DEFAULT_BGCOLOR = 16777185;
static var DEFAULT_CORNER = 0;
static var DEFAULT_SHADOW = true;
static var SCREEN_PADDING = 10;
static var DEFAULT_SLEEPDELAY = 500;
static var DEFAULT_PREFS = 0;
static var TYPE = "text";
static var FOLLOW_MOUSE = true;
static var bgColor = DEFAULT_BGCOLOR;
static var strokeColor = DEFAULT_STROKECOLOR;
static var strokeSize = DEFAULT_STROKESIZE;
static var txtColor = DEFAULT_COLOR;
static var txtSize = DEFAULT_TXTSIZE;
static var tipDelay = DEFAULT_DELAY;
static var cursorOffsetX = DEFAULT_COFFSETX;
static var cursorOffsetY = DEFAULT_COFFSETY;
static var textOffsetX = DEFAULT_OFFSET;
static var textOffsetY = DEFAULT_OFFSET;
static var cornerRadius = DEFAULT_CORNER;
static var hasShadow = DEFAULT_SHADOW;
static var sleepDelay = DEFAULT_SLEEPDELAY;
static var maxWidth = DEFAULT_MAXWIDTH;
static var screenPaddingX = SCREEN_PADDING;
static var screenPaddingY = SCREEN_PADDING;
static var type = TYPE;
static var followMouse = FOLLOW_MOUSE;
static var tipDisabled = true;
static var useLibrary = false;
var hasImage = false;
}
Symbol 1183 MovieClip [__Packages.com.games.pencilRacer.config.TipText] Frame 0
class com.games.pencilRacer.config.TipText
{
function TipText () {
}
static var MOVE_TIP_SIMPLE = ("<b>Move (" + com.games.pencilRacer.config.Modes.MOVE_KEY) + ")</b><br>Click and drag to move lines, or click and drag to select a group";
static var LINE_TIP_SIMPLE = ("<b>Line (" + com.games.pencilRacer.config.Modes.LINE_KEY) + ")</b><br>Click to start drawing a line, click again to finish";
static var PENCIL_TIP_SIMPLE = ("<b>Pencil (" + com.games.pencilRacer.config.Modes.PENCIL_KEY) + ")</b><br>Click and drag to draw";
static var POINT_TIP_SIMPLE = ("<b>Point (" + com.games.pencilRacer.config.Modes.POINT_KEY) + ")</b><br>Modifies the beginning or end points of a line";
static var ERASE_TIP_SIMPLE = ("<b>Eraser (" + com.games.pencilRacer.config.Modes.ERASE_KEY) + ")</b><br>Erases lines";
static var ZOOM_TIP_SIMPLE = ("<b>Zoom Tool (" + com.games.pencilRacer.config.Modes.ZOOM_KEY) + ")</b><br>Click to zoom in, SHIFT + click to zoom out<br>Scroll your mouse wheel with any tool to zoom as well";
static var PAN_TIP_SIMPLE = ("<b>Pan Tool (" + com.games.pencilRacer.config.Modes.PAN_KEY) + ")</b><br>Click on the background and drag to pan";
static var SHAPES_TIP = "<b>Shapes</b><br>Choose a shape then add it to your scene";
static var TRACK_TIP = "<b>Track Pieces</b><br>Choose a premade track piece for your vehicle to ride on";
static var VEHICLE_TIP_SIMPLE = "This is your current vehicle<br>Click to change";
static var MOVE_TIP = ("<b>Track Move Tool (" + com.games.pencilRacer.config.Modes.MOVE_KEY) + ")</b><br>Click and drag to move a track, or click and drag to select a group";
static var LINE_TIP = ("<b>Track Line Tool (" + com.games.pencilRacer.config.Modes.LINE_KEY) + ")</b><br>Click to start drawing a track line, click again to finish";
static var PENCIL_TIP = ("<b>Track Pencil Tool (" + com.games.pencilRacer.config.Modes.PENCIL_KEY) + ")</b><br>Draws track continuously";
static var POINT_TIP = ("<b>Track Point Tool (" + com.games.pencilRacer.config.Modes.POINT_KEY) + ")</b><br>Individually modifies the beginning or end points of a track line";
static var ERASE_TIP = ("<b>Track Eraser Tool (" + com.games.pencilRacer.config.Modes.ERASE_KEY) + ")</b><br>Click on a track line to erase, or click and drag to erase groups";
static var MOVE_TIP_ART = ("<b>Art Move Tool (" + com.games.pencilRacer.config.Modes.MOVE_KEY) + ")</b><br>Click and drag to move an <b>art</b> line, or click and drag to select a group";
static var LINE_TIP_ART = ("<b>Art Line Tool (" + com.games.pencilRacer.config.Modes.LINE_KEY) + ")</b><br>Click to start drawing an art line, click again to finish";
static var PENCIL_TIP_ART = ("<b>Art Pencil Tool (" + com.games.pencilRacer.config.Modes.PENCIL_KEY) + ")</b><br>Draws a continous stream of art lines";
static var POINT_TIP_ART = ("<b>Art Point Tool (" + com.games.pencilRacer.config.Modes.POINT_KEY) + ")</b><br>Individually modifies the beginning or end points of an art line";
static var ERASE_TIP_ART = ("<b>Art Eraser Tool (" + com.games.pencilRacer.config.Modes.ERASE_KEY) + ")</b><br>Click on an art line to erase, or click and drag to erase groups";
static var ZOOM_TIP = ("<b>Zoom Tool (" + com.games.pencilRacer.config.Modes.ZOOM_KEY) + ")</b><br>Click to zoom in, SHIFT + click to zoom out<br>Scroll your mouse wheel with any tool to zoom as well";
static var PAN_TIP = ("<b>Pan Tool (" + com.games.pencilRacer.config.Modes.PAN_KEY) + ")</b><br>Click on the background and drag to pan";
static var TRACK_TAB = ("<b>Track Tools (Shortuct key: " + com.games.pencilRacer.config.Modes.TRACK_PANEL_KEY) + ")</b><br>Tools for drawing tracks that affect vehicle physics";
static var ART_TAB = ("<b>Art Palette (Shortuct key: " + com.games.pencilRacer.config.Modes.ART_PANEL_KEY) + ")</b><br>Tools for drawing artistic lines that dont affect vehicle physics";
static var VEHICLE_TAB = ("<b>Vehicle Garage (Shortuct key: " + com.games.pencilRacer.config.Modes.VEHICLES_PANEL_KEY) + ")</b><br>Your selection of vehicles";
static var SELECTION_TAB = "<b>Selection Palette</b><br>Tools pertaining to a line selection. Only active whe lines are currently selected";
static var SHAPES_TAB = ("<b>Shapes (Shortuct key: " + com.games.pencilRacer.config.Modes.SHAPES_PANEL_KEY) + ")</b><br>Choose a shape then add it to your scene";
static var SIMULATE = ("Play track (" + com.games.pencilRacer.config.Modes.SIMULATE_KEY) + ")";
static var NEW = "Create a new track";
static var LOAD = ("Open an existing track (" + com.games.pencilRacer.config.Modes.LOAD_KEY) + ")";
static var SAVE = ("Save your current track (" + com.games.pencilRacer.config.Modes.SAVE_KEY) + ")";
static var HELP = "Show helpful information";
static var MAXIMIZE = "<b>Maximize</b><br>(SHIFT + click to reset)";
static var MINIMIZE = "<b>Minimize</b><br>(SHIFT + click to reset)";
static var STROKE = "Changes the thickness of the art lines you draw";
static var ACCELERATION = "<b>Acceleration</b> will add speed to your vehicle (like a conveyor belt)";
static var STICKINESS = "<b>Stickiness</b> will slow down your vehicle wherever it contacts the line";
static var ACCELERATION_SIMPLE = "<b>Track Acceleration</b><br>Makes tracks add speed to your vehicle";
static var STICKINESS_SIMPLE = "<b>Track Stickiness</b><br>Makes tracks sticky, slowing your vehicle down";
static var ART = "Sets the selected lines as art lines, which have no effect on vehicle physics";
static var TRACK = "Sets the selected lines as tracks lines";
static var DELETE = "Deletes the currently selected line group";
static var RIDER_ICON = "<b>Vehicle starting point</b><br>Click and drag to move";
static var FLAG_ICON = "<b>Set checkpoint flag</b><br>Starts your vehicle from its current location";
static var FLAG_TIP = "Clear the checkpoint flag";
static var STOP = ("Stop playback (" + com.games.pencilRacer.config.Modes.SIMULATE_KEY) + ")";
static var COLOR_TRACK_TIP = "<b>Line Color</b><br>Changes the color used to draw <i>track</i> lines";
static var COLOR_ART_TIP = "<b>Line Color</b><br>Changes the color used to draw <i>art</i> lines";
static var COLOR_SELECTED_TIP = "<b>Line Color</b><br>Changes the color of <i>currently selected</i> lines";
static var BG_COLOR_TIP = "<b>Background Color</b><br>Changes the background color of the entire track";
static var FILE = "Save, load, start over, etc";
static var MUTE_ALL = "Toggle all audio";
static var OPTIONS = "More options";
static var SHARE = "Share this track with others!";
static var MUTE_SOUND = "Toggle sounds";
static var MUTE_MUSIC = "Toggle music";
static var MODE_EXPERT = "Switches the interface to expert mode";
static var MODE_SIMPLE = "Switches the interface to simple mode";
static var ART_MODE_TIP = "Switches your tools to <b>art</b> mode";
static var TRACK_MODE_TIP = "Switches your tools to <b>track</b> mode";
static var ART_MODE_CURRENT_TIP = "You are in <b>art</b> mode";
static var TRACK_MODE_CURRENT_TIP = "Tools are in <b>track</b> mode";
static var BG_PAPER_ON = "Displays a paper texture in the background";
static var BG_PAPER_OFF = "Hides the background paper texture";
}
Symbol 1184 MovieClip [__Packages.com.games.pencilRacer.gui.FlagIcon] Frame 0
class com.games.pencilRacer.gui.FlagIcon extends com.jjcorreia.display.jObject
{
var create, data, clip;
function FlagIcon ($pos, $data) {
super($pos.x, $pos.y, "assets", "FlagIcon");
create();
data = $data;
com.jjcorreia.gui.ToolTip.registerTip(clip, com.games.pencilRacer.config.TipText.FLAG_ICON);
}
function toString() {
var _local2 = "[ FlagIcon";
_local2 = _local2 + (", data:" + data);
_local2 = _local2 + " ]";
return(_local2);
}
}
Symbol 1185 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.Palette] Frame 0
class com.games.pencilRacer.gui.palettes.Palette extends com.jjcorreia.display.jObject
{
var markPosition, clip, d, x, y, moveNow, markedVector, __get__width, __get__height, render, offX, offY, Class;
function Palette ($x, $y, $holder, $Class, $modal) {
super($x, $y, $holder, $Class);
modal = $modal;
Stage.addListener(this);
}
function init() {
markPosition();
clip.drag_btn.onPress = com.jjcorreia.utils.Delegate.create(this, activateDrag);
clip.drag_btn.useHandCursor = false;
clip.minimize_btn.btn_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleMinimized);
com.jjcorreia.gui.ToolTip.registerTip(clip.minimize_btn.btn_btn, com.games.pencilRacer.config.TipText.MINIMIZE);
if (modal) {
d = new com.games.pencilRacer.gui.dialogs.Disabler();
com.jjcorreia.display.jObject.App.Cursor.hide();
}
loadPosition();
clampToScreen();
savePosition();
}
function hide() {
super.hide();
clip._x = -1000;
}
function show() {
super.show();
clip._x = x;
}
function minimize() {
lastX = x;
lastY = y;
minimized = true;
savePosition();
moveNow(x, Stage.height - MINIMIZE_BUFFER);
clip.minimize_btn.gotoAndStop(2);
clip.minimize_btn.btn_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleMinimized);
com.jjcorreia.gui.ToolTip.registerTip(clip.minimize_btn.btn_btn, com.games.pencilRacer.config.TipText.MAXIMIZE);
}
function maximize() {
minimized = false;
moveNow(lastX, lastY);
savePosition();
clip.minimize_btn.gotoAndStop(1);
clip.minimize_btn.btn_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleMinimized);
com.jjcorreia.gui.ToolTip.registerTip(clip.minimize_btn.btn_btn, com.games.pencilRacer.config.TipText.MINIMIZE);
}
function toggleMinimized() {
if (Key.isDown(16)) {
resetPosition();
} else {
(minimized ? (maximize()) : (minimize()));
}
return(minimized);
}
function resetPosition() {
maximize();
moveNow(markedVector.x, markedVector.y);
savePosition();
}
function clampToScreen() {
x = Math.max(x, MIN_X);
y = Math.max(y, MIN_Y);
x = Math.min(x, Stage.width - __get__width());
if (!minimized) {
y = Math.min(y, Stage.height - __get__height());
}
render();
}
function onResize() {
clampToScreen();
}
function activateDrag() {
offX = clip._xmouse;
offY = clip._ymouse;
clip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, doDrag);
clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, haltDrag);
}
function doDrag() {
x = com.jjcorreia.display.jObject.App._xmouse - offX;
y = (minimized ? (clip._y) : (com.jjcorreia.display.jObject.App._ymouse - offY));
clampToScreen();
}
function haltDrag() {
delete clip.onMouseMove;
delete clip.onMouseUp;
savePosition();
}
function savePosition() {
if (minimized) {
com.jjcorreia.display.jObject.App.cookie.save(Class, {minimized:minimized, x:x, y:lastY});
} else {
com.jjcorreia.display.jObject.App.cookie.save(Class, {minimized:minimized, x:x, y:y});
}
}
function loadPosition() {
var _local2 = com.jjcorreia.display.jObject.App.cookie.load(Class, null);
if ((!isNaN(_local2.x)) && (!isNaN(_local2.y))) {
moveNow(_local2.x, _local2.y);
if (_local2.minimized) {
minimize();
}
}
}
function destroy() {
if (modal) {
d.destroy();
}
super.destroy();
}
static var MIN_X = 0;
static var MIN_Y = 0;
var modal = false;
var minimized = false;
static var MINIMIZE_BUFFER = 28;
}
Symbol 1186 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Disabler] Frame 0
class com.games.pencilRacer.gui.dialogs.Disabler extends com.jjcorreia.display.jObject
{
var create, clip;
function Disabler () {
super(0, 0, "disabler", "blank");
create();
clip.beginFill(COLOR, ALPHA);
clip.lineTo(Stage.width, 0);
clip.lineTo(Stage.width, Stage.height);
clip.lineTo(0, Stage.height);
clip.lineTo(0, 0);
clip.endFill();
clip.onPress = function () {
};
clip.onRelease = function () {
};
clip.useHandCursor = false;
}
static var ALPHA = 70;
static var COLOR = 0;
}
Symbol 1187 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.Navigator] Frame 0
class com.games.pencilRacer.gui.palettes.Navigator extends com.games.pencilRacer.gui.palettes.Palette
{
var create, moveNow, clip, preview, view_mc, viewBox, setMain, pause;
function Navigator (x, y) {
super(x, y, "gui", "Navigator");
create();
moveNow(Stage.width - clip._width, Stage.height - clip._height);
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
super.init();
preview = new flash.display.BitmapData(PREVIEW_WIDTH, PREVIEW_HEIGHT, false, PREVIEW_COLOR);
clip.prev_mc.attachBitmap(preview, 1);
view_mc = clip.prev_mc.createEmptyMovieClip("view_mc", clip.prev_mc.getNextHighestDepth());
viewBox = new com.games.pencilRacer.gui.palettes.ViewBox(0, 0, view_mc);
view_mc.scrollRect = preview.rectangle.clone();
clip.scale_mc.suffix = "%";
clip.scale_mc.setRange(com.games.pencilRacer.apps.Zoom.MIN, com.games.pencilRacer.apps.Zoom.MAX);
clip.scale_mc.value = 100;
clip.scale_mc.onUpdate = com.jjcorreia.utils.Delegate.create(this, doZoom);
clip.prev_mc.onPress = com.jjcorreia.utils.Delegate.create(this, startPan);
}
function startPan() {
setMain(main_pan);
clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, stopPan);
}
function stopPan() {
pause();
clip.onMouseUp = null;
}
function main_pan() {
var _local2 = com.jjcorreia.display.jObject.App.camera.clip;
var _local4 = Math.min(preview.width / _local2._width, preview.height / _local2._height);
var _local3 = _local2.getBounds(_local2);
var _local8 = viewBox.clip._width / 2;
var _local5 = viewBox.clip._height / 2;
var _local7 = ((-clip.prev_mc._xmouse) + _local8) / _local4;
var _local6 = ((-clip.prev_mc._ymouse) + _local5) / _local4;
com.jjcorreia.display.jObject.App.panTo(_local7 - (_local3.xMin * com.games.pencilRacer.apps.Zoom.__get__sFactor()), _local6 - (_local3.yMin * com.games.pencilRacer.apps.Zoom.__get__sFactor()));
}
function doZoom() {
var _local2 = com.jjcorreia.display.jObject.App.camera.clip;
var _local4 = new com.jjcorreia.geom.Vector(Stage.width / 2, Stage.height / 2);
_local2.globalToLocal(_local4);
com.games.pencilRacer.apps.Zoom.zoomTo(clip.scale_mc.value, false, false);
var _local5 = new com.jjcorreia.geom.Vector(Stage.width / 2, Stage.height / 2);
_local2.globalToLocal(_local5);
var _local3 = _local5.difference(_local4);
_local3.multiply(com.games.pencilRacer.apps.Zoom.__get__sFactor());
_local3.round();
com.jjcorreia.display.jObject.App.panTo(_local2._x + _local3.x, _local2._y + _local3.y);
}
function displayZoom(val) {
clip.scale_mc.setValue(Math.round(val));
clip.scale_mc.update(true);
}
function drawViewBox(clips) {
var _local3 = clips[0];
var _local6 = _local3._xscale / 100;
var _local4 = Math.min(preview.width / _local3._width, preview.height / _local3._height);
var _local5 = new flash.geom.Transform(_local3);
var _local2 = _local5.pixelBounds;
_local2.x = (-_local2.x) * _local4;
_local2.y = (-_local2.y) * _local4;
_local2.width = Stage.width * _local4;
_local2.height = Stage.height * _local4;
viewBox.draw(_local2);
}
function draw(clips) {
preview.fillRect(preview.rectangle, PREVIEW_COLOR);
var _local2 = clips[0];
var _local6 = _local2.getBounds(com.jjcorreia.display.jObject.App.Skin.getHolder("assets"));
var _local5 = _local2._xscale / 100;
var _local8 = _local2._width / _local5;
var _local7 = _local2._height / _local5;
var _local3 = new flash.geom.Matrix();
var _local4 = Math.min(preview.width / _local8, preview.height / _local7);
_local3.translate(-_local6.xMin, -_local6.yMin);
_local3.scale(_local4, _local4);
preview.draw(_local2, _local3);
drawViewBox(clips, _local4);
}
static var PREVIEW_WIDTH = 140;
static var PREVIEW_HEIGHT = 85;
static var PREVIEW_COLOR = 14674412;
}
Symbol 1188 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.ViewBox] Frame 0
class com.games.pencilRacer.gui.palettes.ViewBox extends com.jjcorreia.display.jObject
{
var create, rect, clip;
function ViewBox ($x, $y, $clip) {
super($x, $y, $clip, "blank");
create();
}
function draw(r) {
rect = r.clone();
clear();
clip.lineStyle(LINE_STROKE, LINE_COLOR, LINE_ALPHA, true);
clip.beginFill(LINE_ALPHA, FILL_ALPHA);
clip.moveTo(r.x, r.y);
clip.lineTo(r.x + r.width, r.y);
clip.lineTo(r.x + r.width, r.y + r.height);
clip.lineTo(r.x, r.y + r.height);
clip.lineTo(r.x, r.y);
}
function clear() {
clip.clear();
}
function toString() {
var _local1 = "[ ViewBox";
_local1 = _local1 + " ]";
return(_local1);
}
static var LINE_STROKE = 2;
static var LINE_COLOR = 0;
static var LINE_ALPHA = 100;
static var FILL_COLOR = 0;
static var FILL_ALPHA = 2;
}
Symbol 1189 MovieClip [__Packages.com.games.pencilRacer.apps.Zoom] Frame 0
class com.games.pencilRacer.apps.Zoom
{
static var clip, clips, app, value, scale, lastPlayBackZoom, lastZoom;
function Zoom () {
}
static function init(c, a) {
clip = c[0];
clips = c;
app = a;
value = 1;
scale = DEFAULT_EDIT;
lastPlayBackZoom = DEFAULT_PLAYBACK;
lastZoom = DEFAULT_EDIT;
}
static function get sFactor() {
return(value);
}
static function simulationZoom() {
lastZoom = scale;
zoomTo(lastPlayBackZoom);
}
static function editZoom() {
lastPlayBackZoom = scale;
zoomTo(lastZoom);
}
static function onMouseWheel(delta) {
adjust(delta * ADJUST_FACTOR);
}
static function clickZoom() {
adjust((Key.isDown(16) ? (-ZOOM_SPEED) : (ZOOM_SPEED)));
}
static function adjust(amount) {
var _local2 = app.__get__cursorPos();
_local2.round();
scale = clip._xscale / ((100 - (amount / 10)) / 100);
scale = Math.min(Math.max(scale, MIN), MAX);
clip._yscale = (clip._xscale = scale);
value = scale / 100;
var _local3 = app.__get__cursorPos();
var _local1 = _local3.difference(_local2);
_local1.multiply(value);
_local1.round();
clip._x = clip._x + _local1.x;
clip._y = clip._y + _local1.y;
updateAll();
app.navigator.displayZoom(scale);
app.navigator.drawViewBox(clips);
onZoom();
}
static function updateAll() {
var _local3 = clips[0];
app.panTo(_local3._x, _local3._y);
var _local1 = 1;
while (_local1 < clips.length) {
var _local2 = clips[_local1];
_local2._xscale = _local3._xscale;
_local2._yscale = _local3._yscale;
_local1++;
}
}
static function zoomTo(target, noCenter, noUpdate) {
scale = Math.min(Math.max(target, MIN), MAX);
value = scale / 100;
clip._xscale = (clip._yscale = scale);
updateAll();
if (noUpdate != true) {
app.navigator.displayZoom(scale);
}
app.navigator.drawViewBox(clips);
onZoom();
}
static function onZoom() {
app.dash.setDash(1 / value, 3 / value);
}
static var MAX = 800;
static var MIN = 5;
static var DEFAULT_PLAYBACK = 220;
static var DEFAULT_EDIT = 100;
static var ADJUST_FACTOR = 15;
static var ZOOM_SPEED = 250;
}
Symbol 1190 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.PlaybackBar] Frame 0
class com.games.pencilRacer.gui.palettes.PlaybackBar extends com.games.pencilRacer.gui.palettes.Palette
{
var create, hide, clip, onMouseMove, moveNow, __set__alpha;
function PlaybackBar () {
super(0, 0, "gui2", "PlaybackBar");
create();
init();
hide();
}
function init() {
clip.stop_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.stopLevel);
clip.flag_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.markFlag);
com.jjcorreia.gui.ToolTip.registerTip(clip.stop_btn, com.games.pencilRacer.config.TipText.STOP);
com.jjcorreia.gui.ToolTip.registerTip(clip.flag_btn, com.games.pencilRacer.config.TipText.FLAG_ICON);
main_over();
main_out();
onMouseMove = main_out;
Mouse.addListener(this);
clampToScreen();
}
function clampToScreen() {
moveNow(Stage.width / 2, 0);
}
function main_out() {
if (clip.hitTest(com.jjcorreia.display.jObject.App._xmouse, com.jjcorreia.display.jObject.App._ymouse, false)) {
__set__alpha(100);
onMouseMove = main_over;
}
}
function main_over() {
if (!clip.hitTest(com.jjcorreia.display.jObject.App._xmouse, com.jjcorreia.display.jObject.App._ymouse, false)) {
__set__alpha(ALPHA_LOW);
onMouseMove = main_out;
}
}
static var ALPHA_LOW = 40;
}
Symbol 1191 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.LineRiderLoad] Frame 0
class com.games.pencilRacer.gui.dialogs.LineRiderLoad extends com.games.pencilRacer.gui.palettes.Palette
{
var create, myCookie, modal, clip, destroy, savedTracks, buffer, fileVersion, segments, perFrame, loadPerFrame, resume, pause;
function LineRiderLoad ($x, $y) {
super($x, $y, "gui", "LineRiderLoad");
create();
myCookie = new com.jjcorreia.utils.prefs.jCookie("savedLines", "/");
modal = true;
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
super.init();
clip.trackmc.dataProvider = myCookie.__get__data().trackList;
clip.load_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doLoad);
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, destroy);
}
function doLoad() {
if (clip.trackmc.selectedIndex != undefined) {
parseLineRiderTrack(clip.trackmc.selectedIndex);
}
}
function parseLineRiderTrack($index) {
delete com.jjcorreia.display.jObject.App.riderStart;
savedTracks = myCookie.__get__data().trackList[$index];
buffer = savedTracks.data;
fileVersion = savedTracks.version;
var _local2 = new com.jjcorreia.geom.Vector(savedTracks.startLine[0], savedTracks.startLine[1]);
com.jjcorreia.display.jObject.App.markRiderStart(_local2);
segments = buffer.length - 1;
perFrame = 0;
loadPerFrame = 1;
resume();
}
function Main() {
if (segments > 0) {
if (segments > (loadPerFrame - 2)) {
segments = segments - loadPerFrame;
perFrame = loadPerFrame;
} else {
perFrame = segments;
segments = 0;
}
var _local3 = 0;
if (((_local3 < (perFrame + (segments == 0))) ? 1 : 0)) {
var _local2 = buffer[(segments + perFrame) - _local3];
if (_local2[9] == undefined) {
_local2[9] = 0;
}
var _local5 = new com.jjcorreia.geom.Vector(_local2[0], _local2[1]);
var _local4 = new com.jjcorreia.geom.Vector(_local2[2], _local2[3]);
com.jjcorreia.display.jObject.App.addLine(_local5, _local4);
_local3++;
}
} else {
pause();
close();
}
}
function close() {
destroy();
}
}
Symbol 1192 MovieClip [__Packages.com.jjcorreia.utils.prefs.jCookie] Frame 0
class com.jjcorreia.utils.prefs.jCookie
{
var my_so, userName;
function jCookie ($name, $folder, $userName) {
my_so = SharedObject.getLocal($name, $folder);
my_so.onStatus = callBack;
setUser($userName);
}
function callBack(infoObject) {
for (var _local2 in infoObject) {
trace((_local2 + ":") + infoObject[_local2]);
}
}
function setUser($userName) {
if ($userName != undefined) {
userName = $userName;
hasUser = true;
if (userData == undefined) {
my_so.data[$userName] = new Object();
}
} else {
hasUser = false;
}
}
function save($targ, $val, $topLevel) {
($topLevel ? ((data[$targ] = $val)) : ((userData[$targ] = $val)));
return(my_so.flush());
}
function load($targ, $defaultReturn, $topLevel) {
var _local3;
var _local2;
($topLevel ? (_local2 = data[$targ]) : (_local2 = userData[$targ]));
(((_local2 == undefined) && ($defaultReturn != undefined)) ? (_local3 = $defaultReturn) : (_local3 = _local2));
return(_local3);
}
function remove($targ) {
delete userData[$targ];
}
function get userData() {
if (hasUser) {
return(my_so.data[userName]);
}
return(my_so.data);
}
function get data() {
return(my_so.data);
}
function Debug() {
trace("Debug:");
for (var _local3 in data) {
trace(((" " + _local3) + ": ") + data[_local3]);
for (var _local2 in data[_local3]) {
trace(((((" " + _local3) + ".") + _local2) + ": ") + data[_local3][_local2]);
}
}
}
function destroy() {
my_so.clear();
}
function get size() {
return(my_so.getSize());
}
var hasUser = false;
}
Symbol 1193 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Dialog] Frame 0
class com.games.pencilRacer.gui.dialogs.Dialog extends com.jjcorreia.display.jObject
{
var _shadow, holder, d, clip, moveNow, __get__width, __get__height;
function Dialog ($x, $y, $holder, $Class, $modal) {
super($x, $y, $holder, $Class);
modal = $modal;
_shadow = new flash.filters.DropShadowFilter(6, 45, 0, 0.5, 8, 8, 1, 3);
trace(holder);
}
function init() {
alignCenter();
if (modal) {
d = new com.games.pencilRacer.gui.dialogs.Disabler();
com.jjcorreia.display.jObject.App.goModal();
clip.filters = [_shadow];
}
}
function alignCenter() {
moveNow((Stage.width / 2) - (__get__width() / 2), (Stage.height / 2) - (__get__height() / 2));
}
function close() {
destroy();
}
function destroy() {
if (modal) {
d.destroy();
com.jjcorreia.display.jObject.App.endModal();
}
super.destroy();
}
var modal = false;
}
Symbol 1194 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.PasteLoad] Frame 0
class com.games.pencilRacer.gui.dialogs.PasteLoad extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, clip, hide, show, loadSlotRequested;
function PasteLoad ($x, $y) {
super($x, $y, "modals", "PasteLoad", true);
create();
init();
clip.load_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, loadString);
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
hide();
Key.addListener(this);
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, loadTitles);
}
function onKeyUp() {
if (Selection.getFocus() != clip.code_txt) {
var _local2 = 0;
while (_local2 < TOTAL_SLOTS) {
if (Key.getCode() == com.jjcorreia.input.KeyManager.getKeyCode(_local2 + 1)) {
requestLoad(_local2);
}
_local2++;
}
}
}
function loadTitles() {
var _local3;
var _local2 = 0;
while (_local2 < TOTAL_SLOTS) {
var _local4 = com.jjcorreia.display.jObject.App.cookie.load(("track" + _local2) + "_title");
clip[("t" + _local2) + "_txt"].text = _local4 || (DEFAULT_TITLE);
_local3 = clip[("s" + _local2) + "_btn"];
if (_local4 == undefined) {
trace(_local3);
_local3.disable(30);
} else {
_local3.onRelease = com.jjcorreia.utils.Delegate.create(this, requestLoad, _local2);
}
_local2++;
}
show();
}
function requestLoad(slot) {
loadSlotRequested = slot;
close();
var _local2 = new com.games.pencilRacer.gui.dialogs.LoadConfirmation(com.jjcorreia.utils.Delegate.create(this, doLoad));
}
function doLoad() {
var _local2 = com.jjcorreia.display.jObject.App.cookie.load("track" + loadSlotRequested);
var _local3 = com.jjcorreia.display.jObject.App.cookie.load(("track" + loadSlotRequested) + "_title");
if (_local2 != undefined) {
com.jjcorreia.display.jObject.App.loadSave(_local2, _local3);
}
}
function loadString() {
if ((clip.code_txt.text != undefined) && (clip.code_txt.text.length > 0)) {
var _local2 = new com.games.pencilRacer.gui.dialogs.LoadConfirmation(com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.loadExternalTrack, clip.code_txt.text));
close();
}
}
function displayLevel(level) {
clip.code_txt.text = level || "";
}
function close() {
Key.removeListener(this);
super.close();
}
static var DEFAULT_TITLE = "Empty";
static var TOTAL_SLOTS = 4;
}
Symbol 1195 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.LoadConfirmation] Frame 0
class com.games.pencilRacer.gui.dialogs.LoadConfirmation extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, method, clip, close;
function LoadConfirmation (method) {
super(0, 0, "modals", "LoadConfirmation", true);
create();
init();
this.method = method;
clip.yes_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, execute);
clip.no_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
}
function execute() {
method();
close();
}
}
Symbol 1196 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.SaveStringDisplay] Frame 0
class com.games.pencilRacer.gui.dialogs.SaveStringDisplay extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, clip, save, currrentSlot, alignCenter;
function SaveStringDisplay ($x, $y, $data, page) {
super($x, $y, "modals", "SaveStringDisplay", true);
create();
init();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
var _local3 = 0;
while (_local3 < TOTAL_SLOTS) {
clip[("s" + _local3) + "_btn"].onRelease = com.jjcorreia.utils.Delegate.create(this, checkSlot, _local3);
_local3++;
}
clip.share_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, initPage, "chooseShare");
Key.addListener(this);
save = new com.games.pencilRacer.apps.saves.DefaultSave();
if (page) {
initPage(page);
} else {
loadTitles();
}
}
function onKeyUp() {
switch (clip._currentframe) {
case 1 :
var _local2 = 0;
while (_local2 < TOTAL_SLOTS) {
if (Key.getCode() == com.jjcorreia.input.KeyManager.getKeyCode(_local2 + 1)) {
checkSlot(_local2);
}
_local2++;
}
break;
case 2 :
if (!(Key.getCode() === com.jjcorreia.input.KeyManager.getKeyCode("ENTER"))) {
} else {
doSave(currrentSlot);
}
break;
case 3 :
if (!(Key.getCode() === com.jjcorreia.input.KeyManager.getKeyCode("ENTER"))) {
} else {
doSave(currrentSlot);
}
break;
case 4 :
}
}
function checkSlot(slot) {
currrentSlot = slot;
var _local2 = clip[("s" + slot) + "_txt"].text;
if (_local2 == DEFAULT_TITLE) {
initPage("newSave");
} else {
initPage("overwrite", _local2);
}
}
function initPage(page, title) {
clip.gotoAndStop(page);
alignCenter();
switch (page) {
case "newSave" :
Selection.setFocus(clip.title_txt);
clip.save_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doSave, currrentSlot);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
break;
case "overwrite" :
clip.title_txt.text = title || "";
Selection.setFocus(clip.title_txt);
clip.save_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doSave, currrentSlot);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
break;
case "chooseShare" :
clip.friend_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.submit, com.games.pencilRacer.gui.dialogs.AbstractShare.FRIEND);
clip.gallery_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.submit, com.games.pencilRacer.gui.dialogs.AbstractShare.GALLERY);
clip.both_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.submit, com.games.pencilRacer.gui.dialogs.AbstractShare.ALL);
clip.code_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.submit, com.games.pencilRacer.gui.dialogs.AbstractShare.CODE);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
}
}
function doSave(slot) {
var _local2 = clip.title_txt.text || "";
save = new com.games.pencilRacer.apps.saves.DefaultSave(null, _local2);
com.jjcorreia.display.jObject.App.cookie.save("track" + slot, save.__get__data());
com.jjcorreia.display.jObject.App.cookie.save(("track" + slot) + "_title", ((_local2 == "") ? ("Untitled " + slot) : (_local2)));
loadTitles();
close();
}
function loadTitles() {
var _local2 = 0;
while (_local2 < TOTAL_SLOTS) {
clip[("s" + _local2) + "_txt"].text = com.jjcorreia.display.jObject.App.cookie.load(("track" + _local2) + "_title", DEFAULT_TITLE);
_local2++;
}
}
function close() {
Key.removeListener(this);
super.close();
}
static var DEFAULT_TITLE = "Save Track";
static var TOTAL_SLOTS = 4;
}
Symbol 1197 MovieClip [__Packages.com.games.pencilRacer.apps.saves.DefaultSave] Frame 0
class com.games.pencilRacer.apps.saves.DefaultSave
{
var isShared, lineList, saveString, saveVersion, linesToParse;
function DefaultSave (toParse, progressDisplay, isShared) {
this.isShared = isShared || false;
lineList = new Array();
if (toParse) {
parseSave(com.jjcorreia.utils.encoding.LZW.decompress(toParse), progressDisplay);
return;
}
var _local3 = [];
_local3.push(VERSION);
_local3.push(0);
_local3.push(com.jjcorreia.application.AppBase.__get__clip().bgColor);
_local3.push(com.jjcorreia.application.AppBase.__get__clip().riderStart.x);
_local3.push(com.jjcorreia.application.AppBase.__get__clip().riderStart.y);
_local3.push(com.jjcorreia.application.AppBase.__get__clip().vehicleString);
_local3.push(com.games.pencilRacer.apps.Zoom.lastPlayBackZoom);
_local3.push(com.jjcorreia.application.AppBase.__get__clip().useBGpaper);
saveString = (DELIMIT_HEADER + _local3.join(DELIMIT_HEADER_DATA)) + DELIMIT_HEADER;
var _local2 = com.games.pencilRacer.apps.SpatialDatabase.getAll();
var _local4 = [];
for (var _local5 in _local2) {
_local4.push(formatObject(_local2[_local5]));
}
trace(_local4.join(newline));
saveString = saveString + _local4.join(DELIMIT_LINES);
}
function formatObject(obj) {
var _local2 = [];
var _local3 = obj.type;
switch (_local3) {
case com.games.pencilRacer.objects.Line.TYPE_NORMAL :
obj = com.games.pencilRacer.objects.Line(obj);
var _local9 = obj.p1.x;
var _local7 = obj.p1.y;
var _local8 = obj.p2.x;
var _local6 = obj.p2.y;
var _local4 = obj.color;
var _local5 = _local4.toString();
if (_local4 == DEFAULT_LINE_COLOR) {
_local5 = "";
}
var _local13 = obj.friction * 100;
var _local11 = obj.acceleration * 100;
var _local12 = Number(obj.physics);
var _local14 = Math.max(0, Math.min(com.games.pencilRacer.gui.palettes.panels.ArtPanel.STROKE_MAX, Number(obj.stroke)));
var _local10 = obj.id;
_local2.push(_local3);
_local2.push(_local9);
_local2.push(_local7);
_local2.push(_local8);
_local2.push(_local6);
_local2.push(_local5);
_local2.push(_local13);
_local2.push(_local11);
_local2.push(_local12);
_local2.push(_local14);
_local2.push(_local10);
break;
case com.games.pencilRacer.objects.Line.TYPE_SHAPE :
obj = com.games.pencilRacer.objects.CustomShape(obj);
_local2.push(obj.type);
_local2.push(obj.shape);
_local2.push(obj.x);
_local2.push(obj.y);
_local2.push(obj.rotation);
_local2.push(obj.scaleX);
break;
case com.games.pencilRacer.objects.Line.TYPE_TRACK :
obj = com.games.pencilRacer.objects.CustomTrack(obj);
_local2.push(obj.type);
_local2.push(obj.shape);
_local2.push(obj.x);
_local2.push(obj.y);
_local2.push(obj.rotation);
_local2.push(obj.scaleX);
break;
case com.games.pencilRacer.objects.Line.TYPE_HIDDEN :
break;
default :
trace("Unknown object type " + _local3);
}
return(_local2.join(DELIMIT_LINE_DATA));
}
function parseSave(toParse, progressDisplay) {
saveString = toParse;
var _local3 = parseHead();
saveVersion = _local3[0];
var _local11 = Number(_local3[1]);
var _local4 = Number(_local3[2]);
if (isNaN(_local4)) {
_local4 = DEFAULT_BG_COLOR;
}
var _local7 = Number(_local3[3]);
var _local6 = Number(_local3[4]);
var _local9 = _local3[5];
var _local5 = Number(_local3[6]);
if (isNaN(_local5)) {
_local5 = com.games.pencilRacer.apps.Zoom.DEFAULT_PLAYBACK;
}
var _local8 = ((_local3[7] == "true") ? true : false);
com.games.pencilRacer.apps.Zoom.zoomTo(100);
com.games.pencilRacer.apps.Zoom.lastPlayBackZoom = _local5;
com.jjcorreia.application.AppBase.__get__clip().panToCenter(-_local7, -_local6);
com.jjcorreia.application.AppBase.__get__clip().setTitle(title);
com.jjcorreia.application.AppBase.__get__clip().setBGColor(_local4);
com.jjcorreia.application.AppBase.__get__clip().markRiderStart(new com.jjcorreia.geom.Vector(_local7, _local6));
com.jjcorreia.application.AppBase.__get__clip().setVehicle(_local9);
com.jjcorreia.application.AppBase.__get__clip().showBGPaper(_local8);
linesToParse = parseLines();
progressDisplay.initialize(linesToParse.length);
_root.onEnterFrame = com.jjcorreia.utils.Delegate.create(this, parseLineGroup, progressDisplay);
}
function parseLineGroup(progressDisplay) {
progressDisplay.display(linesToParse.length);
if (linesToParse.length == 0) {
delete _root.onEnterFrame;
return(undefined);
}
var _local24 = linesToParse.splice(0, PARSE_PER_TICK);
var _local25 = _local24.length;
var _local12 = 0;
while (_local12 < _local25) {
var _local3 = _local24[_local12].split(DELIMIT_LINE_DATA);
var _local16 = Number(_local3[0]);
switch (_local16) {
case com.games.pencilRacer.objects.Line.TYPE_NORMAL :
var _local20 = Number(_local3[1]);
var _local18 = Number(_local3[2]);
var _local19 = Number(_local3[3]);
var _local17 = Number(_local3[4]);
var _local7 = Number(_local3[5]);
if (isNaN(_local7)) {
_local7 = DEFAULT_LINE_COLOR;
}
var _local10 = Number(_local3[6]) / 100;
var _local6 = Number(_local3[7]) / 100;
var _local21 = Boolean((_local3[8] ? (Number(_local3[8])) : 1));
var _local13 = Number(_local3[9]);
var _local22 = Number(_local3[10]);
if (isNaN(_local10)) {
_local10 = 1;
}
if (isNaN(_local6)) {
_local6 = 0;
}
if (isNaN(_local13)) {
_local13 = com.games.pencilRacer.apps.Game.DEFAULT_STROKE;
}
var _local23 = com.jjcorreia.application.AppBase.__get__clip().addLine(new com.jjcorreia.geom.Vector(_local20, _local18), new com.jjcorreia.geom.Vector(_local19, _local17), _local7, 0, _local10, _local6, _local21, _local13, false);
break;
case com.games.pencilRacer.objects.Line.TYPE_SHAPE :
var _local8 = _local3[1];
var _local15 = Number(_local3[2]);
var _local14 = Number(_local3[3]);
var _local11 = Number(_local3[4]);
var _local5 = Number(_local3[5]);
var _local4 = new com.games.pencilRacer.objects.CustomShape(new com.jjcorreia.geom.Vector(_local15, _local14), _local8);
_local4.__set__rotation(_local11);
_local4.__set__scaleX(_local4.__set__scaleY(_local5));
break;
case com.games.pencilRacer.objects.Line.TYPE_TRACK :
_local8 = _local3[1];
_local15 = Number(_local3[2]);
_local14 = Number(_local3[3]);
_local11 = Number(_local3[4]);
_local5 = Number(_local3[5]);
var _local9 = new com.games.pencilRacer.objects.CustomTrack(new com.jjcorreia.geom.Vector(_local15, _local14), _local8);
_local9.__set__rotation(_local11);
_local9.__set__scaleX(_local9.__set__scaleY(_local5));
break;
default :
trace("Unknown object type " + _local16);
}
_local12++;
}
}
function parseHead() {
if (saveString.indexOf(DELIMIT_HEADER) == 0) {
var _local2 = saveString.substr(1);
_local2 = _local2.substr(0, _local2.indexOf(DELIMIT_HEADER));
var _local3 = _local2.split(DELIMIT_HEADER_DATA);
return(_local3);
}
return(null);
}
function parseLines() {
var _local5 = saveString.substr(saveString.lastIndexOf(DELIMIT_HEADER) + 1);
var _local3 = _local5.split(DELIMIT_LINES);
var _local4 = isShared && ((saveVersion == 0.5) || (saveVersion == "0.5"));
var _local2 = Key.isDown(16) && (Key.isDown(17));
if (_local4 || (!_local2)) {
_local3.reverse();
}
trace(_local2);
return(_local3);
}
function get data() {
return(com.jjcorreia.utils.encoding.LZW.compress(saveString));
}
static var DELIMIT_HEADER = "`";
static var DELIMIT_HEADER_DATA = ",";
static var DELIMIT_LINES = "|";
static var DELIMIT_LINE_DATA = ",";
static var VERSION = "2.1";
static var DEFAULT_LINE_COLOR = 0;
static var DEFAULT_BG_COLOR = 16777215;
static var DEFAULT_GAME_TYPE = 0;
static var PARSE_PER_TICK = 20;
static var PARSE_INTERVAL = 20;
var title = "";
}
Symbol 1198 MovieClip [__Packages.com.jjcorreia.utils.encoding.LZW] Frame 0
class com.jjcorreia.utils.encoding.LZW
{
function LZW () {
}
static function compress(str) {
var _local3 = new Array();
var _local9 = (xmlsafe ? 5 : 0);
var _local4 = 0;
while (_local4 < 256) {
_local3[String.fromCharCode(_local4)] = _local4;
_local4++;
}
if (xmlsafe) {
_local3["<"] = 256;
_local3[">"] = 257;
_local3["&"] = 258;
_local3["\""] = 259;
_local3["'"] = 260;
}
var _local6 = "";
var _local10 = str;
var _local7 = _local10.split("");
var _local8 = _local7.length;
var _local5 = 256 + _local9;
var _local2 = "";
_local4 = 0;
while (_local4 <= _local8) {
var _local1 = _local7[_local4];
if (!(_local3[_local2 + _local1] === undefined)) {
_local2 = _local2 + _local1;
} else {
_local6 = _local6 + String.fromCharCode(_local3[_local2]);
_local3[_local2 + _local1] = _local5;
_local5++;
_local2 = _local1;
}
_local4++;
}
return(_local6);
}
static function decompress(str) {
var _local4 = new Array();
var _local10 = (xmlsafe ? 5 : 0);
var _local6 = 0;
while (_local6 < 256) {
var _local9 = String.fromCharCode(_local6);
_local4[_local6] = _local9;
_local6++;
}
if (xmlsafe) {
_local4[256] = "<";
_local4[257] = ">";
_local4[258] = "&";
_local4[259] = "\"";
_local4[260] = "'";
}
var _local11 = str;
var _local13 = _local11.split("");
var _local12 = _local13.length;
var _local7 = 256 + _local10;
var _local1 = "";
var _local2 = "";
var _local8 = "";
_local6 = 0;
while (_local6 < _local12) {
var _local5 = _local11.charCodeAt(_local6);
var _local3 = _local4[_local5];
if (_local1 == "") {
_local1 = _local3;
_local8 = _local8 + _local3;
} else if (_local5 <= (255 + _local10)) {
_local8 = _local8 + _local3;
_local2 = _local1 + _local3;
_local4[_local7] = _local2;
_local7++;
_local1 = _local3;
} else {
_local2 = _local4[_local5];
if (_local2 == undefined) {
_local2 = _local1 + _local1.slice(0, 1);
}
_local8 = _local8 + _local2;
_local4[_local7] = _local1 + _local2.slice(0, 1);
_local7++;
_local1 = _local2;
}
_local6++;
}
return(_local8);
}
static function compress_fp6(str) {
var _local3 = new Array();
var _local10 = (xmlsafe ? 5 : 0);
var _local4 = 0;
while (_local4 < 256) {
_local3[String(_local4)] = _local4;
_local4++;
}
if (xmlsafe) {
var _local14 = String(new String("<").charCodeAt(0));
var _local11 = String(new String(">").charCodeAt(0));
var _local13 = String(new String("&").charCodeAt(0));
var _local15 = String(new String("\"").charCodeAt(0));
var _local12 = String(new String("'").charCodeAt(0));
_local3[_local14] = 256;
_local3[_local11] = 257;
_local3[_local13] = 258;
_local3[_local15] = 259;
_local3[_local12] = 260;
}
var _local7 = "";
var _local16 = str;
var _local8 = _local16.split("");
var _local9 = _local8.length;
var _local6 = 256 + _local10;
var _local1 = new Array();
_local4 = 0;
while (_local4 <= _local9) {
var _local2 = _local8[_local4];
if (_local1.length == 0) {
var _local5 = String(_local2.charCodeAt(0));
} else {
var _local5 = (_local1.join("-") + "-") + String(_local2.charCodeAt(0));
}
if (!(_local3[_local5] === undefined)) {
_local1.push(_local2.charCodeAt(0));
} else {
_local7 = _local7 + String.fromCharCode(_local3[_local1.join("-")]);
_local3[_local5] = _local6;
_local6++;
_local1 = new Array();
_local1.push(_local2.charCodeAt(0));
}
_local4++;
}
return(_local7);
}
static var xmlsafe = false;
}
Symbol 1199 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.ButtonPanel] Frame 0
class com.games.pencilRacer.gui.palettes.panels.ButtonPanel extends com.jjcorreia.display.jObject
{
var buttons;
function ButtonPanel (holder, linkage) {
super(0, 0, holder, linkage);
}
function clearDisplay() {
for (var _local2 in buttons) {
buttons[_local2].gotoAndStop(1);
buttons[_local2].enable();
}
}
}
Symbol 1200 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.ArtPanel] Frame 0
class com.games.pencilRacer.gui.palettes.panels.ArtPanel extends com.games.pencilRacer.gui.palettes.panels.ButtonPanel
{
var create, clip, buttons, clearDisplay;
function ArtPanel (holder) {
super(holder, "Palette_TabBar_art");
create();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
clip.stroke_mc.mode = "int";
clip.stroke_mc.setRange(STROKE_MIN, STROKE_MAX);
clip.stroke_mc.value = com.jjcorreia.display.jObject.App.stroke;
clip.stroke_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.setStroke, clip.stroke_mc);
clip.stroke_mc.setLabel("Thickness");
buttons = new Object();
buttons[com.games.pencilRacer.config.Modes.LINE] = clip.line_mc;
buttons[com.games.pencilRacer.config.Modes.PENCIL] = clip.pencil_mc;
buttons[com.games.pencilRacer.config.Modes.PEN] = clip.pen_mc;
buttons[com.games.pencilRacer.config.Modes.MOVE] = clip.move_mc;
buttons[com.games.pencilRacer.config.Modes.POINT] = clip.point_mc;
buttons[com.games.pencilRacer.config.Modes.ERASE] = clip.erase_mc;
buttons[com.games.pencilRacer.config.Modes.PAN] = clip.pan_mc;
buttons[com.games.pencilRacer.config.Modes.ZOOM] = clip.zoom_mc;
for (var _local2 in buttons) {
buttons[_local2].onPress = com.jjcorreia.utils.Delegate.create(this, setMode, _local2);
}
clip.color_mc.disable();
com.jjcorreia.gui.ToolTip.registerTip(clip.line_mc, com.games.pencilRacer.config.TipText.LINE_TIP_ART);
com.jjcorreia.gui.ToolTip.registerTip(clip.pencil_mc, com.games.pencilRacer.config.TipText.PENCIL_TIP_ART);
com.jjcorreia.gui.ToolTip.registerTip(clip.move_mc, com.games.pencilRacer.config.TipText.MOVE_TIP_ART);
com.jjcorreia.gui.ToolTip.registerTip(clip.point_mc, com.games.pencilRacer.config.TipText.POINT_TIP_ART);
com.jjcorreia.gui.ToolTip.registerTip(clip.erase_mc, com.games.pencilRacer.config.TipText.ERASE_TIP_ART);
com.jjcorreia.gui.ToolTip.registerTip(clip.pan_mc, com.games.pencilRacer.config.TipText.PAN_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.zoom_mc, com.games.pencilRacer.config.TipText.ZOOM_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.cpicker.cpicker, com.games.pencilRacer.config.TipText.COLOR_ART_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.stroke_mc.press_mc, com.games.pencilRacer.config.TipText.STROKE);
clip.cpicker.addListener(this);
clip.bg_picker.addListener(this);
display(com.jjcorreia.display.jObject.App.mode);
clip.cpicker.color = com.jjcorreia.display.jObject.App.drawArtColor;
}
function change(target) {
switch (target._name) {
case "cpicker" :
com.jjcorreia.display.jObject.App.drawArtColor = Number("0x" + target.getRGB());
break;
case "bg_picker" :
com.jjcorreia.display.jObject.App.setBGColor(Number("0x" + target.getRGB()));
}
}
function setMode(mode) {
com.jjcorreia.display.jObject.App.physicsEnabled = false;
com.jjcorreia.display.jObject.App.setMode(mode);
display(mode);
}
function display($mode) {
clearDisplay();
if ((com.jjcorreia.display.jObject.App.physicsEnabled && ($mode != com.games.pencilRacer.config.Modes.PAN)) && ($mode != com.games.pencilRacer.config.Modes.ZOOM)) {
return(undefined);
}
var _local2 = buttons[$mode];
_local2.disable();
_local2.gotoAndStop(4);
}
static var STROKE_MIN = 1;
static var STROKE_MAX = 15;
}
Symbol 1201 MovieClip [__Packages.com.games.pencilRacer.objects.CustomTrack] Frame 0
class com.games.pencilRacer.objects.CustomTrack extends com.games.pencilRacer.objects.CustomShape
{
static var gFilter;
var type, lines, template_mc, clip, shape, holder, x, y, markPosition, getPosition, markedVector, id;
function CustomTrack (pos, shape) {
super(pos, shape);
type = com.games.pencilRacer.objects.Line.TYPE_TRACK;
lines = new Array();
attachTemplate();
}
static function initClass() {
gFilter = new flash.filters.GlowFilter(16711680, 1, 4, 4);
return(true);
}
function attachTemplate() {
template_mc = clip.attachMovie(shape + "Template", "temp", 99);
template_mc.object = this;
template_mc._visible = false;
updateTemplate();
}
function removeTemplate() {
template_mc.removeMovieClip();
}
function updateTemplate() {
template_mc._xscale = clip.graphic._xscale;
template_mc._yscale = clip.graphic._yscale;
}
function onLine(line) {
var _local2 = line.__get__p1();
var _local3 = line.__get__p2();
_local2.multiply(template_mc._xscale / 100);
_local3.multiply(template_mc._xscale / 100);
clip.localToGlobal(_local2);
clip.localToGlobal(_local3);
holder.globalToLocal(_local2);
holder.globalToLocal(_local3);
com.jjcorreia.application.AppBase.__get__clip().checkStartFlag(_local2);
line = com.jjcorreia.application.AppBase.__get__clip().addLine(_local2, _local3, null, com.games.pencilRacer.objects.Line.TYPE_HIDDEN, line.friction, line.acceleration);
lines.push(line);
}
function moveNow(x, y) {
var _local5 = x - this.x;
var _local4 = y - this.y;
super.moveNow(x, y);
for (var _local3 in lines) {
}
}
function onDragStart() {
trace("onDragStart");
clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, onDragStop);
markPosition();
}
function onDragStop() {
trace("onDragStop");
clip.onMouseUp = null;
var _local2 = getPosition().subtract(markedVector);
trace(_local2);
for (var _local3 in lines) {
lines[_local3].nudge(_local2.x, _local2.y);
}
}
function stopScale() {
super.stopScale();
refreshLines();
}
function removeLines() {
for (var _local2 in lines) {
com.jjcorreia.application.AppBase.__get__clip().removeLine(lines[_local2]);
}
lines = new Array();
}
function refreshLines() {
removeLines();
removeTemplate();
attachTemplate();
}
function stopRotate() {
super.stopRotate();
refreshLines();
}
function updateLineScale() {
for (var _local2 in lines) {
}
}
function destroy() {
removeLines();
super.destroy();
}
function toString() {
var _local2 = "[ CustomTrack";
_local2 = _local2 + (", id:" + id);
_local2 = _local2 + " ]";
return(_local2);
}
function getDescription() {
var _local2 = "[ CustomTrack";
_local2 = _local2 + (", id:" + id);
_local2 = _local2 + " ]";
return(_local2);
}
static var ini = initClass();
var defaultSize = com.games.pencilRacer.config.PreferencesGame.SIZE_TRACK;
}
Symbol 1202 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.AbstractShare] Frame 0
class com.games.pencilRacer.gui.dialogs.AbstractShare extends com.games.pencilRacer.gui.dialogs.Dialog
{
static var saved_name, saved_email, saved_friendsEmail;
var create, init, clip, my_lv, alignCenter;
function AbstractShare ($Class) {
super(0, 0, "modals", $Class, true);
create();
init();
clip.warn_mc._visible = false;
clip.name_txt.text = saved_name || "";
clip.email_txt.text = saved_email || "";
clip.friendsemail_txt.text = saved_friendsEmail || "";
}
function initPage(page) {
}
function submit() {
saved_name = clip.name_txt.text;
saved_email = clip.email_txt.text;
saved_friendsEmail = clip.friendsemail_txt.text;
if (verify()) {
finalSubmit(clip.name_txt.text, clip.email_txt.text, clip.friendsemail_txt.text, clip.mesage_txt.text, sendGallery);
}
}
function finalSubmit(name, email, friendsemail, message, sendGallery) {
my_lv = new com.games.pencilRacer.backend.Submitter(name, email, friendsemail, message, sendGallery, this, done);
clip.gotoAndStop("submitting");
alignCenter();
}
function done(success, result) {
var _local2 = new XML(unescape(result.toString()));
var _local3 = _local2.firstChild.firstChild.attributes.value == "success";
clip.gotoAndStop(((success && (_local3)) ? "success" : "fail"));
if (!_local3) {
lastSubmit = -WAIT_TIME;
} else {
onSuccess(_local2);
}
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
alignCenter();
}
function onSuccess(my_xml) {
var _local2 = my_xml.firstChild.firstChild.attributes.id;
var _local3 = (((my_xml.firstChild.firstChild.attributes.page + "?") + com.games.pencilRacer.backend.BackendPrefs.LOAD_PARAM) + "=") + _local2;
clip.code_txt.text = _local2;
clip.link_txt.text = _local3;
clip.copyCode_btn.onRelease = com.jjcorreia.utils.Delegate.create(System, System.setClipboard, _local2);
clip.copyLink_btn.onRelease = com.jjcorreia.utils.Delegate.create(System, System.setClipboard, _local3);
}
function verify() {
return(true);
}
function verifyEmail(email) {
if ((!email) || (email.length < 1)) {
return(false);
}
var _local2 = email.indexOf("@");
var _local3 = email.lastIndexOf(".");
return(!((_local2 == -1) || (_local3 < _local2)));
}
function warnTime() {
clip.warn_mc.gotoAndStop(2);
clip.warn_mc.warn_txt.text = ("Please wait " + timeOutLeft) + " seconds before submitting again";
clip.warn_mc._visible = true;
}
function warn() {
clip.warn_mc.gotoAndStop(1);
clip.warn_mc._visible = true;
}
function get timeOutLeft() {
return(Math.round(WAIT_TIME / 1000) - Math.round((getTimer() - lastSubmit) / 1000));
}
function checkSpamFilter() {
if ((getTimer() - lastSubmit) < WAIT_TIME) {
warnTime();
return(false);
}
lastSubmit = getTimer();
return(true);
}
function close() {
_root.tabChildren = false;
super.close();
}
static var lastSubmit = -600000;
static var WAIT_TIME = 60000;
var sendGallery = false;
static var FRIEND = "friend";
static var GALLERY = "gallery";
static var ALL = "all";
static var CODE = "code";
}
Symbol 1203 MovieClip [__Packages.com.games.pencilRacer.backend.Submitter] Frame 0
class com.games.pencilRacer.backend.Submitter extends LoadVars
{
var game_id, name, email, friendsEmail, message, saveString, sendGallery, sendAndLoad;
function Submitter (name, email, friendsEmail, message, sendGallery, scope, callBack) {
super();
game_id = com.games.pencilRacer.backend.BackendPrefs.GAME_ID;
this.name = name;
this.email = email;
if (friendsEmail != undefined) {
this.friendsEmail = friendsEmail;
} else {
delete this.friendsEmail;
}
this.message = (message ? (message) : (message));
saveString = (new com.games.pencilRacer.apps.saves.DefaultSave()).data;
this.sendGallery = sendGallery;
var _local3 = new LoadVars();
_local3.onLoad = function (success) {
callBack.apply(scope, [success, this]);
};
sendAndLoad(com.games.pencilRacer.backend.BackendPrefs.DOMAIN + com.games.pencilRacer.backend.BackendPrefs.SUBMIT_SCRIPT, _local3, "POST");
}
}
Symbol 1204 MovieClip [__Packages.com.games.pencilRacer.backend.BackendPrefs] Frame 0
class com.games.pencilRacer.backend.BackendPrefs
{
static var DOMAIN;
function BackendPrefs () {
}
static function init() {
var _local3 = com.jjcorreia.utils.FileInfo.getFullDomain();
var _local4 = com.jjcorreia.utils.FileInfo.getDomainName();
var _local2;
if (_local4 == "addictinggames") {
if (_local3 == "dev.addictinggames.com") {
_local2 = "dev.ic.addictinggames.com";
} else if (_local3 == "stage.addictinggames.com") {
_local2 = "stage.ic.addictinggames.com";
} else if ((_local3 == "www.addictinggames.com") || (_local3 == "addictinggames.com")) {
_local2 = DEFAULT_DOMAIN;
} else {
_local2 = DEFAULT_DOMAIN;
}
} else if (_local3 == "HDD") {
_local2 = DEFAULT_DOMAIN;
} else if (_local4 != "addictinggames") {
_local2 = DEFAULT_DOMAIN;
} else {
_local2 = DEFAULT_DOMAIN;
}
_local2 = "dev.ic.addictinggames.com";
DOMAIN = ("http://" + _local2) + "/";
trace("currentHost: " + _local3);
trace("DOMAIN: " + DOMAIN);
_root.domain = DOMAIN;
System.security.allowDomain("*.addictinggames.com");
System.security.allowDomain(DEFAULT_DOMAIN);
System.security.allowDomain(DOMAIN);
System.security.allowDomain("*." + com.jjcorreia.utils.FileInfo.getDomain());
}
static var DEFAULT_DOMAIN = "ic.addictinggames.com";
static var GAME_ID = 4801;
static var SUBMIT_SCRIPT = "flash/send_vars.php";
static var LOAD_PARAM = "url_id";
static var LOAD_SCRIPT = ("flash/xml.php?" + LOAD_PARAM) + "=";
}
Symbol 1205 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.TabBar] Frame 0
class com.games.pencilRacer.gui.palettes.TabBar extends com.games.pencilRacer.gui.palettes.Palette
{
var create, moveNow, clip, lastTab;
function TabBar () {
super(0, 0, "gui", "TabBar");
create();
moveNow(0, Stage.height - clip._height);
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
super.init();
com.games.pencilRacer.gui.components.Tab.spaceGroup(clip.track_tab.group);
clip.track_tab.addListener(this);
clip.art_tab.addListener(this);
clip.vehicles_tab.addListener(this);
clip.selection_tab.addListener(this);
clip.shapes_tab.addListener(this);
clip.track_tab.addPanel(com.games.pencilRacer.gui.palettes.panels.TrackPanel);
clip.art_tab.addPanel(com.games.pencilRacer.gui.palettes.panels.ArtPanel);
clip.vehicles_tab.addPanel(com.games.pencilRacer.gui.palettes.panels.VehiclesPanel);
clip.selection_tab.addPanel(com.games.pencilRacer.gui.palettes.panels.SelectionPanel);
clip.shapes_tab.addPanel(com.games.pencilRacer.gui.palettes.panels.ShapesPanel);
com.jjcorreia.gui.ToolTip.registerTip(clip.track_tab.back_mc, com.games.pencilRacer.config.TipText.TRACK_TAB);
com.jjcorreia.gui.ToolTip.registerTip(clip.art_tab.back_mc, com.games.pencilRacer.config.TipText.ART_TAB);
com.jjcorreia.gui.ToolTip.registerTip(clip.vehicles_tab.back_mc, com.games.pencilRacer.config.TipText.VEHICLE_TAB);
com.jjcorreia.gui.ToolTip.registerTip(clip.selection_tab.back_mc, com.games.pencilRacer.config.TipText.SELECTION_TAB);
com.jjcorreia.gui.ToolTip.registerTip(clip.shapes_tab.back_mc, com.games.pencilRacer.config.TipText.SHAPES_TAB);
clip.track_tab.activate();
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.TRACK_PANEL_KEY, clip.track_tab, null, clip.track_tab.activate, false);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.ART_PANEL_KEY, clip.art_tab, null, clip.art_tab.activate, false);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.VEHICLES_PANEL_KEY, clip.vehicles_tab, null, clip.vehicles_tab.activate, false);
com.jjcorreia.input.KeyManager.bindKey(com.games.pencilRacer.config.Modes.SHAPES_PANEL_KEY, clip.shapes_tab, null, clip.shapes_tab.activate, false);
clip.selection_tab.disable();
}
function tab_activate(t) {
clip.gotoAndStop(t.title);
if (t != clip.selection_tab) {
lastTab = t;
}
if (!com.jjcorreia.display.jObject.App.simpleMode) {
if (t == clip.art_tab) {
if (com.jjcorreia.display.jObject.App.physicsEnabled) {
t.panel.setMode(com.jjcorreia.display.jObject.App.mode);
}
} else if (t == clip.track_tab) {
if (!com.jjcorreia.display.jObject.App.physicsEnabled) {
t.panel.setMode(com.jjcorreia.display.jObject.App.mode);
}
}
}
}
function initTab() {
}
function displayLineData(line) {
clip.selection_tab.activate();
clip.selection_tab.panel.displayLineData(line);
}
function display($mode) {
clip.track_tab.panel.display($mode);
clip.art_tab.panel.display($mode);
}
function clearLineData() {
clip.selection_tab.disable();
lastTab.activate();
}
function get friction() {
return(1 - clip.track_tab.panel.friction);
}
function get acceleration() {
return(clip.track_tab.panel.acceleration);
}
function selectVehicle(veh) {
clip.vehicles_tab.panel.displayByVehicle(veh);
}
function get physics() {
return(true);
}
static var PREVIEW_WIDTH = 165;
static var PREVIEW_HEIGHT = 85;
static var PREVIEW_COLOR = 16448250;
}
Symbol 1206 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.TrackPanel] Frame 0
class com.games.pencilRacer.gui.palettes.panels.TrackPanel extends com.games.pencilRacer.gui.palettes.panels.ButtonPanel
{
var create, buttons, clip, clearDisplay;
function TrackPanel (holder) {
super(holder, "Palette_TabBar_track");
create();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
buttons = new Object();
buttons[com.games.pencilRacer.config.Modes.LINE] = clip.line_mc;
buttons[com.games.pencilRacer.config.Modes.PENCIL] = clip.pencil_mc;
buttons[com.games.pencilRacer.config.Modes.MOVE] = clip.move_mc;
buttons[com.games.pencilRacer.config.Modes.POINT] = clip.point_mc;
buttons[com.games.pencilRacer.config.Modes.ERASE] = clip.erase_mc;
buttons[com.games.pencilRacer.config.Modes.PAN] = clip.pan_mc;
buttons[com.games.pencilRacer.config.Modes.ZOOM] = clip.zoom_mc;
for (var _local2 in buttons) {
buttons[_local2].onPress = com.jjcorreia.utils.Delegate.create(this, setMode, _local2);
}
clip.color_mc.disable();
clip.friction_mc.mode = "%";
clip.friction_mc.setRange(0, 1);
clip.friction_mc.value = 0;
clip.friction_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().setFriction, clip.friction_mc);
clip.friction_mc.setLabel("Stickiness");
clip.accel_mc.mode = "%";
clip.accel_mc.setRange(0, 0.5);
clip.accel_mc.setLabel("Acceleration");
clip.accel_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().setAccel, clip.accel_mc);
clip.clearFlag_mc.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.clearFlag);
clip.cpicker.addListener(this);
com.jjcorreia.gui.ToolTip.registerTip(clip.line_mc, com.games.pencilRacer.config.TipText.LINE_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.pencil_mc, com.games.pencilRacer.config.TipText.PENCIL_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.move_mc, com.games.pencilRacer.config.TipText.MOVE_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.point_mc, com.games.pencilRacer.config.TipText.POINT_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.erase_mc, com.games.pencilRacer.config.TipText.ERASE_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.pan_mc, com.games.pencilRacer.config.TipText.PAN_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.zoom_mc, com.games.pencilRacer.config.TipText.ZOOM_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.clearFlag_mc, com.games.pencilRacer.config.TipText.FLAG_TIP);
com.jjcorreia.gui.ToolTip.registerTip(clip.friction_mc.press_mc, com.games.pencilRacer.config.TipText.STICKINESS);
com.jjcorreia.gui.ToolTip.registerTip(clip.accel_mc.press_mc, com.games.pencilRacer.config.TipText.ACCELERATION);
com.jjcorreia.gui.ToolTip.registerTip(clip.cpicker.cpicker, com.games.pencilRacer.config.TipText.COLOR_TRACK_TIP);
display(com.jjcorreia.display.jObject.App.mode);
}
function change(target) {
com.jjcorreia.display.jObject.App.drawColor = Number("0x" + target.getRGB());
}
function setMode(mode) {
trace("!!");
com.jjcorreia.display.jObject.App.physicsEnabled = true;
com.jjcorreia.display.jObject.App.setMode(mode);
}
function display($mode) {
clearDisplay();
if (((!com.jjcorreia.display.jObject.App.physicsEnabled) && ($mode != com.games.pencilRacer.config.Modes.PAN)) && ($mode != com.games.pencilRacer.config.Modes.ZOOM)) {
return(undefined);
}
var _local2 = buttons[$mode];
_local2.disable();
_local2.gotoAndStop(4);
}
function get friction() {
return(clip.friction_mc.value);
}
function set friction(v) {
clip.friction_mc.value = v;
//return(friction);
}
function get acceleration() {
return(clip.accel_mc.value);
}
function set acceleration(v) {
clip.accel_mc.value = v;
//return(acceleration);
}
function get physics() {
return(clip.physics_mc.selected);
}
function set physics(v) {
clip.physics_mc.selected = v;
//return(physics);
}
}
Symbol 1207 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.VehiclesPanel] Frame 0
class com.games.pencilRacer.gui.palettes.panels.VehiclesPanel extends com.jjcorreia.display.jObject
{
var create, vehicles, clip;
function VehiclesPanel (holder, id) {
super(0, 0, holder, id || "SmallList");
create();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
scrollAmount = TOTAL_ICONS;
vehicles = com.jjcorreia.application.AppBase.__get__clip().Prefs.vehicles;
clip.left_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, -1);
clip.right_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, 1);
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
_local3.btn.onRelease = com.jjcorreia.utils.Delegate.create(this, selectVehicle, _local3, true);
_local2++;
}
displayVehicles();
displayByVehicle(com.jjcorreia.application.AppBase.__get__clip().vehicleString);
if (Math.floor(vehicles.length / TOTAL_ICONS) == 0) {
clip.left_btn._visible = false;
clip.right_btn._visible = false;
}
}
function getVehicleIndex(veh) {
for (var _local3 in vehicles) {
if (vehicles[_local3] == veh) {
return(Number(_local3));
}
}
return(0);
}
function displayVehicles() {
var _local5 = com.jjcorreia.application.AppBase.__get__clip().Prefs.vehDesc;
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
var _local4 = vehicles[_local2 + idOffset];
if (_local4) {
_local3.setVehicle(_local4);
com.jjcorreia.gui.ToolTip.registerTip(_local3.btn, _local5[_local2 + idOffset]);
_local3._visible = true;
} else {
_local3._visible = false;
}
_local2++;
}
}
function selectVehicle(icon, userSelected) {
selectedIndex = getVehicleIndex(icon.__get__vehicle());
var _local2 = com.jjcorreia.application.AppBase.__get__clip().Prefs.vehDesc;
com.jjcorreia.display.jObject.App.setVehicle(icon.__get__vehicle(), _local2[selectedIndex], true);
}
function displayByVehicle(veh) {
selectedIndex = getVehicleIndex(veh);
page = Math.floor(selectedIndex / TOTAL_ICONS);
displayVehicles();
redisplay();
}
function redisplay() {
clearSelection();
var _local2 = clip["icon" + (selectedIndex - idOffset)];
_local2.select();
}
function clearSelection() {
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
_local3.deselect();
_local2++;
}
}
function get idOffset() {
return(page * TOTAL_ICONS);
}
function scroll(dir) {
page = page + dir;
page = Math.max(page, 0);
page = Math.min(page, Math.floor(vehicles.length / TOTAL_ICONS));
displayVehicles();
redisplay();
}
var TOTAL_ICONS = 5;
var scrollAmount = 1;
var page = 0;
var selectedIndex = 0;
}
Symbol 1208 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.SelectionPanel] Frame 0
class com.games.pencilRacer.gui.palettes.panels.SelectionPanel extends com.jjcorreia.display.jObject
{
var create, clip;
function SelectionPanel (holder) {
super(0, 0, holder, "Palette_TabBar_selection");
create();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
clip.stroke_mc.mode = "int";
clip.stroke_mc.setRange(com.games.pencilRacer.gui.palettes.panels.ArtPanel.STROKE_MIN, com.games.pencilRacer.gui.palettes.panels.ArtPanel.STROKE_MAX);
clip.stroke_mc.value = com.jjcorreia.display.jObject.App.stroke;
clip.stroke_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.setStroke, clip.stroke_mc);
clip.stroke_mc.setLabel("Thickness");
clip.friction_mc.mode = "%";
clip.friction_mc.setRange(0, 1);
clip.friction_mc.value = 0;
clip.friction_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().setFriction, clip.friction_mc);
clip.friction_mc.setLabel("Stickiness");
clip.accel_mc.mode = "%";
clip.accel_mc.setRange(0, 0.5);
clip.accel_mc.setLabel("Acceleration");
clip.accel_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().setAccel, clip.accel_mc);
clip.del_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().removeSelectedLines);
clip.cpicker.addListener(this);
clip.track_mc.addListener(this);
clip.art_mc.addListener(this);
com.jjcorreia.gui.ToolTip.registerTip(clip.stroke_mc.press_mc, com.games.pencilRacer.config.TipText.STROKE);
com.jjcorreia.gui.ToolTip.registerTip(clip.friction_mc.press_mc, com.games.pencilRacer.config.TipText.STICKINESS);
com.jjcorreia.gui.ToolTip.registerTip(clip.accel_mc.press_mc, com.games.pencilRacer.config.TipText.ACCELERATION);
com.jjcorreia.gui.ToolTip.registerTip(clip.del_btn, com.games.pencilRacer.config.TipText.DELETE);
com.jjcorreia.gui.ToolTip.registerTip(clip.art_mc, com.games.pencilRacer.config.TipText.ART);
com.jjcorreia.gui.ToolTip.registerTip(clip.track_mc, com.games.pencilRacer.config.TipText.TRACK);
com.jjcorreia.gui.ToolTip.registerTip(clip.cpicker.cpicker, com.games.pencilRacer.config.TipText.COLOR_SELECTED_TIP);
}
function change(evt) {
com.jjcorreia.display.jObject.App.setColor(Number("0x" + evt.getRGB()));
}
function click(b) {
com.jjcorreia.display.jObject.App.setLinePhysics(b == clip.track_mc);
update();
}
function displayLineData(line) {
clip.friction_mc.setValue(1 - line.friction);
clip.accel_mc.setValue(line.acceleration);
clip.friction_mc.update(true);
clip.accel_mc.update(true);
clip.track_mc.selected = line.physics;
clip.art_mc.selected = !line.__get__physics();
update();
}
function update() {
if (clip.track_mc.selected) {
clip.friction_mc.show();
clip.accel_mc.show();
clip.stroke_mc.hide();
} else {
clip.friction_mc.hide();
clip.accel_mc.hide();
clip.stroke_mc.show();
}
}
}
Symbol 1209 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.ShapesPanel] Frame 0
class com.games.pencilRacer.gui.palettes.panels.ShapesPanel extends com.games.pencilRacer.gui.palettes.panels.VehiclesPanel
{
var scrollAmount, TOTAL_ICONS, vehicles, scroll, clip, selectedIndex, page, redisplay, __get__idOffset;
function ShapesPanel (holder) {
super(holder);
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
scrollAmount = TOTAL_ICONS;
vehicles = com.jjcorreia.application.AppBase.__get__clip().Prefs.shapes;
clip.left_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, -1);
clip.right_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, 1);
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
_local3.btn.onRelease = com.jjcorreia.utils.Delegate.create(this, selectShape, _local3, true);
_local2++;
}
displayVehicles();
displayByVehicle(com.jjcorreia.application.AppBase.__get__clip().Prefs.getCurrentShapeName());
}
function selectShape(icon, userSelected) {
com.jjcorreia.application.AppBase.__get__clip().Prefs.shape = getVehicleIndex(icon.__get__vehicle());
displayByVehicle(icon.__get__vehicle());
com.jjcorreia.application.AppBase.__get__clip().setMode(com.games.pencilRacer.config.Modes.SHAPES);
}
function displayByVehicle(veh) {
selectedIndex = getVehicleIndex(veh);
page = Math.floor(selectedIndex / TOTAL_ICONS);
displayVehicles();
redisplay();
}
function getVehicleIndex(veh) {
for (var _local3 in vehicles) {
if (vehicles[_local3] == veh) {
return(Number(_local3));
}
}
return(0);
}
function displayVehicles() {
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
var _local4 = vehicles[_local2 + __get__idOffset()];
if (_local4) {
_local3.setVehicle(_local4);
_local3._visible = true;
} else {
_local3._visible = false;
}
_local2++;
}
}
}
Symbol 1210 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.ControlPalette] Frame 0
class com.games.pencilRacer.gui.palettes.ControlPalette extends com.games.pencilRacer.gui.palettes.Palette
{
var create, moveNow, x, clip;
function ControlPalette ($x, $y) {
super($x, 0, "gui", "Palette_Control");
create();
moveNow(x, Stage.height - clip._height);
init();
}
function init() {
super.init();
clip.play_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.executeLevel);
clip.new_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.newTrack);
clip.load_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showOpenDialog);
clip.save_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.saveGame);
clip.help_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showHelp);
com.jjcorreia.gui.ToolTip.registerTip(clip.play_btn, com.games.pencilRacer.config.TipText.SIMULATE);
com.jjcorreia.gui.ToolTip.registerTip(clip.new_btn, com.games.pencilRacer.config.TipText.NEW);
com.jjcorreia.gui.ToolTip.registerTip(clip.load_btn, com.games.pencilRacer.config.TipText.LOAD);
com.jjcorreia.gui.ToolTip.registerTip(clip.save_btn, com.games.pencilRacer.config.TipText.SAVE);
com.jjcorreia.gui.ToolTip.registerTip(clip.help_btn, com.games.pencilRacer.config.TipText.HELP);
}
}
Symbol 1211 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.SubmitATT] Frame 0
class com.games.pencilRacer.gui.dialogs.SubmitATT extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, clip, close, my_lv;
function SubmitATT () {
super(0, 0, "modals", "SubmitATT", true);
create();
init();
clip.warn_mc._visible = false;
clip.submit_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, submit);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
Selection.setFocus(clip.name_txt);
}
function submit() {
clip.gotoAndStop("submitting");
if (verify()) {
my_lv = new com.games.pencilRacer.backend.ATTSubmitter(clip.name_txt.text, clip.email_txt.text, this, done);
}
}
function done(success) {
clip.gotoAndStop((success ? "success" : "fail"));
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
}
function verify() {
if ((getTimer() - lastSubmit) < WAIT_TIME) {
warnTime();
return(false);
}
lastSubmit = getTimer();
var _local2 = clip.email_txt.text;
if ((clip.name_txt.text.length < 1) || (_local2.length < 1)) {
warn();
return(false);
}
var _local3 = _local2.indexOf("@");
var _local4 = _local2.lastIndexOf(".");
if ((_local3 == -1) || (_local4 < _local3)) {
warn();
return(false);
}
clip.warn_mc._visible = false;
return(true);
}
function warnTime() {
clip.warn_mc.gotoAndStop(2);
clip.warn_mc._visible = true;
}
function warn() {
clip.warn_mc.gotoAndStop(1);
clip.warn_mc._visible = true;
}
static var lastSubmit = 0;
static var WAIT_TIME = 60;
}
Symbol 1212 MovieClip [__Packages.com.games.pencilRacer.backend.ATTSubmitter] Frame 0
class com.games.pencilRacer.backend.ATTSubmitter extends LoadVars
{
var name, email, saveString, sendAndLoad;
function ATTSubmitter (name, email, scope, callBack) {
super();
trace("ATTSubmitter ");
this.name = name;
this.email = email;
saveString = (new com.games.pencilRacer.apps.saves.DefaultSave()).data;
var _local3 = new LoadVars();
_local3.onLoad = function (success) {
callBack.apply(scope, [success]);
};
trace(this);
sendAndLoad(url, _local3, "POST");
}
static var url = "http://www.jacobcorreia.com";
}
Symbol 1213 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.LineCount] Frame 0
class com.games.pencilRacer.gui.palettes.LineCount extends com.jjcorreia.display.jObject
{
var create, count, maxedOut, clip;
function LineCount (x, y) {
super(x, y, "gui2", "LineCount");
create();
count = 0;
maxedOut = false;
display();
}
function add() {
if (count >= MAX_LINES) {
maxedOut = true;
clip.gotoAndStop(2);
return(undefined);
}
count++;
display();
}
function subtract() {
if (maxedOut && (count < MAX_LINES)) {
maxedOut = false;
clip.gotoAndStop(1);
}
count--;
count = Math.max(0, count);
display();
}
function display() {
var _local2 = com.games.pencilRacer.apps.SpatialDatabase.getDimensions();
var _local4 = Math.max(0, _local2.x);
var _local3 = Math.max(0, _local2.y);
clip.display_txt.text = com.jjcorreia.utils.strings.Format.addCommas(count) + " lines";
clip.display_txt.text = clip.display_txt.text + (((" - " + com.jjcorreia.utils.strings.Format.addCommas(_local4)) + " x ") + com.jjcorreia.utils.strings.Format.addCommas(_local3));
}
function displayCount(amount) {
clip.display_txt.text = (amount + " lines ") + com.games.pencilRacer.apps.SpatialDatabase.getDimensions();
}
static var MAX_LINES = 5000;
}
Symbol 1214 MovieClip [__Packages.com.jjcorreia.utils.strings.Format] Frame 0
class com.jjcorreia.utils.strings.Format
{
function Format () {
}
static function addCommas(s) {
var _local4 = s.toString();
var _local3 = _local4.length;
var _local1 = Math.floor((_local3 - 1) / 3);
var _local2 = 0;
var _local5 = "";
while (_local1 > 0) {
_local5 = _local5 + (_local4.substring(_local2, _local3 - (_local1 * 3)) + ",");
_local2 = _local3 - (_local1 * 3);
_local1--;
}
_local5 = _local5 + _local4.substring(_local2);
return(_local5);
}
}
Symbol 1215 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.LineRoll] Frame 0
class com.games.pencilRacer.gui.palettes.LineRoll extends com.jjcorreia.display.jObject
{
var create, clip;
function LineRoll (x, y, line) {
super(x, y, "tips", "LineRoll");
create();
clip.my_text.autoSize = "left";
clip.my_txt.text = "";
if (line.friction < 1) {
clip.my_txt.text = clip.my_txt.text + (("Stickiness: " + ((1 - line.friction) * 100)) + "%\n");
}
if (line.acceleration > 0) {
clip.my_txt.text = clip.my_txt.text + (("Acceleration: " + ((line.acceleration * 2) * 100)) + "%");
}
if (line.__get__physics()) {
clip.hint_mc._rotation = (line.angle * com.jjcorreia.geom.Vector.RTD) + 180;
} else {
clip._visible = false;
}
}
}
Symbol 1216 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.MenuBar] Frame 0
class com.games.pencilRacer.gui.palettes.MenuBar extends com.games.pencilRacer.gui.palettes.Palette
{
var create, clip, moveNow;
function MenuBar (holder, id) {
super(0, 0, holder || "gui", id || "MenuBar");
create();
init();
}
function init() {
clampToScreen();
clip.options_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showOptions);
clip.mute_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleMute);
com.jjcorreia.gui.ToolTip.registerTip(clip.options_btn, com.games.pencilRacer.config.TipText.OPTIONS);
com.jjcorreia.gui.ToolTip.registerTip(clip.mute_btn, com.games.pencilRacer.config.TipText.MUTE_ALL);
update();
}
function update() {
clip.mute_mc.gotoAndStop((_global.soundPanel.GlobalOff ? 2 : 1));
}
function toggleMute() {
var _local3 = _global.soundPanel.toggleGlobalMute();
clip.mute_mc.gotoAndStop((_local3 ? 2 : 1));
com.jjcorreia.display.jObject.App.cookie.save("globalMute", _local3);
}
function clampToScreen() {
moveNow(Stage.width / 2, 0);
}
}
Symbol 1217 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.ToolsSimple] Frame 0
class com.games.pencilRacer.gui.palettes.ToolsSimple extends com.games.pencilRacer.gui.palettes.Palette
{
var create, hide, buttons, clip, show;
function ToolsSimple () {
super(6, 23, "gui_simple", "ToolsSimple");
create();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
hide();
}
function init() {
super.init();
buttons = new Object();
buttons[com.games.pencilRacer.config.Modes.LINE] = clip.menu0;
buttons[com.games.pencilRacer.config.Modes.PENCIL] = clip.menu0;
buttons[com.games.pencilRacer.config.Modes.ERASE] = clip.menu1;
buttons[com.games.pencilRacer.config.Modes.MOVE] = clip.menu2;
buttons[com.games.pencilRacer.config.Modes.POINT] = clip.menu2;
buttons[com.games.pencilRacer.config.Modes.PAN] = clip.menu3;
buttons[com.games.pencilRacer.config.Modes.ZOOM] = clip.menu3;
buttons[com.games.pencilRacer.config.Modes.SHAPES] = clip.menu4;
buttons[com.games.pencilRacer.config.Modes.TRACK] = clip.menu5;
clip.menu0.setMainIcon(com.games.pencilRacer.config.Modes.PENCIL, com.games.pencilRacer.config.TipText.PENCIL_TIP_SIMPLE);
clip.menu0.setIcon(0, com.games.pencilRacer.config.Modes.PENCIL, com.games.pencilRacer.config.TipText.PENCIL_TIP_SIMPLE);
clip.menu0.setIcon(1, com.games.pencilRacer.config.Modes.LINE, com.games.pencilRacer.config.TipText.LINE_TIP_SIMPLE);
clip.menu0.parent = this;
clip.menu1.totalItems = 0;
clip.menu1.setMainIcon(com.games.pencilRacer.config.Modes.ERASE, com.games.pencilRacer.config.TipText.ERASE_TIP_SIMPLE);
clip.menu1.parent = this;
clip.menu2.setMainIcon(com.games.pencilRacer.config.Modes.MOVE, com.games.pencilRacer.config.TipText.MOVE_TIP_SIMPLE);
clip.menu2.setIcon(0, com.games.pencilRacer.config.Modes.MOVE, com.games.pencilRacer.config.TipText.MOVE_TIP_SIMPLE);
clip.menu2.setIcon(1, com.games.pencilRacer.config.Modes.POINT, com.games.pencilRacer.config.TipText.POINT_TIP_SIMPLE);
clip.menu2.parent = this;
clip.menu3.setMainIcon(com.games.pencilRacer.config.Modes.PAN, com.games.pencilRacer.config.TipText.PAN_TIP_SIMPLE);
clip.menu3.setIcon(0, com.games.pencilRacer.config.Modes.PAN, com.games.pencilRacer.config.TipText.PAN_TIP_SIMPLE);
clip.menu3.setIcon(1, com.games.pencilRacer.config.Modes.ZOOM, com.games.pencilRacer.config.TipText.ZOOM_TIP_SIMPLE);
clip.menu3.parent = this;
clip.menu4.totalItems = 0;
clip.menu4.setMainIcon(com.games.pencilRacer.config.Modes.SHAPES, com.games.pencilRacer.config.TipText.SHAPES_TIP);
clip.menu4.parent = this;
clip.menu5.totalItems = 0;
clip.menu5.setMainIcon(com.games.pencilRacer.config.Modes.TRACK, com.games.pencilRacer.config.TipText.TRACK_TIP);
clip.menu5.parent = this;
clip.cpicker.addListener(this);
clip.bg_picker.addListener(this);
clip.bg_picker.color = com.jjcorreia.display.jObject.App.bgColor;
com.jjcorreia.gui.ToolTip.registerTip(clip.bg_picker.cpicker, com.games.pencilRacer.config.TipText.BG_COLOR_TIP);
togglePhysics(true);
update();
show();
}
function clearDisplay() {
for (var _local2 in buttons) {
buttons[_local2].deselect();
}
}
function change(target) {
var _local1 = Number("0x" + target.getRGB());
switch (target._name) {
case "cpicker" :
(com.jjcorreia.application.AppBase.__get__clip().physicsEnabled ? ((com.jjcorreia.application.AppBase.__get__clip().drawColor = _local1)) : ((com.jjcorreia.application.AppBase.__get__clip().drawArtColor = _local1)));
com.jjcorreia.application.AppBase.__get__clip().setColor(_local1);
break;
case "bg_picker" :
com.jjcorreia.display.jObject.App.setBGColor(_local1);
}
}
function togglePhysics(value) {
selected = !value;
com.jjcorreia.application.AppBase.__get__clip().togglePhysics(value);
com.jjcorreia.application.AppBase.__get__clip().setMode(com.jjcorreia.application.AppBase.__get__clip().mode);
}
function update() {
clip.mode_mc.setIcons();
if (com.jjcorreia.application.AppBase.__get__clip().physicsEnabled) {
clip.cpicker.color = com.jjcorreia.application.AppBase.__get__clip().drawColor;
com.jjcorreia.gui.ToolTip.registerTip(clip.cpicker.cpicker, com.games.pencilRacer.config.TipText.COLOR_TRACK_TIP);
clip.cpicker.colors = clip.cpicker.getStandardColors();
} else {
clip.cpicker.color = com.jjcorreia.application.AppBase.__get__clip().drawArtColor;
com.jjcorreia.gui.ToolTip.registerTip(clip.cpicker.cpicker, com.games.pencilRacer.config.TipText.COLOR_ART_TIP);
clip.cpicker.colors = com.games.pencilRacer.config.PreferencesGame.getArtColors();
}
}
function display(mode) {
clearDisplay();
var _local2 = buttons[mode];
_local2.setMainIcon(mode);
_local2.select();
}
var selected = false;
}
Symbol 1218 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.VehiclesSimple] Frame 0
class com.games.pencilRacer.gui.palettes.VehiclesSimple extends com.games.pencilRacer.gui.palettes.Palette
{
var create, hide, moveNow, show, clip;
function VehiclesSimple () {
super(0, 493, "gui_simple", "VehiclesSimple");
create();
hide();
moveNow(Stage.width, 493);
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
super.init();
show();
clip.icon0.btn.onRelease = com.jjcorreia.utils.Delegate.create(this, showSub);
selectVehicle(com.jjcorreia.application.AppBase.__get__clip().vehicleString, com.jjcorreia.application.AppBase.__get__clip().vehicleDesc);
}
function showSub() {
new com.games.pencilRacer.gui.dialogs.VehicleSimpleDialog(this);
}
function selectVehicle(veh, desc) {
clip.icon0.setVehicle(veh);
if (com.jjcorreia.application.AppBase.__get__clip().vehicleDesc) {
com.jjcorreia.gui.ToolTip.registerTip(clip.icon0.btn, ("<b>" + desc) + "</b><br>Click to select a different vehicle");
}
}
var selected = false;
}
Symbol 1219 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.VehicleSimpleDialog] Frame 0
class com.games.pencilRacer.gui.dialogs.VehicleSimpleDialog extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, clip;
function VehicleSimpleDialog (parent) {
super(0, 0, "modals", "VehicleSimpleDialog", true);
create();
init();
new com.games.pencilRacer.gui.palettes.panels.VehiclesPanelSimple(this, clip.panels_mc);
}
}
Symbol 1220 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.VehiclesPanelSimple] Frame 0
class com.games.pencilRacer.gui.palettes.panels.VehiclesPanelSimple extends com.games.pencilRacer.gui.palettes.panels.VehiclesPanel
{
var parent, TOTAL_ICONS, hide, show;
function VehiclesPanelSimple (parent, holder) {
super(holder, "BigList");
this.parent = parent;
TOTAL_ICONS = 15;
hide();
}
function init() {
super.init();
show();
}
function selectVehicle(icon, userSelected) {
super.selectVehicle(icon);
if (userSelected) {
parent.close();
}
}
}
Symbol 1221 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.PropertiesSimple] Frame 0
class com.games.pencilRacer.gui.palettes.PropertiesSimple extends com.games.pencilRacer.gui.palettes.Palette
{
var create, moveNow, sx, x, sy, y, clip, clampToScreen;
function PropertiesSimple (holder) {
super(0, 0, "gui_simple", "PropertiesSimple");
create();
moveNow(0, 520);
sx = x;
sy = y;
clip._visible = false;
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
super.init();
clip.stroke_mc.mode = "int";
clip.stroke_mc.setRange(com.games.pencilRacer.gui.palettes.panels.ArtPanel.STROKE_MIN, com.games.pencilRacer.gui.palettes.panels.ArtPanel.STROKE_MAX);
clip.stroke_mc.value = com.jjcorreia.display.jObject.App.stroke;
clip.stroke_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.setStroke, clip.stroke_mc);
clip.stroke_mc.setLabel("Thickness");
clip.stroke_mc._visible = false;
clip.friction_mc.mode = "%";
clip.friction_mc.setRange(0, 1);
clip.friction_mc.value = 0;
clip.friction_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().setFriction, clip.friction_mc);
clip.friction_mc.setLabel("Stickiness");
clip.accel_mc.mode = "%";
clip.accel_mc.setRange(0, 0.5);
clip.accel_mc.setLabel("Acceleration");
clip.accel_mc.onUpdate = com.jjcorreia.utils.Delegate.create(com.jjcorreia.application.AppBase.__get__clip(), com.jjcorreia.application.AppBase.__get__clip().setAccel, clip.accel_mc);
com.jjcorreia.gui.ToolTip.registerTip(clip.stroke_mc.press_mc, com.games.pencilRacer.config.TipText.STROKE);
com.jjcorreia.gui.ToolTip.registerTip(clip.friction_mc.press_mc, com.games.pencilRacer.config.TipText.STICKINESS_SIMPLE);
com.jjcorreia.gui.ToolTip.registerTip(clip.accel_mc.press_mc, com.games.pencilRacer.config.TipText.ACCELERATION_SIMPLE);
clip._visible = true;
}
function displayLineData(line) {
clip.friction_mc.setValue(1 - line.friction);
clip.accel_mc.setValue(line.acceleration);
clip.friction_mc.update(true);
clip.accel_mc.update(true);
clip.stroke_mc.setValue(line.stroke);
clip.stroke_mc.update(true);
update(false);
}
function update(fromApp) {
if (com.jjcorreia.display.jObject.App.physicsEnabled) {
clip.friction_mc.show();
clip.accel_mc.show();
clip.stroke_mc.hide();
clip.bg_mc._width = 309;
} else {
clip.friction_mc.hide();
clip.accel_mc.hide();
clip.stroke_mc.show();
clip.bg_mc._width = 150;
}
clampToScreen();
if (fromApp != false) {
clip.stroke_mc.setValue(com.jjcorreia.display.jObject.App.stroke);
clip.stroke_mc.update(true);
}
}
function change(target) {
com.jjcorreia.display.jObject.App.setBGColor(Number("0x" + target.getRGB()));
}
function get width() {
return(clip.bg_mc._width);
}
function get selected() {
return(com.jjcorreia.display.jObject.App.physicsEnabled);
}
function get friction() {
return(1 - clip.friction_mc.value);
}
function set friction(v) {
clip.friction_mc.value = v;
//return(friction);
}
function get acceleration() {
return(clip.accel_mc.value);
}
function set acceleration(v) {
clip.accel_mc.value = v;
//return(acceleration);
}
}
Symbol 1222 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.ControlPaletteSimple] Frame 0
class com.games.pencilRacer.gui.palettes.ControlPaletteSimple extends com.games.pencilRacer.gui.palettes.MenuBar
{
var hide, clip, show;
function ControlPaletteSimple () {
super("gui_simple", "ControlPaletteSimple");
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, initOther);
hide();
}
function initOther() {
clip.file_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, showFile);
clip.play_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.executeLevel);
clip.clearFlag_mc.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.clearFlag);
enableClearFlag(false);
clip.share_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.shareGame);
com.jjcorreia.gui.ToolTip.registerTip(clip.play_btn, com.games.pencilRacer.config.TipText.SIMULATE);
com.jjcorreia.gui.ToolTip.registerTip(clip.file_btn, com.games.pencilRacer.config.TipText.FILE);
com.jjcorreia.gui.ToolTip.registerTip(clip.share_btn, com.games.pencilRacer.config.TipText.SHARE);
update();
show();
}
function showFile() {
var _local1 = new com.games.pencilRacer.gui.dialogs.FileSimple();
}
function update() {
super.update();
enableClearFlag(Boolean(com.jjcorreia.display.jObject.App.flagIcon));
}
function enableClearFlag(val) {
if (val) {
clip.clearFlag_mc.enable();
clip.clearFlag_mc._alpha = 100;
clip.icon_flag_mc._alpha = 100;
com.jjcorreia.gui.ToolTip.registerTip(clip.clearFlag_mc, com.games.pencilRacer.config.TipText.FLAG_TIP);
} else {
clip.clearFlag_mc.disable();
clip.clearFlag_mc._alpha = 0;
clip.icon_flag_mc._alpha = 0;
}
}
}
Symbol 1223 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.FileSimple] Frame 0
class com.games.pencilRacer.gui.dialogs.FileSimple extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, close, clip, hide, show;
function FileSimple () {
super(0, 0, "modals", "FileSimple", true);
create();
init();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.new_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doAction, com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.newTrack);
clip.save_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doAction, com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.saveGame);
clip.help_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doAction, com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showTutorial);
com.jjcorreia.gui.ToolTip.registerTip(clip.new_btn, com.games.pencilRacer.config.TipText.NEW);
com.jjcorreia.gui.ToolTip.registerTip(clip.save_btn, com.games.pencilRacer.config.TipText.SAVE);
com.jjcorreia.gui.ToolTip.registerTip(clip.help_btn, com.games.pencilRacer.config.TipText.HELP);
hide();
var _local3 = new com.jjcorreia.utils.Delay(0.1, this, checkSaves);
}
function checkSaves() {
var _local4 = false;
var _local2 = 0;
while (_local2 < com.games.pencilRacer.gui.dialogs.PasteLoad.TOTAL_SLOTS) {
var _local3 = com.jjcorreia.display.jObject.App.cookie.load(("track" + _local2) + "_title");
if (_local3 != undefined) {
_local4 = true;
break;
}
_local2++;
}
clip.load_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, doAction, com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showOpenDialog);
com.jjcorreia.gui.ToolTip.registerTip(clip.load_btn, com.games.pencilRacer.config.TipText.LOAD);
show();
}
function doAction(scope, method) {
close();
method.apply(scope);
}
}
Symbol 1224 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.LineWarning] Frame 0
class com.games.pencilRacer.gui.dialogs.LineWarning extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, __set__alpha, setMain, myDelay, alignCenter, alpha, __get__alpha, pause, destroy;
function LineWarning () {
super(0, 0, "gui2", "LineWarning", false);
create();
__set__alpha(-100);
setMain(fadeIn);
myDelay = new com.jjcorreia.utils.Delay(DISPLAY_DURATION, this, close);
alignCenter();
}
function fadeIn() {
alpha = alpha + FADE_SPEED;
if (__get__alpha() >= 100) {
pause();
}
}
function fadeOut() {
alpha = alpha - FADE_SPEED;
if (__get__alpha() <= 0) {
destroy();
}
}
function close() {
myDelay.destroy();
setMain(fadeOut);
}
var FADE_SPEED = 12;
var DISPLAY_DURATION = 4;
}
Symbol 1225 MovieClip [__Packages.com.games.pencilRacer.gui.PenDot] Frame 0
class com.games.pencilRacer.gui.PenDot extends com.jjcorreia.display.jObject
{
var create, resume, holder, __set__scaleX, __set__scaleY;
function PenDot ($pos) {
super($pos.x, $pos.y, "assets", "PenDot");
create();
resume();
}
function Main() {
var _local2 = 100 / holder._xscale;
__set__scaleX(100 * _local2);
__set__scaleY(100 * _local2);
}
function toString() {
var _local1 = "[ PenDot";
_local1 = _local1 + " ]";
return(_local1);
}
}
Symbol 1226 MovieClip [__Packages.com.games.pencilRacer.gui.SelectionBox] Frame 0
class com.games.pencilRacer.gui.SelectionBox extends com.jjcorreia.display.jObject
{
var create, x, y, markedVector;
function SelectionBox ($start) {
super($start.x, $start.y, "assets", "blank");
create();
}
function draw(p) {
clear();
com.jjcorreia.display.jObject.App.dash.lineStyle(0, 0, 100, true, "none");
com.jjcorreia.display.jObject.App.dash.moveTo(x, y);
com.jjcorreia.display.jObject.App.dash.lineTo(p.x, y);
com.jjcorreia.display.jObject.App.dash.lineTo(p.x, p.y);
com.jjcorreia.display.jObject.App.dash.lineTo(x, p.y);
com.jjcorreia.display.jObject.App.dash.lineTo(x, y);
markedVector = p.clone();
}
function clear() {
com.jjcorreia.display.jObject.App.dash.clear();
}
function getRect() {
var _local3 = Math.min(x, markedVector.x);
var _local2 = Math.min(y, markedVector.y);
var _local5 = Math.max(x, markedVector.x);
var _local4 = Math.max(y, markedVector.y);
return(new flash.geom.Rectangle(_local3, _local2, _local5 - _local3, _local4 - _local2));
}
function destroy() {
clear();
super.destroy();
}
function toString() {
var _local1 = "[ SelectionBox";
_local1 = _local1 + " ]";
return(_local1);
}
}
Symbol 1227 MovieClip [__Packages.com.senocular.drawing.MxDrawingAPI] Frame 0
interface com.senocular.drawing.MxDrawingAPI
{
}
Symbol 1228 MovieClip [__Packages.com.senocular.drawing.DashedLine] Frame 0
class com.senocular.drawing.DashedLine implements com.senocular.drawing.MxDrawingAPI
{
var target, pen;
function DashedLine (target, onLength, offLength) {
this.target = target;
setDash(onLength, offLength);
isLine = true;
overflow = 0;
pen = {x:0, y:0};
}
function setDash(onLength, offLength) {
this.onLength = onLength;
this.offLength = offLength;
dashLength = this.onLength + this.offLength;
}
function getDash(Void) {
return([onLength, offLength]);
}
function moveTo(x, y) {
targetMoveTo(x, y);
}
function lineTo(x, y) {
var _local15 = x - pen.x;
var _local13 = y - pen.y;
var _local14 = Math.atan2(_local13, _local15);
var _local11 = Math.cos(_local14);
var _local9 = Math.sin(_local14);
var _local3 = lineLength(_local15, _local13);
if (overflow) {
if (overflow > _local3) {
if (isLine) {
targetLineTo(x, y);
} else {
targetMoveTo(x, y);
}
overflow = overflow - _local3;
return(undefined);
}
if (isLine) {
targetLineTo(pen.x + (_local11 * overflow), pen.y + (_local9 * overflow));
} else {
targetMoveTo(pen.x + (_local11 * overflow), pen.y + (_local9 * overflow));
}
_local3 = _local3 - overflow;
overflow = 0;
isLine = !isLine;
if (!_local3) {
return(undefined);
}
}
var _local8 = Math.floor(_local3 / dashLength);
if (_local8) {
var _local7 = _local11 * onLength;
var _local6 = _local9 * onLength;
var _local5 = _local11 * offLength;
var _local4 = _local9 * offLength;
var _local2 = 0;
while (_local2 < _local8) {
if (isLine) {
targetLineTo(pen.x + _local7, pen.y + _local6);
targetMoveTo(pen.x + _local5, pen.y + _local4);
} else {
targetMoveTo(pen.x + _local5, pen.y + _local4);
targetLineTo(pen.x + _local7, pen.y + _local6);
}
_local2++;
}
_local3 = _local3 - (dashLength * _local8);
}
if (isLine) {
if (_local3 > onLength) {
targetLineTo(pen.x + (_local11 * onLength), pen.y + (_local9 * onLength));
targetMoveTo(x, y);
overflow = offLength - (_local3 - onLength);
isLine = false;
} else {
targetLineTo(x, y);
if (_local3 == onLength) {
overflow = 0;
isLine = !isLine;
} else {
overflow = onLength - _local3;
targetMoveTo(x, y);
}
}
} else if (_local3 > offLength) {
targetMoveTo(pen.x + (_local11 * offLength), pen.y + (_local9 * offLength));
targetLineTo(x, y);
overflow = onLength - (_local3 - offLength);
isLine = true;
} else {
targetMoveTo(x, y);
if (_local3 == offLength) {
overflow = 0;
isLine = !isLine;
} else {
overflow = offLength - _local3;
}
}
}
function curveTo(cx, cy, x, y) {
var _local8 = pen.x;
var _local7 = pen.y;
var _local14 = curveLength(_local8, _local7, cx, cy, x, y);
var _local3 = 0;
var _local4 = 0;
var _local2;
if (overflow) {
if (overflow > _local14) {
if (isLine) {
targetCurveTo(cx, cy, x, y);
} else {
targetMoveTo(x, y);
}
overflow = overflow - _local14;
return(undefined);
}
_local3 = overflow / _local14;
_local2 = curveSliceUpTo(_local8, _local7, cx, cy, x, y, _local3);
if (isLine) {
targetCurveTo(_local2[2], _local2[3], _local2[4], _local2[5]);
} else {
targetMoveTo(_local2[4], _local2[5]);
}
overflow = 0;
isLine = !isLine;
if (!_local14) {
return(undefined);
}
}
var _local15 = _local14 - (_local14 * _local3);
var _local16 = Math.floor(_local15 / dashLength);
var _local12 = onLength / _local14;
var _local13 = offLength / _local14;
if (_local16) {
var _local11 = 0;
while (_local11 < _local16) {
if (isLine) {
_local4 = _local3 + _local12;
_local2 = curveSlice(_local8, _local7, cx, cy, x, y, _local3, _local4);
targetCurveTo(_local2[2], _local2[3], _local2[4], _local2[5]);
_local3 = _local4;
_local4 = _local3 + _local13;
_local2 = curveSlice(_local8, _local7, cx, cy, x, y, _local3, _local4);
targetMoveTo(_local2[4], _local2[5]);
} else {
_local4 = _local3 + _local13;
_local2 = curveSlice(_local8, _local7, cx, cy, x, y, _local3, _local4);
targetMoveTo(_local2[4], _local2[5]);
_local3 = _local4;
_local4 = _local3 + _local12;
_local2 = curveSlice(_local8, _local7, cx, cy, x, y, _local3, _local4);
targetCurveTo(_local2[2], _local2[3], _local2[4], _local2[5]);
}
_local3 = _local4;
_local11++;
}
}
_local15 = _local14 - (_local14 * _local3);
if (isLine) {
if (_local15 > onLength) {
_local4 = _local3 + _local12;
_local2 = curveSlice(_local8, _local7, cx, cy, x, y, _local3, _local4);
targetCurveTo(_local2[2], _local2[3], _local2[4], _local2[5]);
targetMoveTo(x, y);
overflow = offLength - (_local15 - onLength);
isLine = false;
} else {
_local2 = curveSliceFrom(_local8, _local7, cx, cy, x, y, _local3);
targetCurveTo(_local2[2], _local2[3], _local2[4], _local2[5]);
if (_local14 == onLength) {
overflow = 0;
isLine = !isLine;
} else {
overflow = onLength - _local15;
targetMoveTo(x, y);
}
}
} else if (_local15 > offLength) {
_local4 = _local3 + _local13;
_local2 = curveSlice(_local8, _local7, cx, cy, x, y, _local3, _local4);
targetMoveTo(_local2[4], _local2[5]);
_local2 = curveSliceFrom(_local8, _local7, cx, cy, x, y, _local4);
targetCurveTo(_local2[2], _local2[3], _local2[4], _local2[5]);
overflow = onLength - (_local15 - offLength);
isLine = true;
} else {
targetMoveTo(x, y);
if (_local15 == offLength) {
overflow = 0;
isLine = !isLine;
} else {
overflow = offLength - _local15;
}
}
}
function clear(Void) {
target.clear();
}
function lineStyle(thickness, rgb, alpha, pixelHinting, noScale, capsStyle, jointStyle, miterLimit) {
target.lineStyle(thickness, rgb, alpha, pixelHinting, noScale, capsStyle, jointStyle, miterLimit);
}
function beginFill(rgb, alpha) {
target.beginFill(rgb, alpha);
}
function beginGradientFill(fillType, colors, alphas, ratios, matrix) {
target.beginGradientFill(fillType, colors, alphas, ratios, matrix);
}
function endFill(Void) {
target.endFill();
}
function lineLength(sx, sy, ex, ey) {
if (arguments.length == 2) {
return(Math.sqrt((sx * sx) + (sy * sy)));
}
var _local3 = ex - sx;
var _local2 = ey - sy;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function curveLength(sx, sy, cx, cy, ex, ey, accuracy) {
var _local13 = 0;
var _local11 = sx;
var _local10 = sy;
var _local9;
var _local8;
var _local2;
var _local4;
var _local7;
var _local6;
var _local5;
var _local12 = (accuracy ? (accuracy) : (_curveaccuracy));
var _local3 = 1;
while (_local3 <= _local12) {
_local2 = _local3 / _local12;
_local4 = 1 - _local2;
_local7 = _local4 * _local4;
_local6 = (2 * _local2) * _local4;
_local5 = _local2 * _local2;
_local9 = ((_local7 * sx) + (_local6 * cx)) + (_local5 * ex);
_local8 = ((_local7 * sy) + (_local6 * cy)) + (_local5 * ey);
_local13 = _local13 + lineLength(_local11, _local10, _local9, _local8);
_local11 = _local9;
_local10 = _local8;
_local3++;
}
return(_local13);
}
function curveSlice(sx, sy, cx, cy, ex, ey, t1, t2) {
if (t1 == 0) {
return(curveSliceUpTo(sx, sy, cx, cy, ex, ey, t2));
}
if (t2 == 1) {
return(curveSliceFrom(sx, sy, cx, cy, ex, ey, t1));
}
var _local2 = curveSliceUpTo(sx, sy, cx, cy, ex, ey, t2);
_local2.push(t1 / t2);
return(curveSliceFrom.apply(this, _local2));
}
function curveSliceUpTo(sx, sy, cx, cy, ex, ey, t) {
if (t == undefined) {
t = 1;
}
if (t != 1) {
var _local5 = cx + ((ex - cx) * t);
var _local4 = cy + ((ey - cy) * t);
cx = sx + ((cx - sx) * t);
cy = sy + ((cy - sy) * t);
ex = cx + ((_local5 - cx) * t);
ey = cy + ((_local4 - cy) * t);
}
return([sx, sy, cx, cy, ex, ey]);
}
function curveSliceFrom(sx, sy, cx, cy, ex, ey, t) {
if (t == undefined) {
t = 1;
}
if (t != 1) {
var _local5 = sx + ((cx - sx) * t);
var _local4 = sy + ((cy - sy) * t);
cx = cx + ((ex - cx) * t);
cy = cy + ((ey - cy) * t);
sx = _local5 + ((cx - _local5) * t);
sy = _local4 + ((cy - _local4) * t);
}
return([sx, sy, cx, cy, ex, ey]);
}
function targetMoveTo(x, y) {
pen = {x:x, y:y};
target.moveTo(x, y);
}
function targetLineTo(x, y) {
if ((x == pen.x) && (y == pen.y)) {
return(undefined);
}
pen = {x:x, y:y};
target.lineTo(x, y);
}
function targetCurveTo(cx, cy, x, y) {
if ((((cx == x) && (cy == y)) && (x == pen.x)) && (y == pen.y)) {
return(undefined);
}
pen = {x:x, y:y};
target.curveTo(cx, cy, x, y);
}
var _curveaccuracy = 6;
var isLine = true;
var overflow = 0;
var offLength = 0;
var onLength = 0;
var dashLength = 0;
}
Symbol 1229 MovieClip [__Packages.com.games.pencilRacer.gui.BackgroundPaper] Frame 0
class com.games.pencilRacer.gui.BackgroundPaper extends com.jjcorreia.display.jObject
{
var create, clip;
function BackgroundPaper () {
super(0, 0, "bgPaper", "BackgroundPaper");
create();
clip.blendMode = "multiply";
}
}
Symbol 1230 MovieClip [__Packages.com.games.pencilRacer.config.PreferencesDefault] Frame 0
class com.games.pencilRacer.config.PreferencesDefault extends com.games.pencilRacer.config.PreferencesGame
{
var vehicles, vehDesc, shapes;
function PreferencesDefault () {
super();
init();
}
function init() {
vehicles = com.games.pencilRacer.packages.VehiclePackageDefault.getObjects();
vehDesc = com.games.pencilRacer.packages.VehiclePackageDefault.getVehicleDescriptions();
shapes = com.games.pencilRacer.packages.ShapesPackageDefault.getObjects();
}
}
Symbol 1231 MovieClip [__Packages.com.games.pencilRacer.packages.VehiclePackageDefault] Frame 0
class com.games.pencilRacer.packages.VehiclePackageDefault
{
function VehiclePackageDefault () {
}
static function getObjects() {
return(["RaceCar", "MonsterTruck", "Car", "Duck", "Tank", "Boar", "Tractor", "Bus", "HamsterWheel", "MonkeyBike", "Sausage", "Particle"]);
}
static function getVehicleDescriptions() {
return(["Race Car", "Monster Truck", "Car", "Duck & Ducklings", "Tank", "Wild Boar", "Farmer's Tractor", "School Bus", "Hamster in a Wheel", "Monkey on a Bike", "Sausage", "Particle"]);
}
}
Symbol 1232 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.BoxVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.BoxVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, templateInit, paint;
function BoxVehicle (pos) {
super(pos, "BoxGraphic", true);
create();
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
paint();
}
}
Symbol 1233 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.TriangleVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.TriangleVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, iterations, parseTemplate, clip;
function TriangleVehicle ($pos) {
super($pos, "TriangleGraphic", true);
create();
attachTemplate("Triangle");
iterations = 3;
new com.jjcorreia.utils.Delay(0.05, this, init);
}
function init() {
parseTemplate();
super.init();
clip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, Main);
}
function Main() {
super.Main();
}
}
Symbol 1234 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.TrainVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.TrainVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, iterations, parseTemplate, clip;
function TrainVehicle ($pos) {
super($pos, "TrainGraphic", true);
create();
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, init);
}
function init() {
iterations = 3;
parseTemplate();
super.init();
clip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, Main);
}
function Main() {
super.Main();
}
}
Symbol 1235 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.ParticleVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.ParticleVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, iterations, addWheel, getPosition, resume, paint;
function ParticleVehicle (pos) {
super(pos);
create();
init();
iterations = 1;
}
function init() {
addWheel("", getPosition(), 4);
resume();
super.init();
}
function Main() {
super.Main();
paint();
}
}
Symbol 1236 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.DuckVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.DuckVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, iterations, sound_id, templateInit, points, syncGraphicParticle, clip, syncGraphicConstraint;
function DuckVehicle ($pos) {
super($pos, "DuckGraphic", true);
create();
attachTemplate();
iterations = 2;
sound_id = "Duck";
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
for (var _local3 in points) {
syncGraphicParticle(clip[_local3], _local3);
}
syncGraphicConstraint(clip.c0, "c0~c1");
syncGraphicConstraint(clip.c1, "c1~c2");
syncGraphicConstraint(clip.c2, "c2~c3");
syncGraphicConstraint(clip.c3, "c3~c4");
syncGraphicConstraint(clip.c4, "c3~c4");
}
}
Symbol 1237 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.MonsterTruckVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.MonsterTruckVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, sound_id, templateInit, syncGraphicParticle, clip, getConstraint;
function MonsterTruckVehicle ($pos) {
super($pos, "MonsterTruckGraphic", true);
create();
attachTemplate();
sound_id = "BigTruck";
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wLeft_mc, "wheelLeft", true);
syncGraphicParticle(clip.wRight_mc, "wheelRight", true);
syncGraphicParticle(clip.chassis_mc, "bedLeft");
syncGraphicParticle(clip.wLeft_mc, "wheelLeft");
syncGraphicParticle(clip.bl_mc, "center");
syncGraphicParticle(clip.br_mc, "center");
clip.chassis_mc._rotation = getConstraint("bedLeft~hoodRight").__get__angle_deg() + 180;
clip.bl_mc._rotation = getConstraint("center~wheelLeft").angle_deg;
clip.br_mc._rotation = getConstraint("center~wheelRight").angle_deg;
}
}
Symbol 1238 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.CarVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.CarVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, sound_id, attachTemplate, templateInit, syncGraphicParticle, clip, syncGraphicConstraint;
function CarVehicle (pos) {
super(pos, "CarGraphic", true);
create();
sound_id = "FunnyCar";
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wheelLeft_mc, "wheelLeft", true);
syncGraphicParticle(clip.wheelRight_mc, "wheelRight", true);
syncGraphicParticle(clip.body_mc, "bedLeft");
syncGraphicConstraint(clip.body_mc, "hoodRight~bedLeft");
}
}
Symbol 1239 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.TankVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.TankVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, sound_id, templateInit, syncGraphicParticle, clip, syncParticleRotation, syncGraphicConstraint, getParticle, x, y;
function TankVehicle (pos) {
super(pos, "TankGraphic", true);
create();
attachTemplate();
sound_id = "Tank";
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.main, "p0");
syncGraphicParticle(clip.w0, "w0");
syncGraphicParticle(clip.w1, "w1");
syncGraphicParticle(clip.w2, "w2");
syncGraphicParticle(clip.center, "center");
syncGraphicParticle(clip.w3, "w3");
syncParticleRotation(clip.w0.w0, "w0");
var _local3 = clip.w0.w0._rotation;
clip.w1.w1._rotation = (clip.w1.w2._rotation = _local3);
clip.center.w0._rotation = _local3;
clip.w2.w0._rotation = _local3;
clip.w3._rotation = _local3;
clip.main.body.w6._rotation = _local3;
syncGraphicConstraint(clip.w0, "w1~w0");
syncGraphicConstraint(clip.w1, "center~w1");
syncGraphicConstraint(clip.center, "w2~center");
syncGraphicConstraint(clip.w2, "w3~w2");
syncGraphicConstraint(clip.main, "p1~p0");
var _local4 = getParticle("p0").curr;
var _local7 = getParticle("p1").curr;
var _local10 = getParticle("w0").curr;
var _local9 = getParticle("w1").curr;
var _local8 = getParticle("w2").curr;
var _local5 = getParticle("center").curr;
var _local6 = getParticle("w3").curr;
clip.clear();
clip.beginFill(6710886);
clip.moveTo(_local4.x - x, _local4.y - y);
clip.lineTo(_local7.x - x, _local7.y - y);
clip.lineTo(_local6.x - x, _local6.y - y);
clip.lineTo(_local8.x - x, _local8.y - y);
clip.lineTo(_local5.x - x, _local5.y - y);
clip.lineTo(_local9.x - x, _local9.y - y);
clip.lineTo(_local10.x - x, _local10.y - y);
clip.lineTo(_local4.x - x, _local4.y - y);
clip.endFill();
}
}
Symbol 1240 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.TractorVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.TractorVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, sound_id, templateInit, syncGraphicParticle, clip, getConstraint;
function TractorVehicle (pos) {
super(pos, "TractorGraphic", true);
create();
attachTemplate();
sound_id = "Tractor";
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wheelLeft, "wheelLeft", true);
syncGraphicParticle(clip.wheelRight, "wheelRight", true);
syncGraphicParticle(clip.body_mc, "topLeft");
clip.body_mc._rotation = getConstraint("topRight~topLeft").angle_deg;
}
}
Symbol 1241 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.BoarVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.BoarVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, iterations, sound_id, templateInit, syncGraphicParticle, clip, getConstraint;
function BoarVehicle (pos) {
super(pos, "BoarGraphic", true);
create();
attachTemplate();
iterations = 4;
sound_id = "Boar";
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.clip_mc, "wheelLeft");
clip.clip_mc._rotation = getConstraint("wheelRight~wheelLeft").angle_deg;
}
}
Symbol 1242 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.BusVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.BusVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, sound_id, attachTemplate, templateInit, syncGraphicParticle, clip, syncGraphicConstraint;
function BusVehicle (pos) {
super(pos, "BusGraphic", true);
create();
sound_id = "Bus";
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wheelLeft_mc, "wheelLeft", true);
syncGraphicParticle(clip.wheelRight_mc, "wheelRight", true);
syncGraphicParticle(clip.body_mc, "backTop");
syncGraphicConstraint(clip.body_mc, "frontTop~backTop");
}
}
Symbol 1243 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.HamsterWheelVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.HamsterWheelVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, iterations, sound_id, attachTemplate, templateInit, syncGraphicParticle, clip, syncParticleRotation;
function HamsterWheelVehicle (pos) {
super(pos, "HamsterWheelGraphic", true);
create();
iterations = 1;
sound_id = "Hamster";
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wheel_mc, "main");
syncParticleRotation(clip.wheel_mc.wheelFront_mc, "main");
clip.wheel_mc.wheelBack_mc._rotation = clip.wheel_mc.wheelFront_mc._rotation;
}
}
Symbol 1244 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.MonkeyBikeVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.MonkeyBikeVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, sound_id, attachTemplate, templateInit, syncGraphicParticle, clip, syncGraphicConstraint;
function MonkeyBikeVehicle (pos) {
super(pos, "MonkeyBikeGraphic", true);
create();
sound_id = "Monkey";
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wheelLeft_mc, "wheelLeft", true);
syncGraphicParticle(clip.wheelRight_mc, "wheelRight", true);
syncGraphicParticle(clip.body_mc, "bedLeft");
clip.body_mc.pedals_mc._rotation = (clip.body_mc.pedalsBack_mc._rotation = clip.wheelLeft_mc._rotation);
syncGraphicConstraint(clip.body_mc, "hoodRight~bedLeft");
}
}
Symbol 1245 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.RaceCarVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.RaceCarVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, sound_id, attachTemplate, templateInit, syncGraphicParticle, clip, syncGraphicConstraint;
function RaceCarVehicle (pos) {
super(pos, "RaceCarGraphic", true);
create();
sound_id = "Fiat";
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.wheelLeft_mc, "wheelLeft", true);
syncGraphicParticle(clip.wheelRight_mc, "wheelRight", true);
syncGraphicParticle(clip.body_mc, "backTop");
syncGraphicConstraint(clip.body_mc, "hoodRight~backTop");
}
}
Symbol 1246 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.SausageVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.SausageVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, sound_id, attachTemplate, templateInit, syncGraphicParticle, clip, getParticle;
function SausageVehicle (pos) {
super(pos, "SausageGraphic", true);
create();
sound_id = "Sausage";
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
}
function Main() {
super.Main();
syncGraphicParticle(clip.body_mc, "wheelLeft");
var _local3 = getParticle("wheelRight").curr.angleTo_Deg(getParticle("wheelLeft").curr);
clip.body_mc._rotation = _local3;
}
}
Symbol 1247 MovieClip [__Packages.com.games.pencilRacer.packages.ShapesPackageDefault] Frame 0
class com.games.pencilRacer.packages.ShapesPackageDefault
{
function ShapesPackageDefault () {
}
static function getCurrentShapeName() {
return(getObjects()[shape]);
}
static function getObjects() {
return(defaultShapes);
}
static function getDescriptions() {
return(["shape_bear", "shape_birds", "shape_bug00", "shape_bug02", "shape_bug03", "shape_bug", "shape_dragon", "shape_flower", "shape_frog", "shape_gator2", "shape_gator", "shape_horse", "shape_jollyroger", "shape_lizard01", "shape_simplestar", "shape_snake", "shape_snake2", "shape_spider", "shape_star", "shape_sun1", "shape_sun", "shape_turtle", "SG14449", "SGNJR017", "SGNJR039", "SGNPK079", "SGNRD026", "80T_TRAF", "CLP00072", "CROSSWLK", "CS005214", "ONEWAY", "QE06030B", "qe06086c"]);
}
static var shape = 0;
static var defaultShapes = ["shape_bear", "shape_birds", "shape_bug00", "shape_bug02", "shape_bug03", "shape_bug", "shape_dragon", "shape_flower", "shape_frog", "shape_gator2", "shape_gator", "shape_horse", "shape_jollyroger", "shape_lizard01", "shape_simplestar", "shape_snake", "shape_snake2", "shape_spider", "shape_star", "shape_sun1", "shape_sun", "shape_turtle", "SG14449", "SGNJR017", "SGNJR039", "SGNPK079", "SGNRD026", "80T_TRAF", "CLP00072", "CROSSWLK", "CS005214", "ONEWAY", "QE06030B", "qe06086c"];
}
Symbol 1248 MovieClip [__Packages.com.games.pencilRacer.gui.Interface] Frame 0
class com.games.pencilRacer.gui.Interface extends com.jjcorreia.application.ui.SkinBase
{
var gameClip, controlClip, guiClip, modalClip, getHolder, __get__clip;
function Interface (clip, gameClip) {
super(clip);
this.gameClip = gameClip;
controlClip = gameClip.createEmptyMovieClip("control", gameClip.getNextHighestDepth());
controlClip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, main_out);
resume();
}
function pause() {
Mouse.removeListener(this);
}
function resume() {
Mouse.addListener(this);
}
function init(clip) {
guiClip = gameClip.getCurrentGUI();
modalClip = getHolder("disabler");
trace("this.modalClip " + modalClip);
}
function doCursorCheck() {
main_out();
main_over();
}
function main_out() {
if (gameClip.simulating) {
return(undefined);
}
if (guiClip.hitTest(__get__clip()._xmouse, __get__clip()._ymouse, true) || (modalClip.hitTest(__get__clip()._xmouse, __get__clip()._ymouse, true))) {
gameClip.Cursor.hide();
controlClip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, main_over);
}
}
function main_over() {
if (gameClip.simulating) {
return(undefined);
}
if ((gameClip.Cursor.isRunning && (!guiClip.hitTest(__get__clip()._xmouse, __get__clip()._ymouse, true))) && (!modalClip.hitTest(__get__clip()._xmouse, __get__clip()._ymouse, true))) {
gameClip.Cursor.show();
controlClip.onMouseMove = com.jjcorreia.utils.Delegate.create(this, main_out);
}
}
}
Symbol 1249 MovieClip [__Packages.com.games.pencilRacer.input.GameCursor] Frame 0
class com.games.pencilRacer.input.GameCursor extends com.jjcorreia.input.MouseCursor
{
var clip;
function GameCursor () {
super();
}
function init() {
clip.x_mc._visible = false;
}
}
Symbol 1250 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.TutorialReminder] Frame 0
class com.games.pencilRacer.gui.dialogs.TutorialReminder extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, __set__alpha, setMain, clip, myDelay, alpha, __get__alpha, pause, destroy;
function TutorialReminder (simpleMode) {
super(0, 0, (simpleMode ? "gui_simple" : "gui"), "TutorialReminder", false);
create();
__set__alpha(-100);
setMain(fadeIn);
clip.onRelease = com.jjcorreia.utils.Delegate.create(this, showTutorial);
myDelay = new com.jjcorreia.utils.Delay(DISPLAY_DURATION, this, close);
clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, close);
}
function showTutorial() {
close();
com.jjcorreia.display.jObject.App.showTutorial();
}
function fadeIn() {
alpha = alpha + FADE_SPEED;
if (__get__alpha() >= 100) {
pause();
}
}
function fadeOut() {
alpha = alpha - FADE_SPEED;
if (__get__alpha() <= 0) {
destroy();
}
}
function close() {
myDelay.destroy();
setMain(fadeOut);
}
var FADE_SPEED = 7;
var DISPLAY_DURATION = 5;
}
Symbol 1251 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Confirmation] Frame 0
class com.games.pencilRacer.gui.dialogs.Confirmation extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, method, clip, close;
function Confirmation (method) {
super(0, 0, "modals", "Confirmation", true);
create();
init();
this.method = method;
clip.yes_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, execute);
clip.no_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
}
function execute() {
method();
close();
}
}
Symbol 1252 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Options] Frame 0
class com.games.pencilRacer.gui.dialogs.Options extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, close, clip, hide, show;
function Options () {
super(0, 0, "modals", "Options", true);
create();
super.init();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.mute_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleMute);
clip.music_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleMusic);
clip.sound_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, toggleSound);
clip.music_mc.gotoAndStop((_global.soundPanel.MusicOff ? 2 : 1));
clip.sound_mc.gotoAndStop((_global.soundPanel.SoundOff ? 2 : 1));
clip.mute_mc.gotoAndStop((_global.soundPanel.GlobalOff ? 2 : 1));
com.jjcorreia.gui.ToolTip.registerTip(clip.music_btn, com.games.pencilRacer.config.TipText.MUTE_MUSIC);
com.jjcorreia.gui.ToolTip.registerTip(clip.sound_btn, com.games.pencilRacer.config.TipText.MUTE_SOUND);
com.jjcorreia.gui.ToolTip.registerTip(clip.mute_btn, com.games.pencilRacer.config.TipText.MUTE_ALL);
hide();
var _local4 = new com.jjcorreia.utils.Delay(0.1, this, init);
}
function init() {
clip.paperOn_mc.addListener(this);
clip.paperOff_mc.addListener(this);
com.jjcorreia.gui.ToolTip.registerTip(clip.simple_mc, com.games.pencilRacer.config.TipText.MODE_SIMPLE);
com.jjcorreia.gui.ToolTip.registerTip(clip.paperOn_mc, com.games.pencilRacer.config.TipText.BG_PAPER_ON);
com.jjcorreia.gui.ToolTip.registerTip(clip.paperOff_mc, com.games.pencilRacer.config.TipText.BG_PAPER_OFF);
if (com.jjcorreia.display.jObject.App.useBGpaper) {
clip.paperOn_mc.selected = true;
} else {
clip.paperOff_mc.selected = true;
}
show();
}
function setMode(simple) {
com.jjcorreia.display.jObject.App.simpleMode = simple;
com.jjcorreia.display.jObject.App.initGuiMode();
close();
}
function change(target) {
com.jjcorreia.display.jObject.App.setBGColor(Number("0x" + target.getRGB()));
}
function click(b) {
switch (b.group) {
case "paper" :
com.jjcorreia.display.jObject.App.showBGPaper(b == clip.paperOn_mc);
break;
case "mode" :
setMode(b == clip.simple_mc);
}
}
function toggleMute() {
var _local3 = _global.soundPanel.toggleGlobalMute();
clip.mute_mc.gotoAndStop((_local3 ? 2 : 1));
com.jjcorreia.display.jObject.App.cookie.save("globalMute", _local3);
com.jjcorreia.display.jObject.App.simpleControl.update();
}
function toggleMusic() {
var _local3 = _global.soundPanel.toggleMusic();
clip.music_mc.gotoAndStop((_local3 ? 2 : 1));
com.jjcorreia.display.jObject.App.cookie.save("musicMuted", _local3);
}
function toggleSound() {
var _local3 = _global.soundPanel.toggleSound();
clip.sound_mc.gotoAndStop((_local3 ? 2 : 1));
com.jjcorreia.display.jObject.App.cookie.save("soundMuted", _local3);
}
}
Symbol 1253 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Credits] Frame 0
class com.games.pencilRacer.gui.dialogs.Credits extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, close, clip;
function Credits () {
super(0, 0, "modals", "Credits", true);
create();
init();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
}
}
Symbol 1254 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.TutorialSimple] Frame 0
class com.games.pencilRacer.gui.dialogs.TutorialSimple extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, clip, __set__alpha, setMain, alpha, __get__alpha, pause, destroy;
function TutorialSimple () {
super(0, 0, "gui2", "TutorialSimple", false);
create();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.closeTutorial);
__set__alpha(-100);
setMain(fadeIn);
var _local3 = com.jjcorreia.application.AppBase.__get__clip();
_local3.simpleVehicle.hide();
_local3.simpleProps.hide();
_local3.simpleControl.hide();
_local3.simpleTools.hide();
}
function fadeIn() {
alpha = alpha + FADE_SPEED;
if (__get__alpha() >= 100) {
clip.play();
pause();
}
}
function fadeOut() {
alpha = alpha - FADE_SPEED;
if (__get__alpha() <= 0) {
destroy()();
}
}
function close() {
clip.stop();
setMain(fadeOut);
}
var FADE_SPEED = 7;
}
Symbol 1255 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Tutorial] Frame 0
class com.games.pencilRacer.gui.dialogs.Tutorial extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, clip, __set__alpha, setMain, alpha, __get__alpha, pause, destroy;
function Tutorial () {
super(0, 0, "gui2", "Tutorial", false);
create();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.closeTutorial);
__set__alpha(-100);
setMain(fadeIn);
}
function fadeIn() {
alpha = alpha + FADE_SPEED;
if (__get__alpha() >= 100) {
clip.play();
pause();
}
}
function fadeOut() {
alpha = alpha - FADE_SPEED;
if (__get__alpha() <= 0) {
destroy()();
}
}
function close() {
clip.stop();
setMain(fadeOut);
}
var FADE_SPEED = 7;
}
Symbol 1256 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.HelpSimple] Frame 0
class com.games.pencilRacer.gui.dialogs.HelpSimple extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, q, close, clip;
function HelpSimple () {
super(0, 0, "modals", "HelpSimple", true);
create();
init();
com.jjcorreia.display.jObject.App.closeTutorial();
q = _root._quality;
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.tutorial_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, showTut);
clip.credits_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showCredits);
clip.disabler_btn.useHandCursor = false;
display();
}
function nextPage() {
clip.nextFrame();
display();
}
function prevPage() {
clip.prevFrame();
display();
}
function display() {
_root._quality = "medium";
_root._quality = q;
clip.back_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, prevPage);
clip.next_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, nextPage);
var _local3 = new com.jjcorreia.utils.Delay(0.01, this, initPage);
clip.page_txt.text = page;
}
function initPage() {
}
function get page() {
return(clip._currentframe);
}
function showTut() {
com.jjcorreia.display.jObject.App.showTutorial();
close();
}
}
Symbol 1257 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.Help] Frame 0
class com.games.pencilRacer.gui.dialogs.Help extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, q, close, clip;
function Help ($x, $y) {
super($x, $y, "modals", "Help", true);
create();
init();
com.jjcorreia.display.jObject.App.closeTutorial();
q = _root._quality;
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.tutorial_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, showTut);
clip.credits_btn.onRelease = com.jjcorreia.utils.Delegate.create(com.jjcorreia.display.jObject.App, com.jjcorreia.display.jObject.App.showCredits);
clip.disabler_btn.useHandCursor = false;
display();
}
function nextPage() {
clip.nextFrame();
display();
}
function prevPage() {
clip.prevFrame();
display();
}
function display() {
_root._quality = "medium";
_root._quality = q;
clip.back_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, prevPage);
clip.next_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, nextPage);
var _local3 = new com.jjcorreia.utils.Delay(0.01, this, initPage);
clip.page_txt.text = page;
}
function initPage() {
switch (page) {
case 2 :
clip.track_mc.activate();
break;
case 3 :
clip.art_mc.activate();
break;
case 4 :
clip.vehicles_mc.activate();
break;
case 5 :
clip.selection_mc.activate();
clip.palette_mc.track_mc.activate();
}
}
function get page() {
return(clip._currentframe);
}
function showTut() {
com.jjcorreia.display.jObject.App.showTutorial();
close();
}
}
Symbol 1258 MovieClip [__Packages.com.games.pencilRacer.backend.Loader] Frame 0
class com.games.pencilRacer.backend.Loader extends XML
{
static var loadDialog;
var ignoreWhite, load, firstChild;
function Loader (url_id) {
super();
loadDialog = new com.games.pencilRacer.gui.dialogs.LoadServer();
ignoreWhite = true;
load((com.games.pencilRacer.backend.BackendPrefs.DOMAIN + com.games.pencilRacer.backend.BackendPrefs.LOAD_SCRIPT) + url_id);
}
function onLoad(success) {
loadDialog.close();
if (success) {
var _local2 = firstChild.childNodes[1].firstChild.nodeValue;
if (_local2) {
com.jjcorreia.application.AppBase.__get__clip().loadSave(_local2);
} else {
failure();
}
} else {
failure();
}
}
function failure() {
trace("LOAD FAILURE: 1");
var _local1 = new com.games.pencilRacer.gui.dialogs.LoadError();
}
}
Symbol 1259 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.LoadServer] Frame 0
class com.games.pencilRacer.gui.dialogs.LoadServer extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init;
function LoadServer () {
super(0, 0, "modals", "LoadServer", true);
create();
init();
}
}
Symbol 1260 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.LoadError] Frame 0
class com.games.pencilRacer.gui.dialogs.LoadError extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, close, clip;
function LoadError () {
super(0, 0, "modals", "LoadError", true);
create();
init();
clip.close_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
clip.retry_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, retry);
}
function retry() {
close();
com.jjcorreia.display.jObject.App.loadExternalTrack();
}
}
Symbol 1261 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.LoadProgress] Frame 0
class com.games.pencilRacer.gui.dialogs.LoadProgress extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, total, clip, close;
function LoadProgress () {
super(0, 0, "modals", "LoadProgress", true);
create();
init();
}
function initialize(total) {
this.total = total;
}
function display(remaining) {
var _local2 = Math.round((remaining / total) * 100);
clip.perc_txt.text = (100 - _local2) + "%";
if (_local2 == 0) {
new com.games.pencilRacer.gui.dialogs.SharedTutorial();
close();
}
}
}
Symbol 1262 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.SharedTutorial] Frame 0
class com.games.pencilRacer.gui.dialogs.SharedTutorial extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, __set__alpha, setMain, myDelay, clip, alpha, __get__alpha, pause, destroy;
function SharedTutorial () {
super(0, 0, "gui2", "SharedTutorial", false);
create();
__set__alpha(-100);
setMain(fadeIn);
myDelay = new com.jjcorreia.utils.Delay(DISPLAY_DURATION, this, close);
clip.onMouseUp = com.jjcorreia.utils.Delegate.create(this, close);
}
function fadeIn() {
alpha = alpha + FADE_SPEED;
if (__get__alpha() >= 100) {
pause();
}
}
function fadeOut() {
alpha = alpha - FADE_SPEED;
if (__get__alpha() <= 0) {
destroy();
}
}
function close() {
myDelay.destroy();
setMain(fadeOut);
}
var FADE_SPEED = 20;
var DISPLAY_DURATION = 30;
}
Symbol 1263 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.ShareFriend] Frame 0
class com.games.pencilRacer.gui.dialogs.ShareFriend extends com.games.pencilRacer.gui.dialogs.AbstractShare
{
var submit, clip, close, verifyEmail, warn, checkSpamFilter;
function ShareFriend (option) {
super("ShareFriend");
clip.submit_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, submit);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
Selection.setFocus(clip.name_txt);
_root.tabChildren = true;
clip.name_txt.tabEnabled = true;
clip.email_txt.tabEnabled = true;
clip.friendsemail_txt.tabEnabled = true;
clip.mesage_txt.tabEnabled = true;
clip.name_txt.tabIndex = 1;
clip.email_txt.tabIndex = 2;
clip.friendsemail_txt.tabIndex = 3;
clip.mesage_txt.tabIndex = 4;
}
function verify() {
clip.warn_mc._visible = false;
var _local2 = clip.name_txt.text;
var _local3 = clip.email_txt.text;
var _local4 = clip.friendsemail_txt.text;
if ((((!_local2) || (_local2.length < 1)) || (!verifyEmail(_local3))) || (!verifyEmail(_local4))) {
warn();
return(false);
}
if (!checkSpamFilter()) {
return(false);
}
return(true);
}
}
Symbol 1264 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.ShareGallery] Frame 0
class com.games.pencilRacer.gui.dialogs.ShareGallery extends com.games.pencilRacer.gui.dialogs.AbstractShare
{
var sendGallery, finalSubmit, submit, clip, close, verifyEmail, warn, checkSpamFilter;
function ShareGallery (codeOnly) {
super("ShareGallery");
sendGallery = true;
if (codeOnly) {
finalSubmit("PRXL_Code", "null@null.com", "", "", sendGallery);
return;
}
clip.submit_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, submit);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
Selection.setFocus(clip.name_txt);
_root.tabChildren = true;
clip.name_txt.tabEnabled = true;
clip.email_txt.tabEnabled = true;
clip.mesage_txt.tabEnabled = true;
clip.name_txt.tabIndex = 1;
clip.email_txt.tabIndex = 2;
clip.mesage_txt.tabIndex = 3;
}
function verify() {
clip.warn_mc._visible = false;
var _local2 = clip.name_txt.text;
var _local3 = clip.email_txt.text;
if (((!_local2) || (_local2.length < 1)) || (!verifyEmail(_local3))) {
warn();
return(false);
}
if (!checkSpamFilter()) {
return(false);
}
return(true);
}
}
Symbol 1265 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.ShareAll] Frame 0
class com.games.pencilRacer.gui.dialogs.ShareAll extends com.games.pencilRacer.gui.dialogs.AbstractShare
{
var sendGallery, submit, clip, close, verifyEmail, warn, checkSpamFilter;
function ShareAll () {
super("ShareAll");
sendGallery = true;
clip.submit_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, submit);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
Selection.setFocus(clip.name_txt);
_root.tabChildren = true;
clip.name_txt.tabEnabled = true;
clip.email_txt.tabEnabled = true;
clip.friendsemail_txt.tabEnabled = true;
clip.mesage_txt.tabEnabled = true;
clip.name_txt.tabIndex = 1;
clip.email_txt.tabIndex = 2;
clip.friendsemail_txt.tabIndex = 3;
clip.mesage_txt.tabIndex = 4;
}
function verify() {
clip.warn_mc._visible = false;
var _local2 = clip.name_txt.text;
var _local3 = clip.email_txt.text;
var _local4 = clip.friendsemail_txt.text;
if ((((!_local2) || (_local2.length < 1)) || (!verifyEmail(_local3))) || (!verifyEmail(_local4))) {
warn();
return(false);
}
if (!checkSpamFilter()) {
return(false);
}
return(true);
}
}
Symbol 1266 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.ShapesSimpleDialog] Frame 0
class com.games.pencilRacer.gui.dialogs.ShapesSimpleDialog extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, clip;
function ShapesSimpleDialog () {
super(0, 0, "modals", "ShapesSimpleDialog", true);
create();
init();
new com.games.pencilRacer.gui.palettes.panels.ShapesPanelSimple(this, clip.panels_mc);
}
}
Symbol 1267 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.ShapesPanelSimple] Frame 0
class com.games.pencilRacer.gui.palettes.panels.ShapesPanelSimple extends com.games.pencilRacer.gui.palettes.panels.VehiclesPanel
{
var parent, TOTAL_ICONS, hide, scrollAmount, vehicles, scroll, clip, show, selectedIndex, page, redisplay, __get__idOffset;
function ShapesPanelSimple (parent, holder) {
super(holder, "BigList");
this.parent = parent;
TOTAL_ICONS = 15;
hide();
}
function init() {
scrollAmount = TOTAL_ICONS;
vehicles = com.jjcorreia.application.AppBase.__get__clip().Prefs.shapes;
clip.left_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, -1);
clip.right_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, 1);
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
_local3.btn.onRelease = com.jjcorreia.utils.Delegate.create(this, selectShape, _local3, true);
_local2++;
}
displayVehicles();
displayByVehicle(com.jjcorreia.application.AppBase.__get__clip().Prefs.getCurrentShapeName());
show();
}
function selectShape(icon, userSelected) {
com.jjcorreia.application.AppBase.__get__clip().Prefs.shape = getVehicleIndex(icon.__get__vehicle());
if (userSelected) {
parent.close();
}
}
function displayByVehicle(veh) {
selectedIndex = getVehicleIndex(veh);
page = Math.floor(selectedIndex / TOTAL_ICONS);
displayVehicles();
redisplay();
}
function getVehicleIndex(veh) {
for (var _local3 in vehicles) {
if (vehicles[_local3] == veh) {
return(Number(_local3));
}
}
return(0);
}
function displayVehicles() {
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
var _local4 = vehicles[_local2 + __get__idOffset()];
if (_local4) {
_local3.setVehicle(_local4);
_local3._visible = true;
} else {
_local3._visible = false;
}
_local2++;
}
}
}
Symbol 1268 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.TrackPartsDialog] Frame 0
class com.games.pencilRacer.gui.dialogs.TrackPartsDialog extends com.games.pencilRacer.gui.dialogs.Dialog
{
var create, init, clip;
function TrackPartsDialog () {
super(0, 0, "modals", "TrackPartsDialog", true);
create();
init();
new com.games.pencilRacer.gui.palettes.panels.TrackPartsSimple(this, clip.panels_mc);
}
}
Symbol 1269 MovieClip [__Packages.com.games.pencilRacer.gui.palettes.panels.TrackPartsSimple] Frame 0
class com.games.pencilRacer.gui.palettes.panels.TrackPartsSimple extends com.games.pencilRacer.gui.palettes.panels.ShapesPanelSimple
{
var scrollAmount, TOTAL_ICONS, vehicles, scroll, clip, displayVehicles, displayByVehicle, show, getVehicleIndex, parent;
function TrackPartsSimple (parent, holder) {
super(parent, holder);
}
function init() {
scrollAmount = TOTAL_ICONS;
vehicles = com.jjcorreia.application.AppBase.__get__clip().Prefs.track;
clip.left_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, -1);
clip.right_btn.onPress = com.jjcorreia.utils.Delegate.create(this, scroll, 1);
var _local2 = 0;
while (_local2 < TOTAL_ICONS) {
var _local3 = clip["icon" + _local2];
_local3.btn.onRelease = com.jjcorreia.utils.Delegate.create(this, selectShape, _local3, true);
_local2++;
}
displayVehicles();
displayByVehicle(com.jjcorreia.application.AppBase.__get__clip().Prefs.getCurrentShapeName());
show();
}
function selectShape(icon, userSelected) {
com.jjcorreia.application.AppBase.__get__clip().Prefs.trackPart = getVehicleIndex(icon.__get__vehicle());
if (userSelected) {
parent.close();
}
}
}
Symbol 1270 MovieClip [__Packages.com.jjcorreia.geom.SegmentMath] Frame 0
class com.jjcorreia.geom.SegmentMath
{
function SegmentMath () {
}
static function segmentIntersection(a0, a1, b0, b1) {
var _local1 = a1.difference(a0);
var _local4 = b1.difference(b0);
var _local2 = a0.difference(b0);
var _local9 = (_local4.x * _local2.y) - (_local4.y * _local2.x);
var _local6 = (_local1.x * _local2.y) - (_local1.y * _local2.x);
var _local5 = (_local4.y * _local1.x) - (_local4.x * _local1.y);
if (_local5 != 0) {
var _local3 = _local9 / _local5;
var _local7 = _local6 / _local5;
if ((((_local3 >= 0) && (_local3 <= 1)) && (_local7 >= 0)) && (_local7 <= 1)) {
return(new com.jjcorreia.geom.Vector(a0.x + (_local3 * _local1.x), a0.y + (_local3 * _local1.y)));
}
return(null);
}
return(null);
}
static function segmentsIntersect(a0, a1, b0, b1) {
var _local3 = a1.difference(a0);
var _local2 = b1.difference(b0);
var _local1 = a0.difference(b0);
var _local8 = (_local2.x * _local1.y) - (_local2.y * _local1.x);
var _local7 = (_local3.x * _local1.y) - (_local3.y * _local1.x);
var _local4 = (_local2.y * _local3.x) - (_local2.x * _local3.y);
if (_local4 != 0) {
var _local6 = _local8 / _local4;
var _local5 = _local7 / _local4;
if ((((_local6 >= 0) && (_local6 <= 1)) && (_local5 >= 0)) && (_local5 <= 1)) {
return(true);
}
}
return(false);
}
static function segmentsIntersect2(v0, v1) {
var _local1 = v0.difference(v1);
var _local8 = (v1.x * _local1.y) - (v1.y * _local1.x);
var _local7 = (v0.x * _local1.y) - (v0.y * _local1.x);
var _local3 = (v1.y * v0.x) - (v1.x * v0.y);
if (_local3 != 0) {
var _local6 = _local8 / _local3;
var _local5 = _local7 / _local3;
if ((((_local6 >= 0) && (_local6 <= 1)) && (_local5 >= 0)) && (_local5 <= 1)) {
return(true);
}
}
return(false);
}
static function circleLine(p, r, a0, a1) {
var _local6 = ((a1.x - a0.x) * (a1.x - a0.x)) + ((a1.y - a0.y) * (a1.y - a0.y));
var _local3 = 2 * (((a1.x - a0.x) * (a0.x - p.x)) + ((a1.y - a0.y) * (a0.y - p.y)));
var _local10 = (((((p.x * p.x) + (p.y * p.y)) + (a0.x * a0.x)) + (a0.y * a0.y)) - (2 * ((p.x * a0.x) + (p.y * a0.y)))) - (r * r);
var _local5 = (_local3 * _local3) - ((4 * _local6) * _local10);
if ((_local5 < 0) || (_local5 == 0)) {
return(false);
}
var _local7 = Math.sqrt(_local5);
var _local9 = ((-_local3) + _local7) / (2 * _local6);
var _local8 = ((-_local3) - _local7) / (2 * _local6);
if (((_local9 < 0) || (_local9 > 1)) && ((_local8 < 0) || (_local8 > 1))) {
return(false);
}
return(true);
}
}
Symbol 1271 MovieClip [__Packages.com.games.pencilRacer.gui.components.ExpandMenu] Frame 0
class com.games.pencilRacer.gui.components.ExpandMenu extends MovieClip
{
var items_array, mode, tip, parent, icon_mc, main_mc, hitTest, onMouseMove;
function ExpandMenu () {
super();
items_array = new Array();
var _local5 = 0;
while (_local5 < initialItems) {
var _local3 = this["item" + _local5];
var _local4 = this["icon" + _local5];
_local3.__x = _local3._x;
_local3.__y = _local3._y;
_local4.__x = _local4._x;
_local4.__y = _local4._y;
_local3._visible = false;
_local4._visible = false;
_local5++;
}
close();
}
function setMode(mode, tip) {
this.mode = mode;
if (tip != undefined) {
this.tip = tip;
}
setMainIcon(mode, tip);
com.jjcorreia.application.AppBase.__get__clip().physicsEnabled = true;
com.jjcorreia.application.AppBase.__get__clip().setMode(mode, parent);
close();
}
function setIcon(id, frame, tip) {
this["icon" + id].gotoAndStop(frame);
this["item" + id].onRelease = com.jjcorreia.utils.Delegate.create(this, setMode, frame, tip);
if (tip) {
com.jjcorreia.gui.ToolTip.registerTip(this["item" + id], tip);
}
}
function setMainIcon(mode, tip) {
this.mode = mode;
if (tip != undefined) {
this.tip = tip;
}
icon_mc.gotoAndStop(mode);
activeMainBtn();
}
function select() {
main_mc.gotoAndStop(2);
activeMainBtn();
}
function deselect() {
main_mc.gotoAndStop(1);
activeMainBtn();
}
function activeMainBtn() {
main_mc.main_btn.onRollOver = com.jjcorreia.utils.Delegate.create(this, open);
main_mc.main_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, setMode, mode);
if ((totalItems == 0) && (tip != undefined)) {
com.jjcorreia.gui.ToolTip.registerTip(main_mc.main_btn, tip);
}
}
function checkClosed() {
if (!hitTest(_root._xmouse, _root._ymouse, true)) {
close();
}
}
function open() {
showItems();
onMouseMove = com.jjcorreia.utils.Delegate.create(this, checkClosed);
}
function close() {
activeMainBtn();
onMouseMove = null;
hideItems();
}
function hideItems() {
main_mc.back_mc._visible = false;
var _local2 = 0;
while (_local2 < totalItems) {
var _local3 = this["item" + _local2];
var _local4 = this["icon" + _local2];
_local3._x = 0;
_local3._y = 0;
_local4._x = 0;
_local4._y = 0;
_local3._visible = false;
_local4._visible = false;
_local2++;
}
}
function hideAll() {
var _local2 = 0;
while (_local2 < initialItems) {
var _local3 = this["item" + _local2];
var _local4 = this["icon" + _local2];
_local3._x = 0;
_local3._y = 0;
_local4._x = 0;
_local4._y = 0;
_local3._visible = false;
_local4._visible = false;
_local2++;
}
}
function showItems() {
main_mc.back_mc._visible = true;
var _local4 = 0;
while (_local4 < totalItems) {
var _local2 = this["item" + _local4];
var _local3 = this["icon" + _local4];
_local2._x = _local2.__x;
_local2._y = _local2.__y;
_local3._x = _local3.__x;
_local3._y = _local3.__y;
_local2._visible = true;
_local3._visible = true;
_local4++;
}
}
var totalItems = 2;
var initialItems = 2;
}
Symbol 1272 MovieClip [__Packages.com.games.pencilRacer.gui.components.ExpandMenuMode] Frame 0
class com.games.pencilRacer.gui.components.ExpandMenuMode extends MovieClip
{
var b0_btn, t0_mc, t1_mc, b1_btn, hitTest, gotoAndStop, onMouseMove;
function ExpandMenuMode () {
super();
new com.jjcorreia.utils.Delay(0.1, this, init);
b0_btn.onRollOver = com.jjcorreia.utils.Delegate.create(this, open);
}
function init() {
setIcons();
}
function setIcons() {
if (com.jjcorreia.application.AppBase.__get__clip().physicsEnabled) {
t0_mc.gotoAndStop(2);
t1_mc.gotoAndStop(1);
b1_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, togglePhysics, false);
com.jjcorreia.gui.ToolTip.registerTip(b1_btn, com.games.pencilRacer.config.TipText.ART_MODE_TIP);
} else {
t0_mc.gotoAndStop(1);
t1_mc.gotoAndStop(2);
b1_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, togglePhysics, true);
com.jjcorreia.gui.ToolTip.registerTip(b1_btn, com.games.pencilRacer.config.TipText.TRACK_MODE_TIP);
}
}
function togglePhysics(val) {
com.jjcorreia.application.AppBase.__get__clip().togglePhysics(val);
setIcons();
}
function checkClosed() {
if (!hitTest(_root._xmouse, _root._ymouse, true)) {
close();
}
}
function open() {
b0_btn.disable(25);
gotoAndStop(2);
onMouseMove = com.jjcorreia.utils.Delegate.create(this, checkClosed);
setIcons();
}
function close() {
b0_btn.enable();
com.jjcorreia.gui.ToolTip.hideTip();
gotoAndStop(1);
onMouseMove = null;
}
var totalItems = 2;
var initialItems = 2;
}
Symbol 1273 MovieClip [__Packages.com.jjcorreia.display.Scale9Button] Frame 0
class com.jjcorreia.display.Scale9Button extends MovieClip
{
var _parent, _width, _height;
function Scale9Button () {
super();
if (!_parent.sx) {
_parent.sx = _parent._xscale;
}
if (!_parent.sy) {
_parent.sy = _parent._yscale;
}
_width = _width * (_parent.sx / 100);
_height = _height * (_parent.sy / 100);
_parent._xscale = 100;
_parent._yscale = 100;
}
}
Symbol 1274 MovieClip [__Packages.com.games.pencilRacer.apps.VersionChecker] Frame 0
class com.games.pencilRacer.apps.VersionChecker
{
function VersionChecker () {
}
static function meetsRequirements() {
var _local1 = com.jjcorreia.utils.FileInfo.getFlashMajorVersion();
return(_local1 >= MIN_VERSION);
}
static var MIN_VERSION = 8;
}
Symbol 1275 MovieClip [__Packages.com.games.pencilRacer.apps.GameTmobile] Frame 0
class com.games.pencilRacer.apps.GameTmobile extends com.games.pencilRacer.apps.Game
{
var _quality, simpleControl, share;
function GameTmobile () {
super(com.games.pencilRacer.config.PreferencesTmobile);
_quality = "best";
}
function initUI() {
super.initUI();
simpleControl.clip.submit_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, submit);
com.jjcorreia.gui.ToolTip.registerTip(simpleControl.clip.submit_btn, SUBMIT_TIP);
}
function submit() {
if (com.jjcorreia.application.AppBase.__get__clip().validateTrack()) {
share = new com.games.pencilRacer.gui.dialogs.SubmitTmobile();
}
}
var SUBMIT_TIP = "Submit your track to win!";
}
Symbol 1276 MovieClip [__Packages.com.games.pencilRacer.config.PreferencesTmobile] Frame 0
class com.games.pencilRacer.config.PreferencesTmobile extends com.games.pencilRacer.config.PreferencesGame
{
var vehicles, vehDesc, shapes, track, trackDesc;
function PreferencesTmobile () {
super();
com.games.pencilRacer.config.PreferencesGame.SHAPE_SIZE = 250;
init();
}
function init() {
vehicles = com.games.pencilRacer.packages.VehiclePackageTmobile.getObjects();
vehDesc = com.games.pencilRacer.packages.VehiclePackageTmobile.getVehicleDescriptions();
shapes = com.games.pencilRacer.packages.ShapesPackageTmobile.getObjects();
track = com.games.pencilRacer.packages.TrackPartsTmobile.getObjects();
trackDesc = com.games.pencilRacer.packages.TrackPartsTmobile.getDescriptions();
}
}
Symbol 1277 MovieClip [__Packages.com.games.pencilRacer.packages.VehiclePackageTmobile] Frame 0
class com.games.pencilRacer.packages.VehiclePackageTmobile
{
function VehiclePackageTmobile () {
}
static function getObjects() {
return(["KidSkater", "MonkeySkater", "BotSkater"]);
}
static function getVehicleDescriptions() {
return(["Skater Kid", "Monkey Skater", "Robot Skater"]);
}
}
Symbol 1278 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.SkaterVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.SkaterVehicle extends com.games.pencilRacer.objects.vehicles.Vehicle
{
var create, attachTemplate, templateInit, state, lScale, clip, sound_id, multipleImpactSounds, soundPlaying, currImpactSound, playSound, syncGraphicParticle, syncGraphicConstraint, syncParticleRotation;
function SkaterVehicle (pos, graphic) {
super(pos, graphic, true);
create();
attachTemplate();
var _local3 = new com.jjcorreia.utils.Delay(0.05, this, templateInit);
state.impactThreshold = 2;
state.airTimeThreshold = 300;
state.accelThreshold = 5;
lScale = clip.skater._xscale;
}
function vehicle_impact(speedDiff) {
_global.soundPanel.stopSound(sound_id + com.games.pencilRacer.config.SoundConfig.SUFFIX_AIR);
var _local5 = Math.min(150, Math.round(((-speedDiff) / 40) * 150));
var _local3 = sound_id + com.games.pencilRacer.config.SoundConfig.SUFFIX_IMPACT;
if (multipleImpactSounds || (!soundPlaying)) {
currImpactSound = _local3;
playSound(_local3, _local5);
}
if (clip.skater.airAnim || (clip.skater._currentframe == 1)) {
if (speedDiff < -40) {
clip.skater.gotoAndPlay("landBig");
} else if (speedDiff < -15) {
clip.skater.gotoAndPlay("land");
}
}
}
function vehicle_post_air() {
clip.skater.gotoAndPlay("land");
}
function vehicle_accel(speedDiff) {
if ((!state.inAir) && (clip.skater._currentframe == 1)) {
clip.skater.gotoAndPlay("accel");
}
}
function vehicle_air() {
super.vehicle_air();
if (state.lastSpeed.y < 0) {
clip.skater.gotoAndPlay("air");
}
}
function Main() {
super.Main();
if (state.lastSpeed.x > 2) {
clip.skater._xscale = lScale;
} else if (state.lastSpeed.x < -2) {
clip.skater._xscale = -lScale;
}
syncGraphicParticle(clip.skater, "center", false);
syncGraphicConstraint(clip.skater, "wheelRight~wheelLeft");
syncParticleRotation(clip.skater.board.left, "wheelLeft");
syncParticleRotation(clip.skater.board.right, "wheelRight");
}
}
Symbol 1279 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.BotSkaterVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.BotSkaterVehicle extends com.games.pencilRacer.objects.vehicles.SkaterVehicle
{
var sound_id;
function BotSkaterVehicle (pos) {
super(pos, "BotSkaterGraphic", true);
sound_id = "botSkater";
}
}
Symbol 1280 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.MonkeySkaterVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.MonkeySkaterVehicle extends com.games.pencilRacer.objects.vehicles.SkaterVehicle
{
var sound_id;
function MonkeySkaterVehicle (pos) {
super(pos, "MonkeySkaterGraphic", true);
sound_id = "monkeySkater";
}
}
Symbol 1281 MovieClip [__Packages.com.games.pencilRacer.objects.vehicles.KidSkaterVehicle] Frame 0
class com.games.pencilRacer.objects.vehicles.KidSkaterVehicle extends com.games.pencilRacer.objects.vehicles.SkaterVehicle
{
var sound_id;
function KidSkaterVehicle (pos) {
super(pos, "KidSkaterGraphic", true);
sound_id = "kidSkater";
}
}
Symbol 1282 MovieClip [__Packages.com.games.pencilRacer.packages.ShapesPackageTmobile] Frame 0
class com.games.pencilRacer.packages.ShapesPackageTmobile
{
function ShapesPackageTmobile () {
}
static function getObjects() {
return(defaultShapes);
}
static var defaultShapes = ["SK_THawk_FrontC", "SK_THawk_FrontO", "SK_THawk_LClose", "SK_THawk_LOpen", "SK_THawk_ROpen", "HawkLogo", "WoodPlank", "BlackBar"];
}
Symbol 1283 MovieClip [__Packages.com.games.pencilRacer.packages.TrackPartsTmobile] Frame 0
class com.games.pencilRacer.packages.TrackPartsTmobile
{
function TrackPartsTmobile () {
}
static function getObjects() {
return(["quarter1", "quarter2", "box", "BoxLong", "rail2", "rail3", "rail4", "ramp1", "ramp2", "ramp3", "ramp4"]);
}
static function getDescriptions() {
return(["quarter1", "quarter2", "box", "BoxLong", "rail2", "rail3", "rail4", "ramp1", "ramp2", "ramp3", "ramp4"]);
}
}
Symbol 1284 MovieClip [__Packages.com.games.pencilRacer.gui.dialogs.SubmitTmobile] Frame 0
class com.games.pencilRacer.gui.dialogs.SubmitTmobile extends com.games.pencilRacer.gui.dialogs.AbstractShare
{
var sendGallery, clip, alignCenter, close, my_lv, done, verifyEmail, checkSpamFilter;
function SubmitTmobile () {
super("SubmitTmobile");
sendGallery = true;
begin();
}
function begin() {
clip.gotoAndStop(1);
alignCenter();
var _local4 = [clip.track_txt, clip.name_txt, clip.lastname_txt, clip.month_mc, clip.email_txt, clip.street_txt, clip.city_txt, clip.zip_txt, clip.phone_txt];
clip.submit_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, submit);
clip.cancel_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, close);
Selection.setFocus(_local4[0]);
_root.tabChildren = true;
var _local3 = 0;
while (_local3 < _local4.length) {
_local4[_local3].tabEnabled = true;
_local4[_local3].tabIndex = _local3;
_local3++;
}
clip.zip_txt.restrict = "0-9";
clip.phone_txt.restrict = "0-9\\-";
clip.state_mc.setStyle("fontSize", 11);
clip.month_mc.setStyle("fontSize", 11);
clip.day_mc.setStyle("fontSize", 11);
clip.year_mc.setStyle("fontSize", 11);
clip.onEnterFrame = com.jjcorreia.utils.Delegate.create(this, initComp);
}
function initComp() {
delete clip.onEnterFrame;
var _local3 = [clip.track_txt, clip.name_txt, clip.lastname_txt, clip.email_txt, clip.street_txt, clip.city_txt, clip.zip_txt, clip.phone_txt];
var _local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2].text = savedData[_local3[_local2]._name] || "";
_local2++;
}
if (clip.track_txt.text.length == 0) {
clip.track_txt.text = com.jjcorreia.application.AppBase.__get__clip().title || "";
}
clip.state_mc.dataProvider = stateData;
clip.month_mc.dataProvider = months;
var _local4 = new Array();
var _local5 = 1996;
_local2 = 1930;
while (_local2 < _local5) {
_local4.push(_local2);
_local2++;
}
_local4.reverse();
clip.year_mc.dataProvider = _local4;
clip.month_mc.addEventListener("change", this);
clip.day_mc.addEventListener("change", this);
clip.year_mc.addEventListener("change", this);
clip.state_mc.addEventListener("change", this);
clip.month_mc.selectedIndex = savedData.month_mc || 0;
clip.day_mc.selectedIndex = savedData.day_mc || 0;
clip.year_mc.selectedIndex = savedData.year_mc || 0;
clip.state_mc.selectedIndex = savedData.state_mc || 0;
change({target:clip.month_mc});
}
function change(eventObject) {
savedData[eventObject.target._name] = eventObject.target.selectedIndex;
switch (eventObject.target._name) {
case "month_mc" :
var _local3 = new Array();
var _local4 = Number(months[eventObject.target.selectedIndex].data);
var _local2 = 1;
while (_local2 < (_local4 + 1)) {
_local3.push(_local2);
_local2++;
}
clip.day_mc.dataProvider = _local3;
clip.day_mc.selectedIndex = savedData.day_mc;
break;
case "day_mc" :
}
}
function submit() {
var _local3 = [clip.track_txt, clip.name_txt, clip.lastname_txt, clip.email_txt, clip.street_txt, clip.city_txt, clip.zip_txt, clip.phone_txt];
var _local2 = 0;
while (_local2 < _local3.length) {
savedData[_local3[_local2]._name] = _local3[_local2].text;
_local2++;
}
if (verify()) {
finalSubmit();
}
}
function finalSubmit() {
var _local3 = (((clip.year_mc.text + "-") + (clip.month_mc.selectedIndex + 1)) + "-") + clip.day_mc.text;
var _local2 = clip.state_mc.selectedItem.data;
my_lv = new com.games.pencilRacer.backend.SubmitterTmobile(clip.track_txt.text, clip.name_txt.text, clip.lastname_txt.text, clip.email_txt.text, clip.street_txt.text, clip.city_txt.text, _local2, clip.zip_txt.text, _local3, clip.phone_txt.text, sendGallery, this, done);
alignCenter();
}
function verify() {
clip.warn_mc._visible = false;
var _local4 = [clip.track_txt, clip.name_txt, clip.lastname_txt, clip.email_txt, clip.street_txt, clip.city_txt, clip.zip_txt, clip.phone_txt];
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].text;
if ((!_local3) || (_local3.length < 1)) {
warn();
return(false);
}
_local2++;
}
if ((!verifyEmail(clip.email_txt)) || (!clip.agree_mc.selected)) {
warn();
return(false);
}
if (!checkSpamFilter()) {
return(false);
}
return(true);
}
function warn() {
clip.gotoAndStop("oops");
alignCenter();
clip.ok_btn.onRelease = com.jjcorreia.utils.Delegate.create(this, begin);
}
var stateData = new Array({data:"AK", label:"Alaska"}, {data:"AL", label:"Alabama"}, {data:"AR", label:"Arkansas"}, {data:"AZ", label:"Arizona"}, {data:"CA", label:"California"}, {data:"CO", label:"Colorado"}, {data:"CT", label:"Connecticut"}, {data:"DE", label:"Delaware"}, {data:"FL", label:"Florida"}, {data:"GA", label:"Georgia"}, {data:"HI", label:"Hawaii"}, {data:"IA", label:"Iowa"}, {data:"ID", label:"Idaho"}, {data:"IL", label:"Illinois"}, {data:"IN", label:"Indiana"}, {data:"KS", label:"Kansas"}, {data:"KY", label:"Kentucky"}, {data:"LA", label:"Louisiana"}, {data:"MA", label:"Massachusetts"}, {data:"MD", label:"Maryland"}, {data:"ME", label:"Maine"}, {data:"MI", label:"Michigan"}, {data:"MN", label:"Minnesota"}, {data:"MS", label:"Mississippi"}, {data:"MO", label:"Missouri"}, {data:"MT", label:"Montana"}, {data:"NC", label:"North Carolina"}, {data:"ND", label:"North Dakota"}, {data:"NE", label:"Nebraska"}, {data:"NH", label:"New Hampshire"}, {data:"NJ", label:"New Jersey"}, {data:"NM", label:"New Mexico"}, {data:"NV", label:"Nevada"}, {data:"NY", label:"New York"}, {data:"OH", label:"Ohio"}, {data:"OK", label:"Oklahoma"}, {data:"OR", label:"Oregon"}, {data:"PA", label:"Pennsylvania"}, {data:"RI", label:"Rhode Island"}, {data:"SC", label:"South Carolina"}, {data:"SD", label:"South Dakota"}, {data:"TN", label:"Tennessee"}, {data:"TX", label:"Texas"}, {data:"UT", label:"Utah"}, {data:"VA", label:"Virginia"}, {data:"VT", label:"Vermont"}, {data:"WA", label:"Washington"}, {data:"WI", label:"Wisconsin"}, {data:"WV", label:"West Virginia"}, {data:"WY", label:"Wyoming"});
var months = [{label:"January", data:"31"}, {label:"February", data:"29"}, {label:"March", data:"31"}, {label:"April", data:"30"}, {label:"May", data:"31"}, {label:"June", data:"30"}, {label:"July", data:"31"}, {label:"August", data:"31"}, {label:"September", data:"30"}, {label:"October", data:"31"}, {label:"November", data:"30"}, {label:"December", data:"31"}];
static var savedData = new Object();
}
Symbol 1285 MovieClip [__Packages.com.games.pencilRacer.backend.SubmitterTmobile] Frame 0
class com.games.pencilRacer.backend.SubmitterTmobile extends LoadVars
{
var game_id, game_name, first_name, last_name, email, street, city, state, zip_code, date_of_birth, phone_number, saveString, sendGallery, sendAndLoad;
function SubmitterTmobile (game_name, first_name, last_name, email, street, city, state, zip_code, date_of_birth, phone_number, sendGallery, scope, callBack) {
super();
game_id = GAME_ID;
this.game_name = game_name;
this.first_name = first_name;
this.last_name = last_name;
this.email = email;
this.street = street;
this.city = city;
this.state = state;
this.zip_code = zip_code;
this.date_of_birth = date_of_birth;
this.phone_number = phone_number;
saveString = (new com.games.pencilRacer.apps.saves.DefaultSave()).data;
this.sendGallery = sendGallery;
var _local3 = new LoadVars();
_local3.onLoad = function (success) {
callBack.apply(scope, [success, this]);
};
sendAndLoad(com.games.pencilRacer.backend.BackendPrefs.DOMAIN + com.games.pencilRacer.backend.BackendPrefs.SUBMIT_SCRIPT, _local3, "POST");
}
static var GAME_ID = 5066;
}
Symbol 329 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local2 = __width;
var _local3 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local2, oldHeight:_local3});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = createObject(className.symbolOwner.symbolName, id, depth, initobj);
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.127";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 330 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 331 MovieClip [__Packages.mx.controls.listclasses.DataSelector] Frame 0
class mx.controls.listclasses.DataSelector extends Object
{
var __vPosition, setVPosition, __dataProvider, enabled, lastSelID, lastSelected, selected, invUpdateControl, invalidate, multipleSelection, updateControl, __rowCount, rows;
function DataSelector () {
super();
}
static function Initialize(obj) {
var _local3 = mixinProps;
var _local4 = _local3.length;
obj = obj.prototype;
var _local1 = 0;
while (_local1 < _local4) {
obj[_local3[_local1]] = mixins[_local3[_local1]];
_local1++;
}
mixins.createProp(obj, "dataProvider", true);
mixins.createProp(obj, "length", false);
mixins.createProp(obj, "value", false);
mixins.createProp(obj, "selectedIndex", true);
mixins.createProp(obj, "selectedIndices", true);
mixins.createProp(obj, "selectedItems", false);
mixins.createProp(obj, "selectedItem", true);
return(true);
}
function createProp(obj, propName, setter) {
var p = (propName.charAt(0).toUpperCase() + propName.substr(1));
var _local2 = null;
var _local4 = function (Void) {
return(this["get" + p]());
};
if (setter) {
_local2 = function (val) {
this["set" + p](val);
};
}
obj.addProperty(propName, _local4, _local2);
}
function setDataProvider(dP) {
if (__vPosition != 0) {
setVPosition(0);
}
clearSelected();
__dataProvider.removeEventListener(this);
__dataProvider = dP;
dP.addEventListener("modelChanged", this);
dP.addView(this);
modelChanged({eventName:"updateAll"});
}
function getDataProvider(Void) {
return(__dataProvider);
}
function addItemAt(index, label, data) {
if ((index < 0) || (!enabled)) {
return(undefined);
}
var _local2 = __dataProvider;
if (_local2 == undefined) {
_local2 = (__dataProvider = new Array());
_local2.addEventListener("modelChanged", this);
index = 0;
}
if ((typeof(label) == "object") || (typeof(_local2.getItemAt(0)) == "string")) {
_local2.addItemAt(index, label);
} else {
_local2.addItemAt(index, {label:label, data:data});
}
}
function addItem(label, data) {
addItemAt(__dataProvider.length, label, data);
}
function removeItemAt(index) {
return(__dataProvider.removeItemAt(index));
}
function removeAll(Void) {
__dataProvider.removeAll();
}
function replaceItemAt(index, newLabel, newData) {
if (typeof(newLabel) == "object") {
__dataProvider.replaceItemAt(index, newLabel);
} else {
__dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
}
}
function sortItemsBy(fieldName, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItemsBy(fieldName, order);
}
function sortItems(compareFunc, order) {
lastSelID = __dataProvider.getItemID(lastSelected);
__dataProvider.sortItems(compareFunc, order);
}
function getLength(Void) {
return(__dataProvider.length);
}
function getItemAt(index) {
return(__dataProvider.getItemAt(index));
}
function modelChanged(eventObj) {
var _local3 = eventObj.firstItem;
var _local6 = eventObj.lastItem;
var _local7 = eventObj.eventName;
if (_local7 == undefined) {
_local7 = eventObj.event;
_local3 = eventObj.firstRow;
_local6 = eventObj.lastRow;
if (_local7 == "addRows") {
_local7 = (eventObj.eventName = "addItems");
} else if (_local7 == "deleteRows") {
_local7 = (eventObj.eventName = "removeItems");
} else if (_local7 == "updateRows") {
_local7 = (eventObj.eventName = "updateItems");
}
}
if (_local7 == "addItems") {
for (var _local2 in selected) {
var _local5 = selected[_local2];
if ((_local5 != undefined) && (_local5 >= _local3)) {
selected[_local2] = selected[_local2] + ((_local6 - _local3) + 1);
}
}
} else if (_local7 == "removeItems") {
if (__dataProvider.length == 0) {
delete selected;
} else {
var _local9 = eventObj.removedIDs;
var _local10 = _local9.length;
var _local2 = 0;
while (_local2 < _local10) {
var _local4 = _local9[_local2];
if (selected[_local4] != undefined) {
delete selected[_local4];
}
_local2++;
}
for (_local2 in selected) {
if (selected[_local2] >= _local3) {
selected[_local2] = selected[_local2] - ((_local6 - _local3) + 1);
}
}
}
} else if (_local7 == "sort") {
if (typeof(__dataProvider.getItemAt(0)) != "object") {
delete selected;
} else {
var _local10 = __dataProvider.length;
var _local2 = 0;
while (_local2 < _local10) {
if (isSelected(_local2)) {
var _local4 = __dataProvider.getItemID(_local2);
if (_local4 == lastSelID) {
lastSelected = _local2;
}
selected[_local4] = _local2;
}
_local2++;
}
}
} else if (_local7 == "filterModel") {
setVPosition(0);
}
invUpdateControl = true;
invalidate();
}
function getValue(Void) {
var _local2 = getSelectedItem();
if (typeof(_local2) != "object") {
return(_local2);
}
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
}
function getSelectedIndex(Void) {
for (var _local3 in selected) {
var _local2 = selected[_local3];
if (_local2 != undefined) {
return(_local2);
}
}
}
function setSelectedIndex(index) {
if (((index >= 0) && (index < __dataProvider.length)) && (enabled)) {
delete selected;
selectItem(index, true);
lastSelected = index;
invUpdateControl = true;
invalidate();
} else if (index == undefined) {
clearSelected();
}
}
function getSelectedIndices(Void) {
var _local2 = new Array();
for (var _local3 in selected) {
_local2.push(selected[_local3]);
}
_local2.reverse();
return(((_local2.length > 0) ? (_local2) : undefined));
}
function setSelectedIndices(indexArray) {
if (multipleSelection != true) {
return(undefined);
}
delete selected;
var _local3 = 0;
while (_local3 < indexArray.length) {
var _local2 = indexArray[_local3];
if ((_local2 >= 0) && (_local2 < __dataProvider.length)) {
selectItem(_local2, true);
}
_local3++;
}
invUpdateControl = true;
updateControl();
}
function getSelectedItems(Void) {
var _local3 = getSelectedIndices();
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local3.length) {
_local4.push(getItemAt(_local3[_local2]));
_local2++;
}
return(((_local4.length > 0) ? (_local4) : undefined));
}
function getSelectedItem(Void) {
return(__dataProvider.getItemAt(getSelectedIndex()));
}
function selectItem(index, selectedFlag) {
if (selected == undefined) {
selected = new Object();
}
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (selectedFlag && (!isSelected(index))) {
selected[_local2] = index;
} else if (!selectedFlag) {
delete selected[_local2];
}
}
function isSelected(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(false);
}
return(selected[_local2] != undefined);
}
function clearSelected(transition) {
var _local3 = 0;
for (var _local4 in selected) {
var _local2 = selected[_local4];
if (((_local2 != undefined) && (__vPosition <= _local2)) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "normal", transition && ((_local3 % 3) == 0));
}
_local3++;
}
delete selected;
}
static var mixins = new mx.controls.listclasses.DataSelector();
static var mixinProps = ["setDataProvider", "getDataProvider", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "sortItemsBy", "sortItems", "getLength", "getItemAt", "modelChanged", "calcPreferredWidthFromData", "calcPreferredHeightFromData", "getValue", "getSelectedIndex", "getSelectedItem", "getSelectedIndices", "getSelectedItems", "selectItem", "isSelected", "clearSelected", "setSelectedIndex", "setSelectedIndices"];
}
Symbol 332 MovieClip [__Packages.mx.controls.ComboBase] Frame 0
class mx.controls.ComboBase extends mx.core.UIComponent
{
var getValue, tabEnabled, tabChildren, boundingBox_mc, downArrow_mc, createClassObject, onDownArrow, border_mc, __border, text_mc, focusTextField, __width, __height, getFocusManager, __get__height, height, _parent;
function ComboBase () {
super();
getValue = _getValue;
}
function init() {
super.init();
tabEnabled = !_editable;
tabChildren = _editable;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren() {
var _local3 = new Object();
_local3.styleName = this;
if (downArrow_mc == undefined) {
_local3.falseUpSkin = downArrowUpName;
_local3.falseOverSkin = downArrowOverName;
_local3.falseDownSkin = downArrowDownName;
_local3.falseDisabledSkin = downArrowDisabledName;
_local3.validateNow = true;
_local3.tabEnabled = false;
createClassObject(mx.controls.SimpleButton, "downArrow_mc", 19, _local3);
downArrow_mc.buttonDownHandler = onDownArrow;
downArrow_mc.useHandCursor = false;
downArrow_mc.onPressWas = downArrow_mc.onPress;
downArrow_mc.onPress = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = true;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onPressWas();
};
downArrow_mc.onDragOutWas = downArrow_mc.onDragOut;
downArrow_mc.onDragOut = function () {
this.trackAsMenuWas = this.trackAsMenu;
this.trackAsMenu = false;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOutWas();
};
downArrow_mc.onDragOverWas = downArrow_mc.onDragOver;
downArrow_mc.onDragOver = function () {
this.trackAsMenu = this.trackAsMenuWas;
if (!this._editable) {
this._parent.text_mc.trackAsMenu = this.trackAsMenu;
}
this.onDragOverWas();
};
}
if (border_mc == undefined) {
_local3.tabEnabled = false;
createClassObject(_global.styles.rectBorderClass, "border_mc", 17, _local3);
border_mc.move(0, 0);
__border = border_mc;
}
_local3.borderStyle = "none";
_local3.readOnly = !_editable;
_local3.tabEnabled = _editable;
if (text_mc == undefined) {
createClassObject(mx.controls.TextInput, "text_mc", 18, _local3);
text_mc.move(0, 0);
text_mc.addEnterEvents();
text_mc.enterHandler = _enterHandler;
text_mc.changeHandler = _changeHandler;
text_mc.oldOnSetFocus = text_mc.onSetFocus;
text_mc.onSetFocus = function () {
this.oldOnSetFocus();
this._parent.onSetFocus();
};
text_mc.__set__restrict("^\x1B");
text_mc.oldOnKillFocus = text_mc.onKillFocus;
text_mc.onKillFocus = function (n) {
this.oldOnKillFocus(n);
this._parent.onKillFocus(n);
};
text_mc.drawFocus = function (b) {
this._parent.drawFocus(b);
};
delete text_mc.borderStyle;
}
focusTextField = text_mc;
text_mc.owner = this;
layoutChildren(__width, __height);
}
function onKillFocus() {
super.onKillFocus();
Key.removeListener(text_mc);
getFocusManager().defaultPushButtonEnabled = true;
}
function onSetFocus() {
super.onSetFocus();
getFocusManager().defaultPushButtonEnabled = false;
Key.addListener(text_mc);
}
function setFocus() {
if (_editable) {
Selection.setFocus(text_mc);
} else {
Selection.setFocus(this);
}
}
function setSize(w, h, noEvent) {
super.setSize(w, ((h == undefined) ? (__get__height()) : (h)), noEvent);
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
downArrow_mc.enabled = enabledFlag;
text_mc.enabled = enabledFlag;
}
function setEditable(e) {
_editable = e;
if (wrapDownArrowButton == false) {
if (e) {
border_mc.borderStyle = "inset";
text_mc.borderStyle = "inset";
symbolName = "ComboBox";
invalidateStyle();
} else {
border_mc.borderStyle = "comboNonEdit";
text_mc.borderStyle = "dropDown";
symbolName = "DropDown";
invalidateStyle();
}
}
tabEnabled = !e;
tabChildren = e;
text_mc.tabEnabled = e;
if (e) {
delete text_mc.onPress;
delete text_mc.onRelease;
delete text_mc.onReleaseOutside;
delete text_mc.onDragOut;
delete text_mc.onDragOver;
delete text_mc.onRollOver;
delete text_mc.onRollOut;
} else {
text_mc.onPress = function () {
this._parent.downArrow_mc.onPress();
};
text_mc.onRelease = function () {
this._parent.downArrow_mc.onRelease();
};
text_mc.onReleaseOutside = function () {
this._parent.downArrow_mc.onReleaseOutside();
};
text_mc.onDragOut = function () {
this._parent.downArrow_mc.onDragOut();
};
text_mc.onDragOver = function () {
this._parent.downArrow_mc.onDragOver();
};
text_mc.onRollOver = function () {
this._parent.downArrow_mc.onRollOver();
};
text_mc.onRollOut = function () {
this._parent.downArrow_mc.onRollOut();
};
text_mc.useHandCursor = false;
}
}
function get editable() {
return(_editable);
}
function set editable(e) {
setEditable(e);
//return(editable);
}
function _getValue() {
return((_editable ? (text_mc.getText()) : (DSgetValue())));
}
function draw() {
downArrow_mc.draw();
border_mc.draw();
}
function size() {
layoutChildren(__width, __height);
}
function setTheme(t) {
downArrowUpName = (t + "downArrow") + "Up_mc";
downArrowDownName = (t + "downArrow") + "Down_mc";
downArrowDisabledName = (t + "downArrow") + "Disabled_mc";
}
function get text() {
return(text_mc.getText());
}
function set text(t) {
setText(t);
//return(text);
}
function setText(t) {
text_mc.setText(t);
}
function get textField() {
return(text_mc);
}
function get restrict() {
return(text_mc.__get__restrict());
}
function set restrict(w) {
text_mc.__set__restrict(w);
//return(restrict);
}
function invalidateStyle() {
downArrow_mc.invalidateStyle();
text_mc.invalidateStyle();
border_mc.invalidateStyle();
}
function layoutChildren(w, h) {
if (downArrow_mc == undefined) {
return(undefined);
}
if (wrapDownArrowButton) {
var _local2 = border_mc.__get__borderMetrics();
downArrow_mc._width = (downArrow_mc._height = (h - _local2.top) - _local2.bottom);
downArrow_mc.move((w - downArrow_mc._width) - _local2.right, _local2.top);
border_mc.setSize(w, h);
text_mc.setSize(w - downArrow_mc._width, h);
} else {
downArrow_mc.move(w - downArrow_mc._width, 0);
border_mc.setSize(w - downArrow_mc.width, h);
text_mc.setSize(w - downArrow_mc._width, h);
downArrow_mc._height = height;
}
}
function _changeHandler(obj) {
}
function _enterHandler(obj) {
var _local2 = _parent;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function get tabIndex() {
return(text_mc.__get__tabIndex());
}
function set tabIndex(w) {
text_mc.__set__tabIndex(w);
//return(tabIndex);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.ComboBase);
static var symbolName = "ComboBase";
static var symbolOwner = mx.controls.ComboBase;
static var version = "2.0.2.127";
var _editable = false;
var downArrowUpName = "ScrollDownArrowUp";
var downArrowDownName = "ScrollDownArrowDown";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDisabledName = "ScrollDownArrowDisabled";
var wrapDownArrowButton = true;
var DSgetValue = mx.controls.listclasses.DataSelector.prototype.getValue;
var multipleSelection = false;
}
Symbol 333 MovieClip [__Packages.mx.controls.ComboBox] Frame 0
class mx.controls.ComboBox extends mx.controls.ComboBase
{
var __set__editable, editable, __labels, data, __dropdownWidth, __width, _editable, selectedIndex, __dropdown, dataProvider, __labelFunction, createObject, border_mc, mask, text_mc, dispatchValueChangedEvent, getValue, length, selectedItem, _y, isPressed, owner, __set__visible, height, localToGlobal, __selectedIndexOnDropdown, __initialSelectedIndexOnDropdown, __get__height, getStyle, _parent, width, __dataProvider, selected, dispatchEvent;
function ComboBox () {
super();
}
function init() {
super.init();
}
function createChildren() {
super.createChildren();
__set__editable(editable);
if (__labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
dropdownWidth = (((typeof(__dropdownWidth) == "number") ? (__dropdownWidth) : (__width)));
if (!_editable) {
selectedIndex = 0;
}
initializing = false;
}
function onKillFocus(n) {
if (_showingDropdown && (n != null)) {
displayDropdown(false);
}
super.onKillFocus();
}
function getDropdown() {
if (initializing) {
return(undefined);
}
if (!hasDropdown()) {
var _local3 = new Object();
_local3.styleName = this;
if (dropdownBorderStyle != undefined) {
_local3.borderStyle = dropdownBorderStyle;
}
_local3._visible = false;
__dropdown = mx.managers.PopUpManager.createPopUp(this, mx.controls.List, false, _local3, true);
__dropdown.scroller.mask.removeMovieClip();
if (dataProvider == undefined) {
dataProvider = new Array();
}
__dropdown.setDataProvider(dataProvider);
__dropdown.selectMultiple = false;
__dropdown.rowCount = __rowCount;
__dropdown.selectedIndex = selectedIndex;
__dropdown.vScrollPolicy = "auto";
__dropdown.labelField = __labelField;
__dropdown.labelFunction = __labelFunction;
__dropdown.owner = this;
__dropdown.changeHandler = _changeHandler;
__dropdown.scrollHandler = _scrollHandler;
__dropdown.itemRollOverHandler = _itemRollOverHandler;
__dropdown.itemRollOutHandler = _itemRollOutHandler;
__dropdown.resizeHandler = _resizeHandler;
__dropdown.mouseDownOutsideHandler = function (eventObj) {
var _local3 = this.owner;
var _local4 = new Object();
_local4.x = _local3._root._xmouse;
_local4.y = _local3._root._ymouse;
_local3._root.localToGlobal(_local4);
if (_local3.hitTest(_local4.x, _local4.y, false)) {
} else if ((!this.wrapDownArrowButton) && (this.owner.downArrow_mc.hitTest(_root._xmouse, _root._ymouse, false))) {
} else {
_local3.displayDropdown(false);
}
};
__dropdown.onTweenUpdate = function (v) {
this._y = v;
};
__dropdown.setSize(__dropdownWidth, __dropdown.height);
createObject("BoundingBox", "mask", 20);
mask._y = border_mc.height;
mask._width = __dropdownWidth;
mask._height = __dropdown.height;
mask._visible = false;
__dropdown.setMask(mask);
}
return(__dropdown);
}
function setSize(w, h, noEvent) {
super.setSize(w, h, noEvent);
__dropdownWidth = w;
__dropdown.rowHeight = h;
__dropdown.setSize(__dropdownWidth, __dropdown.height);
}
function setEditable(e) {
super.setEditable(e);
if (e) {
text_mc.setText("");
} else {
text_mc.setText(selectedLabel);
}
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function getLabelField() {
return(__labelField);
}
function get labelField() {
return(getLabelField());
}
function setLabelField(s) {
__dropdown.labelField = (__labelField = s);
text_mc.setText(selectedLabel);
}
function set labelField(s) {
setLabelField(s);
//return(labelField);
}
function getLabelFunction() {
return(__labelFunction);
}
function get labelFunction() {
return(getLabelFunction());
}
function set labelFunction(f) {
__dropdown.labelFunction = (__labelFunction = f);
text_mc.setText(selectedLabel);
//return(labelFunction);
}
function setSelectedItem(v) {
super.setSelectedItem(v);
__dropdown.selectedItem = v;
text_mc.setText(selectedLabel);
}
function setSelectedIndex(v) {
super.setSelectedIndex(v);
__dropdown.selectedIndex = v;
if (v != undefined) {
text_mc.setText(selectedLabel);
}
dispatchValueChangedEvent(getValue());
}
function setRowCount(count) {
if (isNaN(count)) {
return(undefined);
}
__rowCount = count;
__dropdown.setRowCount(count);
}
function get rowCount() {
return(Math.max(1, Math.min(length, __rowCount)));
}
function set rowCount(v) {
setRowCount(v);
//return(rowCount);
}
function setDropdownWidth(w) {
__dropdownWidth = w;
__dropdown.setSize(w, __dropdown.height);
}
function get dropdownWidth() {
return(__dropdownWidth);
}
function set dropdownWidth(v) {
setDropdownWidth(v);
//return(dropdownWidth);
}
function get dropdown() {
return(getDropdown());
}
function setDataProvider(dp) {
super.setDataProvider(dp);
__dropdown.setDataProvider(dp);
if (!_editable) {
selectedIndex = 0;
}
}
function open() {
displayDropdown(true);
}
function close() {
displayDropdown(false);
}
function get selectedLabel() {
var _local2 = selectedItem;
if (_local2 == undefined) {
return("");
}
if (labelFunction != undefined) {
return(labelFunction(_local2));
}
if (typeof(_local2) != "object") {
return(_local2);
}
if (_local2[labelField] != undefined) {
return(_local2[labelField]);
}
if (_local2.label != undefined) {
return(_local2.label);
}
var _local3 = " ";
for (var _local4 in _local2) {
if (_local4 != "__ID__") {
_local3 = (_local2[_local4] + ", ") + _local3;
}
}
_local3 = _local3.substring(0, _local3.length - 3);
return(_local3);
}
function hasDropdown() {
return((__dropdown != undefined) && (__dropdown.valueOf() != undefined));
}
function tweenEndShow(value) {
_y = value;
isPressed = true;
owner.dispatchEvent({type:"open", target:owner});
}
function tweenEndHide(value) {
_y = value;
__set__visible(false);
owner.dispatchEvent({type:"close", target:owner});
}
function displayDropdown(show) {
if (show == _showingDropdown) {
return(undefined);
}
var _local3 = new Object();
_local3.x = 0;
_local3.y = height;
localToGlobal(_local3);
if (show) {
__selectedIndexOnDropdown = selectedIndex;
__initialSelectedIndexOnDropdown = selectedIndex;
getDropdown();
var _local2 = __dropdown;
_local2.isPressed = true;
_local2.rowCount = rowCount;
_local2.visible = show;
_local2._parent.globalToLocal(_local3);
_local2.onTweenEnd = tweenEndShow;
var _local5;
var _local8;
if ((_local3.y + _local2.height) > Stage.height) {
_local5 = _local3.y - __get__height();
_local8 = _local5 - _local2.height;
mask._y = -_local2.height;
} else {
_local5 = _local3.y - _local2.height;
_local8 = _local3.y;
mask._y = border_mc.height;
}
var _local6 = _local2.selectedIndex;
if (_local6 == undefined) {
_local6 = 0;
}
var _local4 = _local2.vPosition;
_local4 = _local6 - 1;
_local4 = Math.min(Math.max(_local4, 0), _local2.length - _local2.rowCount);
_local2.vPosition = _local4;
_local2.move(_local3.x, _local5);
_local2.tween = new mx.effects.Tween(__dropdown, _local5, _local8, getStyle("openDuration"));
} else {
__dropdown._parent.globalToLocal(_local3);
delete __dropdown.dragScrolling;
__dropdown.onTweenEnd = tweenEndHide;
__dropdown.tween = new mx.effects.Tween(__dropdown, __dropdown._y, _local3.y - __dropdown.height, getStyle("openDuration"));
if (__initialSelectedIndexOnDropdown != selectedIndex) {
dispatchChangeEvent(undefined, __initialSelectedIndexOnDropdown, selectedIndex);
}
}
var _local9 = getStyle("openEasing");
if (_local9 != undefined) {
__dropdown.tween.easingEquation = _local9;
}
_showingDropdown = show;
}
function onDownArrow() {
_parent.displayDropdown(!_parent._showingDropdown);
}
function keyDown(e) {
if (e.ctrlKey && (e.code == 40)) {
displayDropdown(true);
} else if (e.ctrlKey && (e.code == 38)) {
displayDropdown(false);
dispatchChangeEvent(undefined, __selectedIndexOnDropdown, selectedIndex);
} else if (e.code == 27) {
displayDropdown(false);
} else if (e.code == 13) {
if (_showingDropdown) {
selectedIndex = __dropdown.selectedIndex;
displayDropdown(false);
}
} else if (((((!_editable) || (e.code == 38)) || (e.code == 40)) || (e.code == 33)) || (e.code == 34)) {
selectedIndex = 0 + selectedIndex;
bInKeyDown = true;
var _local3 = dropdown;
_local3.keyDown(e);
bInKeyDown = false;
selectedIndex = __dropdown.selectedIndex;
}
}
function invalidateStyle(styleProp) {
__dropdown.invalidateStyle(styleProp);
super.invalidateStyle(styleProp);
}
function changeTextStyleInChildren(styleProp) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeTextStyleInChildren(styleProp);
super.changeTextStyleInChildren(styleProp);
}
function changeColorStyleInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.changeColorStyleInChildren(sheetName, styleProp, newValue);
super.changeColorStyleInChildren(sheetName, styleProp, newValue);
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
if (dropdown.stylecache != undefined) {
delete dropdown.stylecache[styleProp];
delete dropdown.stylecache.tf;
}
__dropdown.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
super.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
}
function onUnload() {
__dropdown.removeMovieClip();
}
function _resizeHandler() {
var _local2 = owner;
_local2.mask._width = width;
_local2.mask._height = height;
}
function _changeHandler(obj) {
var _local2 = owner;
var _local3 = _local2.selectedIndex;
obj.target = _local2;
if (this == owner.text_mc) {
_local2.selectedIndex = undefined;
_local2.dispatchChangeEvent(obj, -1, -2);
} else {
_local2.selectedIndex = selectedIndex;
if (!_local2._showingDropdown) {
_local2.dispatchChangeEvent(obj, _local3, _local2.selectedIndex);
} else if (!_local2.bInKeyDown) {
_local2.displayDropdown(false);
}
}
}
function _scrollHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOverHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function _itemRollOutHandler(obj) {
var _local2 = owner;
obj.target = _local2;
_local2.dispatchEvent(obj);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
if (0 == __dataProvider.length) {
text_mc.setText("");
delete selected;
} else if ((__dataProvider.length == ((eventObj.lastItem - eventObj.firstItem) + 1)) && (eventObj.eventName == "addItems")) {
selectedIndex = 0;
}
}
function dispatchChangeEvent(obj, prevValue, newValue) {
var _local2;
if (prevValue != newValue) {
if ((obj != undefined) && (obj.type == "change")) {
_local2 = obj;
} else {
_local2 = {type:"change"};
}
dispatchEvent(_local2);
}
}
static var symbolName = "ComboBox";
static var symbolOwner = mx.controls.ComboBox;
static var version = "2.0.2.127";
var clipParameters = {labels:1, data:1, editable:1, rowCount:1, dropdownWidth:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.ComboBox.prototype.clipParameters, mx.controls.ComboBase.prototype.clipParameters);
var className = "ComboBox";
var _showingDropdown = false;
var __rowCount = 5;
var dropdownBorderStyle = undefined;
var initializing = true;
var __labelField = "label";
var bInKeyDown = false;
}
Symbol 446 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 447 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 448 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 449 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 450 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 451 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.127";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 452 MovieClip [__Packages.mx.controls.TextInput] Frame 0
class mx.controls.TextInput extends mx.core.UIComponent
{
var owner, enterListener, label, tabChildren, tabEnabled, focusTextField, _color, _parent, border_mc, createClassObject, dispatchValueChangedEvent, __get__width, __get__height, tfx, tfy, tfw, tfh, getStyle, bind, updateModel, _getTextFormat, enabled;
function TextInput () {
super();
}
function addEventListener(event, handler) {
if (event == "enter") {
addEnterEvents();
}
super.addEventListener(event, handler);
}
function enterOnKeyDown() {
if (Key.getAscii() == 13) {
owner.dispatchEvent({type:"enter"});
}
}
function addEnterEvents() {
if (enterListener == undefined) {
enterListener = new Object();
enterListener.owner = this;
enterListener.onKeyDown = enterOnKeyDown;
}
}
function init(Void) {
super.init();
label.styleName = this;
tabChildren = true;
tabEnabled = false;
focusTextField = label;
_color = mx.core.UIObject.textColorList;
label.onSetFocus = function () {
this._parent.onSetFocus();
};
label.onKillFocus = function (n) {
this._parent.onKillFocus(n);
};
label.drawFocus = function (b) {
this._parent.drawFocus(b);
};
label.onChanged = onLabelChanged;
}
function setFocus() {
Selection.setFocus(label);
}
function onLabelChanged(Void) {
_parent.dispatchEvent({type:"change"});
_parent.dispatchValueChangedEvent(text);
}
function createChildren(Void) {
super.createChildren();
if (border_mc == undefined) {
createClassObject(_global.styles.rectBorderClass, "border_mc", 0, {styleName:this});
}
border_mc.swapDepths(label);
label.autoSize = "none";
}
function get html() {
return(getHtml());
}
function set html(value) {
setHtml(value);
//return(html);
}
function getHtml() {
return(label.html);
}
function setHtml(value) {
if (value != label.html) {
label.html = value;
}
}
function get text() {
return(getText());
}
function set text(t) {
setText(t);
//return(text);
}
function getText() {
if (initializing) {
return(initText);
}
if (label.html == true) {
return(label.htmlText);
}
return(label.text);
}
function setText(t) {
if (initializing) {
initText = t;
} else {
var _local2 = label;
if (_local2.html == true) {
_local2.htmlText = t;
} else {
_local2.text = t;
}
}
dispatchValueChangedEvent(t);
}
function size(Void) {
border_mc.setSize(__get__width(), __get__height());
var _local2 = border_mc.__get__borderMetrics();
var _local6 = _local2.left + _local2.right;
var _local3 = _local2.top + _local2.bottom;
var _local5 = _local2.left;
var _local4 = _local2.top;
tfx = _local5;
tfy = _local4;
tfw = __get__width() - _local6;
tfh = __get__height() - _local3;
label.move(tfx, tfy);
label.setSize(tfw, tfh + 1);
}
function setEnabled(enable) {
label.type = (((__editable == true) || (enable == false)) ? "input" : "dynamic");
label.selectable = enable;
var _local2 = getStyle((enable ? "color" : "disabledColor"));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
setColor(_local2);
}
function setColor(col) {
label.textColor = col;
}
function onKillFocus(newFocus) {
if (enterListener != undefined) {
Key.removeListener(enterListener);
}
if (bind != undefined) {
updateModel(text);
}
super.onKillFocus(newFocus);
}
function onSetFocus(oldFocus) {
var f = Selection.getFocus();
var o = eval (f);
if (o != label) {
Selection.setFocus(label);
return(undefined);
}
if (enterListener != undefined) {
Key.addListener(enterListener);
}
super.onSetFocus(oldFocus);
}
function draw(Void) {
var _local2 = label;
var _local4 = getText();
if (initializing) {
initializing = false;
delete initText;
}
var _local3 = _getTextFormat();
_local2.embedFonts = _local3.embedFonts == true;
if (_local3 != undefined) {
_local2.setTextFormat(_local3);
_local2.setNewTextFormat(_local3);
}
_local2.multiline = false;
_local2.wordWrap = false;
if (_local2.html == true) {
_local2.setTextFormat(_local3);
_local2.htmlText = _local4;
} else {
_local2.text = _local4;
}
_local2.type = (((__editable == true) || (enabled == false)) ? "input" : "dynamic");
size();
}
function setEditable(s) {
__editable = s;
label.type = (s ? "input" : "dynamic");
}
function get maxChars() {
return(label.maxChars);
}
function set maxChars(w) {
label.maxChars = w;
//return(maxChars);
}
function get length() {
return(label.length);
}
function get restrict() {
return(label.restrict);
}
function set restrict(w) {
label.restrict = ((w == "") ? null : (w));
//return(restrict);
}
function get hPosition() {
return(label.hscroll);
}
function set hPosition(w) {
label.hscroll = w;
//return(hPosition);
}
function get maxHPosition() {
return(label.maxhscroll);
}
function get editable() {
return(__editable);
}
function set editable(w) {
setEditable(w);
//return(editable);
}
function get password() {
return(label.password);
}
function set password(w) {
label.password = w;
//return(password);
}
function get tabIndex() {
return(label.tabIndex);
}
function set tabIndex(w) {
label.tabIndex = w;
//return(tabIndex);
}
function set _accProps(val) {
label._accProps = val;
//return(_accProps);
}
function get _accProps() {
return(label._accProps);
}
static var symbolName = "TextInput";
static var symbolOwner = mx.controls.TextInput;
static var version = "2.0.2.127";
var className = "TextInput";
var initializing = true;
var clipParameters = {text:1, editable:1, password:1, maxChars:1, restrict:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.TextInput.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var _maxWidth = mx.core.UIComponent.kStretch;
var __editable = true;
var initText = "";
}
Symbol 453 MovieClip [__Packages.mx.controls.SimpleButton] Frame 0
class mx.controls.SimpleButton extends mx.core.UIComponent
{
static var emphasizedStyleDeclaration;
var preset, boundingBox_mc, useHandCursor, skinName, linkLength, iconName, destroyObject, __width, _width, __height, _height, __emphaticStyleName, styleName, enabled, invalidate, pressFocus, dispatchEvent, autoRepeat, interval, getStyle, releaseFocus, createLabel, invalidateStyle;
function SimpleButton () {
super();
}
function init(Void) {
super.init();
if (preset == undefined) {
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
useHandCursor = false;
}
function createChildren(Void) {
if (preset != undefined) {
var _local2 = this[idNames[preset]];
this[refNames[preset]] = _local2;
skinName = _local2;
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
initializing = false;
} else if (__state == true) {
setStateVar(true);
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
}
}
}
function setIcon(tag, linkageName) {
return(setSkin(tag + 8, linkageName));
}
function changeIcon(tag, linkageName) {
linkLength = linkageName.length;
var _local2 = stateNames[tag] + "Icon";
this[_local2] = linkageName;
this[idNames[tag + 8]] = _local2;
setStateVar(getState());
}
function changeSkin(tag, linkageName) {
var _local2 = stateNames[tag] + "Skin";
this[_local2] = linkageName;
this[idNames[tag]] = _local2;
setStateVar(getState());
}
function viewIcon(varName) {
var _local4 = varName + "Icon";
var _local3 = this[_local4];
if (typeof(_local3) == "string") {
var _local5 = _local3;
if (__emphasized) {
if (this[_local3 + "Emphasized"].length > 0) {
_local3 = _local3 + "Emphasized";
}
}
if (this[_local3].length == 0) {
return(undefined);
}
_local3 = setIcon(tagMap[_local5], this[_local3]);
if ((_local3 == undefined) && (_global.isLivePreview)) {
_local3 = setIcon(0, "ButtonIcon");
}
this[_local4] = _local3;
}
iconName._visible = false;
iconName = _local3;
iconName._visible = true;
}
function removeIcons() {
var _local3 = 0;
while (_local3 < 2) {
var _local2 = 8;
while (_local2 < 16) {
destroyObject(idNames[_local2]);
this[stateNames[_local2 - 8] + "Icon"] = "";
_local2++;
}
_local3++;
}
refresh();
}
function setSkin(tag, linkageName, initobj) {
var _local3 = super.setSkin(tag, linkageName, ((initobj != undefined) ? (initobj) : ({styleName:this})));
calcSize(tag, _local3);
return(_local3);
}
function calcSize(Void) {
__width = _width;
__height = _height;
}
function viewSkin(varName, initObj) {
var _local3 = varName + "Skin";
var _local2 = this[_local3];
if (typeof(_local2) == "string") {
var _local4 = _local2;
if (__emphasized) {
if (this[_local2 + "Emphasized"].length > 0) {
_local2 = _local2 + "Emphasized";
}
}
if (this[_local2].length == 0) {
return(undefined);
}
_local2 = setSkin(tagMap[_local4], this[_local2], ((initObj != undefined) ? (initObj) : ({styleName:this})));
this[_local3] = _local2;
}
skinName._visible = false;
skinName = _local2;
skinName._visible = true;
}
function showEmphasized(e) {
if (e && (!__emphatic)) {
if (emphasizedStyleDeclaration != undefined) {
__emphaticStyleName = styleName;
styleName = emphasizedStyleDeclaration;
}
__emphatic = true;
} else {
if (__emphatic) {
styleName = __emphaticStyleName;
}
__emphatic = false;
}
}
function refresh(Void) {
var _local2 = getState();
if (enabled == false) {
viewIcon("disabled");
viewSkin("disabled");
} else {
viewSkin(phase);
viewIcon(phase);
}
setView(phase == "down");
iconName.enabled = enabled;
}
function setView(offset) {
if (iconName == undefined) {
return(undefined);
}
var _local2 = (offset ? (btnOffset) : 0);
iconName._x = ((__width - iconName._width) / 2) + _local2;
iconName._y = ((__height - iconName._height) / 2) + _local2;
}
function setStateVar(state) {
if (state) {
if (trueOverSkin.length == 0) {
rolloverSkin = tus;
} else {
rolloverSkin = trs;
}
if (trueOverIcon.length == 0) {
rolloverIcon = tui;
} else {
rolloverIcon = tri;
}
upSkin = tus;
downSkin = tds;
disabledSkin = dts;
upIcon = tui;
downIcon = tdi;
disabledIcon = dti;
} else {
if (falseOverSkin.length == 0) {
rolloverSkin = fus;
} else {
rolloverSkin = frs;
}
if (falseOverIcon.length == 0) {
rolloverIcon = fui;
} else {
rolloverIcon = fri;
}
upSkin = fus;
downSkin = fds;
disabledSkin = dfs;
upIcon = fui;
downIcon = fdi;
disabledIcon = dfi;
}
__state = state;
}
function setState(state) {
if (state != __state) {
setStateVar(state);
invalidate();
}
}
function size(Void) {
refresh();
}
function draw(Void) {
if (initializing) {
initializing = false;
skinName.visible = true;
iconName.visible = true;
}
size();
}
function getState(Void) {
return(__state);
}
function setToggle(val) {
__toggle = val;
if (__toggle == false) {
setState(false);
}
}
function getToggle(Void) {
return(__toggle);
}
function set toggle(val) {
setToggle(val);
//return(toggle);
}
function get toggle() {
return(getToggle());
}
function set value(val) {
setSelected(val);
//return(value);
}
function get value() {
return(getSelected());
}
function set selected(val) {
setSelected(val);
//return(selected);
}
function get selected() {
return(getSelected());
}
function setSelected(val) {
if (__toggle) {
setState(val);
} else {
setState((initializing ? (val) : (__state)));
}
}
function getSelected() {
return(__state);
}
function setEnabled(val) {
if (enabled != val) {
super.setEnabled(val);
invalidate();
}
}
function onPress(Void) {
pressFocus();
phase = "down";
refresh();
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
interval = setInterval(this, "onPressDelay", getStyle("repeatDelay"));
}
}
function onPressDelay(Void) {
dispatchEvent({type:"buttonDown"});
if (autoRepeat) {
clearInterval(interval);
interval = setInterval(this, "onPressRepeat", getStyle("repeatInterval"));
}
}
function onPressRepeat(Void) {
dispatchEvent({type:"buttonDown"});
updateAfterEvent();
}
function onRelease(Void) {
releaseFocus();
phase = "rollover";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
if (getToggle()) {
setState(!getState());
} else {
refresh();
}
dispatchEvent({type:"click"});
}
function onDragOut(Void) {
phase = "up";
refresh();
dispatchEvent({type:"buttonDragOut"});
}
function onDragOver(Void) {
if (phase != "up") {
onPress();
return(undefined);
}
phase = "down";
refresh();
}
function onReleaseOutside(Void) {
releaseFocus();
phase = "up";
if (interval != undefined) {
clearInterval(interval);
delete interval;
}
}
function onRollOver(Void) {
phase = "rollover";
refresh();
}
function onRollOut(Void) {
phase = "up";
refresh();
}
function getLabel(Void) {
return(fui.text);
}
function setLabel(val) {
if (typeof(fui) == "string") {
createLabel("fui", 8, val);
fui.styleName = this;
} else {
fui.text = val;
}
var _local4 = fui._getTextFormat();
var _local2 = _local4.getTextExtent2(val);
fui._width = _local2.width + 5;
fui._height = _local2.height + 5;
iconName = fui;
setView(__state);
}
function get emphasized() {
return(__emphasized);
}
function set emphasized(val) {
__emphasized = val;
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]] = stateNames[_local2] + "Skin";
if (typeof(this[idNames[_local2 + 8]]) == "movieclip") {
this[idNames[_local2 + 8]] = stateNames[_local2] + "Icon";
}
_local2++;
}
showEmphasized(__emphasized);
setStateVar(__state);
invalidateStyle();
//return(emphasized);
}
function keyDown(e) {
if (e.code == 32) {
onPress();
}
}
function keyUp(e) {
if (e.code == 32) {
onRelease();
}
}
function onKillFocus(newFocus) {
super.onKillFocus();
if (phase != "up") {
phase = "up";
refresh();
}
}
static var symbolName = "SimpleButton";
static var symbolOwner = mx.controls.SimpleButton;
static var version = "2.0.2.127";
var className = "SimpleButton";
var style3dInset = 4;
var btnOffset = 1;
var __toggle = false;
var __state = false;
var __emphasized = false;
var __emphatic = false;
static var falseUp = 0;
static var falseDown = 1;
static var falseOver = 2;
static var falseDisabled = 3;
static var trueUp = 4;
static var trueDown = 5;
static var trueOver = 6;
static var trueDisabled = 7;
var falseUpSkin = "SimpleButtonUp";
var falseDownSkin = "SimpleButtonIn";
var falseOverSkin = "";
var falseDisabledSkin = "SimpleButtonUp";
var trueUpSkin = "SimpleButtonIn";
var trueDownSkin = "";
var trueOverSkin = "";
var trueDisabledSkin = "SimpleButtonIn";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var phase = "up";
var fui = "falseUpIcon";
var fus = "falseUpSkin";
var fdi = "falseDownIcon";
var fds = "falseDownSkin";
var frs = "falseOverSkin";
var fri = "falseOverIcon";
var dfi = "falseDisabledIcon";
var dfs = "falseDisabledSkin";
var tui = "trueUpIcon";
var tus = "trueUpSkin";
var tdi = "trueDownIcon";
var tds = "trueDownSkin";
var trs = "trueOverSkin";
var tri = "trueOverIcon";
var dts = "trueDisabledSkin";
var dti = "trueDisabledIcon";
var rolloverSkin = mx.controls.SimpleButton.prototype.frs;
var rolloverIcon = mx.controls.SimpleButton.prototype.fri;
var upSkin = mx.controls.SimpleButton.prototype.fus;
var downSkin = mx.controls.SimpleButton.prototype.fds;
var disabledSkin = mx.controls.SimpleButton.prototype.dfs;
var upIcon = mx.controls.SimpleButton.prototype.fui;
var downIcon = mx.controls.SimpleButton.prototype.fdi;
var disabledIcon = mx.controls.SimpleButton.prototype.dfi;
var initializing = true;
var idNames = ["fus", "fds", "frs", "dfs", "tus", "tds", "trs", "dts", "fui", "fdi", "fri", "dfi", "tui", "tdi", "tri", "dti"];
var stateNames = ["falseUp", "falseDown", "falseOver", "falseDisabled", "trueUp", "trueDown", "trueOver", "trueDisabled"];
var refNames = ["upSkin", "downSkin", "rolloverSkin", "disabledSkin"];
var tagMap = {falseUpSkin:0, falseDownSkin:1, falseOverSkin:2, falseDisabledSkin:3, trueUpSkin:4, trueDownSkin:5, trueOverSkin:6, trueDisabledSkin:7, falseUpIcon:0, falseDownIcon:1, falseOverIcon:2, falseDisabledIcon:3, trueUpIcon:4, trueDownIcon:5, trueOverIcon:6, trueDisabledIcon:7};
}
Symbol 454 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local6 = "down";
if (depthFlag == kBottom) {
_local6 = "up";
}
var _local5;
if (_local3[_local2] != undefined) {
_local5 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local6);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local5 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local5, _local3, _local6);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(this, _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local2 = targetDepth;
var _local1 = targetDepth;
if (direction == "down") {
while (depthTable[_local1] != undefined) {
_local1--;
}
return(_local1);
}
while (depthTable[_local2] != undefined) {
_local2++;
}
return(_local2);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 455 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 456 MovieClip [__Packages.mx.managers.SystemManager] Frame 0
class mx.managers.SystemManager
{
static var _xAddEventListener, addEventListener, __addEventListener, _xRemoveEventListener, removeEventListener, __removeEventListener, form, __screen, dispatchEvent;
function SystemManager () {
}
static function init(Void) {
if (_initialized == false) {
_initialized = true;
mx.events.EventDispatcher.initialize(mx.managers.SystemManager);
Mouse.addListener(mx.managers.SystemManager);
Stage.addListener(mx.managers.SystemManager);
_xAddEventListener = addEventListener;
addEventListener = __addEventListener;
_xRemoveEventListener = removeEventListener;
removeEventListener = __removeEventListener;
}
}
static function addFocusManager(f) {
form = f;
f.focusManager.activate();
}
static function removeFocusManager(f) {
}
static function onMouseDown(Void) {
var _local1 = form;
_local1.focusManager._onMouseDown();
}
static function onResize(Void) {
var _local7 = Stage.width;
var _local6 = Stage.height;
var _local9 = _global.origWidth;
var _local8 = _global.origHeight;
var _local3 = Stage.align;
var _local5 = (_local9 - _local7) / 2;
var _local4 = (_local8 - _local6) / 2;
if (_local3 == "T") {
_local4 = 0;
} else if (_local3 == "B") {
_local4 = _local8 - _local6;
} else if (_local3 == "L") {
_local5 = 0;
} else if (_local3 == "R") {
_local5 = _local9 - _local7;
} else if (_local3 == "LT") {
_local4 = 0;
_local5 = 0;
} else if (_local3 == "TR") {
_local4 = 0;
_local5 = _local9 - _local7;
} else if (_local3 == "LB") {
_local4 = _local8 - _local6;
_local5 = 0;
} else if (_local3 == "RB") {
_local4 = _local8 - _local6;
_local5 = _local9 - _local7;
}
if (__screen == undefined) {
__screen = new Object();
}
__screen.x = _local5;
__screen.y = _local4;
__screen.width = _local7;
__screen.height = _local6;
_root.focusManager.relocate();
dispatchEvent({type:"resize"});
}
static function get screen() {
init();
if (__screen == undefined) {
onResize();
}
return(__screen);
}
static var _initialized = false;
static var idleFrames = 0;
static var isMouseDown = false;
static var forms = new Array();
}
Symbol 457 MovieClip [__Packages.mx.managers.PopUpManager] Frame 0
class mx.managers.PopUpManager
{
var popUp, setSize, move, modalWindow, _parent, _name, _visible, owner;
function PopUpManager () {
}
static function createModalWindow(parent, o, broadcastOutsideEvents) {
var _local2 = parent.createChildAtDepth("Modal", mx.managers.DepthManager.kTopmost);
_local2.setDepthBelow(o);
o.modalID = _local2._name;
_local2._alpha = _global.style.modalTransparency;
_local2.tabEnabled = false;
if (broadcastOutsideEvents) {
_local2.onPress = mixins.onPress;
} else {
_local2.onPress = mixins.nullFunction;
}
_local2.onRelease = mixins.nullFunction;
_local2.resize = mixins.resize;
mx.managers.SystemManager.init();
mx.managers.SystemManager.addEventListener("resize", _local2);
_local2.resize();
_local2.useHandCursor = false;
_local2.popUp = o;
o.modalWindow = _local2;
o.deletePopUp = mixins.deletePopUp;
o.setVisible = mixins.setVisible;
o.getVisible = mixins.getVisible;
o.addProperty("visible", o.getVisible, o.setVisible);
}
static function createPopUp(parent, className, modal, initobj, broadcastOutsideEvents) {
if (mixins == undefined) {
mixins = new mx.managers.PopUpManager();
}
if (broadcastOutsideEvents == undefined) {
broadcastOutsideEvents = false;
}
var _local5 = parent._root;
if (_local5 == undefined) {
_local5 = _root;
}
while (parent != _local5) {
parent = parent._parent;
}
initobj.popUp = true;
var _local4 = parent.createClassChildAtDepth(className, ((broadcastOutsideEvents || (modal)) ? (mx.managers.DepthManager.kTopmost) : (mx.managers.DepthManager.kTop)), initobj);
var _local2 = _root;
var _local6 = _local2.focusManager != undefined;
while (_local2._parent != undefined) {
_local2 = _local2._parent._root;
if (_local2.focusManager != undefined) {
_local6 = true;
break;
}
}
if (_local6) {
_local4.createObject("FocusManager", "focusManager", -1);
if (_local4._visible == false) {
mx.managers.SystemManager.deactivate(_local4);
}
}
if (modal) {
createModalWindow(parent, _local4, broadcastOutsideEvents);
} else {
if (broadcastOutsideEvents) {
_local4.mouseListener = new Object();
_local4.mouseListener.owner = _local4;
_local4.mouseListener.onMouseDown = mixins.onMouseDown;
Mouse.addListener(_local4.mouseListener);
}
_local4.deletePopUp = mixins.deletePopUp;
}
return(_local4);
}
function onPress(Void) {
var _local3 = popUp._root;
if (_local3 == undefined) {
_local3 = _root;
}
if (popUp.hitTest(_local3._xmouse, _local3._ymouse, false)) {
return(undefined);
}
popUp.dispatchEvent({type:"mouseDownOutside"});
}
function nullFunction(Void) {
}
function resize(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
setSize(_local2.width, _local2.height);
move(_local2.x, _local2.y);
}
function deletePopUp(Void) {
if (modalWindow != undefined) {
_parent.destroyObject(modalWindow._name);
}
_parent.destroyObject(_name);
}
function setVisible(v, noEvent) {
super.setVisible(v, noEvent);
modalWindow._visible = v;
}
function getVisible(Void) {
return(_visible);
}
function onMouseDown(Void) {
var _local3 = owner._root;
if (_local3 == undefined) {
_local3 = _root;
}
var _local4 = new Object();
_local4.x = _local3._xmouse;
_local4.y = _local3._ymouse;
_local3.localToGlobal(_local4);
if (owner.hitTest(_local4.x, _local4.y, false)) {
} else {
owner.mouseDownOutsideHandler(owner);
}
}
static var version = "2.0.2.127";
static var mixins = undefined;
}
Symbol 458 MovieClip [__Packages.mx.core.View] Frame 0
class mx.core.View extends mx.core.UIComponent
{
var tabChildren, tabEnabled, boundingBox_mc, border_mc, __get__width, __get__height, __tabIndex, depth, createObject, createClassObject, loadExternal, destroyObject, createClassChildAtDepth, doLater;
function View () {
super();
}
function init() {
super.init();
tabChildren = true;
tabEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function size() {
border_mc.move(0, 0);
border_mc.setSize(__get__width(), __get__height());
doLayout();
}
function draw() {
size();
}
function get numChildren() {
var _local3 = childNameBase;
var _local2 = 0;
while (true) {
if (this[_local3 + _local2] == undefined) {
return(_local2);
}
_local2++;
}
}
function get tabIndex() {
return((tabEnabled ? (__tabIndex) : undefined));
}
function set tabIndex(n) {
__tabIndex = n;
//return(tabIndex);
}
function addLayoutObject(object) {
}
function createChild(className, instanceName, initProps) {
if (depth == undefined) {
depth = 1;
}
var _local2;
if (typeof(className) == "string") {
_local2 = createObject(className, instanceName, depth++, initProps);
} else {
_local2 = createClassObject(className, instanceName, depth++, initProps);
}
if (_local2 == undefined) {
_local2 = loadExternal(className, _loadExternalClass, instanceName, depth++, initProps);
} else {
this[childNameBase + numChildren] = _local2;
_local2._complete = true;
childLoaded(_local2);
}
addLayoutObject(_local2);
return(_local2);
}
function getChildAt(childIndex) {
return(this[childNameBase + childIndex]);
}
function destroyChildAt(childIndex) {
if (!((childIndex >= 0) && (childIndex < numChildren))) {
return(undefined);
}
var _local4 = childNameBase + childIndex;
var _local6 = numChildren;
var _local3;
for (_local3 in this) {
if (_local3 == _local4) {
_local4 = "";
destroyObject(_local3);
break;
}
}
var _local2 = Number(childIndex);
while (_local2 < (_local6 - 1)) {
this[childNameBase + _local2] = this[childNameBase + (_local2 + 1)];
_local2++;
}
delete this[childNameBase + (_local6 - 1)];
depth--;
}
function initLayout() {
if (!hasBeenLayedOut) {
doLayout();
}
}
function doLayout() {
hasBeenLayedOut = true;
}
function createChildren() {
if (border_mc == undefined) {
border_mc = createClassChildAtDepth(_global.styles.rectBorderClass, mx.managers.DepthManager.kBottom, {styleName:this});
}
doLater(this, "initLayout");
}
function convertToUIObject(obj) {
}
function childLoaded(obj) {
convertToUIObject(obj);
}
static function extension() {
mx.core.ExternalContent.enableExternalContent();
}
static var symbolName = "View";
static var symbolOwner = mx.core.View;
static var version = "2.0.2.127";
var className = "View";
static var childNameBase = "_child";
var hasBeenLayedOut = false;
var _loadExternalClass = "UIComponent";
}
Symbol 459 MovieClip [__Packages.mx.events.UIEventDispatcher] Frame 0
class mx.events.UIEventDispatcher extends mx.events.EventDispatcher
{
var dispatchQueue, owner, __sentLoadEvent, __origAddEventListener;
function UIEventDispatcher () {
super();
}
static function addKeyEvents(obj) {
if (obj.keyHandler == undefined) {
var _local1 = (obj.keyHandler = new Object());
_local1.owner = obj;
_local1.onKeyDown = _fEventDispatcher.onKeyDown;
_local1.onKeyUp = _fEventDispatcher.onKeyUp;
}
Key.addListener(obj.keyHandler);
}
static function removeKeyEvents(obj) {
Key.removeListener(obj.keyHandler);
}
static function addLoadEvents(obj) {
if (obj.onLoad == undefined) {
obj.onLoad = _fEventDispatcher.onLoad;
obj.onUnload = _fEventDispatcher.onUnload;
if (obj.getBytesTotal() == obj.getBytesLoaded()) {
obj.doLater(obj, "onLoad");
}
}
}
static function removeLoadEvents(obj) {
delete obj.onLoad;
delete obj.onUnload;
}
static function initialize(obj) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.UIEventDispatcher();
}
obj.addEventListener = _fEventDispatcher.__addEventListener;
obj.__origAddEventListener = _fEventDispatcher.addEventListener;
obj.removeEventListener = _fEventDispatcher.removeEventListener;
obj.dispatchEvent = _fEventDispatcher.dispatchEvent;
obj.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(mx.events.EventDispatcher, eventObj);
dispatchQueue(this, eventObj);
}
function onKeyDown(Void) {
owner.dispatchEvent({type:"keyDown", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onKeyUp(Void) {
owner.dispatchEvent({type:"keyUp", code:Key.getCode(), ascii:Key.getAscii(), shiftKey:Key.isDown(16), ctrlKey:Key.isDown(17)});
}
function onLoad(Void) {
if (__sentLoadEvent != true) {
dispatchEvent({type:"load"});
}
__sentLoadEvent = true;
}
function onUnload(Void) {
dispatchEvent({type:"unload"});
}
function __addEventListener(event, handler) {
__origAddEventListener(event, handler);
var _local3 = lowLevelEvents;
for (var _local5 in _local3) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local2 = _local3[_local5][0];
mx.events.UIEventDispatcher[_local2](this);
}
}
}
function removeEventListener(event, handler) {
var _local6 = "__q_" + event;
mx.events.EventDispatcher._removeEventListener(this[_local6], event, handler);
if (this[_local6].length == 0) {
var _local2 = lowLevelEvents;
for (var _local5 in _local2) {
if (mx.events.UIEventDispatcher[_local5][event] != undefined) {
var _local3 = _local2[_local5][1];
mx.events.UIEventDispatcher[_local2[_local5][1]](this);
}
}
}
}
static var keyEvents = {keyDown:1, keyUp:1};
static var loadEvents = {load:1, unload:1};
static var lowLevelEvents = {keyEvents:["addKeyEvents", "removeKeyEvents"], loadEvents:["addLoadEvents", "removeLoadEvents"]};
static var _fEventDispatcher = undefined;
}
Symbol 460 MovieClip [__Packages.mx.core.ExternalContent] Frame 0
class mx.core.ExternalContent
{
var createObject, numChildren, prepList, doLater, loadList, dispatchEvent, loadedList, childLoaded;
function ExternalContent () {
}
function loadExternal(url, placeholderClassName, instanceName, depth, initProps) {
var _local2;
_local2 = createObject(placeholderClassName, instanceName, depth, initProps);
this[mx.core.View.childNameBase + numChildren] = _local2;
if (prepList == undefined) {
prepList = new Object();
}
prepList[instanceName] = {obj:_local2, url:url, complete:false, initProps:initProps};
prepareToLoadMovie(_local2);
return(_local2);
}
function prepareToLoadMovie(obj) {
obj.unloadMovie();
doLater(this, "waitForUnload");
}
function waitForUnload() {
var _local3;
for (_local3 in prepList) {
var _local2 = prepList[_local3];
if (_local2.obj.getBytesTotal() == 0) {
if (loadList == undefined) {
loadList = new Object();
}
loadList[_local3] = _local2;
_local2.obj.loadMovie(_local2.url);
delete prepList[_local3];
doLater(this, "checkLoadProgress");
} else {
doLater(this, "waitForUnload");
}
}
}
function checkLoadProgress() {
var _local8 = false;
var _local3;
for (_local3 in loadList) {
var _local2 = loadList[_local3];
_local2.loaded = _local2.obj.getBytesLoaded();
_local2.total = _local2.obj.getBytesTotal();
if (_local2.total > 0) {
_local2.obj._visible = false;
dispatchEvent({type:"progress", target:_local2.obj, current:_local2.loaded, total:_local2.total});
if (_local2.loaded == _local2.total) {
if (loadedList == undefined) {
loadedList = new Object();
}
loadedList[_local3] = _local2;
delete loadList[_local3];
doLater(this, "contentLoaded");
}
} else if (_local2.total == -1) {
if (_local2.failedOnce != undefined) {
_local2.failedOnce++;
if (_local2.failedOnce > 3) {
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadList[_local3];
}
} else {
_local2.failedOnce = 0;
}
}
_local8 = true;
}
if (_local8) {
doLater(this, "checkLoadProgress");
}
}
function contentLoaded() {
var _local4;
for (_local4 in loadedList) {
var _local2 = loadedList[_local4];
_local2.obj._visible = true;
_local2.obj._complete = true;
var _local3;
for (_local3 in _local2.initProps) {
_local2.obj[_local3] = _local2.initProps[_local3];
}
childLoaded(_local2.obj);
dispatchEvent({type:"complete", target:_local2.obj, current:_local2.loaded, total:_local2.total});
delete loadedList[_local4];
}
}
function convertToUIObject(obj) {
if (obj.setSize == undefined) {
var _local2 = mx.core.UIObject.prototype;
obj.addProperty("width", _local2.__get__width, null);
obj.addProperty("height", _local2.__get__height, null);
obj.addProperty("left", _local2.__get__left, null);
obj.addProperty("x", _local2.__get__x, null);
obj.addProperty("top", _local2.__get__top, null);
obj.addProperty("y", _local2.__get__y, null);
obj.addProperty("right", _local2.__get__right, null);
obj.addProperty("bottom", _local2.__get__bottom, null);
obj.addProperty("visible", _local2.__get__visible, _local2.__set__visible);
obj.move = mx.core.UIObject.prototype.move;
obj.setSize = mx.core.UIObject.prototype.setSize;
obj.size = mx.core.UIObject.prototype.size;
mx.events.UIEventDispatcher.initialize(obj);
}
}
static function enableExternalContent() {
}
static function classConstruct() {
var _local1 = mx.core.View.prototype;
var _local2 = mx.core.ExternalContent.prototype;
_local1.loadExternal = _local2.loadExternal;
_local1.prepareToLoadMovie = _local2.prepareToLoadMovie;
_local1.waitForUnload = _local2.waitForUnload;
_local1.checkLoadProgress = _local2.checkLoadProgress;
_local1.contentLoaded = _local2.contentLoaded;
_local1.convertToUIObject = _local2.convertToUIObject;
return(true);
}
static var classConstructed = classConstruct();
static var ViewDependency = mx.core.View;
}
Symbol 461 MovieClip [__Packages.mx.skins.CustomBorder] Frame 0
class mx.skins.CustomBorder extends mx.skins.Border
{
var __width, __height, l_mc, setSkin, minHeight, minWidth, m_mc, r_mc;
function CustomBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function createChildren(Void) {
}
function draw(Void) {
if (l_mc == undefined) {
var _local2 = setSkin(tagL, leftSkin);
if (horizontal) {
minHeight = l_mc._height;
minWidth = l_mc._width;
} else {
minHeight = l_mc._height;
minWidth = l_mc._width;
}
}
if (m_mc == undefined) {
setSkin(tagM, middleSkin);
if (horizontal) {
minHeight = m_mc._height;
minWidth = minWidth + m_mc._width;
} else {
minHeight = minHeight + m_mc._height;
minWidth = m_mc._width;
}
}
if (r_mc == undefined) {
setSkin(tagR, rightSkin);
if (horizontal) {
minHeight = r_mc._height;
minWidth = minWidth + r_mc._width;
} else {
minHeight = minHeight + r_mc._height;
minWidth = r_mc._width;
}
}
size();
}
function size(Void) {
l_mc.move(0, 0);
if (horizontal) {
r_mc.move(width - r_mc.width, 0);
m_mc.move(l_mc.width, 0);
m_mc.setSize(r_mc.x - m_mc.x, m_mc.height);
} else {
r_mc.move(0, height - r_mc.height, 0);
m_mc.move(0, l_mc.height);
m_mc.setSize(m_mc.width, r_mc.y - m_mc.y);
}
}
static var symbolName = "CustomBorder";
static var symbolOwner = mx.skins.CustomBorder;
static var version = "2.0.2.127";
var className = "CustomBorder";
static var tagL = 0;
static var tagM = 1;
static var tagR = 2;
var idNames = new Array("l_mc", "m_mc", "r_mc");
var leftSkin = "F3PieceLeft";
var middleSkin = "F3PieceMiddle";
var rightSkin = "F3PieceRight";
var horizontal = true;
}
Symbol 462 MovieClip [__Packages.mx.controls.scrollClasses.ScrollThumb] Frame 0
class mx.controls.scrollClasses.ScrollThumb extends mx.skins.CustomBorder
{
var useHandCursor, ymin, ymax, datamin, datamax, scrollMove, lastY, _ymouse, _y, _parent, onMouseMove, grip_mc, setSkin, gripSkin, __get__width, __get__height;
function ScrollThumb () {
super();
}
function createChildren(Void) {
super.createChildren();
useHandCursor = false;
}
function setRange(_ymin, _ymax, _datamin, _datamax) {
ymin = _ymin;
ymax = _ymax;
datamin = _datamin;
datamax = _datamax;
}
function dragThumb(Void) {
scrollMove = _ymouse - lastY;
scrollMove = scrollMove + _y;
if (scrollMove < ymin) {
scrollMove = ymin;
} else if (scrollMove > ymax) {
scrollMove = ymax;
}
_parent.isScrolling = true;
_y = scrollMove;
var _local2 = Math.round(((datamax - datamin) * (_y - ymin)) / (ymax - ymin)) + datamin;
_parent.scrollPosition = _local2;
_parent.dispatchScrollEvent("ThumbTrack");
updateAfterEvent();
}
function stopDragThumb(Void) {
_parent.isScrolling = false;
_parent.dispatchScrollEvent("ThumbPosition");
_parent.dispatchScrollChangedEvent();
delete onMouseMove;
}
function onPress(Void) {
_parent.pressFocus();
lastY = _ymouse;
onMouseMove = dragThumb;
super.onPress();
}
function onRelease(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onRelease();
}
function onReleaseOutside(Void) {
_parent.releaseFocus();
stopDragThumb();
super.onReleaseOutside();
}
function draw() {
super.draw();
if (grip_mc == undefined) {
setSkin(3, gripSkin);
}
}
function size() {
super.size();
grip_mc.move((__get__width() - grip_mc.width) / 2, (__get__height() - grip_mc.height) / 2);
}
static var symbolOwner = mx.skins.CustomBorder.symbolOwner;
var className = "ScrollThumb";
var btnOffset = 0;
var horizontal = false;
var idNames = new Array("l_mc", "m_mc", "r_mc", "grip_mc");
}
Symbol 463 MovieClip [__Packages.mx.controls.scrollClasses.ScrollBar] Frame 0
class mx.controls.scrollClasses.ScrollBar extends mx.core.UIComponent
{
var isScrolling, scrollTrack_mc, scrollThumb_mc, __height, tabEnabled, focusEnabled, boundingBox_mc, setSkin, upArrow_mc, _minHeight, _minWidth, downArrow_mc, createObject, createClassObject, enabled, _height, dispatchEvent, minMode, maxMode, plusMode, minusMode, _parent, getStyle, scrolling, _ymouse;
function ScrollBar () {
super();
}
function get scrollPosition() {
return(_scrollPosition);
}
function set scrollPosition(pos) {
_scrollPosition = pos;
if (isScrolling != true) {
pos = Math.min(pos, maxPos);
pos = Math.max(pos, minPos);
var _local3 = (((pos - minPos) * (scrollTrack_mc.height - scrollThumb_mc._height)) / (maxPos - minPos)) + scrollTrack_mc.top;
scrollThumb_mc.move(0, _local3);
}
//return(scrollPosition);
}
function get pageScrollSize() {
return(largeScroll);
}
function set pageScrollSize(lScroll) {
largeScroll = lScroll;
//return(pageScrollSize);
}
function set lineScrollSize(sScroll) {
smallScroll = sScroll;
//return(lineScrollSize);
}
function get lineScrollSize() {
return(smallScroll);
}
function get virtualHeight() {
return(__height);
}
function init(Void) {
super.init();
_scrollPosition = 0;
tabEnabled = false;
focusEnabled = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function createChildren(Void) {
if (scrollTrack_mc == undefined) {
setSkin(skinIDTrack, scrollTrackName);
}
scrollTrack_mc.visible = false;
var _local3 = new Object();
_local3.enabled = false;
_local3.preset = mx.controls.SimpleButton.falseDisabled;
_local3.initProperties = 0;
_local3.autoRepeat = true;
_local3.tabEnabled = false;
var _local2;
if (upArrow_mc == undefined) {
_local2 = createButton(upArrowName, "upArrow_mc", skinIDUpArrow, _local3);
}
_local2.buttonDownHandler = onUpArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _local2.height;
_minWidth = _local2.width;
if (downArrow_mc == undefined) {
_local2 = createButton(downArrowName, "downArrow_mc", skinIDDownArrow, _local3);
}
_local2.buttonDownHandler = onDownArrow;
_local2.clickHandler = onScrollChanged;
_minHeight = _minHeight + _local2.height;
}
function createButton(linkageName, id, skinID, o) {
if (skinID == skinIDUpArrow) {
o.falseUpSkin = upArrowUpName;
o.falseDownSkin = upArrowDownName;
o.falseOverSkin = upArrowOverName;
} else {
o.falseUpSkin = downArrowUpName;
o.falseDownSkin = downArrowDownName;
o.falseOverSkin = downArrowOverName;
}
var _local3 = createObject(linkageName, id, skinID, o);
this[id].visible = false;
this[id].useHandCursor = false;
return(_local3);
}
function createThumb(Void) {
var _local2 = new Object();
_local2.validateNow = true;
_local2.tabEnabled = false;
_local2.leftSkin = thumbTopName;
_local2.middleSkin = thumbMiddleName;
_local2.rightSkin = thumbBottomName;
_local2.gripSkin = thumbGripName;
createClassObject(mx.controls.scrollClasses.ScrollThumb, "scrollThumb_mc", skinIDThumb, _local2);
}
function setScrollProperties(pSize, mnPos, mxPos, ls) {
var _local4;
var _local2 = scrollTrack_mc;
pageSize = pSize;
largeScroll = (((ls != undefined) && (ls > 0)) ? (ls) : (pSize));
minPos = Math.max(mnPos, 0);
maxPos = Math.max(mxPos, 0);
_scrollPosition = Math.max(minPos, _scrollPosition);
_scrollPosition = Math.min(maxPos, _scrollPosition);
if (((maxPos - minPos) > 0) && (enabled)) {
var _local5 = _scrollPosition;
if (!initializing) {
upArrow_mc.enabled = true;
downArrow_mc.enabled = true;
}
_local2.onPress = (_local2.onDragOver = startTrackScroller);
_local2.onRelease = releaseScrolling;
_local2.onDragOut = (_local2.stopScrolling = stopScrolling);
_local2.onReleaseOutside = releaseScrolling;
_local2.useHandCursor = false;
if (scrollThumb_mc == undefined) {
createThumb();
}
var _local3 = scrollThumb_mc;
if (scrollTrackOverName.length > 0) {
_local2.onRollOver = trackOver;
_local2.onRollOut = trackOut;
}
_local4 = (pageSize / ((maxPos - minPos) + pageSize)) * _local2.height;
if (_local4 < _local3.minHeight) {
if (_local2.height < _local3.minHeight) {
_local3.__set__visible(false);
} else {
_local4 = _local3.minHeight;
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local3.minHeight + 0);
}
} else {
_local3.__set__visible(true);
_local3.setSize(_minWidth, _local4);
}
_local3.setRange(upArrow_mc.__get__height() + 0, (virtualHeight - downArrow_mc.__get__height()) - _local3.__get__height(), minPos, maxPos);
_local5 = Math.min(_local5, maxPos);
scrollPosition = (Math.max(_local5, minPos));
} else {
scrollThumb_mc.__set__visible(false);
if (!initializing) {
upArrow_mc.enabled = false;
downArrow_mc.enabled = false;
}
delete _local2.onPress;
delete _local2.onDragOver;
delete _local2.onRelease;
delete _local2.onDragOut;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onReleaseOutside;
}
if (initializing) {
scrollThumb_mc.__set__visible(false);
}
}
function setEnabled(enabledFlag) {
super.setEnabled(enabledFlag);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function draw(Void) {
if (initializing) {
initializing = false;
scrollTrack_mc.visible = true;
upArrow_mc.__set__visible(true);
downArrow_mc.__set__visible(true);
}
size();
}
function size(Void) {
if (_height == 1) {
return(undefined);
}
if (upArrow_mc == undefined) {
return(undefined);
}
var _local3 = upArrow_mc.__get__height();
var _local2 = downArrow_mc.__get__height();
upArrow_mc.move(0, 0);
var _local4 = scrollTrack_mc;
_local4._y = _local3;
_local4._height = (virtualHeight - _local3) - _local2;
downArrow_mc.move(0, virtualHeight - _local2);
setScrollProperties(pageSize, minPos, maxPos, largeScroll);
}
function dispatchScrollEvent(detail) {
dispatchEvent({type:"scroll", detail:detail});
}
function isScrollBarKey(k) {
if (k == 36) {
if (scrollPosition != 0) {
scrollPosition = (0);
dispatchScrollEvent(minMode);
}
return(true);
}
if (k == 35) {
if (scrollPosition < maxPos) {
scrollPosition = (maxPos);
dispatchScrollEvent(maxMode);
}
return(true);
}
return(false);
}
function scrollIt(inc, mode) {
var _local3 = smallScroll;
if (inc != "Line") {
_local3 = ((largeScroll == 0) ? (pageSize) : (largeScroll));
}
var _local2 = _scrollPosition + (mode * _local3);
if (_local2 > maxPos) {
_local2 = maxPos;
} else if (_local2 < minPos) {
_local2 = minPos;
}
if (scrollPosition != _local2) {
scrollPosition = (_local2);
var _local4 = ((mode < 0) ? (minusMode) : (plusMode));
dispatchScrollEvent(inc + _local4);
}
}
function startTrackScroller(Void) {
_parent.pressFocus();
if (_parent.scrollTrackDownName.length > 0) {
if (_parent.scrollTrackDown_mc == undefined) {
_parent.setSkin(skinIDTrackDown, scrollTrackDownName);
} else {
_parent.scrollTrackDown_mc.visible = true;
}
}
_parent.trackScroller();
_parent.scrolling = setInterval(_parent, "scrollInterval", getStyle("repeatDelay"), "Page", -1);
}
function scrollInterval(inc, mode) {
clearInterval(scrolling);
if (inc == "Page") {
trackScroller();
} else {
scrollIt(inc, mode);
}
scrolling = setInterval(this, "scrollInterval", getStyle("repeatInterval"), inc, mode);
}
function trackScroller(Void) {
if ((scrollThumb_mc._y + scrollThumb_mc.__get__height()) < _ymouse) {
scrollIt("Page", 1);
} else if (scrollThumb_mc._y > _ymouse) {
scrollIt("Page", -1);
}
}
function dispatchScrollChangedEvent(Void) {
dispatchEvent({type:"scrollChanged"});
}
function stopScrolling(Void) {
clearInterval(_parent.scrolling);
_parent.scrollTrackDown_mc.visible = false;
}
function releaseScrolling(Void) {
_parent.releaseFocus();
stopScrolling();
_parent.dispatchScrollChangedEvent();
}
function trackOver(Void) {
if (_parent.scrollTrackOverName.length > 0) {
if (_parent.scrollTrackOver_mc == undefined) {
_parent.setSkin(skinIDTrackOver, scrollTrackOverName);
} else {
_parent.scrollTrackOver_mc.visible = true;
}
}
}
function trackOut(Void) {
_parent.scrollTrackOver_mc.visible = false;
}
function onUpArrow(Void) {
_parent.scrollIt("Line", -1);
}
function onDownArrow(Void) {
_parent.scrollIt("Line", 1);
}
function onScrollChanged(Void) {
_parent.dispatchScrollChangedEvent();
}
static var symbolOwner = mx.core.UIComponent;
var className = "ScrollBar";
var minPos = 0;
var maxPos = 0;
var pageSize = 0;
var largeScroll = 0;
var smallScroll = 1;
var _scrollPosition = 0;
var scrollTrackName = "ScrollTrack";
var scrollTrackOverName = "";
var scrollTrackDownName = "";
var upArrowName = "BtnUpArrow";
var upArrowUpName = "ScrollUpArrowUp";
var upArrowOverName = "ScrollUpArrowOver";
var upArrowDownName = "ScrollUpArrowDown";
var downArrowName = "BtnDownArrow";
var downArrowUpName = "ScrollDownArrowUp";
var downArrowOverName = "ScrollDownArrowOver";
var downArrowDownName = "ScrollDownArrowDown";
var thumbTopName = "ScrollThumbTopUp";
var thumbMiddleName = "ScrollThumbMiddleUp";
var thumbBottomName = "ScrollThumbBottomUp";
var thumbGripName = "ScrollThumbGripUp";
static var skinIDTrack = 0;
static var skinIDTrackOver = 1;
static var skinIDTrackDown = 2;
static var skinIDUpArrow = 3;
static var skinIDDownArrow = 4;
static var skinIDThumb = 5;
var idNames = new Array("scrollTrack_mc", "scrollTrackOver_mc", "scrollTrackDown_mc", "upArrow_mc", "downArrow_mc");
var clipParameters = {minPos:1, maxPos:1, pageSize:1, scrollPosition:1, lineScrollSize:1, pageScrollSize:1, visible:1, enabled:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.scrollClasses.ScrollBar.prototype.clipParameters, mx.core.UIComponent.prototype.clipParameters);
var initializing = true;
}
Symbol 464 MovieClip [__Packages.mx.core.ScrollView] Frame 0
class mx.core.ScrollView extends mx.core.View
{
var __width, hScroller, vScroller, __maxHPosition, propsInited, scrollAreaChanged, specialHScrollCase, createObject, viewableColumns, __height, oldRndUp, viewableRows, __viewMetrics, owner, enabled, border_mc, __get__width, __get__height, invLayout, mask_mc, _parent, dispatchEvent;
function ScrollView () {
super();
}
function getHScrollPolicy(Void) {
return(__hScrollPolicy);
}
function setHScrollPolicy(policy) {
__hScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get hScrollPolicy() {
return(getHScrollPolicy());
}
function set hScrollPolicy(policy) {
setHScrollPolicy(policy);
//return(hScrollPolicy);
}
function getVScrollPolicy(Void) {
return(__vScrollPolicy);
}
function setVScrollPolicy(policy) {
__vScrollPolicy = policy.toLowerCase();
if (__width == undefined) {
return(undefined);
}
setScrollProperties(numberOfCols, columnWidth, rowC, rowH, heightPadding, widthPadding);
}
function get vScrollPolicy() {
return(getVScrollPolicy());
}
function set vScrollPolicy(policy) {
setVScrollPolicy(policy);
//return(vScrollPolicy);
}
function get hPosition() {
return(getHPosition());
}
function set hPosition(pos) {
setHPosition(pos);
//return(hPosition);
}
function getHPosition(Void) {
return(__hPosition);
}
function setHPosition(pos) {
hScroller.__set__scrollPosition(pos);
__hPosition = pos;
}
function get vPosition() {
return(getVPosition());
}
function set vPosition(pos) {
setVPosition(pos);
//return(vPosition);
}
function getVPosition(Void) {
return(__vPosition);
}
function setVPosition(pos) {
vScroller.__set__scrollPosition(pos);
__vPosition = pos;
}
function get maxVPosition() {
var _local2 = vScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function get maxHPosition() {
return(getMaxHPosition());
}
function set maxHPosition(pos) {
setMaxHPosition(pos);
//return(maxHPosition);
}
function getMaxHPosition(Void) {
if (__maxHPosition != undefined) {
return(__maxHPosition);
}
var _local2 = hScroller.maxPos;
return(((_local2 == undefined) ? 0 : (_local2)));
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
}
function setScrollProperties(colCount, colWidth, rwCount, rwHeight, hPadding, wPadding) {
var _local3 = getViewMetrics();
if (hPadding == undefined) {
hPadding = 0;
}
if (wPadding == undefined) {
wPadding = 0;
}
propsInited = true;
delete scrollAreaChanged;
heightPadding = hPadding;
widthPadding = wPadding;
if (colWidth == 0) {
colWidth = 1;
}
if (rwHeight == 0) {
rwHeight = 1;
}
var _local5 = Math.ceil((((__width - _local3.left) - _local3.right) - widthPadding) / colWidth);
if ((__hScrollPolicy == "on") || ((_local5 < colCount) && (__hScrollPolicy == "auto"))) {
if ((hScroller == undefined) || (specialHScrollCase)) {
delete specialHScrollCase;
hScroller = createObject("HScrollBar", "hSB", 1001);
hScroller.__set__lineScrollSize(20);
hScroller.scrollHandler = scrollProxy;
hScroller.__set__scrollPosition(__hPosition);
scrollAreaChanged = true;
}
if ((((numberOfCols != colCount) || (columnWidth != colWidth)) || (viewableColumns != _local5)) || (scrollAreaChanged)) {
hScroller.setScrollProperties(_local5, 0, colCount - _local5);
viewableColumns = _local5;
numberOfCols = colCount;
columnWidth = colWidth;
}
} else if (((__hScrollPolicy == "auto") || (__hScrollPolicy == "off")) && (hScroller != undefined)) {
hScroller.removeMovieClip();
delete hScroller;
scrollAreaChanged = true;
}
if (heightPadding == undefined) {
heightPadding = 0;
}
var _local4 = Math.ceil((((__height - _local3.top) - _local3.bottom) - heightPadding) / rwHeight);
var _local8 = (((__height - _local3.top) - _local3.bottom) % rwHeight) != 0;
if ((__vScrollPolicy == "on") || ((_local4 < (rwCount + _local8)) && (__vScrollPolicy == "auto"))) {
if (vScroller == undefined) {
vScroller = createObject("VScrollBar", "vSB", 1002);
vScroller.scrollHandler = scrollProxy;
vScroller.__set__scrollPosition(__vPosition);
scrollAreaChanged = true;
rowH = 0;
}
if ((((rowC != rwCount) || (rowH != rwHeight)) || ((viewableRows + _local8) != (_local4 + oldRndUp))) || (scrollAreaChanged)) {
vScroller.setScrollProperties(_local4, 0, (rwCount - _local4) + _local8);
viewableRows = _local4;
rowC = rwCount;
rowH = rwHeight;
oldRndUp = _local8;
}
} else if (((__vScrollPolicy == "auto") || (__vScrollPolicy == "off")) && (vScroller != undefined)) {
vScroller.removeMovieClip();
delete vScroller;
scrollAreaChanged = true;
}
numberOfCols = colCount;
columnWidth = colWidth;
if (scrollAreaChanged) {
doLayout();
var _local2 = __viewMetrics;
var _local12 = ((owner != undefined) ? (owner) : this);
_local12.layoutContent(_local2.left, _local2.top, ((columnWidth * numberOfCols) - _local2.left) - _local2.right, rowC * rowH, (__width - _local2.left) - _local2.right, (__height - _local2.top) - _local2.bottom);
}
if (!enabled) {
setEnabled(false);
}
}
function getViewMetrics(Void) {
var _local2 = __viewMetrics;
var _local3 = border_mc.__get__borderMetrics();
_local2.left = _local3.left;
_local2.right = _local3.right;
if (vScroller != undefined) {
_local2.right = _local2.right + vScroller.minWidth;
}
_local2.top = _local3.top;
if ((hScroller == undefined) && ((__hScrollPolicy == "on") || (__hScrollPolicy == true))) {
hScroller = createObject("FHScrollBar", "hSB", 1001);
specialHScrollCase = true;
}
_local2.bottom = _local3.bottom;
if (hScroller != undefined) {
_local2.bottom = _local2.bottom + hScroller.minHeight;
}
return(_local2);
}
function doLayout(Void) {
var _local10 = __get__width();
var _local8 = __get__height();
delete invLayout;
var _local3 = (__viewMetrics = getViewMetrics());
var _local2 = _local3.left;
var _local9 = _local3.right;
var _local5 = _local3.top;
var _local11 = _local3.bottom;
var _local7 = hScroller;
var _local6 = vScroller;
_local7.setSize((_local10 - _local2) - _local9, _local7.minHeight + 0);
_local7.move(_local2, _local8 - _local11);
_local6.setSize(_local6.minWidth + 0, (_local8 - _local5) - _local11);
_local6.move(_local10 - _local9, _local5);
var _local4 = mask_mc;
_local4._width = (_local10 - _local2) - _local9;
_local4._height = (_local8 - _local5) - _local11;
_local4._x = _local2;
_local4._y = _local5;
}
function createChild(id, name, props) {
var _local2 = super.createChild(id, name, props);
return(_local2);
}
function init(Void) {
super.init();
__viewMetrics = new Object();
if (_global.__SVMouseWheelManager == undefined) {
var _local4 = (_global.__SVMouseWheelManager = new Object());
_local4.onMouseWheel = __onMouseWheel;
Mouse.addListener(_local4);
}
}
function __onMouseWheel(delta, scrollTarget) {
var _local4 = scrollTarget;
var _local1;
while (_local4 != undefined) {
if (_local4 instanceof mx.core.ScrollView) {
_local1 = _local4;
}
_local4 = _local4._parent;
}
if (_local1 != undefined) {
_local4 = ((delta <= 0) ? 1 : -1);
var _local2 = _local1.vScroller.lineScrollSize;
if (_local2 == undefined) {
_local2 = 0;
}
_local2 = Math.max(Math.abs(delta), _local2);
var _local3 = _local1.vPosition + (_local2 * _local4);
_local1.vPosition = Math.max(0, Math.min(_local3, _local1.maxVPosition));
_local1.dispatchEvent({type:"scroll", direction:"vertical", position:_local1.vPosition});
}
}
function createChildren(Void) {
super.createChildren();
if (mask_mc == undefined) {
mask_mc = createObject("BoundingBox", "mask_mc", MASK_DEPTH);
}
mask_mc._visible = false;
}
function invalidate(Void) {
super.invalidate();
}
function draw(Void) {
size();
}
function size(Void) {
super.size();
}
function scrollProxy(docObj) {
_parent.onScroll(docObj);
}
function onScroll(docObj) {
var _local3 = docObj.target;
var _local2 = _local3.scrollPosition;
if (_local3 == vScroller) {
var _local4 = "vertical";
var _local5 = "__vPosition";
} else {
var _local4 = "horizontal";
var _local5 = "__hPosition";
}
this[_local5] = _local2;
dispatchEvent({type:"scroll", direction:_local4, position:_local2});
}
function setEnabled(v) {
vScroller.enabled = (hScroller.enabled = v);
}
function childLoaded(obj) {
super.childLoaded(obj);
obj.setMask(mask_mc);
}
static var symbolName = "ScrollView";
static var symbolOwner = mx.core.ScrollView;
static var version = "2.0.2.127";
var className = "ScrollView";
var __vScrollPolicy = "auto";
var __hScrollPolicy = "off";
var __vPosition = 0;
var __hPosition = 0;
var numberOfCols = 0;
var rowC = 0;
var columnWidth = 1;
var rowH = 0;
var heightPadding = 0;
var widthPadding = 0;
var MASK_DEPTH = 10000;
}
Symbol 465 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 466 MovieClip [__Packages.mx.controls.listclasses.ScrollSelectList] Frame 0
class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
{
var invLayoutContent, rows, topRowZ, listContent, __dataProvider, __vPosition, tW, layoutX, layoutY, tH, invRowHeight, invalidate, __height, invUpdateControl, __cellRenderer, __labelFunction, __iconField, __iconFunction, getLength, baseRowZ, lastPosition, propertyTable, isSelected, wasKeySelected, changeFlag, clearSelected, selectItem, lastSelected, dispatchEvent, dragScrolling, _ymouse, scrollInterval, isPressed, onMouseUp, getSelectedIndex, enabled, tabEnabled, tabChildren, createEmptyMovieClip, border_mc;
function ScrollSelectList () {
super();
}
function layoutContent(x, y, w, h) {
delete invLayoutContent;
var _local4 = Math.ceil(h / __rowHeight);
roundUp = (h % __rowHeight) != 0;
var _local12 = _local4 - __rowCount;
if (_local12 < 0) {
var _local3 = _local4;
while (_local3 < __rowCount) {
rows[_local3].removeMovieClip();
delete rows[_local3];
_local3++;
}
topRowZ = topRowZ + _local12;
} else if (_local12 > 0) {
if (rows == undefined) {
rows = new Array();
}
var _local3 = __rowCount;
while (_local3 < _local4) {
var _local2 = (rows[_local3] = listContent.createObject(__rowRenderer, "listRow" + (topRowZ++), topRowZ, {owner:this, styleName:this, rowIndex:_local3}));
_local2._x = x;
_local2._y = Math.round((_local3 * __rowHeight) + y);
_local2.setSize(w, __rowHeight);
_local2.drawRow(__dataProvider.getItemAt(__vPosition + _local3), getStateAt(__vPosition + _local3));
_local2.lastY = _local2._y;
_local3++;
}
}
if (w != tW) {
var _local11 = ((_local12 > 0) ? (__rowCount) : (_local4));
var _local3 = 0;
while (_local3 < _local11) {
rows[_local3].setSize(w, __rowHeight);
_local3++;
}
}
if ((layoutX != x) || (layoutY != y)) {
var _local3 = 0;
while (_local3 < _local4) {
rows[_local3]._x = x;
rows[_local3]._y = Math.round((_local3 * __rowHeight) + y);
_local3++;
}
}
__rowCount = _local4;
layoutX = x;
layoutY = y;
tW = w;
tH = h;
}
function getRowHeight(Void) {
return(__rowHeight);
}
function setRowHeight(v) {
__rowHeight = v;
invRowHeight = true;
invalidate();
}
function get rowHeight() {
return(getRowHeight());
}
function set rowHeight(w) {
setRowHeight(w);
//return(rowHeight);
}
function setRowCount(v) {
__rowCount = v;
}
function getRowCount(Void) {
var _local2 = ((__rowCount == 0) ? (Math.ceil(__height / __rowHeight)) : (__rowCount));
return(_local2);
}
function get rowCount() {
return(getRowCount());
}
function set rowCount(w) {
setRowCount(w);
//return(rowCount);
}
function setEnabled(v) {
super.setEnabled(v);
invUpdateControl = true;
invalidate();
}
function setCellRenderer(cR) {
__cellRenderer = cR;
var _local2 = 0;
while (_local2 < rows.length) {
rows[_local2].setCellRenderer(true);
_local2++;
}
invUpdateControl = true;
invalidate();
}
function set cellRenderer(cR) {
setCellRenderer(cR);
//return(cellRenderer);
}
function get cellRenderer() {
return(__cellRenderer);
}
function set labelField(field) {
setLabelField(field);
//return(labelField);
}
function setLabelField(field) {
__labelField = field;
invUpdateControl = true;
invalidate();
}
function get labelField() {
return(__labelField);
}
function set labelFunction(func) {
setLabelFunction(func);
//return(labelFunction);
}
function setLabelFunction(func) {
__labelFunction = func;
invUpdateControl = true;
invalidate();
}
function get labelFunction() {
return(__labelFunction);
}
function set iconField(field) {
setIconField(field);
//return(iconField);
}
function setIconField(field) {
__iconField = field;
invUpdateControl = true;
invalidate();
}
function get iconField() {
return(__iconField);
}
function set iconFunction(func) {
setIconFunction(func);
//return(iconFunction);
}
function setIconFunction(func) {
__iconFunction = func;
invUpdateControl = true;
invalidate();
}
function get iconFunction() {
return(__iconFunction);
}
function setVPosition(pos) {
if (pos < 0) {
return(undefined);
}
if ((pos > 0) && (pos > ((getLength() - __rowCount) + roundUp))) {
return(undefined);
}
var _local8 = pos - __vPosition;
if (_local8 == 0) {
return(undefined);
}
__vPosition = pos;
var _local10 = _local8 > 0;
_local8 = Math.abs(_local8);
if (_local8 >= __rowCount) {
updateControl();
} else {
var _local4 = new Array();
var _local9 = __rowCount - _local8;
var _local12 = _local8 * __rowHeight;
var _local11 = _local9 * __rowHeight;
var _local6 = (_local10 ? 1 : -1);
var _local3 = 0;
while (_local3 < __rowCount) {
if (((_local3 < _local8) && (_local10)) || ((_local3 >= _local9) && (!_local10))) {
rows[_local3]._y = rows[_local3]._y + Math.round(_local6 * _local11);
var _local5 = _local3 + (_local6 * _local9);
var _local7 = __vPosition + _local5;
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
_local4[_local5].drawRow(__dataProvider.getItemAt(_local7), getStateAt(_local7), false);
} else {
rows[_local3]._y = rows[_local3]._y - Math.round(_local6 * _local12);
var _local5 = _local3 - (_local6 * _local8);
_local4[_local5] = rows[_local3];
_local4[_local5].rowIndex = _local5;
}
_local3++;
}
rows = _local4;
_local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].swapDepths(baseRowZ + _local3);
_local3++;
}
}
lastPosition = pos;
super.setVPosition(pos);
}
function setPropertiesAt(index, obj) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
if (propertyTable == undefined) {
propertyTable = new Object();
}
propertyTable[_local2] = obj;
rows[index - __vPosition].drawRow(__dataProvider.getItemAt(index), getStateAt(index));
}
function getPropertiesAt(index) {
var _local2 = __dataProvider.getItemID(index);
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getPropertiesOf(obj) {
var _local2 = obj.getID();
if (_local2 == undefined) {
return(undefined);
}
return(propertyTable[_local2]);
}
function getStyle(styleProp) {
var _local2 = super.getStyle(styleProp);
var _local3 = mx.styles.StyleManager.colorNames[_local2];
if (_local3 != undefined) {
_local2 = _local3;
}
return(_local2);
}
function updateControl(Void) {
var _local2 = 0;
while (_local2 < __rowCount) {
rows[_local2].drawRow(__dataProvider.getItemAt(_local2 + __vPosition), getStateAt(_local2 + __vPosition));
_local2++;
}
delete invUpdateControl;
}
function getStateAt(index) {
return((isSelected(index) ? "selected" : "normal"));
}
function selectRow(rowIndex, transition, allowChangeEvent) {
if (!selectable) {
return(undefined);
}
var _local3 = __vPosition + rowIndex;
var _local8 = __dataProvider.getItemAt(_local3);
var _local5 = rows[rowIndex];
if (_local8 == undefined) {
return(undefined);
}
if (transition == undefined) {
transition = true;
}
if (allowChangeEvent == undefined) {
allowChangeEvent = wasKeySelected;
}
changeFlag = true;
if (((!multipleSelection) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
clearSelected(transition);
selectItem(_local3, true);
lastSelected = _local3;
_local5.drawRow(_local5.item, getStateAt(_local3), transition);
} else if (Key.isDown(16) && (multipleSelection)) {
if (lastSelected == undefined) {
lastSelected = _local3;
}
var _local4 = ((lastSelected < _local3) ? 1 : -1);
clearSelected(false);
var _local2 = lastSelected;
while (_local2 != _local3) {
selectItem(_local2, true);
if ((_local2 >= __vPosition) && (_local2 < (__vPosition + __rowCount))) {
rows[_local2 - __vPosition].drawRow(rows[_local2 - __vPosition].item, "selected", false);
}
_local2 = _local2 + _local4;
}
selectItem(_local3, true);
_local5.drawRow(_local5.item, "selected", transition);
} else if (Key.isDown(17)) {
var _local7 = isSelected(_local3);
if ((!multipleSelection) || (wasKeySelected)) {
clearSelected(transition);
}
if (!((!multipleSelection) && (_local7))) {
selectItem(_local3, !_local7);
var _local9 = ((!_local7) ? "selected" : "normal");
_local5.drawRow(_local5.item, _local9, transition);
}
lastSelected = _local3;
}
if (allowChangeEvent) {
dispatchEvent({type:"change"});
}
delete wasKeySelected;
}
function dragScroll(Void) {
clearInterval(dragScrolling);
if (_ymouse < 0) {
setVPosition(__vPosition - 1);
selectRow(0, false);
var _local2 = Math.min((-_ymouse) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else if (_ymouse > __height) {
var _local3 = __vPosition;
setVPosition(__vPosition + 1);
if (_local3 != __vPosition) {
selectRow((__rowCount - 1) - roundUp, false);
}
var _local2 = Math.min((_ymouse - __height) - 30, 0);
scrollInterval = (((0.593 * _local2) * _local2) + 1) + minScrollInterval;
dragScrolling = setInterval(this, "dragScroll", scrollInterval);
dispatchEvent({type:"scroll", direction:"vertical", position:__vPosition});
} else {
dragScrolling = setInterval(this, "dragScroll", 15);
}
updateAfterEvent();
}
function __onMouseUp(Void) {
clearInterval(dragScrolling);
delete dragScrolling;
delete dragScrolling;
delete isPressed;
delete onMouseUp;
if (!selectable) {
return(undefined);
}
if (changeFlag) {
dispatchEvent({type:"change"});
}
delete changeFlag;
}
function moveSelBy(incr) {
if (!selectable) {
setVPosition(__vPosition + incr);
return(undefined);
}
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = -1;
}
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < __vPosition) || (_local3 >= (__vPosition + __rowCount))) {
setVPosition(_local3);
}
if ((_local2 >= ((__vPosition + __rowCount) - roundUp)) || (_local2 < __vPosition)) {
setVPosition(__vPosition + incr);
}
wasKeySelected = true;
selectRow(_local2 - __vPosition, false);
}
function keyDown(e) {
if (selectable) {
if (findInputText()) {
return(undefined);
}
}
if (e.code == 40) {
moveSelBy(1);
} else if (e.code == 38) {
moveSelBy(-1);
} else if (e.code == 34) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((__rowCount - 1) - roundUp);
} else if (e.code == 33) {
if (selectable) {
var _local3 = getSelectedIndex();
if (_local3 == undefined) {
_local3 = 0;
}
setVPosition(_local3);
}
moveSelBy((1 - __rowCount) + roundUp);
} else if (e.code == 36) {
moveSelBy(-__dataProvider.length);
} else if (e.code == 35) {
moveSelBy(__dataProvider.length);
}
}
function findInputText(Void) {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
findString(String.fromCharCode(_local2));
return(true);
}
}
function findString(str) {
if (__dataProvider.length == 0) {
return(undefined);
}
var _local4 = getSelectedIndex();
if (_local4 == undefined) {
_local4 = 0;
}
var _local6 = 0;
var _local3 = _local4 + 1;
while (_local3 != _local4) {
var _local2 = __dataProvider.getItemAt(_local3);
if (_local2 instanceof XMLNode) {
_local2 = _local2.attributes[__labelField];
} else if (typeof(_local2) != "string") {
_local2 = String(_local2[__labelField]);
}
_local2 = _local2.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
_local6 = _local3 - _local4;
break;
}
if (_local3 >= (getLength() - 1)) {
_local3 = -1;
}
_local3++;
}
if (_local6 != 0) {
moveSelBy(_local6);
}
}
function onRowPress(rowIndex) {
if (!enabled) {
return(undefined);
}
isPressed = true;
dragScrolling = setInterval(this, "dragScroll", 15);
onMouseUp = __onMouseUp;
if (!selectable) {
return(undefined);
}
selectRow(rowIndex);
}
function onRowRelease(rowIndex) {
}
function onRowRollOver(rowIndex) {
if (!enabled) {
return(undefined);
}
var _local2 = rows[rowIndex].item;
if (getStyle("useRollOver") && (_local2 != undefined)) {
rows[rowIndex].drawRow(_local2, "highlighted", false);
}
dispatchEvent({type:"itemRollOver", index:rowIndex + __vPosition});
}
function onRowRollOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (getStyle("useRollOver")) {
rows[rowIndex].drawRow(rows[rowIndex].item, getStateAt(rowIndex + __vPosition), false);
}
dispatchEvent({type:"itemRollOut", index:rowIndex + __vPosition});
}
function onRowDragOver(rowIndex) {
if (((!enabled) || (isPressed != true)) || (!selectable)) {
return(undefined);
}
if (dropEnabled) {
} else if (dragScrolling) {
selectRow(rowIndex, false);
} else {
onMouseUp = __onMouseUp;
onRowPress(rowIndex);
}
}
function onRowDragOut(rowIndex) {
if (!enabled) {
return(undefined);
}
if (dragEnabled) {
} else {
onRowRollOut(rowIndex);
}
}
function init(Void) {
super.init();
tabEnabled = true;
tabChildren = false;
if (__dataProvider == undefined) {
__dataProvider = new Array();
__dataProvider.addEventListener("modelChanged", this);
}
baseRowZ = (topRowZ = 10);
}
function createChildren(Void) {
super.createChildren();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
invLayoutContent = true;
invalidate();
}
function draw(Void) {
if (invRowHeight) {
delete invRowHeight;
__rowCount = 0;
listContent.removeMovieClip();
listContent = createEmptyMovieClip("content_mc", CONTENTDEPTH);
}
if (invUpdateControl) {
updateControl();
}
border_mc.draw();
}
function invalidateStyle(propName) {
if (isRowStyle[propName]) {
invUpdateControl = true;
invalidate();
} else {
var _local3 = 0;
while (_local3 < __rowCount) {
rows[_local3].invalidateStyle(propName);
_local3++;
}
}
super.invalidateStyle(propName);
}
static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
var CONTENTDEPTH = 100;
var __hPosition = 0;
var __rowRenderer = "SelectableRow";
var __rowHeight = 22;
var __rowCount = 0;
var __labelField = "label";
var minScrollInterval = 30;
var dropEnabled = false;
var dragEnabled = false;
var className = "ScrollSelectList";
var isRowStyle = {styleName:true, backgroundColor:true, selectionColor:true, rollOverColor:true, selectionDisabledColor:true, backgroundDisabledColor:true, textColor:true, textSelectedColor:true, textRollOverColor:true, textDisabledColor:true, alternatingRowColors:true, defaultIcon:true};
var roundUp = 0;
var selectable = true;
var multipleSelection = false;
}
Symbol 467 MovieClip [__Packages.mx.controls.List] Frame 0
class mx.controls.List extends mx.controls.listclasses.ScrollSelectList
{
var border_mc, __labels, setDataProvider, roundUp, __get__rowCount, __dataProvider, __maxHPosition, invScrollProps, invalidate, __vPosition, getViewMetrics, setSize, __width, __rowHeight, totalWidth, totalHeight, displayWidth, __hScrollPolicy, vScroller, __hPosition, listContent, data, mask_mc, __height, __rowCount, invRowHeight, invLayoutContent, setScrollProperties, oldVWidth;
function List () {
super();
}
function setEnabled(v) {
super.setEnabled(v);
border_mc.backgroundColorName = (v ? "backgroundColor" : "backgroundDisabledColor");
border_mc.invalidate();
}
function get labels() {
return(__labels);
}
function set labels(lbls) {
__labels = lbls;
setDataProvider(lbls);
//return(labels);
}
function setVPosition(pos) {
pos = Math.min((__dataProvider.length - __get__rowCount()) + roundUp, pos);
pos = Math.max(0, pos);
super.setVPosition(pos);
}
function setHPosition(pos) {
pos = Math.max(Math.min(__maxHPosition, pos), 0);
super.setHPosition(pos);
hScroll(pos);
}
function setMaxHPosition(pos) {
__maxHPosition = pos;
invScrollProps = true;
invalidate();
}
function setHScrollPolicy(policy) {
if ((policy.toLowerCase() == "auto") && (!autoHScrollAble)) {
return(undefined);
}
super.setHScrollPolicy(policy);
if (policy == "off") {
setHPosition(0);
setVPosition(Math.min((__dataProvider.length - __get__rowCount()) + roundUp, __vPosition));
}
}
function setRowCount(rC) {
if (isNaN(rC)) {
return(undefined);
}
var _local2 = getViewMetrics();
setSize(__width, ((__rowHeight * rC) + _local2.top) + _local2.bottom);
}
function layoutContent(x, y, tW, tH, dW, dH) {
totalWidth = tW;
totalHeight = tH;
displayWidth = dW;
var _local4 = (((__hScrollPolicy == "on") || (__hScrollPolicy == "auto")) ? (Math.max(tW, dW)) : (dW));
super.layoutContent(x, y, _local4, dH);
}
function modelChanged(eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.eventName;
if ((((_local3 == "addItems") || (_local3 == "removeItems")) || (_local3 == "updateAll")) || (_local3 == "filterModel")) {
invScrollProps = true;
invalidate("invScrollProps");
}
}
function onScroll(eventObj) {
var _local3 = eventObj.target;
if (_local3 == vScroller) {
setVPosition(_local3.scrollPosition);
} else {
hScroll(_local3.scrollPosition);
}
super.onScroll(eventObj);
}
function hScroll(pos) {
__hPosition = pos;
listContent._x = -pos;
}
function init(Void) {
super.init();
if (labels.length > 0) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < labels.length) {
_local6.addItem({label:labels[_local3], data:data[_local3]});
_local3++;
}
setDataProvider(_local6);
}
__maxHPosition = 0;
}
function createChildren(Void) {
super.createChildren();
listContent.setMask(mask_mc);
border_mc.move(0, 0);
border_mc.setSize(__width, __height);
}
function getRowCount(Void) {
var _local2 = getViewMetrics();
return(((__rowCount == 0) ? (Math.ceil(((__height - _local2.top) - _local2.bottom) / __rowHeight)) : (__rowCount)));
}
function size(Void) {
super.size();
configureScrolling();
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
function draw(Void) {
if (invRowHeight) {
invScrollProps = true;
super.draw();
listContent.setMask(mask_mc);
invLayoutContent = true;
}
if (invScrollProps) {
configureScrolling();
delete invScrollProps;
}
if (invLayoutContent) {
var _local3 = getViewMetrics();
layoutContent(_local3.left, _local3.top, __width + __maxHPosition, totalHeight, (__width - _local3.left) - _local3.right, (__height - _local3.top) - _local3.bottom);
}
super.draw();
}
function configureScrolling(Void) {
var _local2 = __dataProvider.length;
if (__vPosition > Math.max(0, (_local2 - getRowCount()) + roundUp)) {
setVPosition(Math.max(0, Math.min((_local2 - getRowCount()) + roundUp, __vPosition)));
}
var _local3 = getViewMetrics();
var _local4 = ((__hScrollPolicy != "off") ? (((__maxHPosition + __width) - _local3.left) - _local3.right) : ((__width - _local3.left) - _local3.right));
if (_local2 == undefined) {
_local2 = 0;
}
setScrollProperties(_local4, 1, _local2, __rowHeight);
if (oldVWidth != _local4) {
invLayoutContent = true;
}
oldVWidth = _local4;
}
static var symbolOwner = mx.controls.List;
static var symbolName = "List";
var className = "List";
static var version = "2.0.2.127";
var clipParameters = {rowHeight:1, enabled:1, visible:1, labels:1};
var scrollDepth = 1;
var __vScrollPolicy = "on";
var autoHScrollAble = false;
}
Symbol 468 MovieClip [__Packages.mx.effects.Tween] Frame 0
class mx.effects.Tween extends Object
{
static var IntervalToken;
var arrayMode, listener, initVal, endVal, startTime, updateFunc, endFunc, ID;
function Tween (listenerObj, init, end, dur) {
super();
if (listenerObj == undefined) {
return;
}
if (typeof(init) != "number") {
arrayMode = true;
}
listener = listenerObj;
initVal = init;
endVal = end;
if (dur != undefined) {
duration = dur;
}
startTime = getTimer();
if (duration == 0) {
endTween();
} else {
AddTween(this);
}
}
static function AddTween(tween) {
tween.ID = ActiveTweens.length;
ActiveTweens.push(tween);
if (IntervalToken == undefined) {
Dispatcher.DispatchTweens = DispatchTweens;
IntervalToken = setInterval(Dispatcher, "DispatchTweens", Interval);
}
}
static function RemoveTweenAt(index) {
var _local2 = ActiveTweens;
if (((index >= _local2.length) || (index < 0)) || (index == undefined)) {
return(undefined);
}
_local2.splice(index, 1);
var _local4 = _local2.length;
var _local1 = index;
while (_local1 < _local4) {
_local2[_local1].ID--;
_local1++;
}
if (_local4 == 0) {
clearInterval(IntervalToken);
delete IntervalToken;
}
}
static function DispatchTweens(Void) {
var _local2 = ActiveTweens;
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2[_local1].doInterval();
_local1++;
}
updateAfterEvent();
}
function doInterval() {
var _local2 = getTimer() - startTime;
var _local3 = getCurVal(_local2);
if (_local2 >= duration) {
endTween();
} else if (updateFunc != undefined) {
listener[updateFunc](_local3);
} else {
listener.onTweenUpdate(_local3);
}
}
function getCurVal(curTime) {
if (arrayMode) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < initVal.length) {
_local3[_local2] = easingEquation(curTime, initVal[_local2], endVal[_local2] - initVal[_local2], duration);
_local2++;
}
return(_local3);
}
return(easingEquation(curTime, initVal, endVal - initVal, duration));
}
function endTween() {
if (endFunc != undefined) {
listener[endFunc](endVal);
} else {
listener.onTweenEnd(endVal);
}
RemoveTweenAt(ID);
}
function setTweenHandlers(update, end) {
updateFunc = update;
endFunc = end;
}
function easingEquation(t, b, c, d) {
return(((c / 2) * (Math.sin(Math.PI * ((t / d) - 0.5)) + 1)) + b);
}
static var ActiveTweens = new Array();
static var Interval = 10;
static var Dispatcher = new Object();
var duration = 3000;
}
Symbol 470 MovieClip [__Packages.mx.core.ext.UIObjectExtensions] Frame 0
class mx.core.ext.UIObjectExtensions
{
function UIObjectExtensions () {
}
static function addGeometry(tf, ui) {
tf.addProperty("width", ui.__get__width, null);
tf.addProperty("height", ui.__get__height, null);
tf.addProperty("left", ui.__get__left, null);
tf.addProperty("x", ui.__get__x, null);
tf.addProperty("top", ui.__get__top, null);
tf.addProperty("y", ui.__get__y, null);
tf.addProperty("right", ui.__get__right, null);
tf.addProperty("bottom", ui.__get__bottom, null);
tf.addProperty("visible", ui.__get__visible, ui.__set__visible);
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
var _local6 = mx.core.UIObject.prototype;
var _local9 = mx.skins.SkinElement.prototype;
addGeometry(_local9, _local6);
mx.events.UIEventDispatcher.initialize(_local6);
var _local13 = mx.skins.ColoredSkinElement;
mx.styles.CSSTextStyles.addTextStyles(_local6);
var _local5 = MovieClip.prototype;
_local5.getTopLevel = _local6.getTopLevel;
_local5.createLabel = _local6.createLabel;
_local5.createObject = _local6.createObject;
_local5.createClassObject = _local6.createClassObject;
_local5.createEmptyObject = _local6.createEmptyObject;
_local5.destroyObject = _local6.destroyObject;
_global.ASSetPropFlags(_local5, "getTopLevel", 1);
_global.ASSetPropFlags(_local5, "createLabel", 1);
_global.ASSetPropFlags(_local5, "createObject", 1);
_global.ASSetPropFlags(_local5, "createClassObject", 1);
_global.ASSetPropFlags(_local5, "createEmptyObject", 1);
_global.ASSetPropFlags(_local5, "destroyObject", 1);
_local5.__getTextFormat = _local6.__getTextFormat;
_local5._getTextFormat = _local6._getTextFormat;
_local5.getStyleName = _local6.getStyleName;
_local5.getStyle = _local6.getStyle;
_global.ASSetPropFlags(_local5, "__getTextFormat", 1);
_global.ASSetPropFlags(_local5, "_getTextFormat", 1);
_global.ASSetPropFlags(_local5, "getStyleName", 1);
_global.ASSetPropFlags(_local5, "getStyle", 1);
var _local7 = TextField.prototype;
addGeometry(_local7, _local6);
_local7.addProperty("enabled", function () {
return(this.__enabled);
}, function (x) {
this.__enabled = x;
this.invalidateStyle();
});
_local7.move = _local9.move;
_local7.setSize = _local9.setSize;
_local7.invalidateStyle = function () {
this.invalidateFlag = true;
};
_local7.draw = function () {
if (this.invalidateFlag) {
this.invalidateFlag = false;
var _local2 = this._getTextFormat();
this.setTextFormat(_local2);
this.setNewTextFormat(_local2);
this.embedFonts = _local2.embedFonts == true;
if (this.__text != undefined) {
if (this.text == "") {
this.text = this.__text;
}
delete this.__text;
}
this._visible = true;
}
};
_local7.setColor = function (color) {
this.textColor = color;
};
_local7.getStyle = _local5.getStyle;
_local7.__getTextFormat = _local6.__getTextFormat;
_local7.setValue = function (v) {
this.text = v;
};
_local7.getValue = function () {
return(this.text);
};
_local7.addProperty("value", function () {
return(this.getValue());
}, function (v) {
this.setValue(v);
});
_local7._getTextFormat = function () {
var _local2 = this.stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
this.__getTextFormat(_local2);
this.stylecache.tf = _local2;
if (this.__enabled == false) {
if (this.enabledColor == undefined) {
var _local4 = this.getTextFormat();
this.enabledColor = _local4.color;
}
var _local3 = this.getStyle("disabledColor");
_local2.color = _local3;
} else if (this.enabledColor != undefined) {
if (_local2.color == undefined) {
_local2.color = this.enabledColor;
}
}
return(_local2);
};
_local7.getPreferredWidth = function () {
this.draw();
return(this.textWidth + 4);
};
_local7.getPreferredHeight = function () {
this.draw();
return(this.textHeight + 4);
};
TextFormat.prototype.getTextExtent2 = function (s) {
var _local3 = _root._getTextExtent;
if (_local3 == undefined) {
_root.createTextField("_getTextExtent", -2, 0, 0, 1000, 100);
_local3 = _root._getTextExtent;
_local3._visible = false;
}
_root._getTextExtent.text = s;
var _local4 = this.align;
this.align = "left";
_root._getTextExtent.setTextFormat(this);
this.align = _local4;
return({width:_local3.textWidth, height:_local3.textHeight});
};
if (_global.style == undefined) {
_global.style = new mx.styles.CSSStyleDeclaration();
_global.cascadingStyles = true;
_global.styles = new Object();
_global.skinRegistry = new Object();
if (_global._origWidth == undefined) {
_global.origWidth = Stage.width;
_global.origHeight = Stage.height;
}
}
var _local4 = _root;
while (_local4._parent != undefined) {
_local4 = _local4._parent;
}
_local4.addProperty("width", function () {
return(Stage.width);
}, null);
_local4.addProperty("height", function () {
return(Stage.height);
}, null);
_global.ASSetPropFlags(_local4, "width", 1);
_global.ASSetPropFlags(_local4, "height", 1);
return(true);
}
static var bExtended = false;
static var UIObjectExtended = Extensions();
static var UIObjectDependency = mx.core.UIObject;
static var SkinElementDependency = mx.skins.SkinElement;
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
static var UIEventDispatcherDependency = mx.events.UIEventDispatcher;
}
Symbol 471 MovieClip [__Packages.mx.skins.halo.Defaults] Frame 0
class mx.skins.halo.Defaults
{
var beginGradientFill, beginFill, moveTo, lineTo, curveTo, endFill;
function Defaults () {
}
static function setThemeDefaults() {
var _local2 = _global.style;
_local2.themeColor = 8453965 /* 0x80FF4D */;
_local2.disabledColor = 8684164 /* 0x848284 */;
_local2.modalTransparency = 0;
_local2.filled = true;
_local2.stroked = true;
_local2.strokeWidth = 1;
_local2.strokeColor = 0;
_local2.fillColor = 16777215 /* 0xFFFFFF */;
_local2.repeatInterval = 35;
_local2.repeatDelay = 500;
_local2.fontFamily = "_sans";
_local2.fontSize = 12;
_local2.selectionColor = 13500353 /* 0xCDFFC1 */;
_local2.rollOverColor = 14942166 /* 0xE3FFD6 */;
_local2.useRollOver = true;
_local2.backgroundDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDisabledColor = 14540253 /* 0xDDDDDD */;
_local2.selectionDuration = 200;
_local2.openDuration = 250;
_local2.borderStyle = "inset";
_local2.color = 734012 /* 0x0B333C */;
_local2.textSelectedColor = 24371;
_local2.textRollOverColor = 2831164 /* 0x2B333C */;
_local2.textDisabledColor = 16777215 /* 0xFFFFFF */;
_local2.vGridLines = true;
_local2.hGridLines = false;
_local2.vGridLineColor = 6710886 /* 0x666666 */;
_local2.hGridLineColor = 6710886 /* 0x666666 */;
_local2.headerColor = 15395562 /* 0xEAEAEA */;
_local2.indentation = 17;
_local2.folderOpenIcon = "TreeFolderOpen";
_local2.folderClosedIcon = "TreeFolderClosed";
_local2.defaultLeafIcon = "TreeNodeIcon";
_local2.disclosureOpenIcon = "TreeDisclosureOpen";
_local2.disclosureClosedIcon = "TreeDisclosureClosed";
_local2.popupDuration = 150;
_local2.todayColor = 6710886 /* 0x666666 */;
_local2 = (_global.styles.ScrollSelectList = new mx.styles.CSSStyleDeclaration());
_local2.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.borderColor = 13290186 /* 0xCACACA */;
_local2.borderStyle = "inset";
_local2 = (_global.styles.ComboBox = new mx.styles.CSSStyleDeclaration());
_local2.borderStyle = "inset";
_local2 = (_global.styles.NumericStepper = new mx.styles.CSSStyleDeclaration());
_local2.textAlign = "center";
_local2 = (_global.styles.RectBorder = new mx.styles.CSSStyleDeclaration());
_local2.borderColor = 14015965 /* 0xD5DDDD */;
_local2.buttonColor = 7305079 /* 0x6F7777 */;
_local2.shadowColor = 15658734 /* 0xEEEEEE */;
_local2.highlightColor = 12897484 /* 0xC4CCCC */;
_local2.shadowCapColor = 14015965 /* 0xD5DDDD */;
_local2.borderCapColor = 9542041 /* 0x919999 */;
var _local4 = new Object();
_local4.borderColor = 16711680 /* 0xFF0000 */;
_local4.buttonColor = 16711680 /* 0xFF0000 */;
_local4.shadowColor = 16711680 /* 0xFF0000 */;
_local4.highlightColor = 16711680 /* 0xFF0000 */;
_local4.shadowCapColor = 16711680 /* 0xFF0000 */;
_local4.borderCapColor = 16711680 /* 0xFF0000 */;
mx.core.UIComponent.prototype.origBorderStyles = _local4;
var _local3;
_local3 = (_global.styles.TextInput = new mx.styles.CSSStyleDeclaration());
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderStyle = "inset";
_global.styles.TextArea = _global.styles.TextInput;
_local3 = (_global.styles.Window = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "default";
_local3 = (_global.styles.windowStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.dataGridStyles = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3 = (_global.styles.Alert = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "alert";
_local3 = (_global.styles.ScrollView = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "inset";
_local3 = (_global.styles.View = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "none";
_local3 = (_global.styles.ProgressBar = new mx.styles.CSSStyleDeclaration());
_local3.color = 11187123 /* 0xAAB3B3 */;
_local3.fontWeight = "bold";
_local3 = (_global.styles.AccordionHeader = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = "11";
_local3 = (_global.styles.Accordion = new mx.styles.CSSStyleDeclaration());
_local3.borderStyle = "solid";
_local3.backgroundColor = 16777215 /* 0xFFFFFF */;
_local3.borderColor = 9081738 /* 0x8A938A */;
_local3.headerHeight = 22;
_local3.marginLeft = (_local3.marginRight = (_local3.marginTop = (_local3.marginBottom = -1)));
_local3.verticalGap = -1;
_local3 = (_global.styles.DateChooser = new mx.styles.CSSStyleDeclaration());
_local3.borderColor = 9542041 /* 0x919999 */;
_local3.headerColor = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.CalendarLayout = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 10;
_local3.textAlign = "right";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.WeekDayStyle = new mx.styles.CSSStyleDeclaration());
_local3.fontWeight = "bold";
_local3.fontSize = 11;
_local3.textAlign = "center";
_local3.color = 2831164 /* 0x2B333C */;
_local3 = (_global.styles.TodayStyle = new mx.styles.CSSStyleDeclaration());
_local3.color = 16777215 /* 0xFFFFFF */;
_local3 = (_global.styles.HeaderDateText = new mx.styles.CSSStyleDeclaration());
_local3.fontSize = 12;
_local3.fontWeight = "bold";
_local3.textAlign = "center";
}
function drawRoundRect(x, y, w, h, r, c, alpha, rot, gradient, ratios) {
if (typeof(r) == "object") {
var _local18 = r.br;
var _local16 = r.bl;
var _local15 = r.tl;
var _local10 = r.tr;
} else {
var _local10 = r;
var _local15 = _local10;
var _local16 = _local15;
var _local18 = _local16;
}
if (typeof(c) == "object") {
if (typeof(alpha) != "object") {
var _local9 = [alpha, alpha];
} else {
var _local9 = alpha;
}
if (ratios == undefined) {
ratios = [0, 255];
}
var _local14 = h * 0.7;
if (typeof(rot) != "object") {
var _local11 = {matrixType:"box", x:-_local14, y:_local14, w:w * 2, h:h * 4, r:rot * 0.0174532925199433 /* Math.PI/180 */};
} else {
var _local11 = rot;
}
if (gradient == "radial") {
beginGradientFill("radial", c, _local9, ratios, _local11);
} else {
beginGradientFill("linear", c, _local9, ratios, _local11);
}
} else if (c != undefined) {
beginFill(c, alpha);
}
r = _local18;
var _local13 = r - (r * 0.707106781186547);
var _local12 = r - (r * 0.414213562373095);
moveTo(x + w, (y + h) - r);
lineTo(x + w, (y + h) - r);
curveTo(x + w, (y + h) - _local12, (x + w) - _local13, (y + h) - _local13);
curveTo((x + w) - _local12, y + h, (x + w) - r, y + h);
r = _local16;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x + r, y + h);
curveTo(x + _local12, y + h, x + _local13, (y + h) - _local13);
curveTo(x, (y + h) - _local12, x, (y + h) - r);
r = _local15;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo(x, y + r);
curveTo(x, y + _local12, x + _local13, y + _local13);
curveTo(x + _local12, y, x + r, y);
r = _local10;
_local13 = r - (r * 0.707106781186547);
_local12 = r - (r * 0.414213562373095);
lineTo((x + w) - r, y);
curveTo((x + w) - _local12, y, (x + w) - _local13, y + _local13);
curveTo(x + w, y + _local12, x + w, y + r);
lineTo(x + w, (y + h) - r);
if (c != undefined) {
endFill();
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
setThemeDefaults();
mx.core.UIObject.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
static var UIObjectDependency = mx.core.UIObject;
}
Symbol 472 MovieClip [__Packages.mx.managers.FocusManager] Frame 0
class mx.managers.FocusManager extends mx.core.UIComponent
{
var __defaultPushButton, defPushButton, form, move, tabEnabled, _width, _height, _x, _y, _alpha, _parent, tabCapture, watch, lastMouse, _visible, lastFocus, doLater, lastSelFocus, cancelAllDoLaters, _searchKey, _lastTarget, _firstNode, _nextIsNext, _nextNode, _lastx, _prevNode, _needPrev, _foundList, _prevObj, _nextObj, _firstObj, _lastObj, _lastNode, lastTabFocus, findFocusFromObject;
function FocusManager () {
super();
}
function get defaultPushButton() {
return(__defaultPushButton);
}
function set defaultPushButton(x) {
if (x != __defaultPushButton) {
__defaultPushButton.__set__emphasized(false);
__defaultPushButton = x;
defPushButton = x;
x.__set__emphasized(true);
}
//return(defaultPushButton);
}
function getMaxTabIndex(o) {
var _local3 = 0;
var _local6;
for (_local6 in o) {
var _local2 = o[_local6];
if (_local2._parent == o) {
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex > _local3) {
_local3 = _local2.tabIndex;
}
}
if (_local2.tabChildren == true) {
var _local4 = getMaxTabIndex(_local2);
if (_local4 > _local3) {
_local3 = _local4;
}
}
}
}
return(_local3);
}
function getNextTabIndex(Void) {
return(getMaxTabIndex(form) + 1);
}
function get nextTabIndex() {
return(getNextTabIndex());
}
function relocate(Void) {
var _local2 = mx.managers.SystemManager.__get__screen();
move(_local2.x - 1, _local2.y - 1);
}
function init(Void) {
super.init();
tabEnabled = false;
_width = (_height = 1);
_x = (_y = -1);
_alpha = 0;
_parent.focusManager = this;
_parent.tabChildren = true;
_parent.tabEnabled = false;
form = _parent;
_parent.addEventListener("hide", this);
_parent.addEventListener("reveal", this);
mx.managers.SystemManager.init();
mx.managers.SystemManager.addFocusManager(form);
tabCapture.tabIndex = 0;
watch("enabled", enabledChanged);
Selection.addListener(this);
lastMouse = new Object();
_global.ASSetPropFlags(_parent, "focusManager", 1);
_global.ASSetPropFlags(_parent, "tabChildren", 1);
_global.ASSetPropFlags(_parent, "tabEnabled", 1);
}
function enabledChanged(id, oldValue, newValue) {
_visible = newValue;
return(newValue);
}
function activate(Void) {
Key.addListener(this);
activated = (_visible = true);
if (lastFocus != undefined) {
bNeedFocus = true;
if (!mx.managers.SystemManager.isMouseDown) {
doLater(this, "restoreFocus");
}
}
}
function deactivate(Void) {
Key.removeListener(this);
activated = (_visible = false);
var _local2 = getSelectionFocus();
var _local3 = getActualFocus(_local2);
if (isOurFocus(_local3)) {
lastSelFocus = _local2;
lastFocus = _local3;
}
cancelAllDoLaters();
}
function isOurFocus(o) {
if (o.focusManager == this) {
return(true);
}
while (o != undefined) {
if (o.focusManager != undefined) {
return(false);
}
if (o._parent == _parent) {
return(true);
}
o = o._parent;
}
return(false);
}
function onSetFocus(o, n) {
if (n == null) {
if (activated) {
bNeedFocus = true;
}
} else {
var _local2 = getFocus();
if (isOurFocus(_local2)) {
bNeedFocus = false;
lastFocus = _local2;
lastSelFocus = n;
}
}
}
function restoreFocus(Void) {
var _local2 = lastSelFocus.hscroll;
if (_local2 != undefined) {
var _local5 = lastSelFocus.scroll;
var _local4 = lastSelFocus.background;
}
lastFocus.setFocus();
var _local3 = Selection;
Selection.setSelection(_local3.lastBeginIndex, _local3.lastEndIndex);
if (_local2 != undefined) {
lastSelFocus.scroll = _local5;
lastSelFocus.hscroll = _local2;
lastSelFocus.background = _local4;
}
}
function onUnload(Void) {
mx.managers.SystemManager.removeFocusManager(form);
}
function setFocus(o) {
if (o == null) {
Selection.setFocus(null);
} else if (o.setFocus == undefined) {
Selection.setFocus(o);
} else {
o.setFocus();
}
}
function getActualFocus(o) {
var _local1 = o._parent;
while (_local1 != undefined) {
if (_local1.focusTextField != undefined) {
while (_local1.focusTextField != undefined) {
o = _local1;
_local1 = _local1._parent;
if (_local1 == undefined) {
return(undefined);
}
if (_local1.focusTextField == undefined) {
return(o);
}
}
}
if (_local1.tabEnabled != true) {
return(o);
}
o = _local1;
_local1 = o._parent;
}
return(undefined);
}
function getSelectionFocus() {
var m = Selection.getFocus();
var o = eval (m);
return(o);
}
function getFocus(Void) {
var _local2 = getSelectionFocus();
return(getActualFocus(_local2));
}
function walkTree(p, index, groupName, dir, lookup, firstChild) {
var _local5 = true;
var _local11;
for (_local11 in p) {
var _local2 = p[_local11];
if ((((_local2._parent == p) && (_local2.enabled != false)) && (_local2._visible != false)) && ((_local2.tabEnabled == true) || ((_local2.tabEnabled != false) && ((((((((_local2.onPress != undefined) || (_local2.onRelease != undefined)) || (_local2.onReleaseOutside != undefined)) || (_local2.onDragOut != undefined)) || (_local2.onDragOver != undefined)) || (_local2.onRollOver != undefined)) || (_local2.onRollOut != undefined)) || (_local2 instanceof TextField))))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_local2 != _lastTarget) {
if (((_local2.groupName != undefined) || (groupName != undefined)) && (_local2.groupName == groupName)) {
continue;
}
if ((_local2 instanceof TextField) && (_local2.selectable == false)) {
continue;
}
if (_local5 || (((_local2.groupName != undefined) && (_local2.groupName == _firstNode.groupName)) && (_local2.selected == true))) {
if (firstChild) {
_firstNode = _local2;
firstChild = false;
}
}
if (_nextIsNext == true) {
if ((((_local2.groupName != undefined) && (_local2.groupName == _nextNode.groupName)) && (_local2.selected == true)) || ((_nextNode == undefined) && ((_local2.groupName == undefined) || ((_local2.groupName != undefined) && (_local2.groupName != groupName))))) {
_nextNode = _local2;
}
}
if ((_local2.groupName == undefined) || (groupName != _local2.groupName)) {
if (((_lastx.groupName != undefined) && (_local2.groupName == _lastx.groupName)) && (_lastx.selected == true)) {
} else {
_lastx = _local2;
}
}
} else {
_prevNode = _lastx;
_needPrev = false;
_nextIsNext = true;
}
if (_local2.tabIndex != undefined) {
if (_local2.tabIndex == index) {
if (_foundList[_local2._name] == undefined) {
if (_needPrev) {
_prevObj = _local2;
_needPrev = false;
}
_nextObj = _local2;
}
}
if (dir && (_local2.tabIndex > index)) {
if (((_nextObj == undefined) || ((_nextObj.tabIndex > _local2.tabIndex) && (((_local2.groupName == undefined) || (_nextObj.groupName == undefined)) || (_local2.groupName != _nextObj.groupName)))) || ((((_nextObj.groupName != undefined) && (_nextObj.groupName == _local2.groupName)) && (_nextObj.selected != true)) && ((_local2.selected == true) || (_nextObj.tabIndex > _local2.tabIndex)))) {
_nextObj = _local2;
}
} else if ((!dir) && (_local2.tabIndex < index)) {
if (((_prevObj == undefined) || ((_prevObj.tabIndex < _local2.tabIndex) && (((_local2.groupName == undefined) || (_prevObj.groupName == undefined)) || (_local2.groupName != _prevObj.groupName)))) || ((((_prevObj.groupName != undefined) && (_prevObj.groupName == _local2.groupName)) && (_prevObj.selected != true)) && ((_local2.selected == true) || (_prevObj.tabIndex < _local2.tabIndex)))) {
_prevObj = _local2;
}
}
if (((_firstObj == undefined) || ((_local2.tabIndex < _firstObj.tabIndex) && (((_local2.groupName == undefined) || (_firstObj.groupName == undefined)) || (_local2.groupName != _firstObj.groupName)))) || ((((_firstObj.groupName != undefined) && (_firstObj.groupName == _local2.groupName)) && (_firstObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex < _firstObj.tabIndex)))) {
_firstObj = _local2;
}
if (((_lastObj == undefined) || ((_local2.tabIndex > _lastObj.tabIndex) && (((_local2.groupName == undefined) || (_lastObj.groupName == undefined)) || (_local2.groupName != _lastObj.groupName)))) || ((((_lastObj.groupName != undefined) && (_lastObj.groupName == _local2.groupName)) && (_lastObj.selected != true)) && ((_local2.selected == true) || (_local2.tabIndex > _lastObj.tabIndex)))) {
_lastObj = _local2;
}
}
if (_local2.tabChildren) {
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
} else if (((_local2._parent == p) && (_local2.tabChildren == true)) && (_local2._visible != false)) {
if (_local2 == _lastTarget) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
if (_prevNode == undefined) {
var _local3 = _lastx;
var _local7 = false;
while (_local3 != undefined) {
if (_local3 == _local2) {
_local7 = true;
break;
}
_local3 = _local3._parent;
}
if (_local7 == false) {
_prevNode = _lastx;
}
}
_needPrev = false;
if (_nextNode == undefined) {
_nextIsNext = true;
}
} else if (!((_local2.focusManager != undefined) && (_local2.focusManager._parent == _local2))) {
if (_local2._searchKey == _searchKey) {
continue;
}
_local2._searchKey = _searchKey;
getTabCandidateFromChildren(_local2, index, groupName, dir, _local5 && (firstChild));
}
_local5 = false;
}
}
_lastNode = _lastx;
if (lookup) {
if (p._parent != undefined) {
if (p != _parent) {
if ((_prevNode == undefined) && (dir)) {
_needPrev = true;
} else if ((_nextNode == undefined) && (!dir)) {
_nextIsNext = false;
}
_lastTarget = _lastTarget._parent;
getTabCandidate(p._parent, index, groupName, dir, true);
}
}
}
}
function getTabCandidate(o, index, groupName, dir, firstChild) {
var _local2;
var _local3 = true;
if (o == _parent) {
_local2 = o;
_local3 = false;
} else {
_local2 = o._parent;
if (_local2 == undefined) {
_local2 = o;
_local3 = false;
}
}
walkTree(_local2, index, groupName, dir, _local3, firstChild);
}
function getTabCandidateFromChildren(o, index, groupName, dir, firstChild) {
walkTree(o, index, groupName, dir, false, firstChild);
}
function getFocusManagerFromObject(o) {
while (o != undefined) {
if (o.focusManager != undefined) {
return(o.focusManager);
}
o = o._parent;
}
return(undefined);
}
function tabHandler(Void) {
bDrawFocus = true;
var _local5 = getSelectionFocus();
var _local4 = getActualFocus(_local5);
if (_local4 != _local5) {
_local5 = _local4;
}
if (getFocusManagerFromObject(_local5) != this) {
_local5 == undefined;
}
if (_local5 == undefined) {
_local5 = form;
} else if (_local5.tabIndex != undefined) {
if ((_foundList != undefined) || (_foundList.tabIndex != _local5.tabIndex)) {
_foundList = new Object();
_foundList.tabIndex = _local5.tabIndex;
}
_foundList[_local5._name] = _local5;
}
var _local3 = Key.isDown(16) != true;
_searchKey = getTimer();
_needPrev = true;
_nextIsNext = false;
_lastx = undefined;
_firstNode = undefined;
_lastNode = undefined;
_nextNode = undefined;
_prevNode = undefined;
_firstObj = undefined;
_lastObj = undefined;
_nextObj = undefined;
_prevObj = undefined;
_lastTarget = _local5;
var _local6 = _local5;
getTabCandidate(_local6, ((_local5.tabIndex == undefined) ? 0 : (_local5.tabIndex)), _local5.groupName, _local3, true);
var _local2;
if (_local3) {
if (_nextObj != undefined) {
_local2 = _nextObj;
} else {
_local2 = _firstObj;
}
} else if (_prevObj != undefined) {
_local2 = _prevObj;
} else {
_local2 = _lastObj;
}
if (_local2.tabIndex != _local5.tabIndex) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
_foundList[_local2._name] = _local2;
} else {
if (_foundList == undefined) {
_foundList = new Object();
_foundList.tabIndex = _local2.tabIndex;
}
_foundList[_local2._name] = _local2;
}
if (_local2 == undefined) {
if (_local3 == false) {
if (_nextNode != undefined) {
_local2 = _nextNode;
} else {
_local2 = _firstNode;
}
} else if ((_prevNode == undefined) || (_local5 == form)) {
_local2 = _lastNode;
} else {
_local2 = _prevNode;
}
}
if (_local2 == undefined) {
return(undefined);
}
lastTabFocus = _local2;
setFocus(_local2);
if (_local2.emphasized != undefined) {
if (defPushButton != undefined) {
_local5 = defPushButton;
defPushButton = _local2;
_local5.emphasized = false;
_local2.emphasized = true;
}
} else if ((defPushButton != undefined) && (defPushButton != __defaultPushButton)) {
_local5 = defPushButton;
defPushButton = __defaultPushButton;
_local5.emphasized = false;
__defaultPushButton.__set__emphasized(true);
}
}
function onKeyDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
if (defaultPushButtonEnabled) {
if (Key.getCode() == 13) {
if (defaultPushButton != undefined) {
doLater(this, "sendDefaultPushButtonEvent");
}
}
}
}
function sendDefaultPushButtonEvent(Void) {
defPushButton.dispatchEvent({type:"click"});
}
function getMousedComponentFromChildren(x, y, o) {
for (var _local7 in o) {
var _local2 = o[_local7];
if (((_local2._visible && (_local2.enabled)) && (_local2._parent == o)) && (_local2._searchKey != _searchKey)) {
_local2._searchKey = _searchKey;
if (_local2.hitTest(x, y, true)) {
if ((_local2.onPress != undefined) || (_local2.onRelease != undefined)) {
return(_local2);
}
var _local3 = getMousedComponentFromChildren(x, y, _local2);
if (_local3 != undefined) {
return(_local3);
}
return(_local2);
}
}
}
return(undefined);
}
function mouseActivate(Void) {
if (!bNeedFocus) {
return(undefined);
}
_searchKey = getTimer();
var _local2 = getMousedComponentFromChildren(lastMouse.x, lastMouse.y, form);
if (_local2 instanceof mx.core.UIComponent) {
return(undefined);
}
_local2 = findFocusFromObject(_local2);
if (_local2 == lastFocus) {
return(undefined);
}
if (_local2 == undefined) {
doLater(this, "restoreFocus");
return(undefined);
}
var _local3 = _local2.hscroll;
if (_local3 != undefined) {
var _local6 = _local2.scroll;
var _local5 = _local2.background;
}
setFocus(_local2);
var _local4 = Selection;
Selection.setSelection(_local4.lastBeginIndex, _local4.lastEndIndex);
if (_local3 != undefined) {
_local2.scroll = _local6;
_local2.hscroll = _local3;
_local2.background = _local5;
}
}
function _onMouseDown(Void) {
bDrawFocus = false;
if (lastFocus != undefined) {
lastFocus.drawFocus(false);
}
mx.managers.SystemManager.idleFrames = 0;
var _local3 = Selection;
_local3.lastBeginIndex = Selection.getBeginIndex();
_local3.lastEndIndex = Selection.getEndIndex();
lastMouse.x = _root._xmouse;
lastMouse.y = _root._ymouse;
_root.localToGlobal(lastMouse);
}
function onMouseUp(Void) {
if (_visible) {
doLater(this, "mouseActivate");
}
}
function handleEvent(e) {
if (e.type == "reveal") {
mx.managers.SystemManager.activate(form);
} else {
mx.managers.SystemManager.deactivate(form);
}
}
static function enableFocusManagement() {
if (!initialized) {
initialized = true;
Object.registerClass("FocusManager", mx.managers.FocusManager);
if (_root.focusManager == undefined) {
_root.createClassObject(mx.managers.FocusManager, "focusManager", mx.managers.DepthManager.highestDepth--);
}
}
}
static var symbolName = "FocusManager";
static var symbolOwner = mx.managers.FocusManager;
static var version = "2.0.2.127";
var className = "FocusManager";
var bNeedFocus = false;
var bDrawFocus = false;
var defaultPushButtonEnabled = true;
var activated = true;
static var initialized = false;
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 473 MovieClip [__Packages.mx.skins.halo.FocusRect] Frame 0
class mx.skins.halo.FocusRect extends mx.skins.SkinElement
{
var boundingBox_mc, _xscale, _yscale, clear, beginFill, drawRoundRect, endFill, _visible;
function FocusRect () {
super();
boundingBox_mc._visible = false;
boundingBox_mc._width = (boundingBox_mc._height = 0);
}
function draw(o) {
o.adjustFocusRect();
}
function setSize(w, h, r, a, rectCol) {
_xscale = (_yscale = 100);
clear();
if (typeof(r) == "object") {
r.br = ((r.br > 2) ? (r.br - 2) : 0);
r.bl = ((r.bl > 2) ? (r.bl - 2) : 0);
r.tr = ((r.tr > 2) ? (r.tr - 2) : 0);
r.tl = ((r.tl > 2) ? (r.tl - 2) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
r.br = ((r.br > 1) ? (r.br + 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl + 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr + 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl + 1) : 0);
beginFill(rectCol, a * 0.3);
drawRoundRect(1, 1, w - 2, h - 2, r);
r.br = ((r.br > 1) ? (r.br - 1) : 0);
r.bl = ((r.bl > 1) ? (r.bl - 1) : 0);
r.tr = ((r.tr > 1) ? (r.tr - 1) : 0);
r.tl = ((r.tl > 1) ? (r.tl - 1) : 0);
drawRoundRect(2, 2, w - 4, h - 4, r);
endFill();
} else {
var _local5;
if (r != 0) {
_local5 = r - 2;
} else {
_local5 = 0;
}
beginFill(rectCol, a * 0.3);
drawRoundRect(0, 0, w, h, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
beginFill(rectCol, a * 0.3);
if (r != 0) {
_local5 = r - 2;
r = r - 1;
} else {
_local5 = 0;
r = 0;
}
drawRoundRect(1, 1, w - 2, h - 2, r);
drawRoundRect(2, 2, w - 4, h - 4, _local5);
endFill();
}
}
function handleEvent(e) {
if (e.type == "unload") {
_visible = true;
} else if (e.type == "resize") {
e.target.adjustFocusRect();
} else if (e.type == "move") {
e.target.adjustFocusRect();
}
}
static function classConstruct() {
mx.core.UIComponent.prototype.drawFocus = function (focused) {
var _local2 = this._parent.focus_mc;
if (!focused) {
_local2._visible = false;
this.removeEventListener("unload", _local2);
this.removeEventListener("move", _local2);
this.removeEventListener("resize", _local2);
} else {
if (_local2 == undefined) {
_local2 = this._parent.createChildAtDepth("FocusRect", mx.managers.DepthManager.kTop);
_local2.tabEnabled = false;
this._parent.focus_mc = _local2;
} else {
_local2._visible = true;
}
_local2.draw(this);
if (_local2.getDepth() < this.getDepth()) {
_local2.setDepthAbove(this);
}
this.addEventListener("unload", _local2);
this.addEventListener("move", _local2);
this.addEventListener("resize", _local2);
}
};
mx.core.UIComponent.prototype.adjustFocusRect = function () {
var _local2 = this.getStyle("themeColor");
if (_local2 == undefined) {
_local2 = 8453965 /* 0x80FF4D */;
}
var _local3 = this._parent.focus_mc;
_local3.setSize(this.width + 4, this.height + 4, 0, 100, _local2);
_local3.move(this.x - 2, this.y - 2);
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.adjustFocusRect = mx.core.UIComponent.prototype.adjustFocusRect;
mx.skins.halo.FocusRect.prototype.drawRoundRect = mx.skins.halo.Defaults.prototype.drawRoundRect;
return(true);
}
static var classConstructed = classConstruct();
static var DefaultsDependency = mx.skins.halo.Defaults;
static var UIComponentDependency = mx.core.UIComponent;
}
Symbol 474 MovieClip [__Packages.mx.managers.OverlappedWindows] Frame 0
class mx.managers.OverlappedWindows
{
function OverlappedWindows () {
}
static function checkIdle(Void) {
if (mx.managers.SystemManager.idleFrames > 10) {
mx.managers.SystemManager.dispatchEvent({type:"idle"});
} else {
mx.managers.SystemManager.idleFrames++;
}
}
static function __addEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager.interval == undefined) {
mx.managers.SystemManager.interval = setInterval(mx.managers.SystemManager.checkIdle, 100);
}
}
mx.managers.SystemManager._xAddEventListener(e, o, l);
}
static function __removeEventListener(e, o, l) {
if (e == "idle") {
if (mx.managers.SystemManager._xRemoveEventListener(e, o, l) == 0) {
clearInterval(mx.managers.SystemManager.interval);
}
} else {
mx.managers.SystemManager._xRemoveEventListener(e, o, l);
}
}
static function onMouseDown(Void) {
mx.managers.SystemManager.idleFrames = 0;
mx.managers.SystemManager.isMouseDown = true;
var _local5 = _root;
var _local3;
var _local8 = _root._xmouse;
var _local7 = _root._ymouse;
if (mx.managers.SystemManager.form.modalWindow == undefined) {
if (mx.managers.SystemManager.forms.length > 1) {
var _local6 = mx.managers.SystemManager.forms.length;
var _local4;
_local4 = 0;
while (_local4 < _local6) {
var _local2 = mx.managers.SystemManager.forms[_local4];
if (_local2._visible) {
if (_local2.hitTest(_local8, _local7)) {
if (_local3 == undefined) {
_local3 = _local2.getDepth();
_local5 = _local2;
} else if (_local3 < _local2.getDepth()) {
_local3 = _local2.getDepth();
_local5 = _local2;
}
}
}
_local4++;
}
if (_local5 != mx.managers.SystemManager.form) {
mx.managers.SystemManager.activate(_local5);
}
}
}
var _local9 = mx.managers.SystemManager.form;
_local9.focusManager._onMouseDown();
}
static function onMouseMove(Void) {
mx.managers.SystemManager.idleFrames = 0;
}
static function onMouseUp(Void) {
mx.managers.SystemManager.isMouseDown = false;
mx.managers.SystemManager.idleFrames = 0;
}
static function activate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form != f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local1 = mx.managers.SystemManager.form;
_local1.focusManager.deactivate();
}
}
mx.managers.SystemManager.form = f;
f.focusManager.activate();
}
static function deactivate(f) {
if (mx.managers.SystemManager.form != undefined) {
if ((mx.managers.SystemManager.form == f) && (mx.managers.SystemManager.forms.length > 1)) {
var _local5 = mx.managers.SystemManager.form;
_local5.focusManager.deactivate();
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
_local1 = _local1 + 1;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
mx.managers.SystemManager.form = _local2;
break;
}
if (mx.managers.SystemManager.forms[_local1]._visible == true) {
_local2 = mx.managers.SystemManager.forms[_local1];
}
_local1++;
}
_local5 = mx.managers.SystemManager.form;
_local5.focusManager.activate();
}
}
}
static function addFocusManager(f) {
mx.managers.SystemManager.forms.push(f);
mx.managers.SystemManager.activate(f);
}
static function removeFocusManager(f) {
var _local3 = mx.managers.SystemManager.forms.length;
var _local1;
_local1 = 0;
while (_local1 < _local3) {
if (mx.managers.SystemManager.forms[_local1] == f) {
if (mx.managers.SystemManager.form == f) {
mx.managers.SystemManager.deactivate(f);
}
mx.managers.SystemManager.forms.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
static function enableOverlappedWindows() {
if (!initialized) {
initialized = true;
mx.managers.SystemManager.checkIdle = checkIdle;
mx.managers.SystemManager.__addEventListener = __addEventListener;
mx.managers.SystemManager.__removeEventListener = __removeEventListener;
mx.managers.SystemManager.onMouseDown = onMouseDown;
mx.managers.SystemManager.onMouseMove = onMouseMove;
mx.managers.SystemManager.onMouseUp = onMouseUp;
mx.managers.SystemManager.activate = activate;
mx.managers.SystemManager.deactivate = deactivate;
mx.managers.SystemManager.addFocusManager = addFocusManager;
mx.managers.SystemManager.removeFocusManager = removeFocusManager;
}
}
static var initialized = false;
static var SystemManagerDependency = mx.managers.SystemManager;
}
Symbol 475 MovieClip [__Packages.mx.styles.CSSSetStyle] Frame 0
class mx.styles.CSSSetStyle
{
var styleName, stylecache, _color, setColor, invalidateStyle;
function CSSSetStyle () {
}
function _setStyle(styleProp, newValue) {
this[styleProp] = newValue;
if (mx.styles.StyleManager.TextStyleMap[styleProp] != undefined) {
if (styleProp == "color") {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
}
_level0.changeTextStyleInChildren(styleProp);
return(undefined);
}
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local7 = mx.styles.StyleManager.colorNames.haloBlue;
var _local6 = mx.styles.StyleManager.colorNames.haloGreen;
var _local8 = mx.styles.StyleManager.colorNames.haloOrange;
var _local4 = {};
_local4[_local7] = 12188666 /* 0xB9FBFA */;
_local4[_local6] = 13500353 /* 0xCDFFC1 */;
_local4[_local8] = 16766319 /* 0xFFD56F */;
var _local5 = {};
_local5[_local7] = 13958653 /* 0xD4FDFD */;
_local5[_local6] = 14942166 /* 0xE3FFD6 */;
_local5[_local8] = 16772787 /* 0xFFEEB3 */;
var _local9 = _local4[newValue];
var _local10 = _local5[newValue];
if (_local9 == undefined) {
_local9 = newValue;
}
if (_local10 == undefined) {
_local10 = newValue;
}
setStyle("selectionColor", _local9);
setStyle("rollOverColor", _local10);
}
_level0.changeColorStyleInChildren(styleName, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
_level0.notifyStyleChangeInChildren(styleName, styleProp, newValue);
}
}
function changeTextStyleInChildren(styleProp) {
var _local4 = getTimer();
var _local5;
for (_local5 in this) {
var _local2 = this[_local5];
if (_local2._parent == this) {
if (_local2.searchKey != _local4) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache.tf;
delete _local2.stylecache[styleProp];
}
_local2.invalidateStyle(styleProp);
_local2.changeTextStyleInChildren(styleProp);
_local2.searchKey = _local4;
}
}
}
}
function changeColorStyleInChildren(sheetName, colorStyle, newValue) {
var _local6 = getTimer();
var _local7;
for (_local7 in this) {
var _local2 = this[_local7];
if (_local2._parent == this) {
if (_local2.searchKey != _local6) {
if (((_local2.getStyleName() == sheetName) || (sheetName == undefined)) || (sheetName == "_global")) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[colorStyle];
}
if (typeof(_local2._color) == "string") {
if (_local2._color == colorStyle) {
var _local4 = _local2.getStyle(colorStyle);
if (colorStyle == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = _local4;
}
}
_local2.setColor(_local4);
}
} else if (_local2._color[colorStyle] != undefined) {
if (typeof(_local2) != "movieclip") {
_local2._parent.invalidateStyle();
} else {
_local2.invalidateStyle(colorStyle);
}
}
}
_local2.changeColorStyleInChildren(sheetName, colorStyle, newValue);
_local2.searchKey = _local6;
}
}
}
}
function notifyStyleChangeInChildren(sheetName, styleProp, newValue) {
var _local5 = getTimer();
var _local6;
for (_local6 in this) {
var _local2 = this[_local6];
if (_local2._parent == this) {
if (_local2.searchKey != _local5) {
if (((_local2.styleName == sheetName) || ((_local2.styleName != undefined) && (typeof(_local2.styleName) == "movieclip"))) || (sheetName == undefined)) {
if (_local2.stylecache != undefined) {
delete _local2.stylecache[styleProp];
delete _local2.stylecache.tf;
}
delete _local2.enabledColor;
_local2.invalidateStyle(styleProp);
}
_local2.notifyStyleChangeInChildren(sheetName, styleProp, newValue);
_local2.searchKey = _local5;
}
}
}
}
function setStyle(styleProp, newValue) {
if (stylecache != undefined) {
delete stylecache[styleProp];
delete stylecache.tf;
}
this[styleProp] = newValue;
if (mx.styles.StyleManager.isColorStyle(styleProp)) {
if (isNaN(newValue)) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
if (styleProp == "themeColor") {
var _local10 = mx.styles.StyleManager.colorNames.haloBlue;
var _local9 = mx.styles.StyleManager.colorNames.haloGreen;
var _local11 = mx.styles.StyleManager.colorNames.haloOrange;
var _local6 = {};
_local6[_local10] = 12188666 /* 0xB9FBFA */;
_local6[_local9] = 13500353 /* 0xCDFFC1 */;
_local6[_local11] = 16766319 /* 0xFFD56F */;
var _local7 = {};
_local7[_local10] = 13958653 /* 0xD4FDFD */;
_local7[_local9] = 14942166 /* 0xE3FFD6 */;
_local7[_local11] = 16772787 /* 0xFFEEB3 */;
var _local12 = _local6[newValue];
var _local13 = _local7[newValue];
if (_local12 == undefined) {
_local12 = newValue;
}
if (_local13 == undefined) {
_local13 = newValue;
}
setStyle("selectionColor", _local12);
setStyle("rollOverColor", _local13);
}
if (typeof(_color) == "string") {
if (_color == styleProp) {
if (styleProp == "color") {
if (stylecache.tf.color != undefined) {
stylecache.tf.color = newValue;
}
}
setColor(newValue);
}
} else if (_color[styleProp] != undefined) {
invalidateStyle(styleProp);
}
changeColorStyleInChildren(undefined, styleProp, newValue);
} else {
if ((styleProp == "backgroundColor") && (isNaN(newValue))) {
newValue = mx.styles.StyleManager.getColorName(newValue);
this[styleProp] = newValue;
if (newValue == undefined) {
return(undefined);
}
}
invalidateStyle(styleProp);
}
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (styleProp == "styleName")) {
var _local8;
var _local5 = newValue;
if (styleProp == "styleName") {
_local8 = ((typeof(newValue) == "string") ? (_global.styles[newValue]) : (_local5));
_local5 = _local8.themeColor;
if (_local5 != undefined) {
_local8.rollOverColor = (_local8.selectionColor = _local5);
}
}
notifyStyleChangeInChildren(undefined, styleProp, newValue);
}
}
static function enableRunTimeCSS() {
}
static function classConstruct() {
var _local2 = MovieClip.prototype;
var _local3 = mx.styles.CSSSetStyle.prototype;
mx.styles.CSSStyleDeclaration.prototype.setStyle = _local3._setStyle;
_local2.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
_local2.changeColorStyleInChildren = _local3.changeColorStyleInChildren;
_local2.notifyStyleChangeInChildren = _local3.notifyStyleChangeInChildren;
_local2.setStyle = _local3.setStyle;
_global.ASSetPropFlags(_local2, "changeTextStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "changeColorStyleInChildren", 1);
_global.ASSetPropFlags(_local2, "notifyStyleChangeInChildren", 1);
_global.ASSetPropFlags(_local2, "setStyle", 1);
var _local4 = TextField.prototype;
_local4.setStyle = _local2.setStyle;
_local4.changeTextStyleInChildren = _local3.changeTextStyleInChildren;
return(true);
}
static var classConstructed = classConstruct();
static var CSSStyleDeclarationDependency = mx.styles.CSSStyleDeclaration;
}
Symbol 476 MovieClip [__Packages.mx.core.ext.UIComponentExtensions] Frame 0
class mx.core.ext.UIComponentExtensions
{
function UIComponentExtensions () {
}
static function Extensions() {
if (bExtended == true) {
return(true);
}
bExtended = true;
TextField.prototype.setFocus = function () {
Selection.setFocus(this);
};
TextField.prototype.onSetFocus = function (oldFocus) {
if (this.tabEnabled != false) {
if (this.getFocusManager().bDrawFocus) {
this.drawFocus(true);
}
}
};
TextField.prototype.onKillFocus = function (oldFocus) {
if (this.tabEnabled != false) {
this.drawFocus(false);
}
};
TextField.prototype.drawFocus = mx.core.UIComponent.prototype.drawFocus;
TextField.prototype.getFocusManager = mx.core.UIComponent.prototype.getFocusManager;
mx.managers.OverlappedWindows.enableOverlappedWindows();
mx.styles.CSSSetStyle.enableRunTimeCSS();
mx.managers.FocusManager.enableFocusManagement();
}
static var bExtended = false;
static var UIComponentExtended = Extensions();
static var UIComponentDependency = mx.core.UIComponent;
static var FocusManagerDependency = mx.managers.FocusManager;
static var OverlappedWindowsDependency = mx.managers.OverlappedWindows;
}
Symbol 477 MovieClip [__Packages.mx.skins.halo.RectBorder] Frame 0
class mx.skins.halo.RectBorder extends mx.skins.RectBorder
{
var offset, getStyle, borderStyleName, __borderMetrics, className, borderColorName, backgroundColorName, shadowColorName, highlightColorName, buttonColorName, __get__width, __get__height, clear, _color, drawRoundRect, beginFill, drawRect, endFill;
function RectBorder () {
super();
}
function init(Void) {
borderWidths.default = 3;
super.init();
}
function getBorderMetrics(Void) {
if (offset == undefined) {
var _local3 = getStyle(borderStyleName);
offset = borderWidths[_local3];
}
if ((getStyle(borderStyleName) == "default") || (getStyle(borderStyleName) == "alert")) {
__borderMetrics = {left:3, top:1, right:3, bottom:3};
return(__borderMetrics);
}
return(super.getBorderMetrics());
}
function drawBorder(Void) {
var _local6 = _global.styles[className];
if (_local6 == undefined) {
_local6 = _global.styles.RectBorder;
}
var _local5 = getStyle(borderStyleName);
var _local7 = getStyle(borderColorName);
if (_local7 == undefined) {
_local7 = _local6[borderColorName];
}
var _local8 = getStyle(backgroundColorName);
if (_local8 == undefined) {
_local8 = _local6[backgroundColorName];
}
var _local16 = getStyle("backgroundImage");
if (_local5 != "none") {
var _local14 = getStyle(shadowColorName);
if (_local14 == undefined) {
_local14 = _local6[shadowColorName];
}
var _local13 = getStyle(highlightColorName);
if (_local13 == undefined) {
_local13 = _local6[highlightColorName];
}
var _local12 = getStyle(buttonColorName);
if (_local12 == undefined) {
_local12 = _local6[buttonColorName];
}
var _local11 = getStyle(borderCapColorName);
if (_local11 == undefined) {
_local11 = _local6[borderCapColorName];
}
var _local10 = getStyle(shadowCapColorName);
if (_local10 == undefined) {
_local10 = _local6[shadowCapColorName];
}
}
offset = borderWidths[_local5];
var _local9 = offset;
var _local3 = __get__width();
var _local4 = __get__height();
clear();
_color = undefined;
if (_local5 == "none") {
} else if (_local5 == "inset") {
_color = colorList;
draw3dBorder(_local11, _local12, _local7, _local13, _local14, _local10);
} else if (_local5 == "outset") {
_color = colorList;
draw3dBorder(_local11, _local7, _local12, _local14, _local13, _local10);
} else if (_local5 == "alert") {
var _local15 = getStyle("themeColor");
drawRoundRect(0, 5, _local3, _local4 - 5, 5, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, 4, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, 3, _local15, 50);
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, 2, 16777215, 100);
} else if (_local5 == "default") {
drawRoundRect(0, 5, _local3, _local4 - 5, {tl:5, tr:5, br:0, bl:0}, 6184542, 10);
drawRoundRect(1, 4, _local3 - 2, _local4 - 5, {tl:4, tr:4, br:0, bl:0}, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(2, 0, _local3 - 4, _local4 - 2, {tl:3, tr:3, br:0, bl:0}, [12897484, 11844796], 100, 0, "radial");
drawRoundRect(3, 1, _local3 - 6, _local4 - 4, {tl:2, tr:2, br:0, bl:0}, 16777215, 100);
} else if (_local5 == "dropDown") {
drawRoundRect(0, 0, _local3 + 1, _local4, {tl:4, tr:0, br:0, bl:4}, [13290186, 7895160], 100, -10, "linear");
drawRoundRect(1, 1, _local3 - 1, _local4 - 2, {tl:3, tr:0, br:0, bl:3}, 16777215, 100);
} else if (_local5 == "menuBorder") {
var _local15 = getStyle("themeColor");
drawRoundRect(4, 4, _local3 - 2, _local4 - 3, 0, [6184542, 6184542], 10, 0, "radial");
drawRoundRect(4, 4, _local3 - 1, _local4 - 2, 0, 6184542, 10);
drawRoundRect(0, 0, _local3 + 1, _local4, 0, [0, 14342874], 100, 250, "linear");
drawRoundRect(0, 0, _local3 + 1, _local4, 0, _local15, 50);
drawRoundRect(2, 2, _local3 - 3, _local4 - 4, 0, 16777215, 100);
} else if (_local5 == "comboNonEdit") {
} else {
beginFill(_local7);
drawRect(0, 0, _local3, _local4);
drawRect(1, 1, _local3 - 1, _local4 - 1);
endFill();
_color = borderColorName;
}
if (_local8 != undefined) {
beginFill(_local8);
drawRect(_local9, _local9, __get__width() - _local9, __get__height() - _local9);
endFill();
}
}
function draw3dBorder(c1, c2, c3, c4, c5, c6) {
var _local3 = __get__width();
var _local2 = __get__height();
beginFill(c1);
drawRect(0, 0, _local3, _local2);
drawRect(1, 0, _local3 - 1, _local2);
endFill();
beginFill(c2);
drawRect(1, 0, _local3 - 1, 1);
endFill();
beginFill(c3);
drawRect(1, _local2 - 1, _local3 - 1, _local2);
endFill();
beginFill(c4);
drawRect(1, 1, _local3 - 1, 2);
endFill();
beginFill(c5);
drawRect(1, _local2 - 2, _local3 - 1, _local2 - 1);
endFill();
beginFill(c6);
drawRect(1, 2, _local3 - 1, _local2 - 2);
drawRect(2, 2, _local3 - 2, _local2 - 2);
endFill();
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.styles.rectBorderClass = mx.skins.halo.RectBorder;
_global.skinRegistry.RectBorder = true;
return(true);
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.halo.RectBorder;
static var version = "2.0.2.127";
var borderCapColorName = "borderCapColor";
var shadowCapColorName = "shadowCapColor";
var colorList = {highlightColor:0, borderColor:0, buttonColor:0, shadowColor:0, borderCapColor:0, shadowCapColor:0};
var borderWidths = {none:0, solid:1, inset:2, outset:2, alert:3, dropDown:2, menuBorder:2, comboNonEdit:2};
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 478 MovieClip [__Packages.mx.controls.listclasses.SelectableRow] Frame 0
class mx.controls.listclasses.SelectableRow extends mx.core.UIComponent
{
var __height, cell, owner, rowIndex, icon_mc, createObject, __width, backGround, highlight, highlightColor, createLabel, createClassObject, listOwner, tabEnabled, item, createEmptyMovieClip, drawRect, isChangedToSelected, bGTween, grandOwner;
function SelectableRow () {
super();
}
function setValue(itmObj, state) {
var _local7 = __height;
var _local2 = cell;
var _local5 = owner;
var _local8 = itemToString(itmObj);
if (_local2.getValue() != _local8) {
_local2.setValue(_local8, itmObj, state);
}
var _local4 = _local5.getPropertiesAt(rowIndex + _local5.__vPosition).icon;
if (_local4 == undefined) {
_local4 = _local5.__iconFunction(itmObj);
if (_local4 == undefined) {
_local4 = itmObj[_local5.__iconField];
if (_local4 == undefined) {
_local4 = _local5.getStyle("defaultIcon");
}
}
}
var _local3 = icon_mc;
if ((_local4 != undefined) && (itmObj != undefined)) {
_local3 = createObject(_local4, "icon_mc", 20);
_local3._x = 2;
_local3._y = (_local7 - _local3._height) / 2;
_local2._x = 4 + _local3._width;
} else {
_local3.removeMovieClip();
_local2._x = 2;
}
var _local9 = ((_local3 == undefined) ? 0 : (_local3._width));
_local2.setSize(__width - _local9, Math.min(_local7, _local2.getPreferredHeight()));
_local2._y = (_local7 - _local2._height) / 2;
}
function size(Void) {
var _local3 = backGround;
var _local2 = cell;
var _local4 = __height;
var _local5 = __width;
var _local6 = ((icon_mc == undefined) ? 0 : (icon_mc._width));
_local2.setSize(_local5 - _local6, Math.min(_local4, _local2.getPreferredHeight()));
_local2._y = (_local4 - _local2._height) / 2;
icon_mc._y = (_local4 - icon_mc._height) / 2;
_local3._x = 0;
_local3._width = _local5;
_local3._height = _local4;
drawRowFill(_local3, normalColor);
drawRowFill(highlight, highlightColor);
}
function setCellRenderer(forceSizing) {
var _local3 = owner.__cellRenderer;
var _local4;
if (cell != undefined) {
_local4 = cell._x;
cell.removeMovieClip();
cell.removeTextField();
}
var _local2;
if (_local3 == undefined) {
_local2 = (cell = createLabel("cll", 0, {styleName:this}));
_local2.styleName = owner;
_local2.selectable = false;
_local2.tabEnabled = false;
_local2.background = false;
_local2.border = false;
} else if (typeof(_local3) == "string") {
_local2 = (cell = createObject(_local3, "cll", 0, {styleName:this}));
} else {
_local2 = (cell = createClassObject(_local3, "cll", 0, {styleName:this}));
}
_local2.owner = this;
_local2.listOwner = owner;
_local2.getCellIndex = getCellIndex;
_local2.getDataLabel = getDataLabel;
if (_local4 != undefined) {
_local2._x = _local4;
}
if (forceSizing) {
size();
}
}
function getCellIndex(Void) {
return({columnIndex:0, itemIndex:owner.rowIndex + listOwner.__vPosition});
}
function getDataLabel() {
return(listOwner.labelField);
}
function init(Void) {
super.init();
tabEnabled = false;
}
function createChildren(Void) {
setCellRenderer(false);
setupBG();
setState(state, false);
}
function drawRow(itmObj, state, transition) {
item = itmObj;
setState(state, transition);
setValue(itmObj, state, transition);
}
function itemToString(itmObj) {
if (itmObj == undefined) {
return(" ");
}
var _local2 = owner.__labelFunction(itmObj);
if (_local2 == undefined) {
_local2 = ((itmObj instanceof XMLNode) ? (itmObj.attributes[owner.__labelField]) : (itmObj[owner.__labelField]));
if (_local2 == undefined) {
_local2 = " ";
if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
}
}
return(_local2);
}
function setupBG(Void) {
var _local2 = (backGround = createEmptyMovieClip("bG_mc", LOWEST_DEPTH));
drawRowFill(_local2, normalColor);
highlight = createEmptyMovieClip("tran_mc", LOWEST_DEPTH + 10);
_local2.owner = this;
_local2.grandOwner = owner;
_local2.onPress = bGOnPress;
_local2.onRelease = bGOnRelease;
_local2.onRollOver = bGOnRollOver;
_local2.onRollOut = bGOnRollOut;
_local2.onDragOver = bGOnDragOver;
_local2.onDragOut = bGOnDragOut;
_local2.useHandCursor = false;
_local2.trackAsMenu = true;
_local2.drawRect = drawRect;
highlight.drawRect = drawRect;
}
function drawRowFill(mc, newClr) {
mc.clear();
mc.beginFill(newClr);
mc.drawRect(1, 0, __width, __height);
mc.endFill();
mc._width = __width;
mc._height = __height;
}
function setState(newState, transition) {
var _local2 = highlight;
var _local8 = backGround;
var _local4 = __height;
var _local3 = owner;
if (!_local3.enabled) {
if ((newState == "selected") || (state == "selected")) {
highlightColor = _local3.getStyle("selectionDisabledColor");
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local2._y = 0;
_local2._height = _local4;
} else {
_local2._visible = false;
normalColor = _local3.getStyle("backgroundDisabledColor");
drawRowFill(_local8, normalColor);
}
cell.__enabled = false;
cell.setColor(_local3.getStyle("disabledColor"));
} else {
cell.__enabled = true;
if (transition && ((newState == state) || ((newState == "highlighted") && (state == "selected")))) {
isChangedToSelected = true;
return(undefined);
}
var _local6 = _local3.getStyle("selectionDuration");
var _local7 = 0;
if (isChangedToSelected && (newState == "selected")) {
transition = false;
}
var _local10 = transition && (_local6 != 0);
if (newState == "normal") {
_local7 = _local3.getStyle("color");
normalColor = getNormalColor();
drawRowFill(_local8, normalColor);
if (_local10) {
_local6 = _local6 / 2;
_local2._height = _local4;
_local2._width = __width;
_local2._y = 0;
bGTween = new mx.effects.Tween(this, _local4 + 2, _local4 * 0.2, _local6, 5);
} else {
_local2._visible = false;
}
delete isChangedToSelected;
} else {
highlightColor = _local3.getStyle(((newState == "highlighted") ? "rollOverColor" : "selectionColor"));
drawRowFill(_local2, highlightColor);
_local2._visible = true;
_local7 = _local3.getStyle(((newState == "highlighted") ? "textRollOverColor" : "textSelectedColor"));
if (_local10) {
_local2._height = _local4 * 0.5;
_local2._y = (_local4 - _local2._height) / 2;
bGTween = new mx.effects.Tween(this, _local2._height, _local4 + 2, _local6, 5);
var _local9 = _local3.getStyle("selectionEasing");
if (_local9 != undefined) {
bGTween.easingEquation = _local9;
}
} else {
_local2._y = 0;
_local2._height = _local4;
}
}
cell.setColor(_local7);
}
state = newState;
}
function onTweenUpdate(val) {
highlight._height = val;
highlight._y = (__height - val) / 2;
}
function onTweenEnd(val) {
onTweenUpdate(val);
highlight._visible = state != "normal";
}
function getNormalColor(Void) {
var _local3;
var _local2 = owner;
if (!owner.enabled) {
_local3 = _local2.getStyle("backgroundDisabledColor");
} else {
var _local5 = rowIndex + _local2.__vPosition;
if (rowIndex == undefined) {
_local3 = _local2.getPropertiesOf(item).backgroundColor;
} else {
_local3 = _local2.getPropertiesAt(_local5).backgroundColor;
}
if (_local3 == undefined) {
var _local4 = _local2.getStyle("alternatingRowColors");
if (_local4 == undefined) {
_local3 = _local2.getStyle("backgroundColor");
} else {
_local3 = _local4[_local5 % _local4.length];
}
}
}
return(_local3);
}
function invalidateStyle(propName) {
cell.invalidateStyle(propName);
super.invalidateStyle(propName);
}
function bGOnPress(Void) {
grandOwner.pressFocus();
grandOwner.onRowPress(owner.rowIndex);
}
function bGOnRelease(Void) {
grandOwner.releaseFocus();
grandOwner.onRowRelease(owner.rowIndex);
}
function bGOnRollOver(Void) {
grandOwner.onRowRollOver(owner.rowIndex);
}
function bGOnRollOut(Void) {
grandOwner.onRowRollOut(owner.rowIndex);
}
function bGOnDragOver(Void) {
grandOwner.onRowDragOver(owner.rowIndex);
}
function bGOnDragOut(Void) {
grandOwner.onRowDragOut(owner.rowIndex);
}
static var LOWEST_DEPTH = -16384;
var state = "normal";
var disabledColor = 15263976;
var normalColor = 16777215;
}
Symbol 479 MovieClip [__Packages.mx.controls.HScrollBar] Frame 0
class mx.controls.HScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var _minHeight, _minWidth, _xscale, _rotation, __width, scrollIt;
function HScrollBar () {
super();
}
function getMinWidth(Void) {
return(_minHeight);
}
function getMinHeight(Void) {
return(_minWidth);
}
function init(Void) {
super.init();
_xscale = -100;
_rotation = -90;
}
function get virtualHeight() {
return(__width);
}
function isScrollBarKey(k) {
if (k == 37) {
scrollIt("Line", -1);
return(true);
}
if (k == 39) {
scrollIt("Line", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "HScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
var className = "HScrollBar";
var minusMode = "Left";
var plusMode = "Right";
var minMode = "AtLeft";
var maxMode = "AtRight";
}
Symbol 480 MovieClip [__Packages.mx.controls.Button] Frame 0
class mx.controls.Button extends mx.controls.SimpleButton
{
var initializing, labelPath, initIcon, getState, enabled, phase, idNames, __width, __height, setState, invalidate, iconName, refresh, createLabel, _iconLinkageName, removeIcons, hitArea_mc, createEmptyObject;
function Button () {
super();
}
function init(Void) {
super.init();
}
function draw() {
if (initializing) {
labelPath.visible = true;
}
super.draw();
if (initIcon != undefined) {
_setIcon(initIcon);
}
delete initIcon;
}
function onRelease(Void) {
super.onRelease();
}
function createChildren(Void) {
super.createChildren();
}
function setSkin(tag, linkageName, initobj) {
return(super.setSkin(tag, linkageName, initobj));
}
function viewSkin(varName) {
var _local3 = (getState() ? "true" : "false");
_local3 = _local3 + (enabled ? (phase) : "disabled");
super.viewSkin(varName, {styleName:this, borderStyle:_local3});
}
function invalidateStyle(c) {
labelPath.invalidateStyle(c);
super.invalidateStyle(c);
}
function setColor(c) {
var _local2 = 0;
while (_local2 < 8) {
this[idNames[_local2]].redraw(true);
_local2++;
}
}
function setEnabled(enable) {
labelPath.enabled = enable;
super.setEnabled(enable);
}
function calcSize(tag, ref) {
if ((__width == undefined) || (__height == undefined)) {
return(undefined);
}
if (tag < 7) {
ref.setSize(__width, __height, true);
}
}
function size(Void) {
setState(getState());
setHitArea(__width, __height);
var _local3 = 0;
while (_local3 < 8) {
var _local4 = idNames[_local3];
if (typeof(this[_local4]) == "movieclip") {
this[_local4].setSize(__width, __height, true);
}
_local3++;
}
super.size();
}
function set labelPlacement(val) {
__labelPlacement = val;
invalidate();
//return(labelPlacement);
}
function get labelPlacement() {
return(__labelPlacement);
}
function getLabelPlacement(Void) {
return(__labelPlacement);
}
function setLabelPlacement(val) {
__labelPlacement = val;
invalidate();
}
function getBtnOffset(Void) {
if (getState()) {
var _local2 = btnOffset;
} else if (phase == "down") {
var _local2 = btnOffset;
} else {
var _local2 = 0;
}
return(_local2);
}
function setView(offset) {
var _local16 = (offset ? (btnOffset) : 0);
var _local12 = getLabelPlacement();
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
var _local8 = 0;
var _local5 = 0;
var _local4 = 0;
var _local3 = labelPath;
var _local2 = iconName;
var _local15 = _local3.textWidth;
var _local14 = _local3.textHeight;
var _local10 = (__width - borderW) - borderW;
var _local11 = (__height - borderW) - borderW;
if (_local2 != undefined) {
_local7 = _local2._width;
_local6 = _local2._height;
}
if ((_local12 == "left") || (_local12 == "right")) {
if (_local3 != undefined) {
_local9 = Math.min(_local10 - _local7, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11, _local14 + 5);
_local3._height = _local8;
}
if (_local12 == "right") {
_local5 = _local7;
if (centerContent) {
_local5 = _local5 + (((_local10 - _local9) - _local7) / 2);
}
_local2._x = _local5 - _local7;
} else {
_local5 = (_local10 - _local9) - _local7;
if (centerContent) {
_local5 = _local5 / 2;
}
_local2._x = _local5 + _local9;
}
_local4 = 0;
_local2._y = _local4;
if (centerContent) {
_local2._y = (_local11 - _local6) / 2;
_local4 = (_local11 - _local8) / 2;
}
if (!centerContent) {
_local2._y = _local2._y + Math.max(0, (_local8 - _local6) / 2);
}
} else {
if (_local3 != undefined) {
_local9 = Math.min(_local10, _local15 + 5);
_local3._width = _local9;
_local8 = Math.min(_local11 - _local6, _local14 + 5);
_local3._height = _local8;
}
_local5 = (_local10 - _local9) / 2;
_local2._x = (_local10 - _local7) / 2;
if (_local12 == "top") {
_local4 = (_local11 - _local8) - _local6;
if (centerContent) {
_local4 = _local4 / 2;
}
_local2._y = _local4 + _local8;
} else {
_local4 = _local6;
if (centerContent) {
_local4 = _local4 + (((_local11 - _local8) - _local6) / 2);
}
_local2._y = _local4 - _local6;
}
}
var _local13 = borderW + _local16;
_local3._x = _local5 + _local13;
_local3._y = _local4 + _local13;
_local2._x = _local2._x + _local13;
_local2._y = _local2._y + _local13;
}
function set label(lbl) {
setLabel(lbl);
//return(label);
}
function setLabel(label) {
if (label == "") {
labelPath.removeTextField();
refresh();
return(undefined);
}
if (labelPath == undefined) {
var _local2 = createLabel("labelPath", 200, label);
_local2._width = _local2.textWidth + 5;
_local2._height = _local2.textHeight + 5;
if (initializing) {
_local2.visible = false;
}
} else {
delete labelPath.__text;
labelPath.text = label;
refresh();
}
}
function getLabel(Void) {
return(((labelPath.__text != undefined) ? (labelPath.__text) : (labelPath.text)));
}
function get label() {
return(getLabel());
}
function _getIcon(Void) {
return(_iconLinkageName);
}
function get icon() {
if (initializing) {
return(initIcon);
}
return(_iconLinkageName);
}
function _setIcon(linkage) {
if (initializing) {
if (linkage == "") {
return(undefined);
}
initIcon = linkage;
} else {
if (linkage == "") {
removeIcons();
return(undefined);
}
super.changeIcon(0, linkage);
super.changeIcon(1, linkage);
super.changeIcon(3, linkage);
super.changeIcon(4, linkage);
super.changeIcon(5, linkage);
_iconLinkageName = linkage;
refresh();
}
}
function set icon(linkage) {
_setIcon(linkage);
//return(icon);
}
function setHitArea(w, h) {
if (hitArea_mc == undefined) {
createEmptyObject("hitArea_mc", 100);
}
var _local2 = hitArea_mc;
_local2.clear();
_local2.beginFill(16711680);
_local2.drawRect(0, 0, w, h);
_local2.endFill();
_local2.setVisible(false);
}
static var symbolName = "Button";
static var symbolOwner = mx.controls.Button;
var className = "Button";
static var version = "2.0.2.127";
var btnOffset = 0;
var _color = "buttonColor";
var __label = "default value";
var __labelPlacement = "right";
var falseUpSkin = "ButtonSkin";
var falseDownSkin = "ButtonSkin";
var falseOverSkin = "ButtonSkin";
var falseDisabledSkin = "ButtonSkin";
var trueUpSkin = "ButtonSkin";
var trueDownSkin = "ButtonSkin";
var trueOverSkin = "ButtonSkin";
var trueDisabledSkin = "ButtonSkin";
var falseUpIcon = "";
var falseDownIcon = "";
var falseOverIcon = "";
var falseDisabledIcon = "";
var trueUpIcon = "";
var trueDownIcon = "";
var trueOverIcon = "";
var trueDisabledIcon = "";
var clipParameters = {labelPlacement:1, icon:1, toggle:1, selected:1, label:1};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.controls.Button.prototype.clipParameters, mx.controls.SimpleButton.prototype.clipParameters);
var centerContent = true;
var borderW = 1;
}
Symbol 481 MovieClip [__Packages.mx.skins.halo.ButtonSkin] Frame 0
class mx.skins.halo.ButtonSkin extends mx.skins.RectBorder
{
var __get__width, __get__height, getStyle, _parent, clear, drawRoundRect, __get__x, __get__y;
function ButtonSkin () {
super();
}
function init() {
super.init();
}
function size() {
drawHaloRect(__get__width(), __get__height());
}
function drawHaloRect(w, h) {
var _local6 = getStyle("borderStyle");
var _local4 = getStyle("themeColor");
var _local5 = _parent.emphasized;
clear();
switch (_local6) {
case "falseup" :
if (_local5) {
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 75);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 85, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 75);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
} else {
drawRoundRect(0, 0, w, h, 5, 9542041, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, [13291985, 16250871], 100, 0, "radial");
drawRoundRect(2, 2, w - 4, h - 4, 3, [9542041, 13818586], 100, 0, "radial");
drawRoundRect(3, 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(3, 4, w - 6, h - 7, 2, 16316664, 100);
}
break;
case "falsedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "falserollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 50);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "falsedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
break;
case "trueup" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16250871, 100);
break;
case "truedown" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 10066329, 100);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16579836], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 50);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, _local4, 20);
break;
case "truerollover" :
drawRoundRect(__get__x(), __get__y(), w, h, 5, 9542041, 100);
drawRoundRect(__get__x(), __get__y(), w, h, 5, _local4, 50);
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, [3355443, 16777215], 100, 0, "radial");
drawRoundRect(__get__x() + 1, __get__y() + 1, w - 2, h - 2, 4, _local4, 40);
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
drawRoundRect(__get__x() + 2, __get__y() + 2, w - 4, h - 4, 3, _local4, 40);
drawRoundRect(__get__x() + 3, __get__y() + 3, w - 6, h - 6, 2, 16777215, 100);
drawRoundRect(__get__x() + 3, __get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
break;
case "truedisabled" :
drawRoundRect(0, 0, w, h, 5, 13159628, 100);
drawRoundRect(1, 1, w - 2, h - 2, 4, 15921906, 100);
drawRoundRect(2, 2, w - 4, h - 4, 3, 13949401, 100);
drawRoundRect(3, 3, w - 6, h - 6, 2, 15921906, 100);
}
}
static function classConstruct() {
mx.core.ext.UIObjectExtensions.Extensions();
_global.skinRegistry.ButtonSkin = true;
return(true);
}
static var symbolName = "ButtonSkin";
static var symbolOwner = mx.skins.halo.ButtonSkin;
var className = "ButtonSkin";
var backgroundColorName = "buttonColor";
static var classConstructed = classConstruct();
static var UIObjectExtensionsDependency = mx.core.ext.UIObjectExtensions;
}
Symbol 482 MovieClip [__Packages.mx.controls.VScrollBar] Frame 0
class mx.controls.VScrollBar extends mx.controls.scrollClasses.ScrollBar
{
var scrollIt;
function VScrollBar () {
super();
}
function init(Void) {
super.init();
}
function isScrollBarKey(k) {
if (k == 38) {
scrollIt("Line", -1);
return(true);
}
if (k == 40) {
scrollIt("Line", 1);
return(true);
}
if (k == 33) {
scrollIt("Page", -1);
return(true);
}
if (k == 34) {
scrollIt("Page", 1);
return(true);
}
return(super.isScrollBarKey(k));
}
static var symbolName = "VScrollBar";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
var className = "VScrollBar";
var minusMode = "Up";
var plusMode = "Down";
var minMode = "AtTop";
var maxMode = "AtBottom";
}
Symbol 787 MovieClip [__Packages.org.sepy.ColorPicker.ColorPicker] Frame 0
class org.sepy.ColorPicker.ColorPicker extends MovieClip
{
var _color, _allowUserColor, _baseColors, _colors, addListener, keyListener, cpicker, _opened, _opening_color, panel, advancedColorPanel, createEmptyMovieClip, selectedColor, noColor, advancedColor, _direction, _columns, _useAdvColors, _useNoColor, broadcastMessage, attachMovie;
function ColorPicker () {
super();
AsBroadcaster.initialize(this);
_color = 0;
_allowUserColor = true;
_baseColors = [16711935, 65535, 16776960, 255, 65280, 16711680, 16777215, 13421772, 10066329, 6710886, 3355443, 0];
_colors = getStandardColors();
initComponent();
addListener(this);
}
function initComponent() {
keyListener = new Object();
keyListener.target = this;
keyListener.onKeyUp = function () {
if ((Key.getCode() == 27) && (this.target.getIsOpened())) {
this.target.setIsOpened(false);
this.target.color = this.target._opening_color;
}
};
Key.addListener(keyListener);
cpicker.onPress = function () {
this._parent.broadcastMessage("open");
};
cpicker.useHandCursor = false;
cpicker.nocolor_face._visible = false;
}
function setIsOpened(opened) {
if (opened && (!_opened)) {
_opening_color = _color;
attachPanel();
} else {
panel.removeMovieClip();
}
_opened = opened;
}
function getIsOpened() {
return(_opened || (advancedColorPanel._x != undefined));
}
function attachPanel() {
panel = createEmptyMovieClip("panel", 1);
panel.createEmptyMovieClip("background", 2);
panel.createEmptyMovieClip("colors", 3);
panel.colors._x = 3;
panel.colors._y = 26;
populateColorPanel();
var _local3 = (((panel.colors._width < MIN_WIDTH) ? (MIN_WIDTH) : (panel.colors._width)) + 6) + panel.colors._x;
var _local2 = (panel.colors._height + 6) + panel.colors._y;
panel.background.lineStyle(1, 16777215, 100);
panel.background.beginFill(13947080, 100);
panel.background.moveTo(0, 0);
panel.background.lineTo(_local3, 0);
panel.background.lineStyle(1, 8421504, 100);
panel.background.lineTo(_local3, _local2);
panel.background.lineTo(0, _local2);
panel.background.lineStyle(1, 16777215, 100);
panel.background.lineTo(0, 0);
panel.background.endFill();
panel.background.lineStyle(1, 0, 100);
panel.background.moveTo(_local3 + 1, 0);
panel.background.lineTo(_local3 + 1, _local2 + 1);
panel.background.lineTo(0, _local2 + 1);
panel.background.attachMovie("color_display", "color_display", 1);
panel.background.color_display.color = color;
panel.background.color_display._x = 3;
panel.background.color_display._y = 3;
panel.background.color_display.addListener(this);
panel.background.attachMovie("color_input", "color_input", 2);
panel.background.color_input.color = color;
panel.background.color_input._x = 48;
panel.background.color_input._y = 3;
panel.background.color_input.enabled = _allowUserColor;
panel.background.color_input.addListener(this);
panel.colors.attachMovie("face_borders", "face_borders", panel.colors.getNextHighestDepth());
var _local5 = new Color(panel.colors.face_borders);
_local5.setRGB(16777215);
panel.colors.face_borders._x = selectedColor._x;
panel.colors.face_borders._y = selectedColor._y;
switch (direction) {
case DOWN_LEFT :
panel._x = (cpicker._x - panel._width) + cpicker._width;
panel._y = (cpicker._y + cpicker._height) + 5;
break;
case UP_LEFT :
panel._x = (cpicker._x - panel._width) + cpicker._width;
panel._y = (cpicker._y - panel._height) - 5;
break;
case UP_RIGHT :
panel._x = cpicker._x;
panel._y = (cpicker._y - panel._height) - 5;
break;
default :
panel._x = cpicker._x;
panel._y = (cpicker._y + cpicker._height) + 5;
}
panel.onMouseDown = function () {
this.onMouseUp = function () {
if (this._parent.getIsOpened()) {
var _local2 = {x:this._xmouse, y:this._ymouse};
this.localToGlobal(_local2);
if (!this.hitTest(_local2.x, _local2.y)) {
this._parent.color = this._parent._opening_color;
this._parent.setIsOpened(false);
}
}
};
};
if (useNoColorSelector) {
noColor = panel.attachMovie("NoColorButton", "NoColorButton", 4);
noColor._x = (panel._width - noColor._width) - 7;
noColor._y = 3;
noColor.addListener(this);
}
if (useAdvancedColorSelector) {
advancedColor = panel.attachMovie("advancedColor", "advancedColor", 5);
advancedColor._x = (panel._width - advancedColor._width) - 7;
advancedColor._y = 3;
advancedColor.addListener(this);
if (useNoColorSelector) {
noColor._x = (advancedColor._x - noColor._width) - 4;
}
}
}
function populateColorPanel() {
var _local6 = _colors.slice();
var _local5;
var _local2;
var _local4 = 0;
var _local7 = 0;
var _local3 = 0;
while (_local6.length) {
_local5 = Number(_local6.shift());
_local2 = panel.colors.attachMovie("single", "single_" + panel.colors.getNextHighestDepth(), panel.colors.getNextHighestDepth());
_local2.addListener(this);
_local2.color = _local5;
if (_local5 == color) {
selectedColor = _local2;
}
if (((_local3 % columns) == 0) && (_local3 > 0)) {
_local7 = _local7 + _local2._height;
_local4 = 0;
}
_local2._x = _local4;
_local2._y = _local7;
_local4 = _local4 + _local2._width;
_local3++;
}
}
function getStandardColors() {
var _local6 = new Array();
var _local11 = 16777215 /* 0xFFFFFF */;
var _local8 = 13056;
var _local7 = 3277056 /* 0x320100 */;
var _local12 = 10027263 /* 0x9900FF */;
var _local10 = 51;
var _local9 = 10026753 /* 0x98FF01 */;
var _local3 = _local11;
var _local5 = _local11;
var _local4 = 0;
while (_local4 < 12) {
var _local2 = 0;
while (_local2 < 21) {
if (_local2 > 0) {
if (_local2 == 18) {
_local3 = 0;
} else if (_local2 == 19) {
_local3 = _baseColors[_local4];
} else if (_local2 == 20) {
_local3 = 0;
} else if (((_local2 % 6) == 0) && (_local2 > 0)) {
_local3 = _local3 - _local7;
} else {
_local3 = _local3 - _local8;
}
}
_local6.push(_local3);
_local2++;
}
if (_local4 == 5) {
_local5 = _local5 - _local9;
} else {
_local5 = _local5 - _local10;
}
_local3 = _local5;
_local4++;
}
_local6.reverse();
return(_local6);
}
function set color(newcolor) {
_color = newcolor;
updateColors(newcolor, true);
//return(color);
}
function get color() {
return(_color);
}
function set direction(value) {
_direction = value;
//return(direction);
}
function get direction() {
return(_direction);
}
function set columns(value) {
_columns = value;
//return(columns);
}
function get columns() {
return(_columns);
}
function set enabled(value) {
cpicker.enabled = value;
//return(enabled);
}
function get enabled() {
return(cpicker.enabled);
}
function set allowUserColor(value) {
_allowUserColor = value;
//return(allowUserColor);
}
function get allowUserColor() {
return(_allowUserColor);
}
function set colors(value) {
_colors = value;
//return(colors);
}
function get colors() {
return(_colors);
}
function get useAdvancedColorSelector() {
return(_useAdvColors);
}
function set useAdvancedColorSelector(value) {
_useAdvColors = value;
//return(useAdvancedColorSelector);
}
function get useNoColorSelector() {
return(_useNoColor);
}
function set useNoColorSelector(value) {
_useNoColor = value;
//return(useNoColorSelector);
}
function setAdvancedColorsMatrix(a_fillType, a_colors, a_alphas, a_ratios) {
m_fillType = a_fillType;
m_colors = a_colors;
m_alphas = a_alphas;
m_ratios = a_ratios;
}
function getRGB() {
return(ColorToString(color));
}
static function ColorToString(value) {
var _local1 = Math.abs(value).toString(16);
while (_local1.length < 6) {
_local1 = "0" + _local1;
}
return(_local1.toUpperCase());
}
static function StringToColor(value) {
return(parseInt(value, 16));
}
static function ColorToRGB(c) {
var _local1 = new Object();
_local1.red = (c >> 16) & 255;
_local1.green = (c >> 8) & 255;
_local1.blue = c & 255;
return(_local1);
}
function updateColors(value, updateInput) {
if (value == null) {
cpicker.nocolor_face._visible = true;
} else {
cpicker.nocolor_face._visible = false;
}
var _local3 = new Color(cpicker.face);
_local3.setRGB(_color);
panel.background.color_display.color = value;
if (updateInput) {
panel.background.color_input.color = value;
}
}
function over(mc) {
color = (mc.color);
panel.colors.face_borders._x = mc._x;
panel.colors.face_borders._y = mc._y;
}
function click(mc) {
if (mc == advancedColor) {
createAdvancedColorPanel(color);
color = (_opening_color);
setIsOpened(false);
} else if (mc == noColor) {
color = (null);
setIsOpened(false);
} else {
color = (mc.color);
setIsOpened(false);
broadcastMessage("change", this);
}
}
function createAdvancedColorPanel(sColor) {
advancedColorPanel = attachMovie("advancedColorPanel", "advancedColorPanel", ADV_PANEL_DEPTH, {_x:panel._x, _y:panel._y, color:sColor});
advancedColorPanel.addListener(this);
}
function unload(mc) {
advancedColorPanel.unloadMovie();
advancedColorPanel.removeMovieClip();
}
function changed(value) {
if (value.charAt(0) == "#") {
value = value.substr(1);
}
_color = StringToColor(value);
updateColors(_color, false);
}
function open() {
setIsOpened(!getIsOpened());
}
static var ADV_PANEL_DEPTH = 5;
static var version = "2.2";
var m_fillType = "linear";
var m_colors = [16711680, 16776960, 65280, 65535, 255, 16711935, 16711680];
var m_alphas = [100, 100, 100, 100, 100, 100, 100];
var m_ratios = [0, 42, 64, 127, 184, 215, 255];
var m_matrix = {matrixType:"box", x:0, y:0, w:175, h:187, r:0};
static var DOWN_LEFT = "DL";
static var DOWN_RIGHT = "DR";
static var UP_LEFT = "UL";
static var UP_RIGHT = "UR";
static var MIN_WIDTH = 130;
}
Symbol 836 MovieClip [__Packages.org.sepy.ColorPicker.ColorBox] Frame 0
class org.sepy.ColorPicker.ColorBox extends MovieClip
{
var useHandCursor, face, attachMovie, face_border, onRollOver, onRelease;
function ColorBox () {
super();
AsBroadcaster.initialize(this);
useHandCursor = false;
face = attachMovie("face", "face", 1);
face_border = attachMovie("face_borders", "face_border", 2);
onRollOver = function () {
this.broadcastMessage("over", this);
};
onRelease = function () {
this.broadcastMessage("click", this);
};
}
function set color(value) {
face.color = value;
//return(color);
}
function get color() {
return(face.color);
}
function getRGB() {
return("0x" + face.color.toString(16));
}
}
Symbol 837 MovieClip [__Packages.org.sepy.ColorPicker.ColorDisplay] Frame 0
class org.sepy.ColorPicker.ColorDisplay extends MovieClip
{
var useHandCursor, face, attachMovie, onRelease;
function ColorDisplay () {
super();
AsBroadcaster.initialize(this);
useHandCursor = false;
face = attachMovie("face", "face", 1);
face._x = 1;
face._y = 1;
face._width = 39;
face._height = 17;
onRelease = function () {
this.broadcastMessage("click", this);
};
}
function set color(value) {
face.color = value;
//return(color);
}
function get color() {
return(face.color);
}
function getRGB() {
return("0x" + face.color.toString(16));
}
}
Symbol 838 MovieClip [__Packages.org.sepy.ColorPicker.ColorInput] Frame 0
class org.sepy.ColorPicker.ColorInput extends MovieClip
{
var input, createTextField, _color, broadcastMessage;
function ColorInput () {
super();
AsBroadcaster.initialize(this);
var _local3 = new TextFormat();
_local3.font = "_sans";
_local3.size = 10;
input = createTextField("input", 1, 2, 1, 57, 16);
input.type = "input";
input.maxChars = 7;
input.setNewTextFormat(_local3);
input.addListener(this);
}
function set color(value) {
_color = value;
input.text = "#" + org.sepy.ColorPicker.ColorPicker.ColorToString(value);
//return(color);
}
function get color() {
return(_color);
}
function onChanged() {
broadcastMessage("changed", input.text);
}
function set enabled(value) {
input.selectable = value;
//return(enabled);
}
function get enabled() {
return(input.selectable);
}
}
Symbol 839 MovieClip [__Packages.org.sepy.ColorPicker.FaceColor] Frame 0
class org.sepy.ColorPicker.FaceColor extends MovieClip
{
var _color;
function FaceColor () {
super();
}
function set color(value) {
var _local2 = new Color(this);
_color = value;
_local2.setRGB(value);
//return(color);
}
function get color() {
return(_color);
}
function getRGB() {
return("0x" + _color.toString(16));
}
}
Symbol 840 MovieClip [__Packages.org.sepy.ColorPicker.AdvancedColorButton] Frame 0
class org.sepy.ColorPicker.AdvancedColorButton extends MovieClip
{
var useHandCursor, gotoAndStop, broadcastMessage;
function AdvancedColorButton () {
super();
useHandCursor = false;
AsBroadcaster.initialize(this);
}
function onRollOver() {
(gotoAndStop(2));// not popped
}
function onRollOut() {
(gotoAndStop(1));// not popped
}
function onReleaseOutside() {
(gotoAndStop(1));// not popped
}
function onRelease() {
broadcastMessage("click", this);
}
}
Symbol 841 MovieClip [__Packages.org.sepy.ColorPicker.RGB] Frame 0
class org.sepy.ColorPicker.RGB
{
var _r, _g, _b;
function RGB (red, green, blue) {
_r = red;
_g = green;
_b = blue;
}
function set r(newr) {
_r = newr;
//return(r);
}
function get r() {
return(_r);
}
function set g(newg) {
_g = newg;
//return(g);
}
function get g() {
return(_g);
}
function set b(newb) {
_b = newb;
//return(b);
}
function get b() {
return(_b);
}
function getRGB() {
return(((r << 16) | (g << 8)) | b);
}
function toString() {
return(((((("[R:" + r) + ", G:") + g) + ", B:") + b) + "]");
}
}
Symbol 842 MovieClip [__Packages.org.sepy.ColorPicker.HLSRGB] Frame 0
class org.sepy.ColorPicker.HLSRGB
{
function HLSRGB () {
}
function get red() {
return(_red);
}
function set red(n) {
_red = n;
ToHLS();
//return(red);
}
function get green() {
return(_green);
}
function set green(n) {
_green = n;
ToHLS();
//return(green);
}
function get blue() {
return(_blue);
}
function set blue(n) {
_blue = n;
ToHLS();
//return(blue);
}
function get luminance() {
return(_luminance);
}
function set luminance(n) {
if ((n < 0) || (n > 1)) {
trace(n + " exceeds luminance bounds. Luminance must be between 0.0 and 1.0");
} else {
_luminance = n;
ToRGB();
}
//return(luminance);
}
function get hue() {
return(_hue);
}
function set hue(n) {
if ((n < 0) || (n > 360)) {
trace(n + " exceeds hue bounds. Hue must be between 0.0 and 360.0");
} else {
_hue = n;
ToRGB();
}
//return(hue);
}
function get saturation() {
return(_saturation);
}
function set saturation(n) {
if ((n < 0) || (n > 1)) {
trace(n + "exceeds saturation bounds. Saturation must be between 0.0 and 1.0");
} else {
_saturation = n;
ToRGB();
}
//return(saturation);
}
function get color() {
var _local2 = new org.sepy.ColorPicker.RGB(_red, _green, _blue);
return(_local2);
}
function getRGB() {
return(((_red << 16) | (_green << 8)) | _blue);
}
function set color(o) {
_red = o.r;
_green = o.g;
_blue = o.b;
ToHLS();
//return(color);
}
function lightenBy(n) {
_luminance = _luminance * (1 + n);
if (_luminance > 1) {
_luminance = 1;
}
ToRGB();
}
function darkenBy(n) {
_luminance = _luminance * n;
ToRGB();
}
function ToHLS() {
var _local5 = Math.min(_red, Math.min(_green, _blue));
var _local2 = Math.max(_red, Math.max(_green, _blue));
var _local3 = _local2 - _local5;
var _local4 = _local2 + _local5;
_luminance = _local4 / 510;
if (_local2 == _local5) {
_saturation = 0;
_hue = 0;
} else {
var _local7 = (_local2 - _red) / _local3;
var _local8 = (_local2 - _green) / _local3;
var _local6 = (_local2 - _blue) / _local3;
_saturation = ((_luminance <= 0.5) ? (_local3 / _local4) : (_local3 / (510 - _local4)));
if (_red == _local2) {
_hue = 60 * ((6 + _local6) - _local8);
} else if (_green == _local2) {
_hue = 60 * ((2 + _local7) - _local6);
} else if (_blue == _local2) {
_hue = 60 * ((4 + _local8) - _local7);
}
_hue = _hue % 360;
}
}
function ToRGB() {
if (_saturation == 0) {
_red = (_green = (_blue = _luminance * 255));
} else {
var _local3;
var _local2;
if (_luminance <= 0.5) {
_local2 = _luminance + (_luminance * _saturation);
} else {
_local2 = (_luminance + _saturation) - (_luminance * _saturation);
}
_local3 = (2 * _luminance) - _local2;
_red = ToRGB1(_local3, _local2, _hue + 120);
_green = ToRGB1(_local3, _local2, _hue);
_blue = ToRGB1(_local3, _local2, _hue - 120);
}
}
function ToRGB1(rm1, rm2, rh) {
if (rh > 360) {
rh = rh - 360;
} else if (rh < 0) {
rh = rh + 360;
}
if (rh < 60) {
rm1 = rm1 + (((rm2 - rm1) * rh) / 60);
} else if (rh < 180) {
rm1 = rm2;
} else if (rh < 240) {
rm1 = rm1 + (((rm2 - rm1) * (240 - rh)) / 60);
}
return(rm1 * 255);
}
function toString() {
return(((((((((((("[R:" + red) + ", G:") + green) + ", B:") + blue) + ", H:") + hue) + ", S:") + saturation) + ", L:") + luminance) + "]");
}
var _red = 0;
var _green = 0;
var _blue = 0;
var _hue = 0;
var _luminance = 0;
var _saturation = 0;
}
Symbol 843 MovieClip [__Packages.org.sepy.ColorPicker.AdvColorPanel] Frame 0
class org.sepy.ColorPicker.AdvColorPanel extends MovieClip
{
var addListener, _hlsrgb, color_map, attachMovie, color_slider, color_display, _hue_mc, _saturation_mc, _luminosity_mc, _red_mc, _green_mc, _blue_mc, ok_btn, close_btn, onMouseUp, broadcastMessage, _color, _hue, __get__hue, _saturation, __get__saturation, _luminosity, __get__luminosity, _red, __get__red, _green, __get__green, _blue, __get__blue;
function AdvColorPanel () {
super();
AsBroadcaster.initialize(this);
addListener(this);
_hlsrgb = new org.sepy.ColorPicker.HLSRGB();
color_map = attachMovie("ColorMap", "color_map", 3, {_x:10, _y:8});
color_slider = attachMovie("ColorSlider", "color_slider", 4, {_x:(color_map._x + color_map._width) + 10, _y:color_map._y});
color_display = attachMovie("color_display", "color_display", 5, {_x:color_map._x, _y:color_map._y + color_map._height});
_hue_mc = attachMovie("IntInput", "_hue_mc", 6, {_x:125, _y:color_map._y + color_map._height, label:"H", variable:"hue"});
_saturation_mc = attachMovie("IntInput", "_saturation_mc", 7, {_x:_hue_mc._x, _y:(_hue_mc._y + _hue_mc._height) + 2, label:"S", variable:"saturation"});
_luminosity_mc = attachMovie("IntInput", "_luminosity_mc", 8, {_x:_hue_mc._x, _y:(_saturation_mc._y + _saturation_mc._height) + 2, label:"L", variable:"luminance"});
_red_mc = attachMovie("IntInput", "_red_mc", 9, {_x:175, _y:_hue_mc._y, label:"R", variable:"red"});
_green_mc = attachMovie("IntInput", "_saturation_mc", 10, {_x:_red_mc._x, _y:_saturation_mc._y, label:"G", variable:"green"});
_blue_mc = attachMovie("IntInput", "_luminosity_mc", 11, {_x:_red_mc._x, _y:_luminosity_mc._y, label:"B", variable:"blue"});
ok_btn = attachMovie("OkButton", "ok_btn", 12, {_x:color_map._x, _y:_blue_mc._y});
close_btn = attachMovie("CancelButton", "close_btn", 13, {_x:ok_btn._x + ok_btn._width, _y:_blue_mc._y});
init();
}
function init() {
onMouseUp = function () {
var _local2 = new flash.geom.Rectangle(this._x, this._y, this._width, this._height);
var _local3 = new flash.geom.Point(this._xmouse, this._ymouse);
if (!_local2.containsPoint(_local3)) {
this.close();
}
};
_hue_mc.max = 360;
_saturation_mc.max = 240;
_luminosity_mc.max = 240;
_red_mc.max = 255;
_green_mc.max = 255;
_blue_mc.max = 255;
_hue_mc.addListener(this);
_saturation_mc.addListener(this);
_luminosity_mc.addListener(this);
_red_mc.addListener(this);
_green_mc.addListener(this);
_blue_mc.addListener(this);
color_slider.color = color;
color_slider.addListener(this);
color_map.addListener(this);
color_display.addListener(this);
close_btn.addListener(this);
ok_btn.addListener(this);
if (color_map.findTheColor(color)) {
}
broadcastMessage("change", this, color);
updateHLS(color_slider.getCurrentColor(), true);
}
function changed(mc, value) {
_hlsrgb.__set__color(new org.sepy.ColorPicker.RGB(_red_mc.value, _green_mc.value, _blue_mc.value));
var _local2 = _hlsrgb.getRGB();
color_map.findTheColor(_local2);
broadcastMessage("change", this, _local2);
}
function change(mc, cl) {
if (mc == color_map) {
color = (cl);
color_slider.color = color;
color_display.color = color_slider.getCurrentColor();
updateHLS(color_slider.getCurrentColor(), true);
} else if (mc == this) {
color = (cl);
color_slider.color = color;
color_display.color = color_slider.getCurrentColor();
updateHLS(color_slider.getCurrentColor(), false);
}
}
function changing(cl) {
color_display.color = cl;
color = (cl);
updateHLS(color_slider.getCurrentColor(), true);
}
function updateHLS(cl, updateObject) {
if (updateObject) {
var _local2 = org.sepy.ColorPicker.ColorPicker.ColorToRGB(cl);
_hlsrgb.__set__hue(_hlsrgb.__set__saturation(_hlsrgb.__set__luminance(0)));
_hlsrgb.__set__red(_local2.red);
_hlsrgb.__set__green(_local2.green);
_hlsrgb.__set__blue(_local2.blue);
}
red = (Math.round(_hlsrgb.__get__red()));
green = (Math.round(_hlsrgb.__get__green()));
blue = (Math.round(_hlsrgb.__get__blue()));
hue = (_hlsrgb.hue);
saturation = (_hlsrgb.saturation);
luminosity = (_hlsrgb.luminance);
}
function click(mc) {
if (mc == ok_btn) {
broadcastMessage("click", this);
close();
} else if (mc == close_btn) {
close();
}
}
function close() {
broadcastMessage("unload", this);
}
function set color(v) {
_color = v;
//return(color);
}
function get color() {
return(_color);
}
function set hue(v) {
v = Math.round(v);
_hue = v;
_hue_mc.value = v;
//return(__get__hue());
}
function set saturation(v) {
v = Math.round(v * 240);
_saturation = v;
_saturation_mc.value = v;
//return(__get__saturation());
}
function set luminosity(v) {
v = Math.round(v * 240);
_luminosity = v;
_luminosity_mc.value = v;
//return(__get__luminosity());
}
function set red(v) {
_red = v;
_red_mc.value = v;
//return(__get__red());
}
function set green(v) {
_green = v;
_green_mc.value = v;
//return(__get__green());
}
function set blue(v) {
_blue = v;
_blue_mc.value = v;
//return(__get__blue());
}
}
Symbol 844 MovieClip [__Packages.org.sepy.ColorPicker.ColorMap] Frame 0
class org.sepy.ColorPicker.ColorMap extends MovieClip
{
var addListener, mc, createEmptyMovieClip, cross_mc, attachMovie, cross_mask, _parent, bmp, _xmouse, _ymouse, broadcastMessage, _color;
function ColorMap () {
super();
AsBroadcaster.initialize(this);
addListener(this);
mc = createEmptyMovieClip("mc", 1);
mc._x = 1;
mc._y = 1;
cross_mc = attachMovie("cross_mc", "cross_mc", 2);
cross_mask = attachMovie("cross_mask", "cross_mask", 3);
cross_mc.setMask(cross_mask);
init();
}
function init() {
mc.beginGradientFill(_parent._parent.m_fillType, _parent._parent.m_colors, _parent._parent.m_alphas, _parent._parent.m_ratios, _parent._parent.m_matrix);
mc.moveTo(0, 0);
mc.lineTo(175, 0);
mc.lineTo(175, 187);
mc.lineTo(0, 187);
mc.lineTo(0, 0);
mc.endFill();
mc.createEmptyMovieClip("upper", 1);
var _local7 = "linear";
var _local2 = [16777215, 0, 0];
var _local3 = [0, 0, 100];
var _local4 = [0, 127, 255];
var _local5 = {matrixType:"box", x:0, y:0, w:175, h:187, r:(Math.PI/2)};
mc.beginGradientFill(_local7, _local2, _local3, _local4, _local5);
mc.moveTo(0, 0);
mc.lineTo(175, 0);
mc.lineTo(175, 187);
mc.lineTo(0, 187);
mc.lineTo(0, 0);
mc.endFill();
mc.onPress = function () {
this.onMouseMove = function () {
var _local3 = new flash.geom.Point(this._xmouse, this._ymouse);
var _local2 = new flash.geom.Rectangle(this._x, this._y, this._width, this._height);
if (_local2.containsPoint(_local3)) {
this._parent.changing(this);
}
updateAfterEvent();
};
this._parent.changing(this);
};
mc.onRelease = function () {
delete this.onMouseMove;
};
mc.onReleaseOutside = mc.onRelease;
mc.onRollOut = mc.onRollOut;
draw();
}
function changing(mc) {
var _local2 = bmp.getPixel((_xmouse - mc._x) - 1, _ymouse - mc._y);
cross_mc._x = _xmouse;
cross_mc._y = _ymouse;
broadcastMessage("change", this, _local2);
}
function draw() {
bmp.dispose();
bmp = new flash.display.BitmapData(mc._width, mc._height);
bmp.draw(mc);
}
function change(mc, cl) {
_color = cl;
}
function set color(c) {
_color = c;
//return(color);
}
function get color() {
return(_color);
}
function findTheColor(cl) {
var _local2 = bmp.getColorBoundsRect(4294967295, 4278190080 + cl, true);
cross_mc._x = (_local2.x + (_local2.width / 2)) + 2;
cross_mc._y = (_local2.y + (_local2.height / 2)) + 2;
return(!((((_local2.x == 0) && (_local2.y == 0)) && (_local2.width == bmp.width)) && (_local2.width == bmp.height)));
}
}
Symbol 845 MovieClip [__Packages.org.sepy.ColorPicker.ColorSlider] Frame 0
class org.sepy.ColorPicker.ColorSlider extends MovieClip
{
var mc, createEmptyMovieClip, slider, attachMovie, bmp, broadcastMessage, _color;
function ColorSlider () {
super();
AsBroadcaster.initialize(this);
mc = createEmptyMovieClip("mc", 1);
mc._x = 1;
mc._y = 1;
mc.useHandCursor = false;
mc.onPress = function () {
this._parent.changing(this);
this.onMouseMove = function () {
if ((this._ymouse >= 0) && (this._ymouse <= this._height)) {
this._parent.changing(this);
}
updateAfterEvent();
};
};
mc.onRelease = function () {
delete this.onMouseMove;
};
mc.onRollOut = mc.onRelease;
mc.onReleaseOutside = mc.onRelease;
slider = attachMovie("slider_mc", "slider", 2, {_x:15, _y:98});
}
function changing(mc) {
slider._y = mc._ymouse;
var _local2 = bmp.getPixel(5, slider._y);
broadcastMessage("changing", _local2);
}
function getCurrentColor() {
return(bmp.getPixel(5, slider._y));
}
function set color(c) {
_color = c;
draw();
//return(color);
}
function get color() {
return(_color);
}
function draw() {
mc.clear();
var _local4 = [0, color, 16777215];
var _local2 = [100, 100, 100];
var _local5 = [0, 127, 255];
var _local3 = {matrixType:"box", x:0, y:0, w:187, h:187, r:4.71238898038469};
mc.clear();
mc.beginGradientFill("linear", _local4, _local2, _local5, _local3, "reflect", "linear");
mc.moveTo(0, 0);
mc.lineTo(12, 0);
mc.lineTo(12, 187);
mc.lineTo(0, 187);
mc.lineTo(0, 0);
mc.endFill();
bmp.dispose();
bmp = new flash.display.BitmapData(mc._width, mc._height, false);
bmp.draw(mc);
}
}
Symbol 846 MovieClip [__Packages.org.sepy.ColorPicker.IntInput] Frame 0
class org.sepy.ColorPicker.IntInput extends MovieClip
{
var tlabel, createTextField, input, _value, broadcastMessage, _label, _max;
function IntInput () {
super();
AsBroadcaster.initialize(this);
var _local3 = new TextFormat();
_local3.font = "_sans";
_local3.size = 10;
tlabel = createTextField("tlabel", 1, 2, 1, 31, 16);
tlabel.setNewTextFormat(_local3);
tlabel.text = label;
input = createTextField("input", 2, 22, 1, 31, 16);
input.type = "input";
input.maxChars = 3;
input.restrict = "[0-9]";
input.setNewTextFormat(_local3);
input.addListener(this);
}
function set value(value) {
_value = value;
input.text = _value.toString(10);
//return(this.value);
}
function get value() {
return(_value);
}
function onChanged() {
var _local2 = Number(input.text);
if (isNaN(_local2)) {
input.text = "0";
}
if ((_local2 > max) && (max != undefined)) {
input.text = max.toString();
}
_value = Number(input.text);
broadcastMessage("changed", this, Number(input.text));
}
function set enabled(value) {
input.selectable = value;
//return(enabled);
}
function get enabled() {
return(input.selectable);
}
function set label(value) {
_label = value;
tlabel.text = value;
//return(label);
}
function get label() {
return(_label);
}
function set max(v) {
_max = v;
//return(max);
}
function get max() {
return(_max);
}
}
Symbol 847 MovieClip [__Packages.org.sepy.ColorPicker.OkButton] Frame 0
class org.sepy.ColorPicker.OkButton extends MovieClip
{
var useHandCursor, gotoAndStop, broadcastMessage;
function OkButton () {
super();
useHandCursor = false;
AsBroadcaster.initialize(this);
}
function onRollOver() {
(gotoAndStop(1));// not popped
}
function onRollOut() {
(gotoAndStop(1));// not popped
}
function onReleaseOutside() {
(gotoAndStop(1));// not popped
}
function onPress() {
(gotoAndStop(2));// not popped
}
function onRelease() {
(gotoAndStop(1));// not popped
broadcastMessage("click", this);
}
}
Symbol 1043 MovieClip [__Packages.com.jjcorreia.panels.jSoundPanel] Frame 0
class com.jjcorreia.panels.jSoundPanel extends MovieClip
{
var swapDepths, buffTime, _soundbuftime, soundObjects, masterSound, sndName_array, file_array, ext_array, mult_array, group_array, isSound_array, vol_array, loops_array, offset_array, pan_array, onDemand_array, stream_array, onProgress, onDone;
function jSoundPanel () {
super();
_global.soundPanel = this;
swapDepths(999555);
if (buffTime != undefined) {
_soundbuftime = buffTime;
}
if (autoInitialize) {
Init();
}
}
function init() {
if (initialized) {
return(false);
}
initialized = true;
soundObjects = new Object();
masterSound = new Sound();
loadIndex = 0;
createAllSounds();
return(true);
}
function Init() {
return(init());
}
function createAllSounds() {
var _local2 = 0;
while (_local2 < sndName_array.length) {
createSound(file_array[_local2], sndName_array[_local2], ext_array[_local2], mult_array[_local2], group_array[_local2], isSound_array[_local2], vol_array[_local2], loops_array[_local2], offset_array[_local2], pan_array[_local2], onDemand_array[_local2], stream_array[_local2]);
_local2++;
}
loadNextSound();
}
function createSound($file, $handle, $ext, $mult, $group, $isSound, $vol, $loops, $offset, $pan, $onDemand, $stream) {
if ((!$file) || (!$handle)) {
return(null);
}
if (debug) {
trace("createSound: " + arguments.join(", "));
}
return((soundObjects[$handle] = new com.jjcorreia.assets.runtimeAudio(this, $file, null, $handle, $ext, $mult, $group, $isSound, $vol, $loops, $offset, $pan, $onDemand, $stream)));
}
function loadNextSound() {
if (loadIndex < sndName_array.length) {
var _local3 = sndName_array[loadIndex];
onProgress(loadIndex, sndName_array.length, _local3);
var _local2 = getObject(_local3);
_local2.onLoad = com.jjcorreia.utils.Delegate.create(this, soundLoaded);
loadIndex++;
_local2.load();
} else {
onProgress(1, 1, "");
onDone();
}
}
function soundLoaded() {
var _local2 = new com.jjcorreia.utils.Delay(0.01, this, loadNextSound);
}
function start($handle, $props) {
var _local2 = getObject($handle);
if (debug) {
trace("start: " + $handle);
}
if (_local2) {
delete _local2.onSoundComplete;
} else {
if (debug) {
trace($handle + " doesnt exist. creating...");
}
_local2 = createSound($handle, $handle);
}
for (var _local4 in $props) {
_local2[_local4] = $props[_local4];
}
_local2.start();
return(_local2);
}
function stopSound(name) {
var _local2 = getObject(name);
_local2.stop();
}
function stopAllMusic() {
for (var _local3 in soundObjects) {
var _local2 = soundObjects[_local3];
if (!_local2.__get__isSound()) {
_local2.stop();
}
}
}
function stopAllSounds() {
for (var _local3 in soundObjects) {
var _local2 = soundObjects[_local3];
if (_local2.__get__isSound()) {
_local2.stop();
}
}
}
function setSoundVolume(name, vol) {
var _local2 = getObject(name);
_local2.__set__vol(vol);
}
function getSoundVolume(name) {
return(getObject(name).__get__vol());
}
function muteAudio(name) {
var _local2 = getObject(name);
_local2.Mute();
}
function unMuteAudio(name) {
var _local2 = getObject(name);
_local2.unMute();
}
function muteSounds() {
soundsMuted = true;
for (var _local3 in soundObjects) {
var _local2 = soundObjects[_local3];
if (_local2.__get__isSound()) {
muteAudio(_local2.__get__Name());
}
}
return(soundsMuted);
}
function unMuteSounds() {
soundsMuted = false;
for (var _local3 in soundObjects) {
var _local2 = soundObjects[_local3];
if (_local2.__get__isSound()) {
unMuteAudio(_local2.__get__Name());
}
}
return(soundsMuted);
}
function toggleSound() {
(soundsMuted ? (unMuteSounds()) : (muteSounds()));
return(soundsMuted);
}
function muteMusic() {
musicMuted = true;
for (var _local3 in soundObjects) {
var _local2 = soundObjects[_local3];
if (!_local2.__get__isSound()) {
muteAudio(_local2.__get__Name());
}
}
return(musicMuted);
}
function unMuteMusic() {
musicMuted = false;
for (var _local3 in soundObjects) {
var _local2 = soundObjects[_local3];
if (!_local2.__get__isSound()) {
unMuteAudio(_local2.__get__Name());
}
}
return(musicMuted);
}
function toggleMusic() {
(musicMuted ? (unMuteMusic()) : (muteMusic()));
return(musicMuted);
}
function muteAll() {
muteMusic();
muteSounds();
}
function unMuteAll() {
unMuteMusic();
unMuteSounds();
}
function toggleGlobalMute() {
(globallyMuted ? (unMuteGlobal()) : (muteGlobal()));
return(globallyMuted);
}
function muteGlobal() {
if (!globallyMuted) {
globallyMuted = true;
lastGlobalVolume = globalVolume;
globalVolume = (0);
}
}
function unMuteGlobal() {
globallyMuted = false;
globalVolume = (lastGlobalVolume);
}
function set globalVolume(vol) {
masterSound.setVolume(vol);
//return(globalVolume);
}
function get globalVolume() {
return(masterSound.getVolume());
}
function set globalPan(num) {
masterSound.setPan(num);
//return(globalPan);
}
function get globalPan() {
return(masterSound.getPan());
}
function getSound(name) {
return(soundObjects[name]);
}
function getObject(name) {
return(soundObjects[name]);
}
function get SoundOff() {
return(soundOff);
}
function get MusicOff() {
return(musicOff);
}
function get GlobalOff() {
return(globalOff);
}
function get soundOff() {
return(soundsMuted);
}
function get musicOff() {
return(musicMuted);
}
function get globalOff() {
return(globallyMuted);
}
function removeSound(name) {
delete soundObjects[name];
}
function destroySound(name) {
destroyObject(name);
}
function destroyObject(name) {
var _local2 = getObject(name);
_local2.destroy();
removeSound(name);
}
var queuedMusic_array = new Array();
var loadIndex = 0;
var lastGlobalVolume = 100;
var globallyMuted = false;
var soundsMuted = false;
var musicMuted = false;
var initialized = false;
var autoInitialize = false;
var debug = false;
}
Symbol 1060 MovieClip [__Packages.com.jjcorreia.assets.runtimeAudio] Frame 0
class com.jjcorreia.assets.runtimeAudio extends com.jjcorreia.assets.runtimeAsset
{
var _myParent, _myName, lastVol, initialVol, lastPan, initialPan, onLoad, test_int, stopPosition, _Loaded, holder_mc, _my_sound, __get__file, progress_int, __get__Loaded, onSoundComplete;
function runtimeAudio ($holder, $file, $hostDir, $handle, ext, mult, $group, isSound, vol, loops, $offset, pan, onDemand, isStreaming) {
super((com.jjcorreia.assets.runtimeAsset.audioFolder + $file) + ".mp3", $hostDir);
_myParent = $holder;
_total++;
_myName = $handle;
if (mult != undefined) {
_mult = mult;
}
if (ext != undefined) {
_ext = ext;
}
if (isSound != undefined) {
_isSound = isSound;
}
if (loops != undefined) {
_loops = (oLoops = loops);
}
if ($offset != undefined) {
offset = ((oOffset = $offset));
}
if (vol != undefined) {
_vol = (oVol = vol);
}
if (pan != undefined) {
_pan = (oPan = pan);
}
if (onDemand != undefined) {
_onDemand = onDemand;
}
if (isStreaming != undefined) {
_isStreaming = isStreaming;
}
if ($group != undefined) {
_group = $group;
}
lastVol = (initialVol = _vol);
lastPan = (initialPan = _pan);
if (onDemand) {
onLoad();
return;
}
}
function beginSparseCheck() {
var _local2 = _offset * 1000;
clearInterval(test_int);
test_int = setInterval(this, "beginFineCheck", Math.floor(((duration - _local2) - _local2) - Math.min(duration / 4, CHECK_BUFFER)));
}
function beginFineCheck() {
clearInterval(test_int);
test_int = setInterval(this, "doFineCheck", 1);
}
function doFineCheck() {
if (position >= stopPosition) {
clearInterval(test_int);
stop();
start();
}
}
function load() {
if ((!_Loaded) && (!_onDemand)) {
initLoad();
return(true);
}
soundLoaded(false);
return(false);
}
function initLoad() {
makeHolder();
newLoader();
}
function makeHolder() {
var _local2 = _myParent.getNextHighestDepth();
holder_mc = _myParent.createEmptyMovieClip("holder_" + _local2, _local2);
}
function newLoader() {
_my_sound = new Sound(holder_mc);
var _local2 = _my_sound;
_local2.host = this;
_my_sound.onLoad = function ($success) {
this.host.soundLoaded($success);
};
if (_ext) {
_my_sound.loadSound(__get__file(), _isStreaming);
applyProps();
} else {
_my_sound.attachSound(name);
soundLoaded(true);
}
}
function soundLoaded($success) {
_Loaded = $success;
var _local2 = _offset * 1000;
stopPosition = (duration - _local2) - _local2;
clearInterval(progress_int);
if (isQueued) {
start();
unQueue();
}
onLoad($success);
}
function playAgain() {
if (_isStreaming && (playCount < _loops)) {
start(true);
}
}
function start($recursive) {
clearInterval(test_int);
if (Queue()) {
initLoad();
return(undefined);
}
if (onDemand && (!__get__Loaded())) {
initLoad();
return(undefined);
}
if (!_mult) {
stop();
}
applyProps();
if (_isStreaming) {
if ($recursive != true) {
playCount = 0;
}
if ((_offset == 0) && (_loops > 0)) {
_my_sound.onSoundComplete = com.jjcorreia.utils.Delegate.create(this, playAgain);
}
}
if ((_offset > 0) && (_loops > 0)) {
_my_sound.start(_offset);
beginSparseCheck();
} else {
_my_sound.start(_offset, _loops);
}
playCount++;
}
function applyProps() {
_my_sound.setVolume(vol);
_my_sound.setPan(pan);
}
function stop() {
clearInterval(test_int);
_Queued = false;
_my_sound.stop();
if (onSoundComplete) {
onSoundComplete();
}
}
function Queue() {
if ((!isStreaming) && (!_Loaded)) {
_Queued = true;
return(true);
}
return(false);
}
function unQueue() {
_Queued = false;
}
function Mute() {
_muted = true;
lastVol = _vol;
vol = (0);
}
function unMute() {
_muted = false;
vol = (lastVol);
}
function toggleMute() {
(_muted ? (unMute()) : (Mute()));
}
function Pause() {
}
function Resume() {
}
function destroy() {
clearInterval(test_int);
delete _my_sound;
_Loaded = false;
_myParent.removeSound(Name);
}
function get mySound() {
return(_my_sound);
}
function get Name() {
return(_myName);
}
function get name() {
return(_myName);
}
function get mult() {
return(_mult);
}
function get ext() {
return(_ext);
}
function get isSound() {
return(_isSound);
}
function get vol() {
return(_vol);
}
function get volume() {
return(_vol);
}
function get loops() {
return(_loops);
}
function get offset() {
return(_offset);
}
function get pan() {
return(_pan);
}
function get onDemand() {
return(_onDemand);
}
function get isQueued() {
return(_Queued);
}
function get isStreaming() {
return(_isStreaming);
}
function get duration() {
return(_my_sound.duration);
}
function get position() {
return(_my_sound.position);
}
function get id3() {
return(_my_sound.id3);
}
function getBytesLoaded() {
return(_my_sound.getBytesLoaded());
}
function getBytesTotal() {
return(_my_sound.getBytesTotal());
}
function toString() {
var _local2 = "[runtimeAudio ";
_local2 = _local2 + (" file:" + __get__file());
_local2 = _local2 + (" Handle:" + Name);
_local2 = _local2 + (" ext:" + ext);
_local2 = _local2 + (" mult:" + mult);
_local2 = _local2 + (" isSound:" + isSound);
_local2 = _local2 + (" vol:" + vol);
_local2 = _local2 + (" loops:" + loops);
_local2 = _local2 + (" offset:" + offset);
_local2 = _local2 + (" pan:" + pan);
_local2 = _local2 + (" onDemand:" + onDemand);
_local2 = _local2 + (" isQueued:" + isQueued);
_local2 = _local2 + "]";
return(_local2);
}
function set vol($val) {
_vol = $val;
_my_sound.setVolume($val);
//return(vol);
}
function set pan($val) {
_pan = $val;
_my_sound.setPan($val);
//return(pan);
}
function set loops($val) {
_loops = $val;
//return(loops);
}
function set offset($val) {
_offset = $val;
if (!isNaN(duration)) {
var _local2 = _offset * 1000;
stopPosition = (duration - _local2) - _local2;
}
//return(offset);
}
static var _total = 0;
var _mult = true;
var _ext = false;
var _isSound = true;
var _group = "global";
var _vol = 100;
var _loops = 0;
var _offset = 0;
var _pan = 0;
var _onDemand = false;
var _isStreaming = false;
static var CHECK_BUFFER = 500;
var oVol = 100;
var oLoops = 0;
var oPan = 0;
var oOffset = 0;
var _Queued = false;
var _muted = false;
var playCount = 0;
var pauseIndex = 0;
}
Symbol 605 MovieClip [m_btn back] Frame 1
#initclip 281
Object.registerClass("m_btn back", com.jjcorreia.display.Scale9Button);
#endinitclip
Symbol 621 MovieClip Frame 1
stop();
Symbol 624 MovieClip [Tab AG] Frame 1
#initclip 272
Object.registerClass("Tab AG", com.games.pencilRacer.gui.components.Tab);
#endinitclip
Symbol 631 MovieClip [BasicButton] Frame 1
#initclip 273
Object.registerClass("BasicButton", com.games.pencilRacer.gui.components.BasicButton);
#endinitclip
stop();
Symbol 638 MovieClip [Tutorial] Frame 1
function onMouseDown() {
mousePressed = true;
play();
}
stop();
mousePressed = false;
Symbol 638 MovieClip [Tutorial] Frame 215
if (!mousePressed) {
stop();
}
Instance of Symbol 624 MovieClip [Tab AG] in Symbol 638 MovieClip [Tutorial] Frame 230
//component parameters
onClipEvent (construct) {
title = "Vehicles";
group = "standard";
}
Symbol 638 MovieClip [Tutorial] Frame 265
stop();
Symbol 638 MovieClip [Tutorial] Frame 281
function onMouseDown() {
}
Symbol 638 MovieClip [Tutorial] Frame 439
stop();
Symbol 643 MovieClip [VehicleIcon] Frame 1
#initclip 274
Object.registerClass("VehicleIcon", com.games.pencilRacer.gui.components.VehicleIcon);
#endinitclip
stop();
Symbol 644 MovieClip [RadioThemeColor2] Frame 1
mx.skins.ColoredSkinElement.setColorStyle(this, "themeColor");
Symbol 650 MovieClip Frame 1
stop();
Symbol 651 MovieClip [Slider_vertical] Frame 1
#initclip 275
Object.registerClass("Slider_vertical", com.games.pencilRacer.gui.components.sliders.NumericalSlider);
#endinitclip
Symbol 684 MovieClip [Cursor] Frame 1
stop();
Symbol 698 MovieClip Frame 1
stop();
Instance of Symbol 624 MovieClip [Tab AG] "track_tab" in Symbol 700 MovieClip [TabBar] Frame 1
//component parameters
onClipEvent (construct) {
title = "Track";
group = "standard";
}
Instance of Symbol 624 MovieClip [Tab AG] "art_tab" in Symbol 700 MovieClip [TabBar] Frame 1
//component parameters
onClipEvent (construct) {
title = "Art";
group = "standard";
}
Instance of Symbol 624 MovieClip [Tab AG] "vehicles_tab" in Symbol 700 MovieClip [TabBar] Frame 1
//component parameters
onClipEvent (construct) {
title = "Vehicles";
group = "standard";
}
Instance of Symbol 624 MovieClip [Tab AG] "shapes_tab" in Symbol 700 MovieClip [TabBar] Frame 1
//component parameters
onClipEvent (construct) {
title = "Shapes";
group = "standard";
}
Instance of Symbol 624 MovieClip [Tab AG] "selection_tab" in Symbol 700 MovieClip [TabBar] Frame 1
//component parameters
onClipEvent (construct) {
title = "Selection";
group = "standard";
}
Symbol 719 MovieClip [FlagIcon] Frame 1
stop();
Symbol 726 MovieClip [Wheel] Frame 1
stop();
Symbol 763 MovieClip [SaveStringDisplay] Frame 1
stop();
Symbol 800 MovieClip [single] Frame 1
#initclip 259
Object.registerClass("single", org.sepy.ColorPicker.ColorBox);
#endinitclip
Symbol 802 MovieClip [color_display] Frame 1
#initclip 260
Object.registerClass("color_display", org.sepy.ColorPicker.ColorDisplay);
#endinitclip
Symbol 804 MovieClip [color_input] Frame 1
#initclip 261
Object.registerClass("color_input", org.sepy.ColorPicker.ColorInput);
#endinitclip
Symbol 805 MovieClip [face] Frame 1
#initclip 262
Object.registerClass("face", org.sepy.ColorPicker.FaceColor);
#endinitclip
Symbol 808 MovieClip [advancedColor] Frame 1
#initclip 263
Object.registerClass("advancedColor", org.sepy.ColorPicker.AdvancedColorButton);
#endinitclip
stop();
Symbol 815 MovieClip [ColorMap] Frame 1
#initclip 264
Object.registerClass("ColorMap", org.sepy.ColorPicker.ColorMap);
#endinitclip
stop();
Symbol 819 MovieClip [ColorSlider] Frame 1
#initclip 265
Object.registerClass("ColorSlider", org.sepy.ColorPicker.ColorSlider);
#endinitclip
stop();
Symbol 821 MovieClip [IntInput] Frame 1
#initclip 266
Object.registerClass("IntInput", org.sepy.ColorPicker.IntInput);
#endinitclip
Symbol 827 MovieClip [OkButton] Frame 1
#initclip 267
Object.registerClass("OkButton", org.sepy.ColorPicker.OkButton);
#endinitclip
stop();
Symbol 830 MovieClip [CancelButton] Frame 1
#initclip 268
Object.registerClass("CancelButton", org.sepy.ColorPicker.OkButton);
#endinitclip
stop();
Symbol 831 MovieClip [advancedColorPanel] Frame 1
#initclip 269
Object.registerClass("advancedColorPanel", org.sepy.ColorPicker.AdvColorPanel);
#endinitclip
stop();
Symbol 834 MovieClip [NoColorButton] Frame 1
#initclip 270
Object.registerClass("NoColorButton", org.sepy.ColorPicker.AdvancedColorButton);
#endinitclip
stop();
Symbol 835 MovieClip [AdvColorPicker] Frame 1
#initclip 271
Object.registerClass("AdvColorPicker", org.sepy.ColorPicker.ColorPicker);
#endinitclip
stop();
Symbol 853 MovieClip [Slider] Frame 1
#initclip 276
Object.registerClass("Slider", com.games.pencilRacer.gui.components.sliders.NumericalSlider);
#endinitclip
Instance of Symbol 835 MovieClip [AdvColorPicker] "cpicker" in Symbol 856 MovieClip [Palette_TabBar_selection] Frame 1
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 0;
columns = 21;
direction = "UR";
useAdvancedColorSelector = true;
useNoColorSelector = false;
}
Instance of Symbol 492 MovieClip [RadioButton] "art_mc" in Symbol 856 MovieClip [Palette_TabBar_selection] Frame 1
//component parameters
onClipEvent (construct) {
group = "lineType";
}
Instance of Symbol 492 MovieClip [RadioButton] "track_mc" in Symbol 856 MovieClip [Palette_TabBar_selection] Frame 1
//component parameters
onClipEvent (construct) {
group = "lineType";
}
Instance of Symbol 835 MovieClip [AdvColorPicker] "cpicker" in Symbol 872 MovieClip [Palette_TabBar_art] Frame 1
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 0;
columns = 21;
direction = "UR";
useAdvancedColorSelector = true;
useNoColorSelector = false;
}
Instance of Symbol 835 MovieClip [AdvColorPicker] "bg_picker" in Symbol 872 MovieClip [Palette_TabBar_art] Frame 1
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 0;
columns = 21;
direction = "UR";
useAdvancedColorSelector = true;
useNoColorSelector = false;
}
Instance of Symbol 835 MovieClip [AdvColorPicker] "cpicker" in Symbol 873 MovieClip [Palette_TabBar_track] Frame 1
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 0;
columns = 21;
direction = "UR";
useAdvancedColorSelector = true;
useNoColorSelector = false;
}
Symbol 881 MovieClip [LineCount] Frame 1
stop();
Symbol 883 MovieClip [SharedTutorial] Frame 1
function onMouseDown() {
mousePressed = true;
play();
}
stop();
mousePressed = false;
Symbol 886 MovieClip Frame 1
stop();
Symbol 888 MovieClip [Tab ] Frame 1
#initclip 277
Object.registerClass("Tab ", com.games.pencilRacer.gui.components.Tab);
#endinitclip
Symbol 889 MovieClip Frame 1
stop();
Instance of Symbol 624 MovieClip [Tab AG] in Symbol 889 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
title = "MyTab";
group = "standard";
}
Instance of Symbol 888 MovieClip [Tab ] in Symbol 889 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
title = "MyTab";
group = "standard";
}
Instance of Symbol 492 MovieClip [RadioButton] in Symbol 889 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
group = "defaultValue";
}
Symbol 892 MovieClip Frame 1
stop();
Symbol 913 MovieClip Frame 1
stop();
Symbol 928 MovieClip [ShareAll] Frame 1
stop();
Symbol 932 MovieClip [LineWarning] Frame 1
function onMouseDown() {
mousePressed = true;
play();
}
stop();
mousePressed = false;
Symbol 934 MovieClip [TutorialReminder] Frame 1
function onMouseDown() {
mousePressed = true;
play();
}
stop();
mousePressed = false;
Symbol 936 MovieClip Frame 1
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 1
#initclip 278
Object.registerClass("TutorialSimple", com.games.pencilRacer.gui.dialogs.TutorialSimpleClip);
#endinitclip
stop();
initPage(0);
var page = 0;
Symbol 968 MovieClip [TutorialSimple] Frame 40
initPage(0);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 63
initPage(1);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 80
initPage(2);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 91
initPage(3);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 102
initPage(4);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 117
initPage(5);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 133
initPage(6);
stop();
Symbol 968 MovieClip [TutorialSimple] Frame 144
initPage(7);
stop();
Symbol 984 MovieClip Frame 1
stop();
Symbol 985 MovieClip [ExpandMenu] Frame 1
#initclip 279
Object.registerClass("ExpandMenu", com.games.pencilRacer.gui.components.ExpandMenu);
#endinitclip
Symbol 987 MovieClip Frame 1
stop();
Symbol 988 MovieClip [ExpandMenuMode] Frame 1
#initclip 280
Object.registerClass("ExpandMenuMode", com.games.pencilRacer.gui.components.ExpandMenuMode);
#endinitclip
stop();
Instance of Symbol 835 MovieClip [AdvColorPicker] "cpicker" in Symbol 989 MovieClip [ToolsSimple] Frame 1
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 0;
columns = 21;
direction = "UR";
useAdvancedColorSelector = false;
useNoColorSelector = false;
}
Instance of Symbol 835 MovieClip [AdvColorPicker] "bg_picker" in Symbol 989 MovieClip [ToolsSimple] Frame 1
//component parameters
onClipEvent (construct) {
allowUserColor = true;
color = 0;
columns = 21;
direction = "UR";
useAdvancedColorSelector = false;
useNoColorSelector = false;
}
Symbol 993 MovieClip Frame 1
stop();
Instance of Symbol 492 MovieClip [RadioButton] "paperOn_mc" in Symbol 1009 MovieClip [Options] Frame 1
//component parameters
onClipEvent (construct) {
group = "paper";
}
Instance of Symbol 492 MovieClip [RadioButton] "paperOff_mc" in Symbol 1009 MovieClip [Options] Frame 1
//component parameters
onClipEvent (construct) {
group = "paper";
}
Symbol 1011 Button
on (release) {
getURL ("http://www.jacobcorreia.com/jEngine/", "_blank");
}
Symbol 1025 Button
on (release) {
getURL ("http://www.addictinggames.com", "_blank");
}
Symbol 1042 MovieClip Frame 1
stop();
Symbol 1054 MovieClip [jSound Panel 1.5.1] Frame 1
#initclip 282
Object.registerClass("jSound Panel 1.5.1", com.jjcorreia.panels.jSoundPanel);
#endinitclip
Symbol 1065 Button
on (release) {
getURL ("http://www.adobe.com/shockwave/download/index.cgi?&P1_Prod_Version=ShockwaveFlash", "_blank");
}
Symbol 1067 Button
on (release) {
gotoAndPlay ("continue");
}
Symbol 1075 Button
on (release) {
_parent.play();
}
Symbol 1086 Button
on (release) {
getURL ("http://www.addictinggames.com", _blank);
}
Symbol 1087 MovieClip Frame 99
_parent.play();
Symbol 1088 Button
on (release) {
gotoAndStop ("end");
}
Symbol 1092 Button
on (release) {
getURL ("http://www.jacobcorreia.com/jEngine/", "_blank");
}
Symbol 1097 MovieClip Frame 1
skip_btn.useHandCursor = false;
Symbol 1097 MovieClip Frame 3
Symbol 1097 MovieClip Frame 178
stop();
delete onMouseDown;
delete onEnterFrame;
_parent.play();
Symbol 1108 Button
on (release) {
gotoAndStop ("game");
}
Symbol 1110 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 1112 Button
on (release) {
getURL ("http://www.addictinggames.com", "_blank");
}
Symbol 1116 Button
on (press) {
getURL ("http://www.addictinggames.com", "_blank");
}
Symbol 1119 Button
on (release) {
gotoAndStop ("title");
}
Symbol 1124 MovieClip [GameView] Frame 1
#initclip 283
Object.registerClass("GameView", com.games.pencilRacer.apps.GameTmobile);
#endinitclip
stop();