hexsha
stringlengths 40
40
| size
int64 5
1.05M
| ext
stringclasses 588
values | lang
stringclasses 305
values | max_stars_repo_path
stringlengths 3
363
| max_stars_repo_name
stringlengths 5
118
| max_stars_repo_head_hexsha
stringlengths 40
40
| max_stars_repo_licenses
listlengths 1
10
| max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringdate 2015-01-01 00:00:35
2022-03-31 23:43:49
⌀ | max_stars_repo_stars_event_max_datetime
stringdate 2015-01-01 12:37:38
2022-03-31 23:59:52
⌀ | max_issues_repo_path
stringlengths 3
363
| max_issues_repo_name
stringlengths 5
118
| max_issues_repo_head_hexsha
stringlengths 40
40
| max_issues_repo_licenses
listlengths 1
10
| max_issues_count
float64 1
134k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
363
| max_forks_repo_name
stringlengths 5
135
| max_forks_repo_head_hexsha
stringlengths 40
40
| max_forks_repo_licenses
listlengths 1
10
| max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringdate 2015-01-01 00:01:02
2022-03-31 23:27:27
⌀ | max_forks_repo_forks_event_max_datetime
stringdate 2015-01-03 08:55:07
2022-03-31 23:59:24
⌀ | content
stringlengths 5
1.05M
| avg_line_length
float64 1.13
1.04M
| max_line_length
int64 1
1.05M
| alphanum_fraction
float64 0
1
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abe5f6f884729779691fef1f564e8f55aae42497
| 4,505
|
as
|
ActionScript
|
src/mod/SelectWindowMod.as
|
deisyjapan/KanColleListMakerKaini
|
ee9c1cb2e89e5a77f6f464f602171a4911fe7af1
|
[
"MIT"
] | 18
|
2016-12-02T10:01:55.000Z
|
2021-11-07T07:15:52.000Z
|
src/mod/SelectWindowMod.as
|
deisyjapan/KanColleListMakerKaini
|
ee9c1cb2e89e5a77f6f464f602171a4911fe7af1
|
[
"MIT"
] | 5
|
2018-08-26T05:53:48.000Z
|
2020-02-01T12:11:31.000Z
|
src/mod/SelectWindowMod.as
|
deisyjapan/KanColleListMakerKaini
|
ee9c1cb2e89e5a77f6f464f602171a4911fe7af1
|
[
"MIT"
] | 8
|
2018-08-13T14:01:45.000Z
|
2022-03-13T03:22:23.000Z
|
#include "modclbk3.hsp"
//#include "hsp3utf.as"
#ifndef newclbk3
dialog "このモジュールはmodclbk3.hspのインクルードが必須です。\n呼び出し元のメインスクリプトでインクルードして下さい。", 1, "SelectWindowMod.hsp"
end
#endif
#if 0
#ifndef __hsp3utf__
dialog "このモジュールはhsp3utf.asのインクルードが必須です。\n呼び出し元のメインスクリプトでインクルードして下さい。", 1, "SelectWindowMod.hsp"
end
#endif
#endif
#module
#uselib "gdi32.dll"
#func CreateSolidBrush "CreateSolidBrush" wptr
#func GetStockObject "GetStockObject" wptr
#func DeleteObject "DeleteObject" wptr
#uselib "user32.dll"
#func FillRect "FillRect" wptr, wptr, wptr
#func RegisterClassEx "RegisterClassExW" wptr
#func UnregisterClass "UnregisterClassW" wptr, wptr
#func CreateWindowEx "CreateWindowExW" wptr, wptr, wptr, wptr, wptr, wptr, wptr, wptr, wptr, wptr, wptr, wptr
#func DestroyWindow "DestroyWindow" wptr
#func UpdateWindow "UpdateWindow" wptr
#func IsWindow "IsWindow" wptr
#func DefWindowProc "DefWindowProcW" wptr, wptr, wptr, wptr
#func SetLayeredWindowAttributes "SetLayeredWindowAttributes" wptr, wptr, wptr, wptr
#func GetWindowLong "GetWindowLongW" wptr, wptr
#func SetWindowLong "SetWindowLongW" wptr, wptr, wptr
#func GetDC "GetDC" wptr
#func ReleaseDC "ReleaseDC" wptr, wptr
#func GetClientRect "GetClientRect" wptr, wptr
#func PostMessage "PostMessageW" wptr, wptr, wptr, wptr
#func LoadIcon "LoadIconW" wptr, wptr
#func LoadCursor "LoadCursorW" wptr, wptr
#func BeginPaint "BeginPaint" wptr, wptr
#func EndPaint "EndPaint" wptr, wptr
#define WM_DESTROY 0x0002
#define WM_CLOSE 0x0010
#define WM_QUIT 0x0012
#define WM_PAINT 0x000F
#define WM_MOUSEMOVE 0x0200
#define WM_LBUTTONDOWN 0x0201
#define WM_APP 0x8000
#define global WM_SELWINDOW 0x8001
#define GWL_WNDPROC -4
#define LWA_ALPHA 0x0002
#define SWP_NOSIZE 0x0001
#define SWP_NOMOVE 0x0002
#define SWP_SHOWWINDOW 0x0040
#define WS_EX_TOPMOST $00000008
#define HWND_NOTOPMOST -2
#define HWND_TOPMOST -1
#deffunc ShowSelectWindow array sscap, int hTopWindow_
hTopWindow = hTopWindow_
dim windowNum
windowNum = length2(sscap)
logmes "windowNum :"+windowNum
dim hWnds, windowNum
dim rect
dim PAINTSTRUCT, 12
defaultWindowProc = GetWindowLong(hwnd, GWL_WNDPROC)
newclbk3 pWindowProc, 4, *WindowProc
logmes "pWindowProc "+pWindowProc
className = "kwnd_2"
sdim classNameWide
cnvstow classNameWide, className
dim WNDCLASSEX, 12
WNDCLASSEX( 0) = 48
WNDCLASSEX( 2) = pWindowProc
WNDCLASSEX( 6) = LoadIcon(0, 32512)
WNDCLASSEX( 7) = LoadCursor(0, 32512)
WNDCLASSEX( 8) = GetStockObject(0)
WNDCLASSEX(10) = varptr(classNameWide)
WNDCLASSEX(11) = LoadIcon(0, 32512)
RegisterClassEx varptr(WNDCLASSEX)
logmes "RegisterClassEx Stat :"+stat
hBrush = CreateSolidBrush(0x0000FF00)
logmes "hBrush :"+hBrush
repeat windowNum
logmes ""+sscap(0, cnt)+","+sscap(1, cnt)+" "+(sscap(2, cnt)-sscap(0, cnt))+"x"+(sscap(3, cnt)-sscap(1, cnt))
CreateWindowEx WS_EX_TOPMOST, className, "", 0x96000000, sscap(0, cnt), sscap(1, cnt), sscap(2, cnt)-sscap(0, cnt), sscap(3, cnt)-sscap(1, cnt), hTopWindow, 0, 0, 0
hWnds(cnt) = stat
logmes strf("hWnds(%d) :%d", cnt, hWnds(cnt))
if hWnds(cnt) == 0: break
UpdateWindow hWnds(cnt)
SetWindowLong hWnds(cnt), -20, 0x00080000
SetLayeredWindowAttributes hWnds(cnt), 0x00000000, 128, LWA_ALPHA
dc = GetDC(hWnds(cnt))
GetClientRect hWindow, varptr(rect)
FillRect dc, varptr(rect), hBrush
ReleaseDC hWnds(cnt), dc
loop
return
*WindowProc
clbkargprotect args
hWindow = args(0)
Message = args(1)
wp = args(2)
lp = args(3)
///*
switch Message
case WM_PAINT
dc = BeginPaint(hWindow, varptr(PAINTSTRUCT))
GetClientRect hWindow, varptr(rect)
FillRect dc, varptr(rect), hBrush
EndPaint hWindow, varptr(PAINTSTRUCT)
return
swbreak
case WM_LBUTTONDOWN
repeat windowNum
WindowID = cnt
if (hWindow == hWnds(WindowID)){
logmes "WindowID "+WindowID
PostMessage hTopWindow, WM_SELWINDOW, WindowID, 0
break
}
loop
return
swbreak
swend
//*/
return DefWindowProc(hWindow, Message, wp, lp)
#deffunc HideSelectWindow
modWish
return
#deffunc modWish onexit
repeat windowNum
if IsWindow(hWnds(cnt)): DestroyWindow hWnds(cnt)
loop
UnregisterClass className, hinstance
DeleteObject hBrush
modclbk_term
windowNum = 0
hTopWindow = 0
return
#global
#if 0
screen 0
oncmd gosub *WM_SELWINDOW_, WM_SELWINDOW
dim sscap, 4, 1
sscap(0, 0) = 100, 100, 900, 580
sscap(0, 1) = 600, 600, 1400, 1080
ShowSelectWindow sscap, hwnd
stop
*WM_SELWINDOW_
mes wparam
HideSelectWindow
return
#endif
| 24.483696
| 166
| 0.74828
|
b80b224523b5b4af5f2927d3fe2ab54a97567aa4
| 3,229
|
as
|
ActionScript
|
libs/laya/src/laya/net/LocalStorage.as
|
wildfirecode/LayaAir-ActionScript-Debug-Demo
|
6aabf492ce21428c58d58a8ef129002982831d91
|
[
"MIT"
] | 2
|
2017-08-08T01:28:29.000Z
|
2017-08-15T01:24:09.000Z
|
libs/laya/src/laya/net/LocalStorage.as
|
wildfirecode/LayaAir-ActionScript-Debug-Demo
|
6aabf492ce21428c58d58a8ef129002982831d91
|
[
"MIT"
] | null | null | null |
libs/laya/src/laya/net/LocalStorage.as
|
wildfirecode/LayaAir-ActionScript-Debug-Demo
|
6aabf492ce21428c58d58a8ef129002982831d91
|
[
"MIT"
] | 1
|
2021-09-06T03:07:10.000Z
|
2021-09-06T03:07:10.000Z
|
package laya.net {
import laya.net.LocalStorage;
/**
* <p> <code>LocalStorage</code> 类用于没有时间限制的数据存储。</p>
*/
public class LocalStorage {
//基础类
public static var _baseClass:Class;
/**
* 数据列表。
*/
public static var items:*;
/**
* 表示是否支持 <code>LocalStorage</code>。
*/
public static var support:Boolean = false;
public static function __init__():void {
if (!_baseClass) {
_baseClass = Storage;
Storage.init();
}
items = _baseClass.items;
support = _baseClass.support;
}
/**
* 存储指定键名和键值,字符串类型。
* @param key 键名。
* @param value 键值。
*/
public static function setItem(key:String, value:String):void {
_baseClass.setItem(key, value);
}
/**
* 获取指定键名的值。
* @param key 键名。
* @return 字符串型值。
*/
public static function getItem(key:String):String {
return _baseClass.getItem(key);
}
/**
* 存储指定键名及其对应的 <code>Object</code> 类型值。
* @param key 键名。
* @param value 键值。是 <code>Object</code> 类型,此致会被转化为 JSON 字符串存储。
*/
public static function setJSON(key:String, value:Object):void {
_baseClass.setJSON(key, value);
}
/**
* 获取指定键名对应的 <code>Object</code> 类型值。
* @param key 键名。
* @return <code>Object</code> 类型值
*/
public static function getJSON(key:String):Object {
return _baseClass.getJSON(key);
}
/**
* 删除指定键名的信息。
* @param key 键名。
*/
public static function removeItem(key:String):void {
_baseClass.removeItem(key);
}
/**
* 清除本地存储信息。
*/
public static function clear():void {
_baseClass.clear();
}
}
}
class Storage {
/**
* 数据列表。
*/
public static var items:*;
/**
* 表示是否支持 <code>LocalStorage</code>。
*/
public static var support:Boolean = false;
public static function init():void {
__JS__("try{Storage.items=window.localStorage;Storage.setItem('laya', '1');Storage.removeItem('laya');Storage.support = true;} catch(e){}if(!Storage.support)console.log('LocalStorage is not supprot or browser is private mode.')");
}
/**
* 存储指定键名和键值,字符串类型。
* @param key 键名。
* @param value 键值。
*/
public static function setItem(key:String, value:String):void {
try {
support && items.setItem(key, value);
} catch (e:*) {
console.warn("set localStorage failed", e);
}
}
/**
* 获取指定键名的值。
* @param key 键名。
* @return 字符串型值。
*/
public static function getItem(key:String):String {
return support ? items.getItem(key) : null;
}
/**
* 存储指定键名和它的 <code>Object</code> 类型值。
* @param key 键名。
* @param value 键值。是 <code>Object</code> 类型,此致会被转化为 JSON 字符串存储。
*/
public static function setJSON(key:String, value:Object):void {
try {
support && items.setItem(key, JSON.stringify(value));
} catch (e:*) {
console.warn("set localStorage failed", e);
}
}
/**
* 获取指定键名的 <code>Object</code> 类型值。
* @param key 键名。
* @return <code>Object</code> 类型值
*/
public static function getJSON(key:String):Object {
return JSON.parse(support ? items.getItem(key) : null);
}
/**
* 删除指定键名的信息。
* @param key 键名。
*/
public static function removeItem(key:String):void {
support && items.removeItem(key);
}
/**
* 清除本地存储信息。
*/
public static function clear():void {
support && items.clear();
}
}
| 20.566879
| 232
| 0.624342
|
52c5b89be0bf7765534bcc451fe9457da35557e1
| 3,517
|
as
|
ActionScript
|
Script/Door/DoorBase.as
|
CreativeMetalCat/PuzzleHorrorPrototype
|
0aba6e684a630a533c028afb92899fcc010a65e4
|
[
"BSD-2-Clause"
] | null | null | null |
Script/Door/DoorBase.as
|
CreativeMetalCat/PuzzleHorrorPrototype
|
0aba6e684a630a533c028afb92899fcc010a65e4
|
[
"BSD-2-Clause"
] | null | null | null |
Script/Door/DoorBase.as
|
CreativeMetalCat/PuzzleHorrorPrototype
|
0aba6e684a630a533c028afb92899fcc010a65e4
|
[
"BSD-2-Clause"
] | null | null | null |
import InteractableObjectBase;
import PickupableObject.LockBase;
class ADoorBase:InteractableObjectBase
{
UPROPERTY()
ALockBase Lock;
/*If true door will act as lock for itself*/
UPROPERTY()
bool SelfLock=false;
UPROPERTY()
int SelfLockKeyId=0;
UPROPERTY()
bool Locked=false;
UPROPERTY()
bool Opened=false;
UPROPERTY()
float MoveTime=1.2f;
UPROPERTY(DefaultComponent)
UAudioComponent MoveSound;
default MoveSound.Sound = Asset("/Game/Sounds/hl2/doors/wood_move1.wood_move1");
default MoveSound.AutoActivate=false;
UPROPERTY(DefaultComponent)
UAudioComponent MoveStopSound;
default MoveStopSound.Sound = Asset("/Game/Sounds/hl2/doors/wood_stop1.wood_stop1");
default MoveStopSound.AutoActivate=false;
UPROPERTY(DefaultComponent)
UAudioComponent LockedSound;
default LockedSound.Sound = Asset("/Game/Sounds/hl2/doors/default_locked.default_locked");
default LockedSound.AutoActivate=false;
UPROPERTY(DefaultComponent)
UAudioComponent UnLockedSound;
default UnLockedSound.Sound = Asset("/Game/Sounds/Lock/lock_creaking.lock_creaking");
default UnLockedSound.AutoActivate=false;
FTimerHandle MovementTimer;
UPROPERTY(DefaultComponent, RootComponent)
UStaticMeshComponent Mesh;
default Mesh.StaticMesh = Asset("/Game/ScienceLab/Meshes/Rooms/Doors/SM_Door01.SM_Door01");
/* The overridden construction script will run when needed. */
UFUNCTION(BlueprintOverride)
void ConstructionScript()
{
/*If we have lock that means door must be locked*/
if(Lock!=nullptr){Locked=true;}
if(!Locked)
{
if(Opened)
{
Mesh.SetRelativeRotation(FRotator(0,90,0));
}
else
{
Mesh.SetRelativeRotation(FRotator(0,0,0));
}
}
}
UFUNCTION(BlueprintOverride)
void Tick(float DeltaSeconds)
{
if(System::TimerExistsHandle(MovementTimer))
{
float Percent = System::GetTimerElapsedTimeHandle(MovementTimer)/MoveTime;
if(Opened)
{
Mesh.SetRelativeRotation(FRotator(0,90-(90*Percent),0));
}
else
{
Mesh.SetRelativeRotation(FRotator(0,90*Percent,0));
}
}
}
UFUNCTION()
void Open()
{
if(Lock!=nullptr)
{
if(!Lock.Locked){Lock=nullptr;Locked=false;}
}
if(!System::TimerExistsHandle(MovementTimer))
{
if(!Locked)
{
MoveSound.Play();
MovementTimer = System::SetTimer(this,n"FinishedMovement",MoveTime,false);
}
else
{
LockedSound.Play();
}
}
}
UFUNCTION()
void FinishedMovement()
{
MoveStopSound.Play();
Opened=!Opened;
}
UFUNCTION(BlueprintOverride)
void OnInteraction(AActor Interactor, UActorComponent InteractedComponent) override
{
if(SelfLock&&Cast<AKey>(Interactor)!=nullptr)
{
int id = Cast<AKey>(Interactor).KeyId;
if(id==SelfLockKeyId||id==-1)
{
Locked = false;
UnLockedSound.Play();
}
}
Open();
}
}
| 26.847328
| 96
| 0.577481
|
9cfb6c073347cb351473be5aadab44e6f5b45032
| 1,622
|
as
|
ActionScript
|
draw_lib/src/com/roipeker/starling/draw/AbsMesh.as
|
roipeker/DrawLib
|
1eb3b74f99262e76a37129a37df492e9972bec4a
|
[
"MIT"
] | 22
|
2019-05-16T23:54:10.000Z
|
2021-08-20T20:33:57.000Z
|
draw_lib/src/com/roipeker/starling/draw/AbsMesh.as
|
roipeker/DrawLib
|
1eb3b74f99262e76a37129a37df492e9972bec4a
|
[
"MIT"
] | 1
|
2019-06-01T11:47:42.000Z
|
2019-06-01T14:11:09.000Z
|
draw_lib/src/com/roipeker/starling/draw/AbsMesh.as
|
roipeker/DrawLib
|
1eb3b74f99262e76a37129a37df492e9972bec4a
|
[
"MIT"
] | 3
|
2020-01-10T07:53:16.000Z
|
2021-08-20T20:33:58.000Z
|
// =================================================================================================
//
// Created by Rodrigo Lopez [roipeker™] on 31/12/2018.
//
// =================================================================================================
package com.roipeker.starling.draw {
import starling.display.Mesh;
import starling.geom.Polygon;
import starling.rendering.IndexData;
import starling.rendering.VertexData;
import starling.styles.MeshStyle;
public class AbsMesh extends Mesh {
protected var _poly:Polygon;
protected var _color:int = 0xffffff;
public function AbsMesh(vdata:VertexData = null, idata:IndexData = null, style:MeshStyle = null) {
if (!vdata) vdata = new VertexData();
if (!idata) idata = new IndexData();
_poly = new Polygon();
super(vdata, idata, style);
}
public function processVerticesList(vertices:Array, color:int = -1):void {
var vdata:VertexData = vertexData;
var idata:IndexData = indexData;
vdata.clear();
idata.clear();
if (!_poly) {
_poly = new Polygon( vertices )
} else {
_poly.numVertices = 0;
_poly.addVertices.apply(null, vertices);
}
_poly.triangulate(idata);
_poly.copyToVertexData(vdata);
if (color > -1) {
_color = color;
vdata.colorize('color', _color);
}
setIndexDataChanged();
}
public function getVertex():VertexData {
return vertexData;
}
public function getIndex():IndexData {
return indexData;
}
}
}
| 27.965517
| 102
| 0.540074
|
2f34d7100680fb6745c6ae8271fc3aaeadb6c1a0
| 2,304
|
as
|
ActionScript
|
src/com/lowoui_as/component/DropdownMenu.as
|
lightoy/LowoUI-AS
|
03c244b791d1abb53ad83c2febd50264fbf3340b
|
[
"MIT"
] | null | null | null |
src/com/lowoui_as/component/DropdownMenu.as
|
lightoy/LowoUI-AS
|
03c244b791d1abb53ad83c2febd50264fbf3340b
|
[
"MIT"
] | null | null | null |
src/com/lowoui_as/component/DropdownMenu.as
|
lightoy/LowoUI-AS
|
03c244b791d1abb53ad83c2febd50264fbf3340b
|
[
"MIT"
] | 3
|
2017-05-09T11:02:05.000Z
|
2017-05-10T09:57:56.000Z
|
package com.lowoui_as.component
{
import com.lowoui_as.core.UIComponent;
import com.lowoui_as.events.ButtonEvent;
import com.lowoui_as.events.DropMenuEvent;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.utils.getDefinitionByName;
[Event(name = "select", type = "com.lowoui_as.events.DropMenuEvent")]
public class DropdownMenu extends UIComponent
{
private var _value :String;
private var dataArr :Array;
private var btnObj :Object;
private var valueObj :TextField;
private var isOpenList:Boolean;
protected var listObjArr:Array;
public function DropdownMenu()
{
dataArr = [];
btnObj = this["btnSelect"];
valueObj = this["tt"];
isOpenList = false;
listObjArr = [];
thisWidth = this["bg"].width;
thisHeight = this["bg"].height;
btnObj.addEventListener(MouseEvent.CLICK,fOnClick);
}
private function fOnClick(e:MouseEvent):void
{
if (dataArr.length != 0) { showSelectList(); }
}
private function updateSelectList()
{
var _class:Class = getDefinitionByName("btn") as Class
for (var i:int = 0; i < dataArr.length; i++)
{
var _listObj:* = new _class() as Object;
_listObj.visible = isOpenList;
_listObj.setName(dataArr[i]);
_listObj.setSize(185,24);
_listObj.x = 0;
_listObj.y = thisHeight+_listObj.height*i;
addChild(_listObj);
listObjArr.push(_listObj);
_listObj.addEventListener(ButtonEvent.CLICK,fOnSelect);
}
}
private function fOnSelect(e:ButtonEvent):void
{
for each (var _obj:Object in listObjArr)
{
if (e.target == _obj)
{
valueObj.text = _obj.value;
_value = _obj.value;
dispatchEvent(new DropMenuEvent(DropMenuEvent.SELECT));
}
}
showSelectList();
}
private function showSelectList()
{
isOpenList = !isOpenList;
for each (var _obj:Object in listObjArr)
{ _obj.visible = isOpenList; }
}
public function set data(arr:Array) : void
{
dataArr = arr;
updateSelectList();
}
public function get data() : Array
{
return dataArr;
}
public function set value(str:String) : void
{
_value = str;
valueObj.text = str;
}
public function get value() : String
{
return _value;
}
}
}
| 23.752577
| 70
| 0.665799
|
efa487910e148072729b65f4a41c05ad72dcad8d
| 2,290
|
as
|
ActionScript
|
src/ScoreShowState.as
|
raptros/DeveloperHappyHour
|
def369444f162aba1ea40a9d4142b27072fd5330
|
[
"MIT"
] | 3
|
2017-06-27T04:43:26.000Z
|
2021-06-12T19:40:01.000Z
|
src/ScoreShowState.as
|
raptros/DeveloperHappyHour
|
def369444f162aba1ea40a9d4142b27072fd5330
|
[
"MIT"
] | null | null | null |
src/ScoreShowState.as
|
raptros/DeveloperHappyHour
|
def369444f162aba1ea40a9d4142b27072fd5330
|
[
"MIT"
] | null | null | null |
package
{
import org.flixel.*;
/**
* A momentary display of the points that certain things are worth - displayed
* only at the start of the game
*/
public class ScoreShowState extends FlxState
{
public var cfg:Class = MeasuresConfig;
//how long the screen should be displayed for in seconds.
private var lifetime:Number=1.0;
override public function create():void
{
//blue background
var bgfill:FlxSprite = new FlxSprite(0,0).createGraphic(FlxG.width, FlxG.height);
bgfill.color = 0x002449;
add(bgfill);
//prompts
var prompter:FlxText = new FlxText(0, cfg.textCfg.prompter.y0, FlxG.width, "CLEAR ALL CUSTOMERS");
prompter.setFormat(null, cfg.fontSize, 0xdbff00, "center", 0);
add(prompter);
prompter = new FlxText(0, cfg.textCfg.prompter.y1, FlxG.width, "TO ADVANCE");
prompter.setFormat(null, cfg.fontSize, 0xdbff00, "center", 0);
add(prompter);
//use arrays plus loops for compactness and easier layout
var pts:Array = ["100 PTS", "50 PTS", "75 PTS", "100 PTS", "150 PTS", "1500 PTS"];
var icons:Array = [Resources.iconMug, Resources.iconPatron1, Resources.iconPatron2,
Resources.iconPatron3, Resources.iconPatron4, Resources.iconTip];
var ylin:Number;
var scoreLine:FlxText;
//loop over each string, icon pair, figure out where it should go, and throw it there
for (var i:int=0; i < 6; i++)
{
ylin = cfg.textCfg.ptsLine.yinit + 3*cfg.fontSize*i;
scoreLine = new FlxText(0, ylin, cfg.textCfg.ptsLine.w, pts[i]);
scoreLine.setFormat(null, cfg.fontSize, 0xdbff00, "right", 0);
add(scoreLine);
add(new FlxSprite(cfg.imgCfg.strip.x, ylin + cfg.imgCfg.strip.offsets[i], icons[i]));
}
}
// runs a countdown timer.
override public function update():void
{
lifetime -= FlxG.elapsed;
if (lifetime <= 0)
FlxG.state = new PrepareState();
super.update();
}
}
}
| 36.935484
| 110
| 0.564629
|
4a1f291a0fe7ad430c99cade0306344573fb5a13
| 1,262
|
as
|
ActionScript
|
OldProjects/helium2.0/src/services/command/rates/companyRates/GetGroupListCompanyRatesCommand.as
|
kirzyka/SampleBase
|
84c3da4d8ced37e7734301c60acad5bfb49169db
|
[
"MIT"
] | null | null | null |
OldProjects/helium2.0/src/services/command/rates/companyRates/GetGroupListCompanyRatesCommand.as
|
kirzyka/SampleBase
|
84c3da4d8ced37e7734301c60acad5bfb49169db
|
[
"MIT"
] | null | null | null |
OldProjects/helium2.0/src/services/command/rates/companyRates/GetGroupListCompanyRatesCommand.as
|
kirzyka/SampleBase
|
84c3da4d8ced37e7734301c60acad5bfb49169db
|
[
"MIT"
] | null | null | null |
package services.command.rates.companyRates
{
import com.adobe.cairngorm.control.CairngormEvent;
import services.business.rates.companyRates.CompanyRatesDelegate;
import services.cairngorm.BaseCommand;
import services.events.rates.companyRates.GetGroupListCompanyRatesEvent;
import mx.collections.ArrayCollection;
public class GetGroupListCompanyRatesCommand extends BaseCommand
{
/**
* Interface method.
* <p>Execute for forwarding the event to the method
* <code>getGroupListCompanyRates()</code>.
*
* @see com.adobe.cairngorm.commands.ICommand
* @see services.events.rates.companyRates.GetGroupListCompanyRatesEvent
*
*/
override public function execute(event:CairngormEvent):void
{
_event = GetGroupListCompanyRatesEvent(event);
var delegate:CompanyRatesDelegate = new CompanyRatesDelegate(this);
delegate.getGroupListCompanyRates(_event as GetGroupListCompanyRatesEvent);
super.execute(event);
}
/**
* The handler for result of execution of request for
* <code>getGroupListCompanyRates()</code>.
*/
override public function result(data:Object):void
{
model.transactionModule.systemGroupsList = new ArrayCollection(data as Array);
super.result(data);
}
}
}
| 30.047619
| 81
| 0.757528
|
674c4aadfb95f564714bb7ca24d7eb0d4c06662f
| 153,819
|
as
|
ActionScript
|
common-snapshot/src/virtualworlds/lang/PPPTranslationData.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | 1
|
2021-06-23T08:53:53.000Z
|
2021-06-23T08:53:53.000Z
|
common-snapshot/src/virtualworlds/lang/PPPTranslationData.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | null | null | null |
common-snapshot/src/virtualworlds/lang/PPPTranslationData.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | null | null | null |
package virtualworlds.lang
{
import virtualworlds.lang.TranslationData;
/**
* Petpet Park translation data.
*
*/
dynamic public class PPPTranslationData extends TranslationData
{
//--------------------------------------
// CLASS CONSTANTS
//--------------------------------------
public var TRANSLATION_TITLE:String = "Petpet park";
public var TITLE_copyright:String = "<P ALIGN='center'><FONT SIZE = '12'>© 2009 Viacom International Inc. All Rights Reserved.</FONT></FONT></P>";
public var SIGNUP_SCREENONE_ONE:String = "<P ALIGN='center'><FONT SIZE = '35'>1</FONT></P>";
public var SIGNUP_SCREENONE_TWO:String = "<P ALIGN='center'><FONT SIZE = '26'>2</FONT></P>";
public var SIGNUP_SCREENONE_THREE:String = "<P ALIGN='center'><FONT SIZE = '26'>3</FONT></P>";
public var SIGNUP_SCREENTWO_ONE:String = "<P ALIGN='center'><FONT SIZE = '26'>1</FONT></P>";
public var SIGNUP_SCREENTWO_TWO:String = "<P ALIGN='center'><FONT SIZE = '35'>2</FONT></P>";
public var SIGNUP_SCREENTWO_THREE:String = "<P ALIGN='center'><FONT SIZE = '26'>3</FONT></P>";
public var SIGNUP_SCREENTHREE_ONE:String = "<P ALIGN='center'><FONT SIZE = '26'>1</FONT></P>";
public var SIGNUP_SCREENTHREE_TWO:String = "<P ALIGN='center'><FONT SIZE = '26'>2</FONT></P>";
public var SIGNUP_SCREENTHREE_THREE:String = "<P ALIGN='center'><FONT SIZE = '35'>3</FONT></P>";
public var ADOPT_Welcome:String = "<P ALIGN='left'><FONT SIZE = '28'><B>Welcome</B></FONT></P>";
public var ADOPT_Adopt_a_Petpet:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Adopt a Petpet</B></FONT></P>";
public var ADOPT_Choose_a_species:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Choose a Species</B></FONT></P>";
public var ADOPT_species:String = "<P ALIGN='LEFT'><FONT SIZE = '39'><B> [SPECIES]</B></FONT></P>";
public var ADOPT_Name_Your_Petpet:String = "<P ALIGN='left'><FONT SIZE = '11'><B>Name Your Petpet</B></FONT></P>";
public var ADOPT_inputName:String = "<P ALIGN='left'><FONT SIZE = '22'>inputName</FONT></P>";
public var ADOPT_Choose_a_color:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Choose a Colour</B></FONT></P>";
public var ADOPT_Female:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Girl</B></FONT></P>";
public var ADOPT_Male:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Boy</B></FONT></P>";
public var ADOPT_Choose_Gift_Package:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Choose Gift Package</B></FONT></P>";
public var ADOPT_starterPackText:String = "<P ALIGN='center'><FONT SIZE = '18'><B>To help you get started, select a welcome gift pack below. </B></FONT></P>";
public var ADOPT_printBtn:String = "<P ALIGN='center'><FONT SIZE = '17'><B>Print</B></FONT></P>";
public var ADOPT_Species:String = "<P ALIGN='right'><FONT SIZE = '22'><B>Species: </B></FONT></P>";
public var ADOPT_Name:String = "<P ALIGN='right'><FONT SIZE = '22'><B>Name: </B></FONT></P>";
public var ADOPT_Color:String = "<P ALIGN='right'><FONT SIZE = '22'><B>Colour: </B></FONT></P>";
public var ADOPT_Gender:String = "<P ALIGN='right'><FONT SIZE = '22'><B>Gender: </B></FONT></P>";
public var ADOPT_Likes:String = "<P ALIGN='right'><FONT SIZE = '30'><B>Likes: </B></FONT></P>";
public var ADOPT_Dislikes:String = "<P ALIGN='right'><FONT SIZE = '30'><B>Dislikes: </B></FONT></P>";
public var ADOPT_Adoption_Papers:String = "<P ALIGN='center'><FONT SIZE = '33'><B>Adoption Papers</B></FONT></P>";
public var ADOPT_Adoption_Date:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Adoption Date</B></FONT></P>";
public var ADOPT_adoptionDateText:String = "<P ALIGN='center'><FONT SIZE = '18'><B>[DATE]</B></FONT></P>";
public var ADOPT_nameText:String = "<P ALIGN='center'><FONT SIZE = '18'><B>[PETPET NAME]</B></FONT></P>";
public var ADOPT_colorText:String = "<P ALIGN='center'><FONT SIZE = '18'><B>[COLOR]</B></FONT></P>";
public var ADOPT_speciesText:String = "<P ALIGN='center'><FONT SIZE = '18'><B>[SPECIES]</B></FONT></P>";
public var ADOPT_genderText:String = "<P ALIGN='center'><FONT SIZE = '18'><B>[GENDER]</B></FONT></P>";
public var ADOPT_likesText1:String = "<P ALIGN='center'><FONT SIZE = '24'><B>[LIKES]</B></FONT></P>";
public var ADOPT_likesText2:String = "<P ALIGN='center'><FONT SIZE = '24'><B>[LIKES]</B></FONT></P>";
public var ADOPT_dislikesText1:String = "<P ALIGN='center'><FONT SIZE = '24'><B>[DISLIKES]</B></FONT></P>";
public var ADOPT_dislikesText2:String = "<P ALIGN='center'><FONT SIZE = '24'><B>[DISLIKES]</B></FONT></P>";
public var ADOPT_enterParkBtn:String = "<P ALIGN='center'><FONT SIZE = '28'><B>ENTER PARK</B></FONT></P>";
public var ADOPT_You_Recieved:String = "<P ALIGN='center'><FONT SIZE = '25'><B>You Received:</B></FONT></P>";
public var ADOPT_Park_Points:String = "<P ALIGN='left'><FONT SIZE = '17'><B>Park Points</B></FONT></P>";
public var ADOPT_Label_Greeting:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Greeting:</B></FONT></P>";
public var ADOPT_Title_SendAGreeting:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Send A Greeting!</B></FONT></P>";
public var ADOPT_Label_SendTo:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Send to:</B></FONT></P>";
public var ADOPT_friendsEmail:String = "<P ALIGN='center'><FONT SIZE = '30'>Your Friend's E-mail</FONT></P>";
public var ADOPT_sendBtn:String = "<P ALIGN='center'><FONT SIZE = '42'><B>Send</B></FONT></P>";
public var ADOPT_BTN_ADOPT:String = "<P ALIGN='center'><FONT SIZE = '34'><B>ADOPT</B></FONT></P>";
public var ADOPT_Agility:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Agility </B></FONT></P>";
public var ADOPT_Charm:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Charm </B></FONT></P>";
public var ADOPT_Memory:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Memory </B></FONT></P>";
public var ADOPT_DECLINE_Forgot2Adopt:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! You forgot to adopt a Petpet!</B></FONT></P>";
public var ADOPT_DECLINE_ForgotSpecies:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! You forgot to select a species!</B></FONT></P>";
public var ADOPT_DECLINE_SelectGift:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! Please select your gift!</B></FONT></P>";
public var ADOPT_DECLINE_TooManyPets:String = "<P ALIGN='center'><FONT SIZE = '16'><B>I'm sorry but you have too many Petpets!</B></FONT></P>";
public var ADOPT_DECLINE_NonValidEmail:String = "<P ALIGN='center'><FONT SIZE = '16'><B>This is a non-valid email!!!</B></FONT></P>";
public var ADOPT_DECLINE_NotSuccessful:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Not Successful!</B></FONT></P>";
public var ADOPT_DECLINE_Difficulties:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! We are having difficulties processing your adoption at this time!</B></FONT></P>";
public var ADOPT_DECLINE_NameTaken:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! That name's been taken already. Please try again.</B></FONT></P>";
public var ADOPT_BACK:String = "<P ALIGN='center'><FONT SIZE = '34'><B>BACK</B></FONT></P>";
public var ADOPT_ACCEPT_Adopting:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Adopting Petpet!</B></FONT></P>";
public var ADOPT_ACCEPT_EmailSent:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Email successfully sent!</B></FONT></P>";
public var ADOPT_ACCEPT_SendingEmail:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Sending Email!!</B></FONT></P>";
public var ADOPT_ACCEPT_Successful:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Successful!</B></FONT></P>";
public var ADOPT_ACCEPT_GettingGift:String = "<P ALIGN='center'><FONT SIZE = '16'><B>We're getting your gift ready!</B></FONT></P>";
public var ADOPT_DECLINE_NameError:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! Your Petpet's name should be between 6-20 characters, with only letters, numbers and the _ character.</B></FONT></P>";
public var ADOPT_DECLINE_GenderError:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Oops! You need to select a Gender for your Petpet.</B></FONT></P>";
public var HUD_PROFILE_curric:String = "<P ALIGN='center'><FONT SIZE = '34'>Jobs</FONT></P>";
public var HUD_PROFILE_Customise:String = "<P ALIGN='center'><FONT SIZE = '19'><B>Customise</B></FONT></P>";
public var HUD_PROFILE_statusButton:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Petpet Profile</B></FONT></P>";
public var HUD_PROFILE_Likes:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Likes:</B></FONT></P>";
public var HUD_PROFILE_Dislikes:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Dislikes:</B></FONT></P>";
public var HUD_PROFILE_Species:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Species:</B></FONT></P>";
public var HUD_PROFILE_Colour:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Colour:</B></FONT></P>";
public var HUD_PROFILE_Gender:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Gender:</B></FONT></P>";
public var HUD_PROFILE_ppName:String = "<P ALIGN='center'><FONT SIZE = '24'><B>[PETPET NAME]</B></FONT></P>";
public var HUD_PROFILE_ticketsBox:String = "<P ALIGN='left'><FONT SIZE = '14'><B>[PARKPOINTS]</B></FONT></P>";
public var HUD_PROFILE_speciesBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[SPECIES]</B></FONT></P>";
public var HUD_PROFILE_colorBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[COLOR]</B></FONT></P>";
public var HUD_PROFILE_genderBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[GENDER]</B></FONT></P>";
public var HUD_PROFILE_likesBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[LIKES]</B></FONT></P>";
public var HUD_PROFILE_dislikesBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[DISLIKES]</B></FONT></P>";
public var HUD_PROFILE_agilityBox:String = "<P ALIGN='left'><FONT SIZE = '25'><B> Agility [AGILITY]</B></FONT></P>";
public var HUD_PROFILE_charmBox:String = "<P ALIGN='left'><FONT SIZE = '25'><B> Charm [CHARM]</B></FONT></P>";
public var HUD_PROFILE_memoryBox:String = "<P ALIGN='left'><FONT SIZE = '25'><B> Memory [MEMORY]</B></FONT></P>";
public var HUD_PROFILE_Mood:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Mood</B></FONT></P>";
public var HUD_PROFILE_moodBox:String = "<P ALIGN='center'><FONT SIZE = '12'><B>[MOOD]</B></FONT></P>";
public var HUD_PROFILE_UserNameLabel:String = "<P ALIGN='left'><FONT SIZE = '20'><B>User Name:</B></FONT></P>";
public var HUD_PROFILE_sendPalInviteBtn:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Send Pal Invite</B></FONT></P>";
public var HUD_CHEST_clothingBtn:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Clothing</B></FONT></P>";
public var HUD_CHEST_suppliesBtn:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Supplies</B></FONT></P>";
public var HUD_DR_clearBtn:String = "<P ALIGN='center'><FONT SIZE = '22'><B>Clear</B></FONT></P>";
public var HUD_DR_applyBtn:String = "<P ALIGN='center'><FONT SIZE = '22'><B>Save</B></FONT></P>";
public var HUD_DR_clothesText:String = "<P ALIGN='center'><FONT SIZE = '10'><B>Clothes</B></FONT></P>";
public var HUD_HELPTASK_Help:String = "<P ALIGN='center'><FONT SIZE = '33'><B>Help</B></FONT></P>";
public var HUD_HELPTASK_bodyBox:String = "<P ALIGN='left'><FONT SIZE = '14'><B>[NEWSBODY]</B></FONT></P>";
public var HUD_HELPTASK_titleBox:String = "<P ALIGN='left'><FONT SIZE = '16'><B>[NEWSTITLE]</B></FONT></P>";
public var HUD_HELP_topicBox:String = "<P ALIGN='left'><FONT SIZE = '12'><B>[HELPTOPIC]</B></FONT></P>";
public var HUD_TICKER_logoutButton:String = "<P ALIGN='center'><FONT SIZE = '12'><B>Logout</B></FONT></P>";
public var HUD_INFO_nameBox:String = "<P ALIGN='left'><FONT SIZE = '20'>[ITEMNAME]</FONT></P>";
public var HUD_INFO_descBox:String = "<P ALIGN='left'><FONT SIZE = '18'>[ITEMDESC]</FONT></P>";
public var HUD_TT_tipBox:String = "<P ALIGN='left'><FONT SIZE = '20'>[ITEMDESC]</FONT></P>";
public var HUD_NEWSSTORY_titleBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[NEWSTITLE]</B></FONT></P>";
public var HUD_NEWSSTORY_dateBox:String = "<P ALIGN='center'><FONT SIZE = '15'><B>[DATE]</B></FONT></P>";
public var HUD_NEWSSTORY_bodyBox:String = "<P ALIGN='left'><FONT SIZE = '11'>[NEWSBODY]</FONT></P>";
public var HUD_NEWSSTORY_moreBox:String = "<P ALIGN='left'><FONT SIZE = '10'><B>More...</B></FONT></P>";
public var HUD_NEWSSTORY_lessBox:String = "<P ALIGN='left'><FONT SIZE = '10'><B>Less...</B></FONT></P>";
public var HUD_NEWSWIN_News:String = "<P ALIGN='center'><FONT SIZE = '33'><B>News</B></FONT></P>";
public var HUD_NEWSTRYWIN_titleBox:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[NEWSTITLE]</B></FONT></P>";
public var HUD_NEWSTRYWIN_dateBox:String = "<P ALIGN='center'><FONT SIZE = '15'><B>[DATE]</B></FONT></P>";
public var HUD_NEWSTRYWIN_bodyBox:String = "<P ALIGN='left'><FONT SIZE = '14'><B>[NEWSBODY]</B></FONT></P>";
public var HUD_myTricksButton:String = "<P ALIGN='center'><FONT SIZE = '18'><B>My Tricks</B></FONT></P>";
public var HUD_allTricksButton:String = "<P ALIGN='center'><FONT SIZE = '18'><B>All Tricks</B></FONT></P>";
public var HUD_TINFO_nameBox:String = "<P ALIGN='left'><FONT SIZE = '16'>[TRICKNAME]</FONT></P>";
public var HUD_TINFO_descBox:String = "<P ALIGN='left'><FONT SIZE = '20'>[TRICKDESC]</FONT></P>";
public var HUD_TT_Close:String = "<P ALIGN='left'><FONT SIZE = '20'>Close</FONT></P>";
public var HUD_TT_PetpetProfile:String = "<P ALIGN='left'><FONT SIZE = '20'>Petpet Profile</FONT></P>";
public var HUD_TT_Help:String = "<P ALIGN='left'><FONT SIZE = '20'>Help</FONT></P>";
public var HUD_TT_Map:String = "<P ALIGN='left'><FONT SIZE = '20'>Map</FONT></P>";
public var HUD_TT_News:String = "<P ALIGN='left'><FONT SIZE = '20'>News</FONT></P>";
public var HUD_TT_Closet:String = "<P ALIGN='left'><FONT SIZE = '20'>Closet</FONT></P>";
public var HUD_TT_Tricks:String = "<P ALIGN='left'><FONT SIZE = '20'>Tricks</FONT></P>";
public var HUD_TT_Chest:String = "<P ALIGN='left'><FONT SIZE = '20'>Inventory</FONT></P>";
public var HUD_TT_Open:String = "<P ALIGN='left'><FONT SIZE = '20'>Open</FONT></P>";
public var HUD_TT_LOGOUT:String = "<P ALIGN='left'><FONT SIZE = '20'>Logout</FONT></P>";
public var CUSTOMIZE:String = "<P ALIGN='center'><FONT SIZE = '19'>Customise</FONT></P>";
public var JANUARY:String = "JANUARY";
public var FEBRUARY:String = "FEBRUARY";
public var MARCH:String = "MARCH";
public var APRIL:String = "APRIL";
public var MAY:String = "MAY";
public var JUNE:String = "JUNE";
public var JULY:String = "JULY";
public var AUGUST:String = "AUGUST";
public var SEPTEMBER:String = "SEPTEMBER";
public var OCTOBER:String = "OCTOBER";
public var NOVEMBER:String = "NOVEMBER";
public var DECEMBER:String = "DECEMBER";
public var MONDAY:String = "MONDAY";
public var TUESDAY:String = "TUESDAY";
public var WEDNESDAY:String = "WEDNESDAY";
public var THURSDAY:String = "THURSDAY";
public var FRIDAY:String = "FRIDAY";
public var SATURDAY:String = "SATURDAY";
public var SUNDAY:String = "SUNDAY";
public var BTN_Nope :String = "<P ALIGN='center'><FONT SIZE = '30'><B>Nope</B></FONT></P>";
public var BTN_Yup:String = "<P ALIGN='center'><FONT SIZE = '30'><B>Yup</B></FONT></P>";
public var MSG_UseItem:String = "<P ALIGN='center'><FONT SIZE = '30'><B>Are you sure you want to use this item?</B></FONT></P>";
public var Blocktacular_Instructions:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Click on 3 or more matching blocks to earn points.</B></FONT></P>";
public var MSG_Memory:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Memory</B></FONT></P>";
public var MSG_RSG_Ready:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Ready...</B></FONT></P>";
public var MSG_RSG_Set:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Set...</B></FONT></P>";
public var MSG_RSG_Go:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Go...</B></FONT></P>";
public var MSG_Agility:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Agility</B></FONT></P>";
public var StartPosition:String = "<P ALIGN='center'><FONT SIZE = '44'><B>Start Position</B></FONT></P>";
public var GetReady_Arrows:String = "<P ALIGN='center'><FONT SIZE = '17'><B>Start Position</B></FONT></P>";
public var MSG_Charm:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Charm</B></FONT></P>";
public var WW_Instruction1:String = "<P ALIGN='left'><FONT SIZE = '23'><B>Click and drag the clothing items onto your Petpet to match the target.</B></FONT></P>";
public var WW_Instruction2:String = "<P ALIGN='left'><FONT SIZE = '23'><B>Get as many matches as you can within the time limit to get maximum points!</B></FONT></P>";
public var Result_Player:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Player:</B></FONT></P>";
public var Point_Award:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Point Award:</B></FONT></P>";
public var BTN_ExitShop:String = "<P ALIGN='center'><FONT SIZE = '34'><B>Exit Shop</B></FONT></P>";
public var BTN_Buy:String = "<P ALIGN='center'><FONT SIZE = '34'><B>Buy</B></FONT></P>";
public var BTN_NoThanks:String = "<P ALIGN='center'><FONT SIZE = '20'><B>No, thanks.</B></FONT></P>";
public var Title_BuyItem:String = "<P ALIGN='left'><FONT SIZE = '30'><B>Buy This Item?</B></FONT></P>";
public var Title_AreYouSure:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Are you sure you want to purchase</B></FONT></P>";
public var MSG_AreYouSure:String = "<P ALIGN = 'Center'><FONT SIZE = '15'><B>Are you sure you'd like to visit the [LOCATION]?</B></FONT></P>";
public var Title_Enroll:String = "<P ALIGN = 'Center'><FONT SIZE = '24'>Enroll</FONT></P>";
public var MSG_Body:String = "<P ALIGN = 'Center'><FONT SIZE = '16'><B>Congratulations, you've been accepted into Petpet University!</B></FONT></P>";
public var Enroll_Dialogue_BTN_Next:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Next</B></FONT></P>";
public var MC_Changing_Room_Title:String = "<P ALIGN = 'Left'><FONT SIZE = '24'><B>Changing Room</B></FONT></P>";
public var Changing_Room_Petpet_Name:String = "<P ALIGN = 'Left'><FONT SIZE = '31'><B>[PETPET NAME]</B></FONT></P>";
public var Label_Shirts:String = "<P ALIGN = 'Center'><FONT SIZE = '10'><B>Shirts</B></FONT></P>";
public var Label_Hats:String = "<P ALIGN = 'Center'><FONT SIZE = '10'><B>Hats</B></FONT></P>";
public var Label_Pants:String = "<P ALIGN = 'Center'><FONT SIZE = '10'><B>Pants</B></FONT></P>";
public var Label_Shoes:String = "<P ALIGN = 'Center'><FONT SIZE = '10'><B>Shoes</B></FONT></P>";
public var MC_Apply:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Apply</B></FONT></P>";
public var BTN_Report:String = "<P ALIGN = 'Center'><FONT SIZE = '11'><B>Report</B></FONT></P>";
public var BTN_Help:String = "<P ALIGN = 'Center'><FONT SIZE = '11'><B>Help</B></FONT></P>";
public var Widget_BTN_Send:String = "<P ALIGN = 'Center'><FONT SIZE = '12'><B>SEND</B></FONT></P>";
public var MSG_Status:String = "<P ALIGN = 'Left'><FONT SIZE = '9'><B>[USERNAME] is now online.</B></FONT></P>";
public var Popup_Chat:String = "<P ALIGN = 'Left'><FONT SIZE = '9'><B>Chat</B></FONT></P>";
public var Popup_Visit:String = "<P ALIGN = 'Left'><FONT SIZE = '9'><B>Visit Pal</B></FONT></P>";
public var Popup_Remove:String = "<P ALIGN = 'Left'><FONT SIZE = '9'><B>Remove Pal</B></FONT></P>";
public var Popup_View:String = "<P ALIGN = 'Left'><FONT SIZE = '9'><B>View Pal</B></FONT></P>";
public var Status_Buddy:String = "<P ALIGN = 'Center'><FONT SIZE = '9'><B>[STATUS]</B></FONT></P>";
public var Status_Available:String = "<P ALIGN = 'Center'><FONT SIZE = '10'><B>Available</B></FONT></P>";
public var Status_Away:String = "<P ALIGN = 'Center'><FONT SIZE = '10'><B>Away</B></FONT></P>";
public var Tab_Status:String = "<P ALIGN = 'Justify'><FONT SIZE = '28'>Status</FONT></P>";
public var Tab_Curriculum:String = "<P ALIGN = 'Justify'><FONT SIZE = '28'>Curriculum</FONT></P>";
public var MSG_Countdown2:String = "<P ALIGN = 'Center'><FONT SIZE = '52'><B>Set</B></FONT></P>";
public var BTN_Instructions:String = "<P ALIGN = 'Center'><FONT SIZE = '95'><B>Instructions</B></FONT></P>";
public var BTN_Start:String = "<P ALIGN = 'Center'><FONT SIZE = '95'><B>Start</B></FONT></P>";
public var BTN_Big_Ready:String = "<P ALIGN = 'Left'><FONT SIZE = '70'><B>Ready</B></FONT></P>";
public var BTN_ViewInstructions:String = "<P ALIGN = 'Center'><FONT SIZE = '27'><B>View Instructions</B></FONT></P>";
public var BTN_Ready:String = "<P ALIGN = 'Left'><FONT SIZE = '27'><B>Done</B></FONT></P>";
public var Game_BTN_Yes:String = "<P ALIGN = 'Center'><FONT SIZE = '55'><B>Yes</B></FONT></P>";
public var Game_BTN_No:String = "<P ALIGN = 'Center'><FONT SIZE = '55'><B>No</B></FONT></P>";
public var Label_Player:String = "<P ALIGN = 'Center'><FONT SIZE = '26'><B>Player [#]</B></FONT></P>";
public var Label_Hat:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Hat:</B></FONT></P>";
public var Label_Shirt:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Shirt:</B></FONT></P>";
public var Label_Gloves:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Gloves:</B></FONT></P>";
public var Label_Item:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Item:</B></FONT></P>";
public var Label_PlayerColumn:String = "<P ALIGN = 'left'><FONT SIZE = '16'><B>Players</B></FONT></P>";
public var Label_ScoreColumn:String = "<P ALIGN = 'center'><FONT SIZE = '16'><B>Score</B></FONT></P>";
public var Label_Tickets:String = "<P ALIGN = 'Center'><FONT SIZE = '20'><B>Player [#] Tickets</B></FONT></P>";
public var Game_Label_Player:String = "<P ALIGN = 'Left'><FONT SIZE = '20'><B>Player [#]:</B></FONT></P>";
public var MSG_Round:String = "<P ALIGN = 'Center'><FONT SIZE = '81'><B>Round [#]</B></FONT></P>";
public var MSG_Title:String = "<P ALIGN = 'Center'><FONT SIZE = '24'><B>Score this Round:</B></FONT></P>";
public var MSG_NextRound:String = "<P ALIGN = 'Left'><FONT SIZE = '19'><B>Ready for Next Round?</B></FONT></P>";
public var MSG_TimeUp:String = "<P ALIGN = 'Center'><FONT SIZE = '85'><B>Time's Up!</B></FONT></P>";
public var MSG_GetReady:String = "<P ALIGN = 'Center'><FONT SIZE = '52'><B>Get Ready!</B></FONT></P>";
public var MSG_Set:String = "<P ALIGN = 'Center'><FONT SIZE = '52'><B>Set!</B></FONT></P>";
public var MSG_Go:String = "<P ALIGN = 'Center'><FONT SIZE = '52'><B>Go!</B></FONT></P>";
public var MSG_YouLose:String = "<P ALIGN = 'Center'><FONT SIZE = '89'><B>You Lose!</B></FONT></P>";
public var MSG_PlayAgain:String = "<P ALIGN = 'Center'><FONT SIZE = '53'><B>Want to play another game?</B></FONT></P>";
public var MSG_YouWin:String = "<P ALIGN = 'Center'><FONT SIZE = '96'><B>You Win!</B></FONT></P>";
public var Title_Score:String = "<P ALIGN = 'Center'><FONT SIZE = '24'><B>Score this Round</B></FONT></P>";
public var Title_Instructions:String = "<P ALIGN = 'Center'><FONT SIZE = '24'><B>Instructions</B></FONT></P>";
public var Title_Results:String = "<P ALIGN = 'Center'><FONT SIZE = '16'><B>Results</B></FONT></P>";
public var Title_Rewards:String = "<P ALIGN = 'right'><FONT SIZE = '16'><B>Rewards</B></FONT></P>";
public var Boogie_BTN_Ready:String = "<P ALIGN = 'Center'><FONT SIZE = '70'><B>Ready</B></FONT></P>";
public var WardrobeWars_Title_Game:String = "<P ALIGN = 'Center'><FONT SIZE = '29'><B>WardrobeWars</B></FONT></P>";
public var Boogie_Title_Game:String = "<P ALIGN = 'Center'><FONT SIZE = '29'><B>Petpet Boogie</B></FONT></P>";
public var Skeedaddle_Title_Game:String = "<P ALIGN = 'Center'><FONT SIZE = '29'><B>Skeedaddle</B></FONT></P>";
public var Gotcha_Title_Game:String = "<P ALIGN = 'Center'><FONT SIZE = '70'><B>Gotcha</B></FONT></P>";
public var Petpetathalon_Title_Game:String = "<P ALIGN = 'Center'><FONT SIZE = '29'><B>Petpetathalon</B></FONT></P>";
// university high score table game names
public var Highscores_Skeedaddle:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Skeedaddle</Font></P>";
public var HIGHSCORES_BLOCKTACULAR:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Blocktacular</Font></P>";
public var HIGHSCORES_BOOGIE:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Petpet Boogie</Font></P>";
public var HIGHSCORES_GRIMSBY:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Mr. Grimsby's Mystery Maze</Font></P>";
public var HIGHSCORES_WARDROBE:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Wardrobe Wars</Font></P>";
public var HIGHSCORES_WIZARDWALK:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Wizard Walk</Font></P>";
public var BTN_SpaReturn:String = "<P ALIGN = 'Center'><FONT SIZE = '30'><B>Return To Reception</B></FONT></P>";
public var MC_Speech2:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Welcome to Groomtopia! Come inside for a pampering and relaxing stay!</B></FONT></P>";
public var MSG_Welcome:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Welcome to Groomtopia! Please select a station:</B></FONT></P>";
public var BTN_Groom:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Hairstyles</B></FONT></P>";
public var BTN_Color:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Colour Change Station</B></FONT></P>";
public var BTN_Shampoo:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Potions & Lotions</B></FONT></P>";
public var Title_News:String = "<P ALIGN = 'Left'><FONT SIZE = '20'><B>News</B></FONT></P>";
public var Title_Signup:String = "<P ALIGN = 'Left'><FONT SIZE = '29'><B>Sign Up With Neopets</B></FONT></P>";
public var MSG_Directions1:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Step 1 of 4: Create a Username and Password</B></FONT></P>";
public var Label_CreateName:String = "<P ALIGN = 'Left'><FONT SIZE = '18'><B>Create a Username</B></FONT></P>";
public var Text_CreateName:String = "<P ALIGN = 'Left'><FONT SIZE = '8'><B>Your username must be between 6 and 20 characters long (letters, numbers or underscores only).</B></FONT></P>";
public var Label_CreatePass:String = "<P ALIGN = 'Left'><FONT SIZE = '18'><B>Create a Password:</B></FONT></P>";
public var Text_CreatePass:String = "<P ALIGN = 'Left'><FONT SIZE = '8'><B>Your password must be at least 6 characters long, and include at least 2 numbers. You may also use !@#$%^&*()_ and capitalization matters (A is differen from a).</B></FONT></P>";
public var Label_ReenterPass:String = "<P ALIGN = 'Left'><FONT SIZE = '18'><B>Re-enter Password</B></FONT></P>";
public var Text_Agree:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>I agree to the <a href = 'event:TextEvent'>terms and conditions & Privacy Policy.</a></B></FONT></P>";
public var Reg_BTN_Cancel:String = "<P ALIGN = 'Left'><FONT SIZE = '24'><B>Back</B></FONT></P>";
public var Reg_BTN_Next:String = "<P ALIGN = 'Left'><FONT SIZE = '24'><B>Next</B></FONT></P>";
public var MSG_Directions2:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Step 2 of 4: Who Are You?</B></FONT></P>";
public var Label_FirstName:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>First Name</B></FONT></P>";
public var Label_MM:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>MM</B></FONT></P>";
public var Label_DD:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>DD</B></FONT></P>";
public var Label_YYYY:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>YYYY</B></FONT></P>";
public var Label_Language:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Language</B></FONT></P>";
public var MSG_Note:String = "<P ALIGN = 'Left'><FONT SIZE = '8'><B>Note: Please Correctly enter your Date of Birth, as you will need to provide this information to us if you forget your password in the future.</B></FONT></P>";
public var Label_Country:String = "<P ALIGN = 'Left'><FONT SIZE = '16'><B>Country</B></FONT></P>";
public var Label_City:String = "<P ALIGN = 'Left'><FONT SIZE = '16'><B>City</B></FONT></P>";
public var Label_State:String = "<P ALIGN = 'Left'><FONT SIZE = '16'><B>State</B></FONT></P>";
public var Label_Zip:String = "<P ALIGN = 'Left'><FONT SIZE = '16'><B>Zip Code</B></FONT></P>";
public var MSG_Directions3:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Step 3 of 4: Enter your Email Address</B></FONT></P>";
public var Label_EnterEmail:String = "<P ALIGN = 'Left'><FONT SIZE = '16'><B>Enter your Email Address</B></FONT></P>";
public var MSG_DoNotInclude:String = "<P ALIGN = 'Left'><FONT SIZE = '8'><B>Note: Do not include \"http://\" or \"www.\" or anything else that isn't part of your actual email address.</B></FONT></P>";
public var Label_ReenterEmail:String = "<P ALIGN = 'Left'><FONT SIZE = '16'><B>Re-enter your Email Address</B></FONT></P>";
public var MSG_BeSure:String = "<P ALIGN = 'Left'><FONT SIZE = '8'><B>Note: Do not include \"http://\" or \"www.\" or anything else that isn't part of your actual email address. Be sure that e-mails from support@neopets.com are not blocked by your e-mail provide! Some e-mail providers may put e-mails from us into a special junk or spam folder. Please check there first if you are having difficulty receiving e-mails from us.</B></FONT></P>";
public var MSG_Congratulations:String = "<P ALIGN = 'Left'><FONT SIZE = '22'><B>Congratulations! You are all done! Confirm your account details, and enter Petpet Park to adopt your very own Petpet!</B></FONT></P>";
public var Label_YourAccount:String = "<P ALIGN = 'Left'><FONT SIZE = '21'><B>Your Neopets Account</B></FONT></P>";
public var MSG_YourAccount:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Please confirm your account details below. You will need them whenever you login to Neopets or Petpet park.</B></FONT></P>";
public var Label_YourUserName:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Your Username:</B></FONT></P>";
public var Label_YourPass:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Your Password:</B></FONT></P>";
public var MSG_2:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Note: We will not display your password again, so please protect your account by memorizing both your username and password, or by writing them down and storing them in a safe place.</B></FONT></P>";
public var MSG_3:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>Remember that you should never reveal your password to anyone!</B></FONT></P>";
public var BTN_Activate:String = "<P ALIGN = 'Left'><FONT SIZE = '21'><B>Activate</B></FONT></P>";
public var MSG_4:String = "<P ALIGN = 'Left'><FONT SIZE = '12'><B>To enjoy everything that Neopets has to offer, you need to activate your account. We hav esent an e-mail with instructions on how to do this. Don't worry, though, it's really easy!</B></FONT></P>";
public var BTN_Enter:String = "<P ALIGN = 'Left'><FONT SIZE = '24'><B>Enter Petpet Park</B></FONT></P>";
public var Store_Bakery_MC_Name:String = "<P ALIGN = 'Left'><FONT SIZE = '20'><B>The Munchery</B></FONT></P>";
public var Fashions_MC_Name:String = "<P ALIGN = 'Left'><FONT SIZE = '20'><B>Feathers, Fins & Fashion</B></FONT></P>";
public var Store_Supplies_MC_Name:String = "<P ALIGN = 'Left'><FONT SIZE = '20'><B>Petpet Emporium</B></FONT></P>";
public var Label_Price:String = "<P ALIGN = 'Left'><FONT SIZE = '26'><B>Price:</B></FONT></P>";
public var MC_LikeToBuy:String = "<P ALIGN = 'Left'><FONT SIZE = '15'><B>Would you like to buy [ITEM NAME]?</B></FONT></P>";
public var BTN_Yes:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Yes</B></FONT></P>";
public var BTN_No:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>No</B></FONT></P>";
public var BTN_Com:String = "<P ALIGN = 'Center'><FONT SIZE = '14'><B>COMMUNITY</B></FONT></P>";
public var BTN_Sign:String = "<P ALIGN = 'Center'><FONT SIZE = '22'><B>SIGN IN</B></FONT></P>";
public var BTN_DL:String = "<P ALIGN = 'Center'><FONT SIZE = '14'><B>DOWNLOADABLES</B></FONT></P>";
public var BTN_Contest:String = "<P ALIGN = 'Center'><FONT SIZE = '14'><B>CONTESTS</B></FONT></P>";
public var BTN_Spot:String = "<P ALIGN = 'Center'><FONT SIZE = '14'><B>SPOTLIGHT</B></FONT></P>";
public var BTN_NCmall:String = "<P ALIGN = 'Center'><FONT SIZE = '14'><B>NC MALL</B></FONT></P>";
public var Title_TrickMatch:String = "<P ALIGN = 'Justified'><FONT SIZE = '24'>Trick Match!</FONT></P>";
public var MSG_Challenge:String = "<P ALIGN = 'Center'><FONT SIZE = '15'><B>You've been challenge by [USERNAME]!</B></FONT></P>";
public var BTN_Accept:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Accept</B></FONT></P>";
public var BTN_Decline:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Decline</B></FONT></P>";
public var BTN_Block:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Block</B></FONT></P>";
public var MSG_Waiting:String = "<P ALIGN = 'Center'><FONT SIZE = '15'><B>Waiting for Player</B></FONT></P>";
public var BTN_Profile:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Profile</B></FONT></P>";
public var BTN_Chat:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Chat</B></FONT></P>";
public var BTN_Challenge:String = "<P ALIGN = 'Center'><FONT SIZE = '28'><B>Challenge</B></FONT></P>";
public var MSG_DragDrop:String = "<P ALIGN = 'Center'><FONT SIZE = '15'><B>Drag and drop the best combination of FIVE tricks to beat your opponent!</B></FONT></P>";
public var MSG_PlayerWins:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Player [USERNAME] wins [AMOUNT] tickets!</B></FONT></P>";
public var MSG_TrickMatch:String = "<P ALIGN = 'Center'><FONT SIZE = '20'><B>Trick Match!</B></FONT></P>";
public var HUD_Tricks:String = "<P ALIGN = 'Center'><FONT SIZE = '16'><B>Tricks</B></FONT></P>";
public var MSG_Ready:String = "<P ALIGN = 'Center'><FONT SIZE = '40'><B>Ready</B></FONT></P>";
public var Trick_Label_Mood:String = "<P ALIGN = 'Left'><FONT SIZE = '28'><B>Mood</B></FONT></P>";
public var Mood_Happy:String = "Happy";
public var Mood_Silly:String = "Silly";
public var Mood_Amused:String = "Amused";
public var Mood_Chipper:String = "Chipper";
public var Mood_So_So:String = "So-So";
public var Mood_Sad:String = "Sad";
public var Mood_Hungry:String = "Hungry";
public var Mood_Cranky:String = "Cranky";
public var Mood_Angry:String = "Angry";
public var MSG_Mood:String = "<P ALIGN = 'Left'><FONT SIZE = '10'><B>[MOOD]</B></FONT></P>";
public var MC_Accepted:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Your opponent accepted.</B></FONT></P>";
public var MC_Declined:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Your opponent declined.</B></FONT></P>";
public var MC_GetReady:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Get ready for your trick challenge.</B></FONT></P>";
public var MC_15Seconds:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>You've got [AMOUNT] seconds to set up your tricks!</B></FONT></P>";
public var Title_Goals:String = "<P ALIGN = 'Center'><FONT SIZE = '29'>Goals</FONT></P>";
public var BTN_Week:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Week [#]</B></FONT></P>";
public var Label_GoalColumn:String = "<P ALIGN = 'Center'><FONT SIZE = '15'><B>Goal List</B></FONT></P>";
public var Entry_Goal:String = "<P ALIGN = 'Center'><FONT SIZE = '22'><B>Goal [#]</B></FONT></P>";
public var Label_CompletedColumn:String = "<P ALIGN = 'Center'><FONT SIZE = '15'><B>Completed</B></FONT></P>";
public var REGPG1_passwordinfo_txt:String = "<P ALIGN='left'><FONT SIZE = '7.5'><B>Your password must be at least 6 characters long, and include at least 2 numbers. You may also use !@#$%^&*()_ and capitalisation matters (A is different from a).</B></FONT></P>";
public var REGPG1_step1_txt:String = "<P ALIGN='left'><FONT SIZE = '36'><B>Step 1 of 4: Create a Username and Password</B></FONT></P>";
public var REGPG1_signup_txt:String = "<P ALIGN='left'><FONT SIZE = '33'><B>Sign Up</B></FONT></P>";
public var REGPG1_username_txt:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Create a Username:</B></FONT></P>";
public var REGPG1_REG_REENTER_PASS:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Re-enter Password</B></FONT></P>";
public var REGPG1_COUNTRY:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Country</B></FONT></P>";
public var REGPG1_MSG1:String = "<P ALIGN='left'><FONT SIZE = '14'><B>One moment.</B></FONT></P>";
public var REGPG1_MSG2:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Username is too short.</B></FONT></P>";
public var REGPG1_MSG3:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Password is too short.</B></FONT></P>";
public var REGPG1_MSG4:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Passwords do not match.</B></FONT></P>";
public var REGPG1_MSG5:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Password must contain at least two numbers.</B></FONT></P>";
public var REGPG1_MSG6:String = "<P ALIGN='left'><FONT SIZE = '14'><B>You must agree to the Terms and Conditions to continue.</B></FONT></P>";
public var REGPG1_REG_I_AGREE:String = "<P ALIGN='left'><FONT SIZE = '16'><B>I agree to the <u><a href = \"http://www.petpetpark.com/help/terms?loc = pop\" target = \"_blank\">Terms and Conditions</a></u> & <u><a href = \"http://www.petpetpark.com/help/privacy\" target = \"_blank\">Privacy Policy</a></u></B></FONT></P>";
public var REGPG1_createpassword_txt:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Create a Password:</B></FONT></P>";
public var REGPG2_FIRST_NAME:String = "<P ALIGN='left'><FONT SIZE = '16'><B>First Name</B></FONT></P>";
public var REGPG2_Label_City:String = "<P ALIGN='left'><FONT SIZE = '16'><B>City</B></FONT></P>";
public var REGPG2_DOB:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Date of Birth</B></FONT></P>";
public var REGPG2_NEED_ACCT_02:String = "<P ALIGN='left'><FONT SIZE = '36'><B>Step 2 of 4: Who Are You?</B></FONT></P>";
public var REGPG2_GENDER:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Gender</B></FONT></P>";
public var REGPG2_language_txt:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Language</B></FONT></P>";
public var REGPG2_MSG1:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Please select your gender.</B></FONT></P>";
public var REGPG2_MSG2:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Please enter your City.</B></FONT></P>";
public var REGPG2_MSG3:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Please enter a valid zipcode.</B></FONT></P>";
public var REGPG2_MSG4:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Please enter your year of birth (e.g., 1999).</B></FONT></P>";
public var REGPG2_MSG5:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Please enter your first name.</B></FONT></P>";
public var REGPG3_step3_txt:String = "<P ALIGN='left'><FONT SIZE = '36'><B>Step 3 of 4: Enter Your Email Address</B></FONT></P>";
public var REGPG3_notehttp_txt:String = "<P ALIGN='left'><FONT SIZE = '8'><B>NOTE: If you are under 13 years old, we don't save this e-mail address after we send your activation code. Do not include \"http://\" or \"www.\" or anything else that isn't part of your actual email address.</B></FONT></P>";
public var REGPG3_notespam_txt:String = "<P ALIGN='left'><FONT SIZE = '7'><B>Note: Be sure that e-mails from support@neopets.com are not blocked by your e-mail provider! Some e-mail providers may put e-mails from us into a special junk or spam folder. Please check there first if you are having difficulty receiving e-mails from us.</B></FONT></P>";
public var REGPG3_MSG1:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Invalid email address.</B></FONT></P>";
public var REGPG3_MSG2:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Email addresses do not match.</B></FONT></P>";
public var REGPG3_MSG3:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Creating account...</B></FONT></P>";
public var REGPG4_congrats_txt:String = "<P ALIGN='left'><FONT SIZE = '36'><B>Congratulations! You are all done! </B></FONT></P>";
public var REGPG4_neopetsaccount_txt:String = "<P ALIGN='left'><FONT SIZE = '21'><B>Your Petpet Park account has been created!</B></FONT></P>";
public var REGPG4_PleaseRecord:String = "<P ALIGN='left'><FONT SIZE = '13'><B>Please record your account information listed here. You can memorise both your username and password, or just write them down and store in a safe place. You will need this information everytime you login to Petpet Park. Remember that you should never reveal your password to anyone!</B></FONT></P>";
public var REGPG4_YourUsername:String = "<P ALIGN='left'><FONT SIZE = '13'><B>Your Username:</B></FONT></P>";
public var REGPG4_YourPassword:String = "<P ALIGN='left'><FONT SIZE = '13'><B>Your Password:</B></FONT></P>";
public var REGPG4_Note:String = "<P ALIGN='left'><FONT SIZE = '13'><B>Note: This account information will work for you on Neopets.com as well.</B></FONT></P>";
public var REGPG4_ActivateAccount:String = "<P ALIGN='left'><FONT SIZE = '13'><B>To enjoy everything that Petpet Park has to offer, you need to activate your account. We have sent an e-mail with instructions on how to do this. Don't worry though, it's really easy!</B></FONT></P>";
public var REGPG4_activate_txt:String = "<P ALIGN='left'><FONT SIZE = '21'><B>Activate</B></FONT></P>";
public var REGPG4_newsupdates_txt:String = "<P ALIGN='left'><FONT SIZE = '12'><B>Click here to receive Petpet Park news and updates if you are 13 years old or older. </B></FONT></P>";
public var REGPG4_done_label_txt:String = "<P ALIGN='center'><FONT SIZE = '44'><B>Done</B></FONT></P>";
public var REG_LOGIN_EnterUandP:String = "<P ALIGN='center'><FONT SIZE = '36'><B>Enter Username and Password.</B></FONT></P>";
public var REG_LOGIN_Username:String = "<P ALIGN='left'><FONT SIZE = '18'><B>Username:</B></FONT></P>";
public var REG_LOGIN_UsernameDesc:String = "<P ALIGN='left'><FONT SIZE = '11'><B>Your username must be between 6 and 20 characterslong (letters, numbers or underscores only).</B></FONT></P>";
public var REG_LOGIN_Password:String = "<P ALIGN='left'><FONT SIZE = '18'><B>Password:</B></FONT></P>";
public var REG_LOGIN_PasswordDesc:String = "<P ALIGN='left'><FONT SIZE = '11'><B>Your password must be at least 6 characters long, and include at least 2 numbers. You may also use !@#$%^&*()_ and capitalisation matters (A is different from a).</B></FONT></P>";
public var REG_LOGIN_ForgotPass:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Forgot Password?</B></FONT></P>";
public var REG_LOGIN_ForgotPassDesc:String = "<P ALIGN='left'><FONT SIZE = '11'><B>Forgot your password? Enter your username and e-mail address here and it will be sent to you.</B></FONT></P>";
public var REG_LOGIN_MSG1:String = "<P ALIGN='center'><FONT SIZE = '14'><B>Entering Petpet Park...</B></FONT></P>";
public var REG_LOGIN_MSG2:String = "<P ALIGN='center'><FONT SIZE = '14'><B>Sending e-mail...</B></FONT></P>";
public var REG_LOGIN_MSG3:String = "<P ALIGN='center'><FONT SIZE = '14'><B>Invalid e-mail address.</B></FONT></P>";
public var REG_LOGIN_MSG4:String = "<P ALIGN='center'><FONT SIZE = '14'><B>An e-mail has been sent containing your username and password.</B></FONT></P>";
public var REG_LOGIN_MSG5:String = "<P ALIGN='center'><FONT SIZE = '14'><B>Unable to connect to server.</B></FONT></P>";
public var REG_LOGIN_MSG:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Unable to connect to server.</B></FONT></P>";
public var REG_LOGIN_signup_txt:String = "<P ALIGN='left'><FONT SIZE = '33'><B>Login</B></FONT></P>";
public var REG_LOGIN_submitButton:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Submit</B></FONT></P>";
public var UNIV_LD_statusButton:String = "<P ALIGN='center'><FONT SIZE = '28'><B>High Scores</B></FONT></P>";
public var UNIV_LD_singleplayer_label_txt:String = "<P ALIGN='left'><FONT SIZE = '18'><B>Singleplayer</B></FONT></P>";
public var UNIV_LD_multiplayer_label_txt:String = "<P ALIGN='left'><FONT SIZE = '18'><B>Multiplayer</B></FONT></P>";
public var UNIV_LD_top50scores_label_txt:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Top 50 Singleplayer Scores for</B></FONT></P>";
public var UNIV_LD_TOP50MULTI:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Top 50 Multiplayer Scores for</B></FONT></P>";
public var UNIV_LD_gamedescription_label_txt:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Game Description</B></FONT></P>";
public var UNIV_LD_selectgame_label_txt:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Select a game:</B></FONT></P>";
public var KIOSK_LearnAbout:String = "<P ALIGN='left'><FONT SIZE = '25'><B>What topic would you like to learn more about?</B></FONT></P>";
public var KIOSK_signup_txt:String = "<P ALIGN='center'><FONT SIZE = '30'><B>FAQ:</B></FONT></P>";
public var KIOSK_DIALOG1:String = "Thanks for stopping by. Come back any time.";
public var KIOSK_DIALOG2:String = "Hi. Would you like to learn more about Petpet Park?";
public var KIOSK_DIALOG3:String = "Ok, come back if you change your mind.";
public var KIOSK_Q1:String = "How do I move my Petpet?";
public var KIOSK_Q2:String = "How do I enter a store?";
public var KIOSK_Q3:String = "What do I use to buy stuff?";
public var KIOSK_Q4:String = "How do I buy stuff?";
public var KIOSK_Q5:String = "What is Neocash?";
public var KIOSK_Q6:String = "So how do I purchase these Neocash items?";
public var KIOSK_Q7:String = "What do those icons at the bottom of my screen mean?";
public var KIOSK_Q8:String = "Customised Petpets are cool! How can I customise my Petpet?";
public var KIOSK_Q9:String = "My Petpet is sad. How can I make them happy?";
public var KIOSK_Q10:String = "Speaking of which, how do I feed my Petpet?";
public var KIOSK_Q11:String = "What about mini-games? How do I play those?";
public var KIOSK_Q12:String = "How many Petpets can I adopt?";
public var KIOSK_Q13:String = "Who are these Petpets in the Park?";
public var KIOSK_A1:String = "Easy! Simply point with your mouse and click on the spot where you want your Petpet to go. A small paw print will appear and your Petpet will walk to it.";
public var KIOSK_A2:String = "Just use your mouse and move your Petpet to the store you want to enter. There will be a tile with a paw on it. Have your Petpet stand on the tile and you will enter the store.";
public var KIOSK_A3:String = "The currency of Petpet Park is Park Points (PP), which can be earned by playing mini-games.";
public var KIOSK_A4:String = "Once you have enough PP for whatever you want to buy, enter a store and click on the item you desire. Information about the item, such as the name, description, and cost, will pop up. Select \"buy\" to purchase the item, and it will be added to your inventory automatically.";
public var KIOSK_A5:String = "Neocash is currency purchased with actual money, while PP are earned from playing games and participating in other activities in the Park. Neocash items are sold in separate stores (located in the Petpet Park Mall).";
public var KIOSK_A6:String = "The process of buying an item with Neocash is the same as buying something with PP, only you go to the Mall to select the store you want. You can also purchase Neocash at the Mall in order to buy Mall items.";
public var KIOSK_A7:String = "<img height = '45' width = '45' align = 'left' src = 'images/faq/chest.png'/> – This is your inventory! There is one tab for clothing and one tab for supplies and food. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/hanger.png'/> – This takes you to the Dressing Room, where you can customise your Petpet. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/stars.png'/> – These are tricks your Petpet can do. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/newspaper.png'/> – This will show you current Petpet Park News. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/map.png'/> – This is a map of Petpet Park. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/id.png'/> – Your Petpet's profile. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/bag.png'/> – This will take you to the Petpet Park Mall. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/question.png'/> – Need any more help? This icon aims to offer assistance!";
public var KIOSK_A8:String = "Simply click on the Dressing Room icon, and then drag and drop your desired items onto your Petpet! You can buy clothing items for Park Points at Fins, Feathers and Fashion or for Neocash at the Petpet Park Mall.";
public var KIOSK_A9:String = "A bored, hungry Petpet is a sad Petpet! Keep your Petpet happy by feeding them, giving them toys to play with, and playing mini-games.";
public var KIOSK_A10:String = "Click on the chest icon, which will open up your inventory. Go to the Supplies tab, find the food you want to feed your Petpet, and drag and drop it onto them. If you don't have any food in your inventory, visit The Munchery or the Mall to pick up some food items.";
public var KIOSK_A11:String = "Enter the lobby of the game you want to play by double-clicking. If you want to play single-player, step on one of the lone circles. A countdown will start, and you will be transported to the game. If you want to play multi-player, step on one of the circles that are clustered in groups of four. When another Petpet steps into the same cluster, the countdown will start. If you want to play with friends, organise it so that you all step in the same cluster. If you need any help, there will be PPL members in all of the lobbies who will be glad to assist you with any lobby or game questions you might have.";
public var KIOSK_A12:String = "For now, you can only adopt one Petpet. (Give the PPL a break; they just opened the park up to the public!) However, who knows what will happen when they're less busy...";
public var KIOSK_A13:String = "They are members of the Petpet Protection League (PPL). They are there to help you and your Petpet find your way around the park. Here are a few of them: Professor Patrice – She may look stern, but she's always willing to help your Petpet do their best in Blocktacular. Wintoura – This fashionista knows Wardrobe Wars inside-out! Fairbanks – The dashing Fairbanks will help you out in Skeedaddle!";
public var NPCCHATBUBBLE_okButton:String = "<P ALIGN='center'><FONT SIZE = '36'><B>Ok</B></FONT></P>";
public var NPCCHATBUBBLE_yesButton:String = "<P ALIGN='center'><FONT SIZE = '36'><B>Yes</B></FONT></P>";
public var NPCCHATBUBBLE_noButton:String = "<P ALIGN='center'><FONT SIZE = '36'><B>No</B></FONT></P>";
public var NPCCHATBUBBLE:String = "<P ALIGN='center'><FONT SIZE = '26'><B>[NPCDIALOG]</B></FONT></P>";
public var TITLE_signUp:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Sign Up</B></FONT></P>";
public var TITLE_signIn:String = "<P ALIGN='center'><FONT SIZE = '58'><B>Login </B></FONT></P>";
public var CHOOSE_ChooseYourPetpet:String = "<P ALIGN='center'><FONT SIZE = '33'><B>Choose Your Petpet</B></FONT></P>";
public var CHOOSE_PetPetName:String = "<P ALIGN='left'><FONT SIZE = '22'><B>[PETPET NAME]</B></FONT></P>";
public var CHOOSE_comingsoon:String = "<P ALIGN='center'><FONT SIZE = '30'>Coming Soon</FONT></P>";
public var CHOOSE_ENTERPARKBTN:String = "<P ALIGN='center'><FONT SIZE = '30'><B>Enter Park</B></FONT></P>";
public var CHOOSE_SELECTPET:String = "<P ALIGN='center'>You must select a Petpet!<FONT SIZE = '22'></FONT></P>";
public var CHOOSE_PetPetOneName:String = "<P ALIGN='left'><FONT SIZE = '22'><B>Petpet 1</B></FONT></P>";
public var CHOOSE_PetPetTwoName:String = "<P ALIGN='left'><FONT SIZE = '22'><B>Petpet 2</B></FONT></P>";
public var CHOOSE_PetPetFourName:String = "<P ALIGN='left'><FONT SIZE = '22'><B>Petpet 4</B></FONT></P>";
public var CHOOSE_PetPetThreeName:String = "<P ALIGN='left'><FONT SIZE = '22'><B>Petpet 3</B></FONT></P>";
public var NPCDIALOG_FAIR1:String = "Howdy! There are single and multiplayer game tiles - step on a tile to begin a game.";
public var QUITSCRN_AreYouSure:String = "<P ALIGN='center'><FONT SIZE = '24'><B>Are you sure you want to leave?</B></FONT></P>";
public var QUITSCRN_noButton:String = "<P ALIGN='center'><FONT SIZE = '36'><B>No</B></FONT></P>";
public var QUITSCRN_yesButton:String = "<P ALIGN='center'><FONT SIZE = '36'><B>Yes</B></FONT></P>";
public var EMAIL_MSG1:String = "I adopted a [SPECIES] species today!";
public var EMAIL_MSG2:String = "I've got a [SPECIES] species!";
public var EMAIL_MSG3:String = "Have you helped out your Petpet Protection League today?";
public var EMAIL_MSG4:String = "Be prepared to see the cutest Petpet ever.";
public var EMAIL_MSG5:String = "It's a boy!";
public var EMAIL_MSG6:String = "It's a girl!";
public var EMAIL_MSG7:String = "I've got a [SPECIES] species!";
public var EMAIL_MSG8:String = "Visit Petpet Park and see my Petpet!";
public var EMAIL_MSG9:String = "Like my Petpet? Too bad, adopt your own!";
public var EMAIL_MSG10:String = "Who's the cutest Petpet in the world? MINE!";
public var EMAIL_MSG11:String = "Come take a walk in the park with me and my new Petpet.";
public var EMAIL_MSG12:String = "I have a new Petpet!";
public var EMAIL_MSG13:String = "I am now a proud owner of a [SPECIES] species.";
//PRIVACY POLICY
public var HELP_BODY1A:String = "Petpetpark.com Privacy Policy\n\nIntroduction\n\nPetpetpark.com is committed to providing a fun, entertaining, and safe Web " +
"site for people of all ages. We are dedicated to safeguarding any personal information collected online and to helping parents and children learn how " +
"to exercise control over personal information while exploring the Internet. To this end, we ensure that our privacy policy and our information practices" +
" adhere to the U.S. Department of Commerce's Safe Harbor Principles. Because many of the visitors to this site are children, we take special measures to" +
" help children protect their privacy while online. For example, we do not ask children to disclose more personal information than is necessary for them" +
" to participate in a particular activity, and we take efforts to prevent children from posting contact information. This Privacy Policy is intended to" +
" explain our privacy practices and inform you as to: (1) the kinds of personally identifiable information (\"Personal Information\") we collect from" +
" visitors of petpetpark.com (the \"Site\"); (2) how that information is collected; (3) how we use Personal Information; (4) the circumstances under" +
" which we disclose Personal Information to third parties; (5) how you can access, update or delete any Personal Information collected about you by us;" +
" and (6) the mechanisms we have implemented to protect your Personal Information. As we continue to offer our visitors new and different types of" +
" content and services, we may modify our practices from time to time. However, we will treat all personal information we collect in accordance with" +
" the privacy notice in effect at the time the information is collected. This Privacy Policy is a part of the terms and conditions which are set forth" +
" in our Terms of Use Agreement (\"Agreement\"). Any terms that are not defined in this Privacy Policy shall have the meaning given in the Agreement" +
".\n\nThe Information We Collect\n\nAt petpetpark.com, where visitors self-identify as 13 years and older we collect a valid e-mail address and birth" +
" date, we may collect additional information including Computer Information (see below), gender, state/province, zip/postal code, and country, and we" +
" may ask additional questions regarding personal preferences on a number of topics through surveys. For certain enhanced services, we also may collect" +
" credit card and billing information (including telephone number). Additionally, when visitors come to our site, we automatically collect some" +
" non-personally identifiable \"computer\" information, such as the type of computer operating system (e.g., Windows XP or Mac OS), the visitor's" +
" \"IP Address\", the web browser (e.g., Netscape, Internet Explorer) being used, information collected through the use of cookies (see below) and" +
" information regarding the Internet service provider (\"Computer Information\").\n\nHow We Use the Information\n\nWe use visitors' Personal Information" +
" for our internal purposes of enabling visitors to enter one of our online contests or sweepstakes, to subscribe to our online newsletter, or to inform" +
" visitors of upcoming events and special announcements. Each e-mail contains instructions on how to be removed from the subscription list. We also use" +
" visitors' Computer Information to track usage, improve the design of the Site, offer products and services, to personalize our visitor's experiences," +
" save your password in password-protected areas, enable you to use shopping carts on our sites and to ensure visitors are following the site's" +
" Agreement. Sometimes we will use agents or contractors to help us provide services to our visitors, such as helping us conduct a sweepstakes and" +
" sending prizes to the winners. In these cases, we require the agent or contractor to keep the information confidential and to use it only for the" +
" specific services they are performing. Additionally. in the event that all or substantially all of our stock and/or assets are transferred or sold" +
" to another entity, we may transfer such information and information collected from parents or guardians to the acquiring entity.\n\nYou acknowledge," +
" consent, and agree that we may access, preserve, and/or disclose your Personal Information, Computer Information, or other information and/or content" +
" to a law enforcement agency or another third party if required to do so by law or in a good faith belief that such access, preservation, or disclosure" +
" is reasonably necessary to: (a) comply with legal process; (b) enforce the Terms and Conditions; (c) respond to claims that any content violates the" +
" rights of third parties; (d) respond to your requests for customer service; or (e) protect the rights, property, or personal safety of Neopets, its" +
" users, and the public.\n\nContests and Sweepstakes\n\nPetpetpark.com occasionally offers contests and sweepstakes, which may be entered online." +
" To participate in a contest or sweepstakes, a visitor is asked to provide his or her name and email address. Sometimes, if the visitor who wishes" +
" to enter the contest is under 13, and the contest or sweepstakes may involve more than a one-time contact, we also ask for the email address of the" +
" visitor's parent. In those cases, we send the visitor's parent an email within two business days informing him or her of their child's entry and give" +
" the parent the option to have the child's entry deleted. All the information collected by petpetpark.com is securely maintained and used only for the" +
" purpose of conducting and fulfillment of the contest or sweepstakes. Once the contest or sweepstakes if finished, we delete any personal information" +
" collected.";
public var HELP_BODY1B:String = "The information collected in a petpetpark.com sweepstakes may be passed to a fulfillment house which may use the information" +
" to help run the contest or sweepstakes. Any such fulfillment house may not use the information for other purposes and must agree to maintain the" +
" confidentiality of the information.Collection of Information by Third-Party Sites and Sponsors\n\nOur site contains links to other sites, including" +
" those of sponsors, advertisers and survey companies. Visitors should consult the other sites' privacy notices, since our Privacy Policy does not cover" +
" those sites. Petpetpark does not share a visitor's e-mail address or other Personal Information with such third parties without permission; however," +
" if you choose to \"opt-in\" (click on a box to receive a third party's information), to register with one of our sponsors, or you choose not" +
" to \"opt-out\" (uncheck a checked box that will provide a sponsor with your information), that means you have allowed Petpetpark to give your" +
" registration and other information, including e-mail address, to that third party.\n\nCookies\n\nPetpetpark.com uses a software technology" +
" called \"cookies.\" Cookies are small text files that we and certain third parties place in visitors' computer browsers to store their preferences." +
" Cookies, by themselves, do not tell us your e-mail address or other personally identifiable information unless you choose to provide this information" +
" to us by, for example, registering at our site. However, once you choose to furnish the site with personally identifiable information, this information" +
" may be linked to the data stored in the cookie.\n\nWe may also use small pieces of code called \"web beacons\" or \"clear gifs\" to collect anonymous" +
" and aggregate advertising metrics, such as counting page views, promotion views, or advertising responses. These \"web beacons\" may be used to deliver" +
" cookies that conform to our cookie policy.\n\nYou may adjust your browser to reject cookies from us or from any other Web site. Please consult" +
" the \"Help\" section of your browser for more information. However, certain areas of our sites can only be accessed in conjunction with cookies" +
" or similar devices and you should be aware that disabling cookies or similar devices might prevent you from accessing some of our content.\n\nOur" +
" Privacy Policy does not cover any use of information that a third party ad server may collect from you. For more information on third party ad" +
" servers, please see <a href='http://www.networkadvertising.org' target='_blank'><u>http://www.networkadvertising.org</u></a> and the section" +
" entitled Collection of Information by Third-Party Sites and Sponsors.\n\nSecurity\n\nWe have put in place appropriate physical, electronic, and" +
" managerial procedures to safeguard and help prevent unauthorized access, maintain data security, and correctly use the information we collect" +
" online.\n\nPhishing\n\nPhishing attacks attempt to steal consumers' personal identity data and financial account credentials. \"Phishers\" use" +
" 'spoofed' e-mails to lead consumers to counterfeit websites designed to trick recipients into divulging Sensitive Personal Information such as" +
" credit card numbers, account usernames, passwords, and social security numbers. WE DO NOT SEND EMAILS ASKING YOU TO PROVIDE OR CONFIRM SENSITIVE" +
" PERSONAL INFORMATION OR YOUR USERNAME OR PASSWORD! If you receive such email communication, please forward it immediately to the Site's Privacy" +
" Administrator at <a href='mailto:Privacy.Petpetpark@Petpetpark.com'><u>Privacy.Petpetpark@Petpetpark.com</u></a> and then immediately delete the fraudulent email from your computer.\n\nAdditional Information" +
" Concerning Children's Privacy\n\nWe do not collect Personal Information from visitors who identify themselves as under the age of 13 except where" +
" we receives verifiable parental consent or in those limited circumstances where we believe that such collection is permitted under applicable law." +
" Visitors to our site may participate in many of our offerings and activities without providing any Personal Information. To participate in certain" +
" of our interactive features, however, we ask the user to register and provide us with the following information: the visitor's age, as well as e-mail" +
" address (not stored for children - click here for more information). We will use e-mail addresses submitted by children to send a one-time account" +
" activation code and to respond to specific requests, (e.g., to send a game challenge, allow them to enter a contest, or provide parental notice)." +
" We may collect additional information including Computer Information, gender, state/province, zip/postal code, and country, and we may ask additional" +
" questions regarding personal preferences on a number of topics through surveys. As noted above, we will not condition participation in an online" +
" activity on the disclosure of more information than is reasonably necessary to participate in the activity. We do not share children's Personal" +
" Information with outside third parties not bound by this Privacy Policy.\n\nAt Petpetpark.com, our goal is to help parents ensure that their kids" +
" have a safe and fun online experience. That's why we've set up a system by which parents can contact us to review any Personal Information collected" +
" about their child, have this information corrected or deleted, and/or request that there be no further collection or use of their child's information." +
" Please make any such request through this e-mail address: <a href='mailto:Privacy.Petpetpark@Petpetpark.com'><u>Privacy.Petpetpark@Petpetpark.com</u></a>. Petpetpark.com takes steps to verify the identity of anyone" +
" requesting information about a child and to ensure that the person is in fact the child's parent or legal guardian.\n\nIf you have any questions about" +
" our children's privacy practices, you may call, e-mail, or write to us using the contact information provided below.\n\nAccessing or Correcting" +
" Information\n\nVisitors can change their user information supplied upon registration (except for user name, original e-mail address and date of birth)" +
" on this page: <a href='http://www.petpetpark.com/help/contact-us/form/section/ppp_parents' target='_blank'><u>http://www.petpetpark.com/help/contact-us/form/section/ppp_parents</u></a>" +
" and following the direction on such page.\n\nContact Us If you have any questions, comments, or concerns regarding our privacy policy and/or practices," +
" please contact us at the following e-mail address, address, or telephone number:\n\<a href='mailto:Privacy.Petpetpark@Petpetpark.com'><u>Privacy.Petpetpark@Petpetpark.com</u></a>\n\nPrivacy Manager" +
" - Petpetpark.com\n\nP.O. Box 10263\n\nGlendale CA, 91209-0263\n\n(818) 551 7580\n\nA Final Note to Parents\n\nThe Internet offers a world of opportunity for" +
" children. Your guidance and involvement are essential to help ensure that children have a safe and rewarding online experience. We encourage you to visit" +
" The Direct Marketing Association's Web site (<a href='http://www.the-dma.org'><u>http://www.the-dma.org</u></a>) and explore the Get CyberSavvy! program" +
" at <a href='http://www.cybersavvy.org/cybersavvy/index.html' target='_blank'><u>http://www.cybersavvy.org/cybersavvy/index.html</u></a>. Get CyberSavvy!" +
" helps families learn how information flows online so they can use the Internet in ways that protect their privacy and well-being. It also contains a number" +
" of valuable resources to help parents and children be aware of and express their preferences about information that is collected online and how it is used." +
" Your efforts to instill responsible information practices will help steer your children to age-appropriate sites and will go a long way toward ensuring that" +
" your children have enriching experiences online.\n\nEffective Date, Updates and Acceptance\n\nThe privacy policy set out above is effective as of May 1, 2009." +
" Your use of the Site is subject to this Privacy Policy and the Terms of Use Agreement. By using this Site, you are accepting the practices set out in this Privacy" +
" Policy and the Terms of Use. We reserve the right to modify this Privacy Policy at any time by posting the changes on this page. Your continued use of any portion" +
" of the Site following posting of the updated Privacy Policy will constitute your acceptance of the changes.\n\nYour California Privacy Rights\n\nCalifornia Civil" +
" Code Section 1798.83 permits our visitors who are California residents to request certain information regarding its disclosure of personal information to third" +
" parties for their direct marketing purposes. To make such a request, please send an e-mail to or write us: <a href='mailto:Privacy.Petpetpark@Petpetpark.com'><u>Privacy.Petpetpark@Petpetpark.com</u></a> e-mail, or you may" +
" contact us via regular mail at:\n\nPrivacy Manager - Petpetpark.com\n\nP.O. Box 10263\n\nGlendale CA, 91209-0263\n\nAttn: Your California Privacy Rights\n\nc/o Privacy" +
" Administrator";
//TERMS & CONDITIONS
public var HELP_BODY2A:String = "Terms and Condition\nPLEASE READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THIS WEBSITE (the \"Site\"). \nThis site is fully controlled and operated by Neopets, Inc. (referred to below as \"Petpetpark\" \"we,\" \"us,\" and \"our\"). By accessing and using this Site, you agree to be legally bound by these Terms and Conditions. If you do not agree to these terms, please do not use the Site. We reserve the right, at our sole discretion, to change, modify, add to, or otherwise alter these Terms and Conditions at any time. Such changes and/or modifications shall become effective immediately upon their posting, so please review the Terms and Conditions posted at this link periodically. Your continued use of the Site following the posting of changes and/or modifications will constitute your acceptance of the revised Terms and Conditions (including the Petpetpark.com Privacy Policy). \nOWNERSHIP OF INTELLECTUAL PROPERTY; LICENSE; RESTRICTIONS ON USE\nAll site software, design, text, images, photographs, illustrations, audio clips, video clips, artwork, graphic material, or other copyrightable elements, and the selection and arrangements thereof, and trademarks, service marks and trade names (the “Materials”) are the property of Neopets, Inc. and/or its subsidiaries, affiliates, assigns, licensors or other respective owners, and are protected, without limitation, pursuant to U.S. and foreign copyright and trademark laws.\nPetpetpark hereby grants you a personal, non-exclusive, non-assignable, revocable, non-transferable license to use and display, for noncommercial and personal use only, one copy of appropriately limited portions of the Materials and/or software that are downloadable from this Site, including, without limitation, any files, codes, audio, or images incorporated in or generated by or in conjunction with the Site and/or Petpetpark, provided that all proprietary notices (e.g. “Copyright 2000-2009 Neopets, Inc. All Rights Reserved. Used With Permission” or “(c) 2000-2009 Neopets, Inc. All Rights Reserved. Used With Permission.”) are properly maintained.\nExcept for the license granted above, you are not permitted to, and hereby agree not to copy, reproduce, publish, republish, upload, post, transmit, distribute, disseminate, broadcast, modify, create derivative works from, display, perform, sell, decompile, reverse engineer, disassemble, or circulate Materials (or any portion thereof) in any way or by any means (including, without limitation, display and distribute the Materials via a third party website), without Petpetpark' express prior written consent. Unauthorized or prohibited exploitation of Materials will result in deletion of the offender's account from the Site, and may subject the offender to civil liability and criminal prosecution under applicable federal and state laws.\nModification of Materials or use of Materials for any other purpose is a violation of Petpetpark's copyright and other proprietary rights. For purposes of these Terms and Conditions, use of any Materials in any unauthorized manner (including, without limitation, on web pages or sites that contain paid or free advertisements, third-party endorsements of any kind or nature (including without limitation, endorsements of a religious, political, or social orientation nature), promotions, products, games, services, or other inappropriate content) is strictly prohibited.\nPetpetpark respects the intellectual property of others, and we ask our users to do the same. Petpetpark may, in appropriate circumstances and at its discretion, terminate the accounts of users who infringe the intellectual property rights of others. \nWe take protection of copyrights, both our own and others, very seriously. We therefore employ multiple measures to prevent copyright infringement over this Site and to promptly end any infringement that might occur. If you believe that the Site contains elements that infringe your copyrights in your work, please follow the procedures set forth in our Copyright Compliance Policy. \nCHAT\nTo the extent that portions of this Site provide users an opportunity to exchange information, ideas, and opinions (“Messages”) in chat rooms or instant message windows (“Chat”), please be advised that Messages do not necessarily reflect the views of Petpetpark. Although we employ filters on all open chat dialog on the Site, and periodically monitor exchanged and posted information, in no event does Petpetpark assume or have any responsibility or liability for any Messages or for any claims, damages or losses resulting from their use and/or appearance on or in conjunction with this Site or elsewhere. \nAlthough users remain solely responsible for the content of their Messages, Petpetpark will make reasonable efforts to ensure that Chat serves the best interests of all users and, therefore, Petpetpark reserves the right to edit, delete, or refuse to post any Message that violates these Terms and Conditions, as well as revoke the privileges of any user who does not comply with these Terms and Conditions. Petpetpark also reserves the right to contact any third party who may have an interest in preserving the safety of users (such as a school or law enforcement) regarding the content of any post and supplying identifying information regarding such poster to such third party. Please see the Privacy Policy for more information.\nYou hereby understand and agree that Petpetpark does not allow Messages that contain:\nprofanity, obscenities, or sexual content (express or implied) \nreligious, political, or social commentary \npersonal attacks on other people (individually or as a group) \nslanderous, defamatory, obscene, pornographic, threatening and harassing suggestions, comments and/or images \npetnames or account usernames that would be considered inappropriate under our Terms and Conditions. \nmaterials created by someone else without their express written permission to do so \"cheat\" or \"hack\" programs or information or links to sites claiming to have these solicitations of user passwords \nsolicitation of user passwords \nprivate or personal information that might identify another user \nlinks to third party commercial Web sites \nonline chat rooms anywhere on our site or links to sites with chat rooms \nPromotions anywhere on the site offering prizes of any kind. Promotions include, but are not limited to, contests, raffles, lotteries or giveaways. \nother information that Petpetpark deems, in its sole discretion, to be inappropriate for this site\nYou hereby further agree that you will not upload to, distribute through, or otherwise publish through or in conjunction with the Site, any Messages that are libelous, defamatory, obscene, pornographic, threatening, invasive of privacy or publicity rights, abusive, illegal, or otherwise objectionable, or that would constitute or encourage a criminal offense, violate the rights of any person, or otherwise violate any law or give rise to liability. \nFurther, you agree not to abuse our message board service by \"spamming\" (posting numerous identical messages) or by creating Messages with inappropriate content. Moreover, you hereby represent and warrant that you have all necessary rights in and to all Messages you provide and all information they contain. \nChat may be used for noncommercial purposes only.";
public var HELP_BODY2B:String = "You are not permitted, without our express written approval, to distribute or otherwise publish any Messages containing any solicitation of funds, endorsements (including of a religious, political, sexual orientation, or social cause nature), promotions, or advertising (free or paid in money or Neopoints or Petpetpark' Items), or solicitations of any kind or nature. You specifically acknowledge that soliciting other Petpetpark' users to join or become members of any commercial online service or other organization or group (profit, non-profit, religious, social, political, or otherwise) is expressly prohibited. \nYou (and your parents, if you're under age 18) hereby authorize us to use, and to authorize others to use, your Messages and submitted opinions and materials in whole or in part, throughout the universe in perpetuity in any form, medium, or technology (now known or hereafter developed or devised throughout the universe) alone or together or as part of other Materials of any kind or nature. Without limiting the foregoing, you hereby grant to Petpetpark the right to use and change the Messages in any manner that Petpetpark may determine.\nDISCLAIMER AND LIMITATION OF LIABILITY\nTHIS SITE AND ALL MATERIALS CONTAINED ON IT ARE DISTRIBUTED AND TRANSMITTED ON AN \"AS IS\" AND \"AS AVAILABLE\" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, PETPETPARK DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PETPETPARK DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SITE OR MATERIALS WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THIS SITE OR THE SERVERS THAT MAKES IT AVAILABLE ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. PETPETPARK DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE MATERIALS IN THIS SITE WITH REGARD TO THEIR CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, ADEQUACY, COMPLETENESS, CORRECTNESS AND VALIDITY OF ANY MATERIAL RESTS WITH YOU. YOU (I.E., NOT PETPETPARK) ASSUME THE COMPLETE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. \nTO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, PETPETPARK, ITS AFFILIATES, AND THEIR RESPECTIVE OFFICERS, DIRECTORS, EMPLOYEES, AGENTS, LICENSORS, REPRESENTATIVES, AND THIRD PARTY PROVIDERS TO THE SITE WILL NOT BE LIABLE FOR DAMAGES OF ANY KIND INCLUDING, WITHOUT LIMITATION, COMPENSATORY, CONSEQUENTIAL, INCIDENTAL, INDIRECT, SPECIAL OR SIMILAR DAMAGES, THAT MAY RESULT FROM THE USE OF, OR THE INABILITY TO USE, THE MATERIALS CONTAINED ON THIS SITE, WHETHER THE MATERIAL IS PROVIDED OR OTHERWISE SUPPLIED BY PETPETPARK OR ANY THIRD PARTY. \nNOTWITHSTANDING THE FOREGOING, IN NO EVENT SHALL PETPETPARK HAVE ANY LIABILITY TO YOU FOR ANY CLAIMS, DAMAGES, LOSSES, AND CAUSES OF ACTION (WHETHER IN CONTRACT, TORT OR OTHERWISE) EXCEEDING THE AMOUNT PAID BY YOU, IF ANY, FOR ACCESSING THIS SITE. \nTHIRD PARTY HYPERLINKS\nThe appearance of external hyperlinks and/or other materials generated by third parties does not constitute an endorsement by Petpetpark, its subsidiaries and affiliates, of the opinions or views expressed by these third party web sites. Petpetpark explicitly disclaims any responsibility for the accuracy, content, availability, currency, completeness or quality of the content contained at these sites. Further, Petpetpark is not responsible for the quality or delivery of the products or services offered, accessed, obtained by or advertised at such sites. As such, neither Petpetpark nor its subsidiaries and affiliates are responsible for any errors or omissions or for the results obtained from the use of such information contained in these sites. \nPetpetpark encourages discretion when browsing the Internet. Because some sites employ automated search results or otherwise link you to sites containing information that may be deemed inappropriate or offensive, Petpetpark cannot be held responsible for the accuracy, copyright compliance, legality, or decency of material contained in third - party sites, and you hereby irrevocably waive any claim against us with respect to such sites. Thus, under no circumstances will Petpetpark be liable for any direct, indirect, incidental or special loss or other damage, whether arising from negligence, breach of contract, defamation, infringement of copyright or other intellectual property rights, caused by the exhibition, distribution or exploitation of any information or content contained within these third party hyperlinked sites. \nPetpetpark cannot ensure that you will be satisfied with any products or services that you obtain from a third - party site that links to or from Petpetpark, since such sites are owned and operated by third parties. Petpetpark does not endorse any of the merchandise or services, nor has Petpetpark taken any steps to confirm the accuracy or reliability of any of the information contained on such third - party sites. Petpetpark does not make any representations or warranties as to the security of any information (including without limitation, credit card and other personal information) you may be required to provide on a third - party site, and you hereby irrevocably waive any claim against Petpetpark with respect to such sites. We strongly encourage you to make whatever investigation you feel necessary or appropriate before proceeding with any online or offline transaction with any of these third parties. Petpetpark never gives or sells e - mail addresses or other personal information supplied by its users to sponsors without permission, provided, however that if a user chooses to \"opt - in\" (click on a checkbox) for sponsor information, or to register with a sponsor, by doing so he has given permission to Petpetpark to transmit his personal information to that sponsor. Please make sure you review Petpetpark Privacy Policy for all details regarding Petpetpark use of your personal information.\nADS AND MALWARE\nWe take great care and pride in creating this Site. We are always on the lookout for technical glitches that effect how the Site works. When we find them on our end, we will fix them. Unfortunately, your home computer may cause some glitches that effect how you see our Site -- and that is beyond our control. \nIf you experience any unusual behavior, content or ads on the Site, it may be the result of Malware on your computer. Malware -- short for MALicious softWARE -- is a term used to broadly classify a form of software which is installed in a computer system with malicious intentions, usually without the owner's knowledge or permission. Malware includes computer viruses, key loggers, malicious active content, rogue programs and dialers, among others.";
public var HELP_BODY2C:String = "While we continuously work closely with our partners to ensure that everything on the Site is working properly, sometimes Malware programs on your personal computer may interfere with your experience on our Site and on other sites that you visit. \nWe suggest that you take some of the following actions which may help to clean your computer and which could prevent future installations of Malware. \nUpdate your computer via Windows Update (found in the Tools menu in your Internet Explorer web browser). \nInstall a SpyWare Removal Tool such as Spybot - Search & Destroy or Ad-Aware to clean your computer of Malware. \nInstall antivirus software, such as Norton AntiVirus or McAfee Virus-Scan. \nInstall Windows Defender (for Windows computers). \nPlease note that we cannot be responsible for the effects of any third-party software including Malware on your computer system. Please make sure to carefully read the Help or Customer Support areas of any software download site. \nIf you do discover any Malware on your system, we also suggest you speak with a qualified computer technician.\nIf, after taking the above actions, you are still experiencing any problems, please feel free to contact us. \nDENIAL OF ACCESS\nPetpetpark, for any reason and at its sole discretion, may decide that any person shall be denied access to any part of the Petpetpark.com site. The sending of an e-mail notice by Petpetpark to any e-mail address used by a person who is subject to the denial shall constitute complete and sufficient notice of the denial. By agreeing to these Terms and Conditions, you agree to cease and desist immediately from any attempt to access the site upon issuance of a denial. If you do not cease and desist, you hereby consent to an injunction to be entered against you by a court of competent jurisdiction, as provided herein, permanently enjoining you from attempting to access the Petpetpark.com site. \nINDEMNIFICATION\nYou agree to indemnify, defend and hold harmless Petpetpark, its affiliates, and their respective officers, directors, employees, agents, licensors, representatives, and third party providers to the site from and against all losses, expenses, damages and costs, including reasonable attorneys' fees, resulting from any violation of these Terms and Conditions by you. Petpetpark reserves the right to assume, at its sole expense, the exclusive defense and control of any matter subject to indemnification by you, in which event you will fully cooperate with Petpetpark in asserting any available defenses. \nMISCELLANEOUS\nYou acknowledge and agree that you are not permitted under any circumstances or for any reason to cheat or utilize third - party games or code in order to win at, or gain Neopoints or Items from any Petpetpark game. You agree not to design, disseminate or use any third party programs designed to change the game play on the site including, but without limitations, programs such as autobuyers, flash game cheats, autofreshers, and snipers. Any use, dissemination or design of such programs is a breach of these Terms you will be responsible for any resulting damages to Petpetpark. You agree that if you disseminate, design or assist in the design of a third party program that changes the game play on Petpetpark, you will pay Petpetpark, Inc. liquidated damages in the sum of Fifty Thousand Dollars for each such program as liquidated damages. You agree that if you use such a program on the Petpetpark.com website, you will pay Petpetpark, Inc. liquidated damages in the sum of Five Hundred Dollars for each time you use a program. \nPetpetpark operates and controls the Site from its offices in Glendale, California, in the United States of America. Petpetpark makes no representation that the Site is appropriate or available in other locations. Accordingly, those persons who choose to access the Site from other locations do so on their own initiative and are responsible for compliance with local laws, if and to the extent local laws are applicable. Software from this Site is subject to United States export controls. Thus, no software from this Site may be downloaded, exported or re - exported (a) into (or to a national or resident of) Cuba, Libya, Iran, Syria, or any other country to which the United States has embargoed goods [Iraq and N. Korea recently removed, checking this.]; or (b) to anyone on the U.S. Treasury Department's list of Specially Designated Nationals or the U.S. Commerce Department's Table of Deny Orders. By downloading any software, you represent and warrant that you are not located in, under the control of, or a national or resident of, any such country or on any such list. \nThese Terms and Conditions contain the entire understanding of the parties hereto relating to the subject matter hereof, and cannot be changed or terminated orally. The privileges granted to you under this Agreement will terminate immediately and automatically without notice from Petpetpark if , in our sole discretion, you fail to comply with any term or provision of these Terms and Conditions. Upon such termination, you must destroy all Materials obtained from this Site (or any other web site or source), and all copies thereof, whether or not made under the terms of this Agreement. \nIf any provision of these Terms and Conditions is found to be illegal or unenforceable, the Terms and Conditions will be curtailed to the extent necessary to make it legal and enforceable and will remain, as modified, in full force and effect. \nThe Terms and Conditions and all matters or issues collateral thereto will be governed by, construed and enforced in accordance with the Laws of the State of California applicable to contracts executed and performed entirely therein (without regard to any principles of conflicts of laws). You hereby agree that any action at law or in equity arising out of or relating to these Terms and Conditions or the site shall be filed only in the state or federal courts located in the County of Los Angeles, in the State of California. Further, you hereby expressly consent and submit to the personal jurisdiction of such courts for the purposes of litigating any such action. ";
public var HELP_BODY3:String = "<b>How do I move my Petpet?</b><br/>Easy! Simply point with your mouse and click on the spot where you want your Petpet to go. A small paw print will appear and your Petpet will walk to it.<br/><br/><b>I want to shop! How do I enter a store?</b><br/>Just use your mouse and move your Petpet to the store you want to enter. There will be a tile with a paw on it. Have your petpet stand on the tile and you will enter the store.<br/><br/><b>What do I use to buy stuff?</b><br/>The currency of Petpet Park is Park Points (PP), which can be earned by playing mini-games. <br/><br/><b>Now How do I buy stuff?</b><br/>Once you have enough PP for whatever you want to buy, enter a store and click on the item you desire. Information about the item, such as the name, description, and cost, will pop up. Select \"buy\" to purchase the item, and it will be added to your inventory automatically.<br/><br/><b>What is Neocash?</b><br/>Neocash is currency purchased with actual money, while PP are earned from playing games and participating in other activities in the Park. Neocash items are sold in separate stores (located in the Petpet Park Mall).<br/><br/><b>So how do I purchase these Neocash items?</b><br/>The process of buying an item with Neocash is the same as buying something with PP, only you go to the Mall to select the store you want. You can also purchase Neocash at the Mall in order to buy Mall items.<br/><br/><b>What do those icons at the bottom of my screen mean?</b><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/chest.png'/> <br/>– This is your inventory! There is one tab for clothing and one tab for supplies and food.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/hanger.png'/> <br/>– This takes you to the Dressing Room, where you can customise your Petpet.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/stars.png'/> <br/>– These are tricks your Petpet can do.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/newspaper.png'/> <br/>– This will show you current Petpet Park News. <br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/map.png'/> <br/>- This is a map of Petpet Park.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/id.png'/> <br/>- Your Petpet's profile.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/bag.png'/> <br/>- This will take you to the Petpet Park Mall<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/question.png'/> <br/>- Need any more help? This icon aims to offer assistance!<br/><br/><br/><br/><b>How do I add friends to my Petpet Pals list?</b><br/>If someone sends you a friend request, a notification will alert you. Just click \"accept\" to add them to your Petpet Pals list. You can add friends yourself while roaming the park by clicking on the Petpet of the friend you want. This will bring up a menu that allows you to add the person to your Petpet Pals list. If you wish to manually add a friend, scroll down to the bottom of your Pals list and type their username into the input box there.<br/><br/><b>I want to talk to my friends! How do I chat?</b><br/>If you are wandering around the Park and say something out loud (to no one particular) or speak to a Petpet that's not on your Petpet Pals list, a speech bubble will appear above your Petpet's head for everyone to see, and what you say will be recorded in the general chat log.To chat privately with a friend (whisper), simply double click on their name in your Petpet Pals list. Your conversation with them will be recorded in a private chat log. If you are chatting with more than one friend, tabs will appear that allow you to toggle between conversations.<br/><br/><b>What are all those funny little buttons on the chat window?</b><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/chatopt.png'/> <br/>- This displays your chat log!<br/> <br/><img height = '45' width = '45' align = 'left' src = 'images/faq/friends.png'/> <br/>- You can see your Petpet Pals list here.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/block.png'/> <br/>- Use this to block other users.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/notify.png'/> <br/>- This displays your notifications, which alerts you to things like when your friends sign online, when they go offline, when a user requests to be your friend, when someone challenges you to a trick-off, or when someone has accepted your friend request.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/chatopt.png'/> <br/>- Show your friends how you feel! Emoticons are here.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/settings.png'/> <br/>- Here, you can adjust your user settings, like your font size, colour, etc.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/whistle.png'/> <br/>- Someone breaking the rules? Report them here.<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/question.png'/> <br/>- Seek help here!<br/><br/><img height = '45' width = '45' align = 'left' src = 'images/faq/min.png'/> <img height = '45' width = '45' align = 'left' src = 'images/faq/max.png'/> <br/>- Maximize or minimize your chat window here.<br/><br/><br/><br/><b>Who are these Neopets in the Park?</b><br/>They are members of the Petpet Protection League (PPL). They are there to help you and your Petpet find your way around the park.<br/><br/><b>Customised Petpets are cool! How can I customise my Petpet?</b><br/>Simply click on the Dressing Room icon, and then drag and drop your desired items onto your Petpet! You can buy clothing items for Park Points at Fins, Feathers and Fashion or for Neocash at the Petpet Park Mall.<BR><BR>My Petpet is sad. How can I make them happy?</b><br/>A bored, hungry Petpet is a sad Petpet! Keep your Petpet happy by feeding them, giving them toys to play with, and playing mini-games.<BR><BR>Speaking of which, how do I feed my Petpet?</b><br/>Click on the chest icon, which will open up your inventory. Go to the Supplies tab, find the food you want to feed your Petpet, and drag and drop it onto them. If you don't have any food in your inventory, visit The Munchery or the Mall to pick up some food items.<br/><br/><b>What about mini-games? How do I play those?</b><br/>Enter the lobby of the game you want to play by double-clicking. If you want to play single-player, step on one of the lone circles. A countdown will start, and you will be transported to the game. If you want to play multi-player, step on one of the circles that are clustered in groups of four. When another Petpet steps into the same cluster, the countdown will start. If you want to play with friends, organise it so that you all step in the same cluster.If you need any help, there will be PPL members in all of the lobbies who will be glad to assist you with any lobby or game questions you might have.<br/><br/><b>How many Petpets can I adopt?</b><br/>For now, you can only adopt one Petpet. (Give the PPL a break; they just opened the park up to the public!) However, who knows what will happen when they're less busy...";
public var NEWS_BODY1:String = "Welcome to the Petpet Park Beta! There's lots going on in Petpet Park, and we'd love to have you help us test things out to make sure we're ready for all of our new members. If you have a Neopets.com account already, just go ahead and Login with your existing Neopets username and password to get started. If you're new to Neopets and Petpet Park, you'll need to Sign Up for a new account first. Hope you enjoy playing in Petpet Park…and be sure to Report Bugs and errors that you find in the Park and to Take A Survey to let us know what you think!";
public var NEWS_TITLE1:String = "Beta Testers...";
public var DISLIKE1:String = "Hot Weather";
public var DISLIKE2:String = "Sandboxes";
public var DISLIKE3:String = "Waiting";
public var DISLIKE4:String = "Loud Noises";
public var DISLIKE5:String = "Squeaky Toys";
public var DISLIKE6:String = "Teaser Toys";
public var DISLIKE7:String = "Cages";
public var DISLIKE8:String = "Being Groomed";
public var DISLIKE9:String = "Teeth Cleaning";
public var DISLIKE10:String = "Tight Collars";
public var DISLIKE11 :String= "Boredom";
public var DISLIKE12:String = "Bullies";
public var DISLIKE13 :String= "Leashes";
public var LIKE1 :String = "Hide-n-seek";
public var LIKE2 :String = "Tree Climbing";
public var LIKE3 :String = "Napping";
public var LIKE4 :String = "Treats";
public var LIKE5 :String = "Dancing";
public var LIKE6 :String = "Walks";
public var LIKE7 :String = "Soft Beds";
public var LIKE8 :String = "Games";
public var LIKE9 :String = "Rock Climbing";
public var LIKE10 :String = "Stories";
public var LIKE11 :String = "Music";
public var LIKE12 :String = "Fuzzy Toys";
public var LIKE13 :String = "Chew Toys";
public var LIKE14 :String = "Being Groomed";
public var LIKE15 :String = "Milk";
public var LIKE16 :String = "Lollipops";
public var LIKE17 :String = "Parks";
public var SPECIES_DIPNI : String = "<P ALIGN='LEFT'><FONT SIZE='16'>Dipnis are timid and reserved creatures, constantly wary and easily startled. They get especially nervous around sharp objects and have a tendency to dart away and hide at the slightest provocation. Despite this, Dipnis are still affectionate and shyly inquisitive. When happy, they make cute gurgling noises in their throats.</FONT></P>";
public var SPECIES_DRYM : String = "<P ALIGN='LEFT'><FONT SIZE='16'>Dryms are loved for their perky, bright personalities. Their curious nature and their predisposition for mischief give them a reputation for being troublemakers, but they are more a source of amusement than annoyance. Dryms love shiny things and have a keen sense of smell that allows them to track down almost anything!</FONT></P>";
public var SPECIES_KASS : String = "<P ALIGN='LEFT'><FONT SIZE='16'>Kassegats are very intelligent and clever. Originating from lush jungle areas, they like to spend most of their time relaxing and eating different kinds of jungle fruit. Kassegats are explorative Petpets, agile and adept at climbing. So if you don't want them to get into something, better keep it locked away tight!</FONT></P>"
public var SPECIES_OUKIN : String = "<P ALIGN='LEFT'><FONT SIZE='16'>Though Oukins are usually tranquil creatures, they can be very quick if the occasion calls for it, and emit a high-pitched shriek when agitated. With their sensitive ears, Oukins can hear other Oukins from far away and come to each other's aid whenever there is trouble. Take our word for it; you don't ever want to work up an Oukin!</FONT></P>";
public var SPECIES_HIFFLO : String = "<P ALIGN='LEFT'><FONT SIZE='16'>Hifflos are sweet, affectionate Petpets. Though they usually like to relax in the shade, they can run very fast for short distances. Despite their appearance, Hifflos possess great grace and a love for music, making them terrific dancers. For those musically inclined, Hifflos are ideal Petpets. It is said that a good song can cure any Hifflo!</FONT></P>";
public var SPECIES_PINI : String= "<P ALIGN='LEFT'><FONT SIZE='16'>Despite their small size, Pinixys are active and athletic. These noisy and rambunctious Petpets are almost always engaged in some physical activity, whether it is running, jumping, wrestling, or climbing. If your companion is a Pinixy, make sure you can keep up with them!</FONT></P>";
public var BLUE:String = "blue";
public var RED:String = "red";
public var YELLOW:String = "yellow";
public var GREEN:String = "green";
public var TRICK1:String = "Sit";
public var TRICK2:String = "Wave";
public var TRICK3:String = "Stumble";
public var TRICK4:String = "Step Left";
public var TRICK5:String = "Roll";
public var TRICK6:String = "One Leg";
public var TRICK7:String = "Moon Walk";
public var TRICK8:String = "Jump Stomp";
public var TRICK9:String = "Hula";
public var TRICK10:String = "Frat Boy Dance";
public var TRICK11:String = "Booty Shake";
public var TRICK12:String = "Disco";
public var TRICK13:String = "Step Right";
public var TRICK14:String = "Stomp and Wave";
public var TTCHEST:String = "<P ALIGN='left'><FONT SIZE = '20'>Inventory</FONT></P>";
public var MAPWIN_GOTHEREBTN :String = "<P ALIGN='center'><FONT SIZE = '20'><B>Go there!</B></FONT></P>";
public var MAPWIN_POPUPTEXT:String = "<P ALIGN='left'><FONT SIZE = '10'><B>[MESSAGE]</B></FONT></P>";
public var HUD_TT_PPMall:String = "<P ALIGN='left'><FONT SIZE = '20'>Petpet Park Mall</FONT></P>";
public var HUD_TT_CHATLOG:String = "<P ALIGN='left'><FONT SIZE = '20'>Chat Log</FONT></P>";
public var HUD_TT_CALENDAR:String = "<P ALIGN='left'><FONT SIZE = '20'>Calendar</FONT></P>";
public var HUD_TT_SETTINGS:String = "<P ALIGN='left'><FONT SIZE = '20'>Settings</FONT></P>";
public var HUD_TT_PAW:String = "<P ALIGN='left'><FONT SIZE = '20'>Petpet Park</FONT></P>";
public var HUD_TT_REPORTPLAYER:String = "<P ALIGN='left'><FONT SIZE = '20'>Report User</FONT></P>";
public var HUD_TT_PARKPOINTS:String = "<P ALIGN='left'><FONT SIZE = '20'>Park Points Balance</FONT></P>";
public var HUD_TT_NEOCASH:String = "<P ALIGN='left'><FONT SIZE = '20'>Neocash Balance</FONT></P>";
public var BOY:String = "Boy";
public var GIRL:String = "Girl";
public var UNIV_LD_PLYRINFO:String = "<P ALIGN='left'><FONT SIZE = '15'><B>[USERNAME]</B></FONT></P>";
public var UNIV_LD_SCORE:String = "<P ALIGN='left'><FONT SIZE = '14'><B>[SCORE]</B></FONT></P>";
public var LOAD_STO:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Entering the shop...</B></FONT></P>";
public var LOAD_PPPL:String = "<P ALIGN='left'><FONT SIZE = '25'><B> Entering Hall of Records...</B></FONT></P>";
public var LOAD_STR:String = "<P ALIGN='CENTER'><FONT SIZE = '18'><B>Preparing the Park for your arrival.</B></FONT></P>";
public var LOAD_GLO:String = "<P ALIGN='CENTER'><FONT SIZE = '18'><B>Almost done...just a few more things.</B></FONT></P>";
public var LOAD_MAP:String = "<P ALIGN='CENTER'><FONT SIZE = '22'><B>Loading Map...</B></FONT></P>";
public var LOAD_UNI:String = "<P ALIGN='CENTER'><FONT SIZE = '22'><B>Loading University Assets...</B></FONT></P>";
public var LOAD_SPA:String = "<P ALIGN='CENTER'><FONT SIZE = '18'><B>Welcome to Groomtopia... we're getting ready for you...</B></FONT></P>";
public var HUD_TINFO_descBox1:String = "<P ALIGN='left'><FONT SIZE = '20'>Required Agility: [AGILITY]</FONT></P>";
public var HUD_TINFO_descBox2:String = "<P ALIGN='left'><FONT SIZE = '20'>Required Memory: [MEMORY]</FONT></P>";
public var HUD_TINFO_descBox3:String = "<P ALIGN='left'><FONT SIZE = '20'>Required Charm: [CHARM]</FONT></P>";
public var GOTCHA_instructionTxt1:String = "<P ALIGN='left'><FONT SIZE = '18'><B>Pick up to see farther into the dark, collect and click on the button and then click on a portal to move there. Pick up to move faster.</B></FONT></P>";
public var GOTCHA_instructionTxt2:String = "<P ALIGN='left'><FONT SIZE = '18'><B>Watch out for they will blow out your candle.</B></FONT></P>";
public var GOTCHA_instructionTxt3:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Then click on any of the blue squares to move your petpet there. You can even pass over walls! Watch out for they will blow out your candle!</B></FONT></P>";
public var GOTCHA_memoryText:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Memory</B></FONT></P>";
public var GOTCHA_readyBtn:String = "<P ALIGN='center'><FONT SIZE = '34'><B>READY</B></FONT></P>";
public var GOTCHA_titleTextOne:String = "<P ALIGN='center'><FONT SIZE = '95'><B>Mr. Grimsby's Mystery Maze</B></FONT></P>";
public var GOTCHA_ResultsTitle:String = "<P ALIGN='center'><FONT SIZE = '44'><B>Mr. Grimsby's Mystery Maze</B></FONT></P>";
public var GOTCHA_youWin:String = "<P ALIGN='center'><FONT SIZE = '96'><B>You Win!</B></FONT></P>";
public var GOTCHA_youLose:String = "<P ALIGN='center'><FONT SIZE = '96'><B>Time's up!</B></FONT></P>";
public var COUNTDOWN_NAME:String = "<P ALIGN='center'><FONT SIZE = '30'><B>[USERNAME]</B></FONT></P>";
public var COUNTDOWN_COLOR:String = "<P ALIGN='center'><FONT SIZE = '28'><B>[COLOR]</B></FONT></P>";
public var GETREADY:String = "<P ALIGN='center'><FONT SIZE = '47'><B>Get Ready!</B></FONT></P>";
public var GetReady_ArrowsTxt:String = "<P ALIGN='center'><FONT SIZE = '17'><B>Use the arrow keys to control your Petpet.</B></FONT></P>";
public var NPCDIALOG_JACE1:String = "Practice some tricks! Just drag and drop the trick you want to perform on your Petpet, then sit back and watch.";
public var NPCDIALOG_WALL1:String = "Welcome. Currently, the University is not in session for the Winter, however you can check the high scores for all of Petpet Park’s games. Just select the chalk board to see the scores. Be sure to check back with me for future information about enrolling for Spring courses.";
public var SPA_COLORCHANGEMSG1:String = "<P ALIGN='center'><FONT SIZE = '35'><B>Colour bottles can only be used once and then they disappear so choose wisely! To change your colour again, simply use another colour bottle.</B></FONT></P>";
public var SPA_HAIRCUTMSG1:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Drag a Haircut or Beard Ticket onto your Petpet.</B></FONT><BR/><FONT SIZE = '19' COLOR = '#FF0000'><B>IMPORTANT:Haircut and Beard Tickets can only be used once\nand then they disappear so choose wisely!</FONT><BR/><FONT SIZE = '19' COLOR = '#000000'>To change your haircut or beard again,simply use\nanother ticket.</B></FONT></P>";
public var SPA_HAIRCUT_EMPTY_INVENTORY:String = "<P ALIGN='center'><FONT SIZE = '31'><B>You do not have any Haircut Tickets.<BR/><BR/> These can be purchased from <BR/>Petpet Park Mall.</B></FONT></P>";
public var SPA_HAIRCUT_CONFIRM_USE:String = "<P ALIGN='center'><FONT COLOR='#FF0000' SIZE = '17'>\n\n\n\n<B>Remember tickets can only be used <u>one time</u>.</B></FONT></P>";
public var SPA_HAIRCUT_CONFIRM_USE_HAS_HAT:String = "<P ALIGN='center'><FONT COLOR='#FF0000' SIZE = '16'>\n\n\n\n<B>Remember tickets can only be used <u>one time</u>.\nWe will need to take off your Petpet's hat to apply haircut!</B></FONT></P>";
public var SPA_HAIRCUT_CONFIRM_USE_HAS_MASK:String = "<P ALIGN='center'><FONT COLOR='#FF0000' SIZE = '16'>\n\n\n\n<B>Remember tickets can only be used <u>one time</u>.\nWe will need to take off your Petpet's mask to apply beard!</B></FONT></P>";
public var SPA_HAIRCUT_CONFIRM_REMOVAL:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Are you sure you want to remove your haircut? <BR/><BR/> </FONT><FONT SIZE = '19' COLOR = '#FF0000'>IMPORTANT: <BR/> Haircut Tickets can only be used <u>one time</u>. <BR/> You are about to <u>permanently</u> delete this haircut.</B></FONT></P>";
public var SPA_BEARD_CONFIRM_REMOVAL:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Are you sure you want to remove your beard? <BR/><BR/> </FONT><FONT SIZE = '19' COLOR = '#FF0000'>IMPORTANT: <BR/> Beard Tickets can only be used <u>one time</u>. <BR/> You are about to <u>permanently</u> delete this beard.</B></FONT></P>";
public var SPA_HAIRCUT_CONGRATS:String = "<P ALIGN='center'><FONT SIZE = '24'><BR/><BR/><B>You have successfully used a [ITEMNAME] Ticket!</B></FONT></P>";
public var SPA_RUSURE:String = "<P ALIGN='center'><FONT SIZE = '31'><B>Are You Sure You Want To Use This Item?</B></FONT></P>";
public var SPA_COMINGSOON:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Coming <br> soon!</B></FONT></P>"
public var STO_NPCFOOD:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Greetings! Our selection of food is guaranteed to provide top-quality nutrition!</B></FONT></P>";
public var STO_NPCCLOTHES:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Hi, and thanks for dropping by! You will look simply wonderful in these clothing and accessories for all your Petpet fashion needs. We're sure of it!</B></FONT></P>";
public var STO_NPCGROOM:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Good day to you! Feel free to browse our collection of grooming supplies, toys, brushes, and more.</B></FONT></P>";
public var STO_NPCPURCHASE:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Looks like you found something you like!</B></FONT></P>";
public var STO_NPCWAIT:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Please wait until I finish ringing up this purchase...</B></FONT></P>";
public var STO_NPCNO:String = "<P ALIGN='left'><FONT SIZE = '16'><B>I'm sorry. It seems you don't have enough Park Points to buy this item right now. You can earn Park Points by playing games and joining activities in the Park.</B></FONT></P>";
public var STO_NPCPR:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Wait a moment while I ring up your purchase...</B></FONT></P>";
public var STO_NPCADD:String = "<P ALIGN='left'><FONT SIZE = '16'><B>[AMOUNT] [ITEM NAME] has now been added to your inventory!</B></FONT></P>";
public var STO_NPCVAULT:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Your backpack is full! [AMOUNT] [ITEM NAME] has been added to your vault.</B></FONT></P>";
public var STO_NPCTHNKS:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Thanks for coming by! Hope to see you again soon.</B></FONT></P>";
public var SHOP_LOOK_AROUND:String = "<P ALIGN='LEFT'><FONT SIZE = '16'><B>Feel free to keep looking around!</B></FONT></P>";
public var MINI_2ND:String = "<P ALIGN='center'><FONT SIZE = '96'><B>You Finished Second</B></FONT></P>";
public var MINI_3RD:String = "<P ALIGN='center'><FONT SIZE = '96'><B>You Finished Third</B></FONT></P>";
public var MINI_4TH:String = "<P ALIGN='center'><FONT SIZE = '96'><B>You Finished Fourth</B></FONT></P>";
public var MINI_READY:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Ready</B></FONT></P>";
public var MINI_SET:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Set</B></FONT></P>";
public var MINI_GO:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Go!</B></FONT></P>";
public var MINI_INSTRC:String = "<P ALIGN='center'><FONT SIZE = '44'><B>Instructions</B></FONT></P>";
public var MINI_START:String = "<P ALIGN='center'><FONT SIZE = '44'><B>Start</B></FONT></P>";
public var HELP_BRIEF0:String = "I can't enter Petpet Park or I'm in Petpet Park, but it's crashing or not loading correctly. What's going on?";
public var HELP_BRIEF1:String = "What is the privacy policy for Petpet Park?";
public var HELP_BRIEF2:String = "What are the terms and conditions for using Petpet Park?";
public var HELP_BRIEF3:String = "Frequently asked questions";
public var HELP_BODY0:String = "You might need to clear your computer's cache. A cache is a temporary storage area where data (such as website URLs) that is used often can be stored for faster access. Once data is stored in the cache, your computer can access the cached copy rather than re-fetching the data, which makes for a shorter loading time.";
public var NPCDIALOG_ERNIE1:String = "Hello! I'm Ernie, the local strongman. Whenever I need to do a little lifting, nothing does the trick like a Blocktacular workout. Just gather up the matching groups of 3 or more blocks and carry them away!";
public var NPCDIALOG_FLER1:String = "Hi there, my name is Flerilda. Welcome to my boutique! When it comes to putting together outfits and winning the Wardrobe Wars, there's no one in Petpet Park who's better suited to showing you how it's done. ";
public var NPCDIALOG_ELLA1:String = "Why, hello… I'm Ella, Petpet Park's dancer extraordinaire! I'm always on the lookout for dancers with the grace and style. Show me your fanciest footwork by matching my most complex moves!";
public var NPCDIALOG_GEO1:String = "How's it going? My name is Geo, and along with my brothers Neeter and Pike, we're the quickest marble wranglers in all of Petpet Park! We're always looking for challengers to keep us on our toes, however. Care to take a shot?";
public var SPA_CONGRATS:String = "<P ALIGN='center'><FONT SIZE = '24'><B>Congratulations!\n\nYou just used one [ITEMNAME]!</B></FONT></P>";
public var SPA_MSGBTN:String = "<P ALIGN='center'><FONT SIZE = '34'><B>OK</B></FONT></P>";
public var SPA_BTNNO :String = "<P ALIGN='center'><FONT SIZE = '30'><B>No</B></FONT></P>";
public var SPA_BTNYES:String = "<P ALIGN='center'><FONT SIZE = '30'><B>Yes</B></FONT></P>";
public var TRK_PROFILEBTN:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Profile</B></FONT></P>";
public var TRK_CHATBTN:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Chat</B></FONT></P>";
public var TRK_CHALBTN:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Challenge</B></FONT></P>";
public var TRK_PPNAME:String = "<P ALIGN='center'><FONT SIZE = '50'>Petpet Name</FONT></P>";
public var TRK_MSG1:String = "<P ALIGN='center'><FONT SIZE = '22'><B>You've got 15 seconds to setup your tricks!</B></FONT></P>";
public var TRK_MSG2:String = "<P ALIGN='center'><FONT SIZE = '22'><B>Get ready for your trick challenge.</B></FONT></P>";
public var TRK_MSG3:String = "<P ALIGN='center'><FONT SIZE = '19'><B>For more points increase your mood by feeding your petpet, and playing more games.</B></FONT></P>";
public var TRK_RSG1:String = "<P ALIGN='center'><FONT SIZE = '40'><B>Ready</B></FONT></P>";
public var TRK_RSG2:String = "<P ALIGN='center'><FONT SIZE = '40'><B>Set</B></FONT></P>";
public var TRK_RSG3:String = "<P ALIGN='center'><FONT SIZE = '40'><B>Go</B></FONT></P>";
public var TRK_TITLE :String = "<P ALIGN='center'><FONT SIZE = '34'>Trick Challenge</FONT></P>";
public var TRK_CHAL:String = "<P ALIGN='center'><FONT SIZE = '24'><B>You have been challenged by [PETPET NAME]</B></FONT></P>";
public var TRK_WAIT:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Waiting for Player...</B></FONT></P>";
public var TRK_CANCEL :String = "<P ALIGN='center'><FONT SIZE = '28'><B>Cancel</B></FONT></P>";
public var TRK_TRKSWON :String = "<P ALIGN='left'><FONT SIZE = '14'><B>Tricks Won:</B></FONT></P>";
public var TRK_PTS :String = "<P ALIGN='left'><FONT SIZE = '14'><B>Points:</B></FONT></P>";
public var TRK_RESULTS :String = "<P ALIGN='center'><FONT SIZE = '42'>Results</FONT></P>";
public var TRCK_PLYRNAME:String = "<P ALIGN='center'><FONT SIZE = '22'><B>[PETPET NAME] has challenged you to a Trick Challenge!\n\nClick \"Accept\" to play!</B></FONT></P>";
public var TRK_INSTRC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Drag and drop the best combination of FIVE tricks to beat your opponent!</B></FONT></P>";
public var TRK_CTDOWN:String = "<P ALIGN='center'><FONT SIZE = '61'><B>[#]</B></FONT></P>";
public var TRK_SCORE:String = "<P ALIGN='center'><FONT SIZE = '16'><B>[#]</B></FONT></P>";
public var TRK_POINTS:String = "<P ALIGN='center'><FONT SIZE = '26'><B>[#]</B></FONT></P>";
public var TRK_RNAME:String = "<P ALIGN='center'><FONT SIZE = '22'><B>[PETPET NAME]</B></FONT></P>";
public var TRK_RNUM:String = "<P ALIGN='center'><FONT SIZE = '14'><B>[#]</B></FONT></P>";
public var TRK_ACCEPT:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Accept</B></FONT></P>";
public var TRK_DECLINE:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Decline</B></FONT></P>";
public var TRK_BLOCK:String = "<P ALIGN='center'><FONT SIZE = '28'><B>Block</B></FONT></P>";
public var TRK_ABEATM:String = "<P ALIGN='center'><FONT SIZE = '12'>Agility beats Memory</FONT></P>";
public var TRK_MBEATC:String = "<P ALIGN='center'><FONT SIZE = '12'>Memory beats Charm</FONT></P>";
public var TRK_CBEATA:String = "<P ALIGN='center'><FONT SIZE = '12'>Charm beats Agility</FONT></P>";
public var TRK_COUNTER:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Trick Challenge!</B></FONT></P>";
public var TRK_OTRICKS:String = "<P ALIGN='center'><FONT SIZE = '16'><B>Opponent Tricks</B></FONT></P>";
public var TRK_MTRICKS:String = "<P ALIGN='center'><FONT SIZE = '16'><B>My Tricks</B></FONT></P>";
public var TRKNAME:String = "Trick Challenge!";
public var NPCDIALOG_GRIM1:String = "Greetings, young traveler! I am Mr. Grimsby, master of all that lurks in the shadows of these grounds. Solving my Mystery Maze will require conquering your fears and following the light that guides you. Best of luck with your journey. you just may need it!";
public var NPCDIALOG_ARZAK1:String = "Behold, for it is I - Arzak the Amazing ! Many seek to earn riches by mastering my magical tiles, yet few ever leave with anything more than a plunge in the waters surrounding my lair. Go on, try your luck. if you dare.";
public var WIZ_INSTR1:String = "<p align = 'center'><font size = '12'>Make your way across the blocks to safety.</font></p>";
public var WIZ_INSTR2:String = "<p align = 'left'><font size = '12'>Pick up these to teleport your Petpet forward.</font></p>";
public var WIZ_INSTR3:String = "<p align = 'left'><font size = '12'>These will make the blocks around you safe to walk on.</font></p>";
public var WIZ_INSTR4:String = "<p align = 'left'><font size = '12'>These will buy you some extra time, pick up a bunch to increase your score.</font></p>";
public var WIZ_TITLE:String = "Wizard Walk";
public var WIZ_RTITLE:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Wizard Walk</B></FONT></P>";
public var WIZ_WAITING:String = "<P ALIGN='center'><FONT SIZE = '52'><B>Waiting for game...</B></FONT></P>";
public var WIZ_TIMEUP:String = "<P ALIGN='center'><FONT SIZE = '85'><B>Time's Up!</B></FONT></P>";
public var HUD_HELPWIN_HelpTopicsText:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Help</B></FONT></P>";
public var ADOPT_winselaIntroText:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Hello. Welcome to Petpet Park.\n\nMy name is Winsela, and it's my job to give help to new residents. I'm sure you're probably anxious to get started, but first you'll need to adopt a Petpet of your own.\n\n Click the Adopt button below to continue.</B></FONT></P>";
public var ADOPT_winselaExitText:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Now you're ready to get started.\n\nIf you have questions while you are playing, just click on the Help button or find me and I'll be happy to answer your questions.\n\nAlright, just click Enter Park below and you'll be on your way.\n\nSee you around the Park!</B></FONT></P>";
public var SPA_MSG:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Welcome to Groomtopia! Come inside for a pampering and relaxing stay!</B></FONT></P>";
public var LOADING:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Loading...</B></FONT></P>";
public var BLOCK_INSTRUCTIONS:String = "<P ALIGN='left'><FONT SIZE = '14'><B> Click on groups of 3 or more matching blocks to pop them.\n\nWork quickly so the blocks don't fill the screen and result in a gameover!</B></FONT></P>";
public var Title_Player:String = "<P ALIGN='center'><FONT SIZE = '35'><B>Players</B></FONT></P>";
public var MINI_PETPETNAME:String = "<P ALIGN='center'><FONT SIZE = '14'><B>[PETPET NAME]</B></FONT></P>";
public var MINI_SCOREBOXNAME:String = "<P ALIGN='center'><FONT SIZE = '17'><B>[PETPET NAME]</B></FONT></P>";
public var MINI_PETPETNAME20:String = "<P ALIGN='left'><FONT SIZE = '20'><B>[PETPET NAME]</B></FONT></P>";
public var MINI_PETPETNAME20C:String = "<P ALIGN='center'><FONT SIZE = '20'><B>[PETPET NAME]</B></FONT></P>";
public var MINI_YOUWIN:String = "<P ALIGN='center'><FONT SIZE = '85'><B>You Win!</B></FONT></P>";
public var MINI_GAMEOVER:String = "<P ALIGN='center'><FONT SIZE = '85'><B>Game Over</B></FONT></P>";
public var BOOGS_STREAK:String = "<P ALIGN='center'><FONT SIZE = '36'><B>Streak</B></FONT></P>";
public var BOOGS_INSTR1:String = "<P ALIGN='left'><FONT SIZE = '15'><B>Use the arrow keys to match the arrows on the scroll bar.</B></FONT></P>";
public var BOOGS_INSTR2:String = "<P ALIGN='left'><FONT SIZE = '15'><B>If you match 5 dance steps, look for the bonus steps!</B></FONT></P>";
public var BOOGS_BONUS:String = "<P ALIGN='center'><FONT SIZE = '56'><B>Bonus Mode!</B></FONT></P>";
public var BOOGS_PERF:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Perfect!</B></FONT></P>";
public var BOOGS_GREAT:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Great!</B></FONT></P>";
public var LOADING_SOUND:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Loading Sounds...</B></FONT></P>";
public var HUD_ADOPTDATE:String = "<P ALIGN='left'><FONT SIZE = '20'><B>[DATE]</B></FONT></P>";
public var REG_LOGIN_ForgotU:String = "<P ALIGN='left'><FONT SIZE = '25'><B>Username:</B></FONT></P>";
public var REG_LOGIN_ForgotE:String = "<P ALIGN='left'><FONT SIZE = '25'><B>E-mail Address:</B></FONT></P>";
public var DROP:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Player Dropped!</B></FONT></P>";
public var MAP_WHATSHERE:String = "<P ALIGN='center'><FONT SIZE = '34'><B>What's Here</B></FONT></P>";
public var REGPG1_PASSDESC:String = "<P ALIGN='left'><FONT SIZE = '7.5'><B>Your password must be at least 6 characters long, and include at least 2 numbers. You may also use !@#$%^&*()_ and capitalisation matters (A is different from a).</B></FONT></P>";
public var Adoption_BTN_Back:String = "<P ALIGN = 'Center'><FONT SIZE = '18'><B>Back</B></FONT></P>";
public var Label_Male:String = "<P ALIGN = 'Left'><FONT SIZE = '23'><B>Boy</B></FONT></P>";
public var Label_Female:String = "<P ALIGN = 'Left'><FONT SIZE = '23'><B>Girl</B></FONT></P>";
//This shows up in adoption
public var Label_Likes:String = "<P ALIGN = 'Left'><FONT SIZE = '25'><B>Likes</B></FONT></P>";
public var Label_Dislikes:String = "<P ALIGN = 'Left'><FONT SIZE = '25'><B>Dislikes</B></FONT></P>";
public var Label_Species:String = "<P ALIGN = 'Left'><FONT SIZE = '15'><B>Species</B></FONT></P>";
public var ADOPT_CHOOSEGENDER:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Choose a Gender!</B></FONT></P>";
public var ADOPT_SPECIESDESC:String = "<P ALIGN='left'><FONT SIZE = '13'><B>[SPECIESDESCRIPTION]</B></FONT></P>";
public var HUD_PROFILE_memoryBox2:String = "<P ALIGN='left'><FONT SIZE = '25'><B> Memory [MEMORY]</B></FONT></P>";
public var AgilityTxt:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Agility</B></FONT></P>";
public var NPCDIALOG_ELRIK:String = "Good day, friend! My name is Elrik, apprentice of Arzak the Amazing. Can I interest you in a game of Wizard's Walk? My master is giving out prizes to those who show skill in his magical game of chance. All you have to do is reach the end of the walk before time runs out and a reward shall be yours. Now, if you will, please proceed to the starting area and await your turn. Best of luck! Not that you'll be needing it, of course....";
public var GREY:String = "grey";
public var WHITE:String = "white";
public var ORANGE:String = "orange";
public var reportWindow_REPORTUSER:String = "Report User";
public var reportWindow_YOURUSERNAME:String = "Your username";
public var reportWindow_YOUAREREPORTING:String = "You are reporting";
public var reportWindow_CANCEL:String = "<P ALIGN='center'><FONT SIZE = '30'><B>Cancel</B></FONT></P>";
public var reportWindow_SUBMIT:String = "<P ALIGN='center'><FONT SIZE = '30'><B>Submit</B></FONT></P>";
// new minigame text added 02/09/09
public var WARD_Matches:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Matches</B></FONT></P>";
public var WARD_Of6:String = "<P ALIGN='center'><FONT SIZE = '25'><B>of 6</B></FONT></P>";
public var MINI_SOUNDON:String = "<P ALIGN='center'><FONT SIZE = '29'><B>SOUND ON</B></FONT></P>";
public var MINI_SOUNDOFF:String = "<P ALIGN='center'><FONT SIZE = '29'><B>SOUND OFF</B></FONT></P>";
public var GRIMS_QUIT:String = "<P ALIGN='left'><FONT SIZE = '29'><B>Exit</B></FONT></P>";
public var BOOGS_EXITBTN:String = "<P ALIGN = 'Center'><FONT SIZE = '37'><B>Exit</B></FONT></P>";
public var BOOGS_READYBTN:String = "<P ALIGN = 'Center'><FONT SIZE = '37'><B>Ready</B></FONT></P>";
public var BOOGS_INSTRUCBTN:String = "<P ALIGN = 'Center'><FONT SIZE = '37'><B>Instructions</B></FONT></P>";
public var BOOGS_PLAYBTN:String = "<P ALIGN = 'Center'><FONT SIZE = '37'><B>Play</B></FONT></P>";
public var BOOGS_SOUNDON:String = "<P ALIGN = 'Center'><FONT SIZE = '37'><B>Sound On</B></FONT></P>";
public var BOOGS_SOUNDOFF:String = "<P ALIGN = 'Center'><FONT SIZE = '37'><B>Sound Off</B></FONT></P>";
public var NEWLEVEL:String = "<P ALIGN='center'><FONT SIZE = '55'><B>New Level</B></FONT></P>";
public var WizWalkKey1:String = "<P ALIGN='left'><FONT SIZE = '12'><B>Creates safe tile zone.</B></FONT></P>";
public var WizWalkKey2:String = "<P ALIGN='left'><FONT SIZE = '12'><B>Move forward.</B></FONT></P>";
public var WizWalkKey3:String = "<P ALIGN='left'><FONT SIZE = '12'><B>Add time to clock.</B></FONT></P>";
public var WizWalkControls:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Controls:</B></FONT></P>";
public var WizWalkLivesText:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Lives Remaining:</B></FONT></P>";
public var WizWalkTimeRemaining:String = "<P ALIGN='center'><FONT SIZE = '25'><B>Time Remaining:</B></FONT></P>";
public var WardrobeWarsMute:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Sound Off</B></FONT></P>";
public var WardrobeWarsSound:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Sound On</B></FONT></P>";
public var WardrobeWarsQuit:String = "<P ALIGN='center'><FONT SIZE = '22'><B>Exit</B></FONT></P>";
public var WardrobeWarsReady:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Ready</B></FONT></P>";
public var WizWalkReady:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Ready</B></FONT></P>";
public var WizWalkQuit:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Exit</B></FONT></P>";
public var WizWalkPlay:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Play</B></FONT></P>";
public var WizWalkMute:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Sound Off</B></FONT></P>";
public var WizWalkSound:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Sound On</B></FONT></P>";
public var WizWalkInstructions:String = "<P ALIGN='center'><FONT SIZE = '15'><B>Instructions</B></FONT></P>";
public var WardrobeWarsResultHeading :String = "<P ALIGN='center'><FONT SIZE = '29'><B>Results</B></FONT></P>";
//edits
public var Blocktacular_Instructions2:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Make a match next to one of these to destroy a column.</B></FONT></P>";
public var Blocktacular_Instructions3:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Make a match next to one of these to destroy a row.</B></FONT></P>";
public var Blocktacular_Instructions4:String = "<P ALIGN='left'><FONT SIZE = '14'><B>Click on one of these in a match for maximum points!</B></FONT></P>";
public var WizWalkWaiting1:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Welcome to Wizard's Walk ! We have a slight wait before you start.</B></FONT></P>";
public var WizWalkWaiting2:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Your session will start shortly.</B></FONT></P>";
public var WizWalkWaitingQuit:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Exit</B></FONT></P>";
public var WardrobeWarsPlayBtn:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Play</B></FONT></P>";
public var WardrobeWarsInstructBtn:String = "<P ALIGN='center'><FONT SIZE = '18'><B>Instructions</B></FONT></P>";
// Mr Grimsby's Mystery Maze
public var GRIMS_PLAY:String = "<P ALIGN='center'><FONT SIZE = '40'>Play</FONT></P>";
public var GRIMS_INSTRUCBTN:String = "<P ALIGN='center'><FONT SIZE = '40'>Instructions</FONT></P>";
public var MAZE_SOUNDON:String = "<P ALIGN='center'><FONT SIZE = '38'>Sound On</FONT></P>";
public var MAZE_SOUNDOFF:String = "<P ALIGN='center'><FONT SIZE = '38'>Sound Off</FONT></P>";
public var GRIMS_INSTRUCTION1:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Pick this up to see farther in the dark.</B></FONT></P>";
public var GRIMS_INSTRUCTION2:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Use this powerup to warp - even through walls!</B></FONT></P>";
public var GRIMS_INSTRUCTION3:String = "<P ALIGN='left'><FONT SIZE = '16'><B>These powerups give you a quick boost.</B></FONT></P>";
public var GRIMS_INSTRUCTION4:String = "<P ALIGN='left'><FONT SIZE = '16'><B>Air vents will blow out your candle, so watch out!</B></FONT></P>";
public var GRIMS_FOUND:String = "<P ALIGN='center'><FONT SIZE = '12'><B> found the chest!</B></FONT></P>";
public var GRIMS_LEFT:String = "<P ALIGN='center'><FONT SIZE = '12'><B> has left the game.</B></FONT></P>";
//Blocktacular
public var Blocktacular_Quit:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Quit</B></FONT></P>";
public var Blocktacular_Ready:String = "<P ALIGN='center'><FONT SIZE = '29'>Ready</FONT></P>";
public var Blocktacular_SOUNDOFF:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Sound Off</B></FONT></P>";
public var Blocktacular_SOUNDON:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Sound On</B></FONT></P>";
public var Blocktacular_PLAY:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Play</B></FONT></P>";
public var Blocktacular_InstrcBtn:String = "<P ALIGN='center'><FONT SIZE = '29'><B>Instructions</B></FONT></P>";
public var WizWalkCountdown:String = "<P ALIGN='center'><FONT SIZE = '17'>Use the arrow keys to control your Petpet.</FONT></P>";
public var WizWalkTimeLeft:String = "<P ALIGN='center'><FONT SIZE = '47'>Get Ready!</FONT></P>";
public var WizWalkWaitingMsg1:String = "<P ALIGN='center'><FONT SIZE = '20'>Welcome to Wizard's Walk! There is a short wait before you start.</FONT></P>";
public var WizWalkWaitingMsg2:String = "<P ALIGN='left'><FONT SIZE = '20'>People ahead of you in line:</FONT></P>";
public var WizWalkWaitingMsg3:String = "<P ALIGN='left'><FONT SIZE = '20'>Wait Time:</FONT></P>";
public var WizWalkWaitLessThan:String = "<P ALIGN='left'><FONT SIZE = '20'>Less than 1 minute</FONT></P>";
public var WizWalkWaitMinute:String = "<P ALIGN='left'><FONT SIZE = '20'>minute</FONT></P>";
public var WizWalkWaitMinutes:String = "<P ALIGN='left'><FONT SIZE = '20'>minutes</FONT></P>";
public var WizWalkWaitQuit:String = "<P ALIGN='center'><FONT SIZE = '30'>Quit</FONT></P>";
public var NEW_LEVEL:String = "<P ALIGN='right'><FONT SIZE = '55'><B>Level</FONT></B></P>";
public var CLICK_TO_CONTINUE:String = "<P ALIGN='center'><B><FONT SIZE = '20'>Click To Continue</FONT></B></P>";
// map names
public var REGION_0:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Park Station</FONT></P>";
public var REGION_1:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Petpet Plaza</FONT></P>";
public var REGION_2:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Shadow Grove</FONT></P>";
public var REGION_3:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>The University</FONT></P>";
public var REGION_4:String = "<P ALIGN='LEFT'><FONT SIZE = '28'>Park Pointe Square</FONT></P>";
public var REGION_5:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Market Lane</FONT></P>";
public var REGION_6:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Lucky Valley</FONT></P>";
public var REGION_7:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Pawvillion</FONT></P>";
public var REGION_8:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Fashion Field</FONT></P>";
public var REGION_9:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Tugg Harbour</FONT></P>";
public var REGION_10:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Pirate Alley</FONT></P>";
public var REGION_11:String = "<P ALIGN='LEFT'><FONT SIZE = '30'>Pool of Illusion</FONT></P>";
public var REGION_15:String = "<P ALIGN='LEFT'><FONT SIZE = '28'>Laughing Springs</FONT></P>";
public var REGION_16:String = "<P ALIGN='LEFT'><FONT SIZE = '28'>Jigglybug Lagoon</FONT></P>";
public var REGION_18:String = "<P ALIGN='LEFT'><FONT SIZE = '25'>Founder's Cemetery</FONT></P>";
public var REGION_19:String = "<P ALIGN='LEFT'><FONT SIZE = '28'>Kripske's Pumpkin Patch</FONT></P>";
public var REGION_20:String = "<P ALIGN='CENTER'><FONT SIZE = '28'>Bogbottom</FONT></P>";
public var TIP_DRAG_CLOTHING_ITEM:String = "Tip: Change your clothes in the dressing room.";
public var TIP_DRAG_SPA_ITEM:String = "Tip: Change your Petpet's colour by going to Groomtopia.";
public var TIP_DRAG_BRUSH:String = "Tip: Use the hairbrush to get a new style at Groomtopia.";
public var TIP_COLOR_CHANGE:String = "Tip: Change your Petpet's colour by going to Groomtopia.";
public var TIP_DRAG_HAIRSTYLE:String = "Tip: Change your Petpet's hairstyle by going to Groomtopia.";
public var TIP_DRAG_POTION_LOTION:String = "Tip: Apply that item by going to Groomtopia.";
public var PROMPT_GENERIC_OOPS:String = "<P ALIGN='CENTER'>Oops!</P>";
public var PROMPT_GENERIC_GO_THERE:String = "<P ALIGN='CENTER'>Go There</P>";
public var PROMPT_GENERIC_CANCEL:String = "<P ALIGN='CENTER'>Cancel</P>";
public var PROMPT_GENERIC_OK:String = "<P ALIGN='CENTER'>OK</P>";
public var PROMPT_INVENTORY:String = "<P ALIGN='CENTER'><FONT SIZE = '18'>Inventory</FONT></P>";
public var PROMPT_TRICKS:String = "<P ALIGN='CENTER'><FONT SIZE = '18'>Tricks</FONT></P>";
public var PROMPT_CHATLOG:String = "<P ALIGN='CENTER'><FONT SIZE = '18'>Chat Log</FONT></P>";
public var PROMPT_GET_MORE:String = "<P ALIGN='CENTER'>Get More</P>";
public var PROMPT_MANAGE:String = "<P ALIGN='CENTER'>Manage</P>";
public var CHOOSE_PETPET_SPECIES:String = "<b>Species: </b>";
public var CHOOSE_PETPET_MOOD:String = "<b>Mood: </b>";
public var CHOOSE_PETPET_AGILITY:String = "<b>Agility: </b>";
public var CHOOSE_PETPET_CHARM:String = "<b>Charm: </b>";
public var CHOOSE_PETPET_MEMORY:String = "<b>Memory: </b>";
public var CHOOSE_PETPET_PP:String = "<b>Park Points: </b>";
public var TRICK_SIT:String = "Sit";
// leaderboard
public var HIGHSCORES_NEETERBALL:String = "Neeterball";
public var NEETERBALL_DESC:String = "Depending on which brother you ask, Neeterball is the best invention ever!";
public var HIGHSCORES_DEADPIN:String = "Dead Pin Bowling";
public var DEADPIN_DESC:String = "Try yer paw at a game of ten pin if you dare!";
public var HIGHSCORES_BOATBLASTER:String = "Boat Blasters";
public var BOATBLASTER_DESC:String = "'Tis better to blast than to be blasted.";
public var HIGHSCORES_QWERTOMIZER:String = "Qwertomizer 5000";
public var QWERTOMIZER_DESC:String = "Help Dr. Zing restore lab assistant Qwert to his former self before it's too late!";
// new things that I found that were not in translation
// 06/18/09
public var REWARDS :String = "Rewards"
public var quitSure :String = "<font size='24'>Are you sure you want to stop playing?</font>"
public var QUEST_JOBS :String = "Jobs";
public var QUEST_PROFILE :String = "Petpet Profile";
public var QUEST_DEFAULT :String = "<p align = 'center'><font size = '30'>You don't currently have any jobs in progress. \n To find one, look for Petpet Park locals who may need your help! </font></p> ";
public var FORGOTPASSWORD :String = "<P ALIGN='CENTER'><FONT SIZE = '37'>Forgot Password</FONT></P>";
public var LOGIN :String = "<P ALIGN='CENTER'><FONT SIZE = '34'>LOGIN</FONT></P>";
public var FORGOTPASSWORDMSG :String = "<P ALIGN='LEFT'><FONT SIZE = '16'>A message has been sent to your e-mail address with a link to your username.<br><br>If you do not receive a message, please try again.<br><br>Check to make sure e-mail's from support@petpetpark.com are not blocked by your e-mail provider.</FONT></P>";
public var DEFAULTCOPY:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please enter your email address</FONT></P>";
public var REENTEREMAILOVER13:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>For security reasons, please re-enter your email address</FONT></P>";
public var INVALIDEMAIL:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Oops, this email address in not valid. Try again.</FONT></P>";
public var EMAILDOESNOTMATCH:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>The email addresses do not match. Please try again</FONT></P>";
public var EMAILEXISTS:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>I'm sorry but that email has reached its max of 5 accounts, " +
"you can either log in using that email, or use a different email.</FONT></P>";
public var MALEORFEMALE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please tell us if you are male or female</FONT></P>";
public var PROCEEDTONEXT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Great job! Click the next button to go to the next page</FONT></P>";
public var ONEMOMENT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>One moment please, while we verify your email address.</FONT></P>";
public var ENTERYOUREMAIL:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Your E-mail:</FONT></P>" ;
public var REENTERYOUREMAIL:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Re-enter Your E-mail:</FONT></P>";
public var AREYOU:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Are you:</FONT></P>";
public var MALE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Male</FONT></P>";
public var FEMALE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Female</FONT></P>";
public var CREATEANACCOUNT:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Create an Account</FONT></P>";
public var COMMUNICATIONPREFERENCE:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Communication Preferences (optional)</FONT></P>";
public var YESIWANTUPDATES:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Yes, I want to receive Petpet Park news and updates</FONT></P>";
//forgot username/password
public var FORGOTUSERNAME:String = "<P ALIGN='CENTER'><FONT SIZE = '37'>Forgot Username</FONT></P>";
//public var LOGIN:String = "<P ALIGN='CENTER'><FONT SIZE = '34'>LOGIN</FONT></P>";
//public var FORGOTPASSWORDMSG:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>A message has been sent to your e-mail address with a link to your password. <br><br>If you do not receive a message, please try again. <br><br>Check to make sure e-mail's from support@petpetpark.com are not blocked by your e-mail provider.</FONT></P>";
public var U13_DEFAULTCOPY:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please enter your parent's email address</FONT></P>";
public var U13_REENTEREMAILUNDER13:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please re-enter your parent's email address to continue</FONT></P>";
public var U13_INVALIDEMAIL:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Oops, this email address in not valid. Try again.</FONT></P>";
public var U13_EMAILDOESNOTMATCH:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>The email addresses do not match. Please try again</FONT></P>";
public var U13_EMAILEXISTS:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>I'm sorry but that email has reached its max of 5 accounts, " +
"you can either log in using that email, or use a different email.</FONT></P>";
public var U13_BOYORGIRL:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please tell us if you are a boy or a girl</FONT></P>";
public var U13_PROCEEDTONEXT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Great job! Click the next button to go to the next page</FONT></P>";
public var U13_ONEMOMENT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>One moment please, while we verify your email address.</FONT></P>";
public var U13_ENTERPARENTEMAIL:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Parent's E-mail:</FONT></P>" ;
public var U13_REENTERPARENTEMAIL:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Re-enter Parent's E-mail:</FONT></P>";
public var U13_AREYOUA:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Are you a:</FONT></P>";
public var U13_BOY:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Boy</FONT></P>";
public var U13_GIRL:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Girl</FONT></P>";
public var U13_CREATEANACCOUNT:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Create an Account</FONT></P>";
public var U13_COMMUNICATIONPREFERENCE:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Communication Preferences (optional)</FONT></P>";
public var U13_YESIWANTUPDATES:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Yes, I want to receive Petpet Park news and updates</FONT></P>";
// sign up page one
public var SIGNUP1_INTROCOPY:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Hi, welcome to Petpet Park! To enter the Park, just login. " +
"If you don't have an account yet, sign up for one...it's easy.</FONT></P>";
public var SIGNUP1_USERNAMEDEFAULT :String= "<P ALIGN='LEFT'><FONT SIZE = '12'>Choose a username that is 6-20 characters long. Please only " +
"use letters, number, or underscores, and please do not use your real name!</FONT></P>";
public var SIGNUP1_PASSWORDDEFAULT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Your password must be at least 6 characters long and contain " +
"at least 2 numbers. Be sure to keep your password a secret!</FONT></P>";
public var SIGNUP1_PASSWORDCONFIRMDEFAULT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please re-enter your password.</FONT></P>";
public var SIGNUP1_BIRTHDATEDEFAULT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please select your birthdate. You will need to provide" +
" this information to us if you forget your password in the future</FONT></P>";
public var SIGNUP1_CREATEANACCOUNT:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Create an Account</FONT></P>";
public var SIGNUP1_USERNAMETOOSHORT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Sorry, your username is not long enough. Please enter one with at least 6 characters.</FONT></P>";
public var SIGNUP1_USERNAMETOOLONG:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Oops, the username is too long. Please enter one with fewer than 20 characters.</FONT></P>";
public var SIGNUP1_USERNAMEMISSING:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please enter a username to continue.</FONT></P>";
public var SIGNUP1_USERNAMENOTAVAILABLE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Sorry, that username is not available. Please try another " +
"or choose a name from the list below.</FONT></P>";
public var SIGNUP1_USERNAMESYMBOLERROR:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Oops, that username has a symbol or a space in it. Please only use letters, " +
"numbers, or underscores!</FONT></P>";
public var SIGNUP1_PASSWORDTOOSHORT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Sorry, the password you have entered is too short. Please add more characters to it.</FONT></P>";
public var SIGNUP1_PASSWORDMISSING:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Please enter a password to continue</FONT></P>";
public var SIGNUP1_PASSWORDINSECURE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Your password is not secure. Please make sure there are 2 numbers in your password.</FONT></P>";
public var SIGNUP1_PASSWORDSDONTMATCH:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Oops, the passwords do not match. Please try again.</FONT></P>";
public var SIGNUP1_USERNAMEPASSWORDSAME:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>The username and password cannot be the same</FONT></P>";
public var SIGNUP1_UNCHECKED:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>You must accept the Terms and Conditions and Privacy Policy to continue!</FONT></P>";
public var SIGNUP1_PROCEEDTONEXT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Great job! Click the next button to go to the next page</FONT></P>";
public var SIGNUP1_PROCESSINGMESSAGE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>One moment</FONT></P>";
public var SIGNUP1_USERNAME:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Username:</FONT></P>";
public var SIGNUP1_PASSWORD:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Password:</FONT></P>";
public var SIGNUP1_REENTERPASSWORD:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Re-enter Password:</FONT></P>";
public var SIGNUP1_BIRTHDAY:String = "<P ALIGN='LEFT'><FONT SIZE = '26'>Your Birthdate:</FONT></P>";
public var SIGNUP1_MONTH:String = "<P ALIGN='CENTER'><FONT SIZE = '12'>Month</FONT></P>";
public var SIGNUP1_DAY:String = "<P ALIGN='CENTER'><FONT SIZE = '12'>Day</FONT></P>";
public var SIGNUP1_YEAR:String = "<P ALIGN='CENTER'><FONT SIZE = '12'>Year</FONT></P>";
public var SIGNUP1_ALREADYAMEMBER:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Already have a Petpet Park or Neopets account? " +
"<font color = '#0000FF'><a href = 'event:TextEvent'> <b>Click here</b> " +
"</a></font></FONT></P>";
/*
public var SIGNUP1_ACCEPTTHIS:String = "I accept the <font color = '#0000FF'>" +
"<u><a href = 'event:Terms'><b>Terms and Conditions</b></a></u>" +
" & <u><a href = 'event:Privacy'><U><b>Privacy Policy.</b></a></u></font>";
*/
//public var SIGNUP1_ACCEPTTHIS:String = "<P><FONT SIZE='10'>I accept the <a href = 'event:Terms'>Terms and Conditions</a> & <a href = 'event:Privacy'>Privacy Policy.</a></FONT></P>";
public var SIGNUP1_ACCEPTTHIS:String = "<P ALIGN='LEFT'><FONT SIZE='12' COLOR='#000000'>I accept the </FONT><FONT SIZE='12' COLOR='#0000FF'><u><b><a href = 'event:Terms'>Terms and Conditions</a></b></u></FONT><FONT SIZE='12' COLOR='#000000'> & </FONT><FONT SIZE='12' COLOR='#0000FF'><u><b><a href = 'event:Privacy'>Privacy Policy</a></b></u>.</FONT></P>";
public var NOTRESIDENTOFMAINE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>I confirm that I am not a resident of the state of Maine.</FONT></P>"
public var UNABLETOPROCESSMAINE:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>Oh, it seems we are unable to process your registration at this time.<font color = '#0000FF'><a href = 'event:maineLaws'>Learn more.</a></FONT></FONT></P>"
public var SIGNUP1_ONEMOMEMT:String = "<P ALIGN='LEFT'><FONT SIZE = '12'>One moment</FONT></P>";
public var PRIVACYPOLICY_TITLE:String = "<P ALIGN='CENTER'><FONT SIZE = '37'>Terms and Conditions \n & Privacy Policy</FONT></P>";
public var PRIVACYPOLICY_BACK:String = "<P ALIGN='CENTER'><FONT SIZE = '34'>BACK</FONT></P>";
public var REPORT_PLAYER :String = "Report Player";
public var GENERIC_YES :String = "Yes";
public var GENERIC_NO :String = "No";
public var STORE_PRICE :String = "<P ALIGN = 'CENTER'><FONT SIZE = '13'><B>Price:</B></FONT></P>";
public var CLOTHING_GREETING :String = "<P ALIGN='left'><FONT SIZE='14'><b>Hi, and thanks for dropping by! We have clothing and accessories for all your Petpet fashion needs. Your Petpet will look simply wonderful in any of our items. We're sure of it!</b></FONT></P>";
public var PIRATESTORE_GREETING :String = "<font size = '14'><b>Here we sell the finest pirate's booty, whatever your sea lovin' heart desires...</b></font>";
public var HUD_PROFILE_JOBS :String = "Jobs";
public var MAP_LOAD : String = "<P ALIGN='CENTER'><FONT SIZE='36'>Loading: %1</FONT></P>";
public var INVENTORY_QUEST_POPUP:String = "This item is needed to complete a Job."
public var QUESTLOG_REWARDS:String = "Rewards";
public var QUESTLOG_CANCEL:String = "Cancel";
public var HIGHSCORES_SLINGANDSPLASH : String = "Sling and Splash";
public var HIGHSCORES_THREERINGSOAKER : String = "Three Ring Soaker";
public var HIGHSCORES_CAKECALAMITY : String = "Cake Calamity";
public var HIGHSCORES_POTIONPANIC : String = "Potion Panic";
public var CAKECALAMITY_DESC : String = "<P ALIGN='center'><FONT SIZE = '20'><B>Cake Calamity - Grab those rolling pins! Mix, frost and display your way to becoming Petpet Park's biggest baking success!</B></FONT></P>";
public var SLINGANDSPLASH_DESC : String = "<P ALIGN='center'><FONT SIZE = '20'><B>Sling and Splash - How many ping-pong balls can you slingshot into the Petpetpet bowls before time runs out? </B></FONT></P>";
public var THREERINGSOAKER_DESC : String = "<P ALIGN='center'><FONT SIZE = '20'><B>Three Ring Soaker - Ready, aim, squirt! First player to burst the balloon wins.</B></FONT></P>";
public var BLOCK_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Blocktacular – Pop the blocks before they reach the top! Boosts your memory the longer you play. Bring your friends and see who can get the high score!</B></FONT></P>";
public var SKEED_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Skeedaddle – Test your speed and agility in this fast-paced game of collecting marbles. </B></FONT></P>";
public var WARD_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Wardrobe Wars – It’s a scramble to see how fast you can dress your Petpet! Use your keen eye for fashion to match outfits.</B></FONT></P>";
public var GRIMS_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Mr. Grimsby’s Mystery Maze – Don't get lost in this dark, mysterious maze! Treasure awaits those who can find their way. </B></FONT></P>";
public var WIZARD_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Wizard Walk – The very ground is enchanted! Make your way across the wizard blocks before time runs out. Lookout for the wizard, with just a wave of his wand, voila! The blocks disappear!</B></FONT></P>";
public var BOOGIE_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Petpet Boogie – It’s a groovy dance-off as you match the arrows and make your Petpet boogie! Try to string together combos and hit the bonus steps for a big payoff.</B></FONT></P>";
public var POTIONPANIC_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Grimelda needs your help! Gather herbs in a cauldron to create a magical blast that'll drive those pesky skeletons away!</B></FONT></P>";
public var GREATWALLS_DESC:String = "<P ALIGN='center'><FONT SIZE = '20'><B>Sir Liam's Castle Defender: Rally your troops to defend the castle from hordes of bugs! Beware the giant Millipede!!</B></FONT></P>";
public var HIGHSCORES_CLUCKENS : String = "Counting Cluckens";
public var CLUCKENS_DESC : String = "<P ALIGN='center'><FONT SIZE = '20'><B>1...2...3...! Help Mellee feed the Cluckens and collect their eggs.</B></FONT></P>";
public var HIGHSCORES_FFARMERS : String = "Frantic Farmer";
public var FFARMERS_DESC : String = "<P ALIGN='center'><FONT SIZE = '20'><B>It's harvest time! Can you gather all the vegetables in time before they rot? </B></FONT></P>";
public var HIGHSCORES_STACKHAPPY:String = "<P ALIGN='CENTER'><FONT SIZE = '16'>Stack Happy</Font></P>";
public var STACKHAPPY_DESC : String = "<P ALIGN='center'><FONT SIZE = '20'><B>It's time to prove your building skills! How high can you stack before things start falling down?</B></FONT></P>";
public var VAULT_BACKPACK_FULL_TITLE : String = "<P ALIGN='CENTER'>Backpack Full!</P>";
public var VAULT_BACKPACK_FULL_BODY : String = "<P ALIGN='LEFT'><FONT SIZE='18'>This backpack is full! Each Petpet's backpack can only hold 16 Park Point items. To put this item in your backpack, you must first remove a Park Point item.</FONT></P>";
public var VAULT_PROMPT_DELETE : String = "<P ALIGN='CENTER'>Delete</P>";
public var VAULT_DELETE_CONFIRM_BODY : String = "<P ALIGN='LEFT'><FONT SIZE='18'>Are you sure you want to delete this item?</FONT></P>";
public var VAULT_CANT_DELETE_BODY : String = "<P ALIGN='LEFT'><FONT SIZE='18'>This item can't be deleted.</FONT></P>";
public var VAULT_CANT_DELETE_TITLE : String = "<P ALIGN='CENTER'>Can't Delete Item!</P>";
public var VAULT_DELETE_CONFIRM_TITLE : String = "<P ALIGN='CENTER'>Are You Sure?</P>";
public var VAULT_TOOLTIP : String = "<P ALIGN='LEFT'>Type: %1\nYou own: %2</P>";
public function PPPTranslationData(){}
}
}
| 124.751825
| 7,416
| 0.697372
|
593a71047d9ff802391adf484efdbbbc077d400e
| 1,289
|
as
|
ActionScript
|
src/game/proto/mail_access_resp.as
|
dengcs/ddz
|
1f2c16cfb3ba38e80ba5f9d7944a05bc8ff6acdd
|
[
"Apache-2.0"
] | null | null | null |
src/game/proto/mail_access_resp.as
|
dengcs/ddz
|
1f2c16cfb3ba38e80ba5f9d7944a05bc8ff6acdd
|
[
"Apache-2.0"
] | null | null | null |
src/game/proto/mail_access_resp.as
|
dengcs/ddz
|
1f2c16cfb3ba38e80ba5f9d7944a05bc8ff6acdd
|
[
"Apache-2.0"
] | null | null | null |
package game.proto {
import com.google.protobuf.*;
import game.proto.mail;
public class mail_access_resp extends Message {
public function mail_access_resp() {
}
private var _mails:Vector.<game.proto.mail> = new Vector.<game.proto.mail>();
public function get mails():Vector.<game.proto.mail> {
return _mails;
}
public function set mails(value:Vector.<game.proto.mail>):void {
_mails = value || new Vector.<game.proto.mail>();
}
override public function writeTo(output:CodedOutputStream):void {
if (_mails.length > 0) {
output.writeVector(_mails, 1, FieldDescriptorType.MESSAGE);
}
super.writeTo(output);
}
override public function readFrom(input:CodedInputStream):void {
while(true) {
var tag:int = input.readTag();
switch(tag) {
case 0: {
return;
}
default: {
if (!input.skipField(tag)) {
return;
}
break;
}
case 10: {
_mails.push(input.readMessage(new game.proto.mail()));
break;
}
}
}
}
}
}
| 26.854167
| 81
| 0.508922
|
8d7ebec8c19ff8a3f4c5b5c16981b07f2dd8cf7a
| 818
|
as
|
ActionScript
|
library/src/com/thebigdev/ai/behaviortree/groups/Sequence.as
|
idmillington/thebigdev-flash
|
19eccf87da7b70ce91b533bed4fc414424145f57
|
[
"MIT"
] | 1
|
2020-07-08T01:44:31.000Z
|
2020-07-08T01:44:31.000Z
|
library/src/com/thebigdev/ai/behaviortree/groups/Sequence.as
|
idmillington/thebigdev-flash
|
19eccf87da7b70ce91b533bed4fc414424145f57
|
[
"MIT"
] | null | null | null |
library/src/com/thebigdev/ai/behaviortree/groups/Sequence.as
|
idmillington/thebigdev-flash
|
19eccf87da7b70ce91b533bed4fc414424145f57
|
[
"MIT"
] | null | null | null |
package com.thebigdev.ai.behaviortree.groups
{
import com.thebigdev.ai.behaviortree.base.OneTaskFromGroup;
import com.thebigdev.ai.behaviortree.base.Task;
import com.thebigdev.ai.behaviortree.base.TaskResult;
/**
* A sequence is one of the basic building blocks of a behavior
* tree: it tries its children in order and returns False when any
* of them return False, and returns True if it gets through them
* all.
*
* It is used to execute tasks in order, failing the whole group
* if it can't carry out one of the steps.
*/
public class Sequence extends OneTaskFromGroup
{
public function Sequence()
{
super(true, false, TaskResult.SUCCESS);
}
public override function clone():Task
{
var task:Sequence = new Sequence();
addClonedChildren(task);
return task;
}
}
}
| 27.266667
| 67
| 0.722494
|
073e2f474d0b37d37b42508cf598099cc262ee23
| 3,922
|
as
|
ActionScript
|
src/org/axgl/AxRect.as
|
arkeus/Axel
|
c0fd56b4ab1afdc8af02958ebda486540ef38958
|
[
"MIT"
] | 11
|
2015-01-18T21:32:44.000Z
|
2019-03-24T17:19:37.000Z
|
src/org/axgl/AxRect.as
|
arkeus/Axel
|
c0fd56b4ab1afdc8af02958ebda486540ef38958
|
[
"MIT"
] | null | null | null |
src/org/axgl/AxRect.as
|
arkeus/Axel
|
c0fd56b4ab1afdc8af02958ebda486540ef38958
|
[
"MIT"
] | 3
|
2015-01-15T04:15:58.000Z
|
2022-03-14T11:37:35.000Z
|
package org.axgl {
import org.axgl.input.AxMouseButton;
/**
* Stores the x and y values, along with the width and height, of a rectangle object.
*/
public class AxRect extends AxPoint {
/**
* The width of this object in pixels.
* @default 0
*/
public var width:Number;
/**
* The height of this object in pixels.
* @default 0
*/
public var height:Number;
/**
* Creates a new rectangle with the passed x, y, width, and height.
*
* @param x The x value of this object.
* @param y The y value of this object.
* @param width The width of this object in pixels.
* @param height The height of this object in pixels.
*
*/
public function AxRect(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0) {
super(x, y);
this.width = width;
this.height = height;
}
/**
* Returns whether or not the passed x, y coordinates are contained within this rectangle.
*
* @param x The x value of the point to check.
* @param y The y value of the point to check.
*
* @return True if the passed point is contained within this rectangle, false otherwise.
*/
public function contains(x:Number, y:Number):Boolean {
return x >= this.x && y >= this.y && x <= this.right && y <= this.bottom;
}
/**
* Checks whether or not this object overlaps the passed object.
*
* @param other The object to check.
*
* @return True if the passed object overlaps this object, false otherwise.
*/
public function overlaps(other:AxRect):Boolean {
return left + AxU.EPSILON < other.right && top + AxU.EPSILON < other.bottom && right - AxU.EPSILON > other.left && bottom - AxU.EPSILON > other.top;
}
/**
* Check whether or not this object is currently being hovered by the mouse.
*
* @return True if the mouse is contained within this object, false otherwise.
*/
public function hover():Boolean {
return contains(Ax.mouse.x, Ax.mouse.y);
}
/**
* Check whether or not this object has just been clicked.
*
* @return True if the mouse just left clicked this object, false otherwise.
*/
public function clicked():Boolean {
return Ax.mouse.pressed(AxMouseButton.LEFT) && hover();
}
/**
* Check whether or not the mouse is currently being held down on top this object.
*
* @return True if the left mouse button is being held and is within this object, false otherwise.
*/
public function held():Boolean {
return Ax.mouse.down(AxMouseButton.LEFT) && hover();
}
/**
* Check whether or not the mouse has just been released from this object.
*
* @return True if the left mouse button was just released and is within this object, false otherwise.
*/
public function released():Boolean {
return Ax.mouse.released(AxMouseButton.LEFT) && hover();
}
/**
* Returns the x coordinate of the left side of this object. This is an alias for <code>x</code>.
*
* @return The x coordinate of the left side of this object.
*/
public function get left():Number {
return x;
}
/**
* Returns the x coordinate of the right side of this object. This is an alias for <code>x + width</code>.
*
* @return The x coordinate of the right side of this object.
*/
public function get right():Number {
return x + width;
}
/**
* Returns the y coordinate of the top side of this object. This is an alias for <code>y</code>.
*
* @return The y coordinate of the top side of this object.
*/
public function get top():Number {
return y;
}
/**
* Returns the y coordinate of the bottom side of this object. This is an alias for <code>y + height</code>.
*
* @return The y coordinate of the bottom side of this object.
*/
public function get bottom():Number {
return y + height;
}
override public function toString():String {
return "(" + x + "," + y + "," + width + "," + height + ")";
}
}
}
| 29.268657
| 151
| 0.649414
|
44564d8f8d03a1b4784b1e795cdf7828122e66bf
| 2,711
|
as
|
ActionScript
|
SmartFoxServer_PRO_1.6.6/Server/sfsExtensions/E4X_example.as
|
ChisdealHD/DetlasWorldLinux
|
336465a4df1a48c9a273329fc7a09d8099c4e4d5
|
[
"MIT"
] | null | null | null |
SmartFoxServer_PRO_1.6.6/Server/sfsExtensions/E4X_example.as
|
ChisdealHD/DetlasWorldLinux
|
336465a4df1a48c9a273329fc7a09d8099c4e4d5
|
[
"MIT"
] | null | null | null |
SmartFoxServer_PRO_1.6.6/Server/sfsExtensions/E4X_example.as
|
ChisdealHD/DetlasWorldLinux
|
336465a4df1a48c9a273329fc7a09d8099c4e4d5
|
[
"MIT"
] | null | null | null |
/*
* SmartFoxServer PRO
* E4X Example based on the XML Parser Example
*
* Demonstrates how to use E4X languages inside an actionscript extension
*
* v 1.0.0
*
* (c) 2005-2006 gotoAndPlay()
*
*/
/*
* Initializion point:
*
* this function is called as soon as the extension
* is loaded in the server.
*
* You can add here all the initialization code
*
*/
// Global extension variables
var xmlObj = null
function init()
{
// Read xml file from disk
var xmlData = _server.readFile("sfsExtensions/data/books.xml")
// Create an XML object
xmlObj = new XML(xmlData)
// Show data
readTheXmlFile()
// Example #1: search all books published in 2003
/*
var books = xmlObj.bookList.book.(@year == 2003)
for (var i = 0; i < books.length(); i++)
{
trace("Title : " + books[i].@title)
trace("Author : " + books[i].@author)
trace("Year : " + books[i].@year)
trace("Publisher: " + books[i].@publisher)
trace("-------------------------------------")
}*/
// Example #2: match a substring in name attribute
/*
var books = xmlObj.bookList.book.(@title.toString().indexOf("Java") > -1)
for (var i = 0; i < books.length(); i++)
{
trace("Title : " + books[i].@title)
trace("Author : " + books[i].@author)
trace("Year : " + books[i].@year)
trace("Publisher: " + books[i].@publisher)
trace("-------------------------------------")
}
*/
}
/*
* Read and parse the XML file
*/
function readTheXmlFile()
{
// Show the <collectionName> and <collectionOwner> nodes
trace("Collection Name: " + xmlObj.collectionName)
trace("Collection Owner: " + xmlObj.collectionOwner + newline)
var bookList = xmlObj.bookList.book
for (var i = 0; i < bookList.length(); i++)
{
trace("Title : " + bookList[i].@title)
trace("Author : " + bookList[i].@author)
trace("Year : " + bookList[i].@year)
trace("Publisher: " + bookList[i].@publisher)
trace("-------------------------------------")
}
}
/*
* This method is called by the server when an extension
* is being removed / destroyed.
*
* Always make sure to release resources like setInterval(s)
* open files etc in this method.
*
*/
function destroy()
{
//
}
/*
*
* Handle Client Requests
*
* cmd = a string with the client command to execute
* params = list of parameters expected from the client
* user = the User object representing the sender
* fromRoom = the id of the room where the request was generated
*
*/
function handleRequest(cmd, params, user, fromRoom)
{
//
}
/*
* This method handles internal events
* Internal events are dispactched by the Zone or Room where the extension is attached to
*
* the (evt) object
*/
function handleInternalEvent(evt)
{
//
}
| 20.231343
| 88
| 0.623386
|
fa70c03fc42ff62563f4b80ff1d03de8cf857b2f
| 4,326
|
as
|
ActionScript
|
mcs/psc_tests/tamarin-redux/tests/acceptance/as3/Types/Number/abs.as
|
sushihangover/PlayScript
|
a2b7c04e176ddb0ddbc16999e5a5902a1e15b563
|
[
"Apache-2.0"
] | 20
|
2015-07-14T07:30:28.000Z
|
2021-11-12T07:41:34.000Z
|
avmplus/test/acceptance/as3/Types/Number/abs.as
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 83
|
2015-07-16T01:31:41.000Z
|
2016-01-13T02:15:47.000Z
|
avmplus/test/acceptance/as3/Types/Number/abs.as
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 10
|
2015-06-14T14:39:59.000Z
|
2021-11-12T07:41:35.000Z
|
/* -*- c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*- */
/* vi: set ts=4 sw=4 expandtab: (add to ~/.vimrc: set modeline modelines=5) */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
Returns the absolute value of x; the result has the same magnitude as x but has positive sign.
*/
import avmplus.*;
import com.adobe.test.Assert;
import com.adobe.test.Utils;
// var SECTION = "15.8.2.1";
// var VERSION = "AS3";
// var TITLE = "public native static function abs (x:Number):Number;";
function check(param:Number):Number { return Number.abs(param); }
Assert.expectEq("Number.abs(3.14) returns a Number", "Number", getQualifiedClassName(Number.abs(3.14)));
Assert.expectEq("Number.abs(-0) returns a int", "int", getQualifiedClassName(Number.abs(-0)));
Assert.expectEq("Number.abs(1) returns a int", "int", getQualifiedClassName(Number.abs(1)));
Assert.expectEq("Number.abs() length is 1", 1, Number.abs.length);
Assert.expectError("Number.abs() with no args", Utils.ARGUMENTERROR+1063, function(){ Number.abs(); });
// If x is NaN, the result is NaN.
Assert.expectEq("Number.abs(undefined)", NaN, Number.abs(undefined));
Assert.expectEq("Number.abs(string)", NaN, Number.abs("string"));
Assert.expectEq("Number.abs(NaN)", NaN, Number.abs(NaN));
Assert.expectEq("Number.abs(NaN) check()", NaN, check(NaN));
// If x is -0, the result is +0.
Assert.expectEq("Number.abs(0.0)", 0, Number.abs(0.0));
Assert.expectEq("Number.POSITIVE_INFINITY/Number.abs(0.0)", Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY/Number.abs(0.0));
Assert.expectEq("Number.abs(-0.0)", 0, Number.abs(-0.0));
Assert.expectEq("Number.POSITIVE_INFINITY/Number.abs(-0.0)", Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY/Number.abs(-0.0));
Assert.expectEq("Number.POSITIVE_INFINITY/cehck(-0.0)", Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY/check(-0.0));
// If x is -Infinity, the result is +Infinity.
Assert.expectEq("Number.abs(Number.NEGATIVE_INFINITY)", Number.POSITIVE_INFINITY, Number.abs(Number.NEGATIVE_INFINITY));
Assert.expectEq("Number.abs(Number.POSITIVE_INFINITY)", Number.POSITIVE_INFINITY, Number.abs(Number.POSITIVE_INFINITY));
Assert.expectEq("Number.abs(Number.NEGATIVE_INFINITY) check()", Number.POSITIVE_INFINITY, check(Number.NEGATIVE_INFINITY));
Assert.expectEq("Number.abs(Number.POSITIVE_INFINITY) check()", Number.POSITIVE_INFINITY, check(Number.POSITIVE_INFINITY));
var pi = 3.14;
Assert.expectEq("Number.abs(-NumberLiteral)", pi, Number.abs(-pi));
Assert.expectEq("Number.abs(NumberLiteral)", pi, Number.abs(pi));
Assert.expectEq("Number.abs(-NumberLiteral) check()", pi, check(-pi));
Assert.expectEq("Number.abs(NumberLiteral) check()", pi, check(pi));
var pi:Number = 3.14;
Assert.expectEq("Number.abs(-typed)", pi, Number.abs(-pi));
Assert.expectEq("Number.abs(typed)", pi, Number.abs(pi));
Assert.expectEq("Number.abs(-typed) check()", pi, check(-pi));
Assert.expectEq("Number.abs(typed) check()", pi, check(pi));
Assert.expectEq("Number.abs(null)", 0, Number.abs(null));
Assert.expectEq("Number.abs(true)", 1, Number.abs(true));
Assert.expectEq("Number.abs(false)", 0, Number.abs(false));
Assert.expectEq("Number.abs('1')", 1, Number.abs('1'));
Assert.expectEq("Number.abs('0')", 0, Number.abs('0'));
Assert.expectEq("Number.NEGATIVE_INFINITY/Number.abs('0')", Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY/Number.abs('0'));
Assert.expectEq("Number.abs(-Number.MIN_VALUE)", Number.MIN_VALUE, Number.abs(-Number.MIN_VALUE));
Assert.expectEq("Number.abs(-Number.MAX_VALUE)", Number.MAX_VALUE, Number.abs(-Number.MAX_VALUE));
Assert.expectEq("Number.abs(Number.MIN_VALUE)", Number.MIN_VALUE, Number.abs(Number.MIN_VALUE));
Assert.expectEq("Number.abs(Number.MAX_VALUE)", Number.MAX_VALUE, Number.abs(Number.MAX_VALUE));
Assert.expectEq("Number.abs(-Number.MIN_VALUE) check()", Number.MIN_VALUE, check(-Number.MIN_VALUE));
Assert.expectEq("Number.abs(-Number.MAX_VALUE) check()", Number.MAX_VALUE, check(-Number.MAX_VALUE));
Assert.expectEq("Number.abs(Number.MIN_VALUE) check()", Number.MIN_VALUE, check(Number.MIN_VALUE));
Assert.expectEq("Number.abs(Number.MAX_VALUE) check()", Number.MAX_VALUE, check(Number.MAX_VALUE));
| 55.461538
| 130
| 0.736015
|
2daa19fd1fb7393c0d759a2b4fbf217252e8b7bd
| 209
|
as
|
ActionScript
|
src/melon/physics/nape/service/IMaterialManager.as
|
flow38/Melon-Engine
|
8915684e712f39295183e612d56ffe5c4f1c523e
|
[
"MIT"
] | null | null | null |
src/melon/physics/nape/service/IMaterialManager.as
|
flow38/Melon-Engine
|
8915684e712f39295183e612d56ffe5c4f1c523e
|
[
"MIT"
] | null | null | null |
src/melon/physics/nape/service/IMaterialManager.as
|
flow38/Melon-Engine
|
8915684e712f39295183e612d56ffe5c4f1c523e
|
[
"MIT"
] | null | null | null |
/**
* Created by FALCYFLO on 06/11/2015.
*/
package melon.physics.nape.service {
import nape.phys.Material;
public interface IMaterialManager {
function getMaterial(materialID : String) : Material;
}
}
| 19
| 57
| 0.732057
|
d26bb53c16e2eed8fa84fead2c9ca649be46e2d0
| 1,421
|
as
|
ActionScript
|
gittok/src/portrayal/label/Label.as
|
stinfodesign/gittok
|
bb6ee18ffca5bc0b9a2f4c1794ceb898000088a5
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | 6
|
2015-02-20T09:19:22.000Z
|
2020-07-28T06:01:30.000Z
|
gittok/src/portrayal/label/Label.as
|
stinfodesign/gittok
|
bb6ee18ffca5bc0b9a2f4c1794ceb898000088a5
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
gittok/src/portrayal/label/Label.as
|
stinfodesign/gittok
|
bb6ee18ffca5bc0b9a2f4c1794ceb898000088a5
|
[
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
package portrayal.label
{
import dataTypes.spatialGeometry.Coordinate2;
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import portrayal.labelStyle.LabelStyle;
public class Label extends Sprite
{
public var text:String;
public var refPos:Coordinate2;
public var style:LabelStyle;
public function Label():void {
super();
}
public function encode():Object {
var outLabel:Object = new Object();
outLabel.text = text;
outLabel.refPos = refPos;
outLabel.style = style;
return outLabel;
}
public function decode(labelObj:Object):void {
var lbl:TextField = new TextField();
text = labelObj.text;
refPos = labelObj.refPos;
style = labelObj.style;
lbl.text = labelObj.text;
var format:TextFormat = new TextFormat();
with (format) {
font = style.font;
size = style.fontSize;
color = style.color;
bold = style.bold;
}
lbl.setTextFormat(format);
lbl.alpha = style.alpla;
var shiftx:Number = lbl.textWidth * (style.reference % 3) * 0.5;
var shifty:Number = lbl.textHeight * (style.reference / 3) * 0.5;
with (lbl) {
x = refPos.x - shiftx;
y = refPos.y - shifty;
autoSize = TextFieldAutoSize.LEFT;
}
if (this.numChildren > 0) this.removeChildAt(0);
this.addChild(lbl);
}
}
}
| 21.861538
| 68
| 0.654469
|
86d605e09817319fd51efb33c772941d13370f22
| 2,217
|
as
|
ActionScript
|
src/as/com/threerings/msoy/data/all/ChannelName.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 21
|
2015-04-30T10:28:47.000Z
|
2021-06-23T23:00:45.000Z
|
src/as/com/threerings/msoy/data/all/ChannelName.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 36
|
2015-07-29T20:50:57.000Z
|
2021-09-18T22:37:25.000Z
|
src/as/com/threerings/msoy/data/all/ChannelName.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 35
|
2015-04-30T10:29:41.000Z
|
2022-02-15T21:17:01.000Z
|
//
// $Id$
package com.threerings.msoy.data.all {
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamable;
import com.threerings.util.Comparable;
import com.threerings.util.Hashable;
import com.threerings.util.Name;
/**
* Contains a channel name and channel id in one handy object.
*/
public class ChannelName extends Name
implements Comparable, Hashable
{
/** The maximum length of a channel name */
public static const LENGTH_MAX :int = 24;
/** The minimum length of a channel name */
public static const LENGTH_MIN :int = 3;
public function ChannelName (name :String = null, creatorId :int = 0)
{
super(name);
_creatorId = creatorId;
}
/**
* Returns the member id of the creator of this chat channel.
*/
public function getCreatorId () :int
{
return _creatorId;
}
// from Hashable (by way of Name)
override public function hashCode () :int
{
return super.hashCode() ^ _creatorId;
}
// from Comparable (by way of Name)
override public function compareTo (other :Object) :int
{
var oc :ChannelName = (other as ChannelName);
if (_creatorId == oc._creatorId) {
return super.compareTo(oc);
} else {
return _creatorId - oc._creatorId;
}
}
// from Equalable (by way of Hashable by way of Name)
override public function equals (other :Object) :Boolean
{
if (other is ChannelName) {
var oc :ChannelName = (other as ChannelName);
return oc._creatorId == _creatorId && oc._name == _name;
} else {
return false;
}
}
// from Streamable (by way of Name)
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
_creatorId = ins.readInt();
}
// from Streamable (by way of Name)
override public function writeObject (out :ObjectOutputStream) :void
{
super.writeObject(out);
out.writeInt(_creatorId);
}
/** The member id of this channel's creator. */
protected var _creatorId :int;
}
}
| 25.77907
| 73
| 0.62968
|
c23c212a41e03eeffaa5003f1774de431cfdbab9
| 1,518
|
as
|
ActionScript
|
src/kabam/rotmg/legends/service/GetLegendsListTask.as
|
ProtoGrace/TKMafia-VIP
|
97dc3c7183e52c6f25af51eaaaafbe62064bb111
|
[
"MIT"
] | 1
|
2021-06-18T13:33:27.000Z
|
2021-06-18T13:33:27.000Z
|
src/kabam/rotmg/legends/service/GetLegendsListTask.as
|
ppmaks/TKMafia-VIP
|
eb3784cbac3b3faaabba27bd3fabe5de2486763f
|
[
"MIT"
] | null | null | null |
src/kabam/rotmg/legends/service/GetLegendsListTask.as
|
ppmaks/TKMafia-VIP
|
eb3784cbac3b3faaabba27bd3fabe5de2486763f
|
[
"MIT"
] | 1
|
2021-03-14T12:12:27.000Z
|
2021-03-14T12:12:27.000Z
|
package kabam.rotmg.legends.service {
import kabam.lib.tasks.BaseTask;
import kabam.rotmg.appengine.api.AppEngineClient;
import kabam.rotmg.core.model.PlayerModel;
import kabam.rotmg.legends.model.Legend;
import kabam.rotmg.legends.model.LegendFactory;
import kabam.rotmg.legends.model.LegendsModel;
import kabam.rotmg.legends.model.Timespan;
public class GetLegendsListTask extends BaseTask {
public function GetLegendsListTask() {
super();
}
[Inject]
public var client:AppEngineClient;
[Inject]
public var player:PlayerModel;
[Inject]
public var model:LegendsModel;
[Inject]
public var factory:LegendFactory;
[Inject]
public var timespan:Timespan;
public var charId:int;
override protected function startTask():void {
this.client.complete.addOnce(this.onComplete);
this.client.sendRequest("/fame/list", this.makeRequestObject());
}
private function onComplete(isOK:Boolean, data:*):void {
isOK && this.updateFameListData(data);
completeTask(isOK, data);
}
private function updateFameListData(data:String):void {
var legends:Vector.<Legend> = this.factory.makeLegends(XML(data));
this.model.setLegendList(legends);
}
private function makeRequestObject():Object {
var request:Object = {};
request.timespan = this.timespan.getId();
request.accountId = this.player.getAccountId();
request.charId = this.charId;
return request;
}
}
}
| 29.192308
| 74
| 0.698946
|
ef0dc32a99151beb531b3bf9ef31aa0365ef7069
| 1,069
|
as
|
ActionScript
|
recorder/src/test/flashwavrecorder/MicrophoneSamplesEventTest.as
|
bhishamtrehan/themedconsult
|
6824436d5000bf9740acfb78c11e2de41440f5e9
|
[
"MIT"
] | 169
|
2015-01-08T08:00:41.000Z
|
2021-11-15T11:48:50.000Z
|
recorder/src/test/flashwavrecorder/MicrophoneSamplesEventTest.as
|
bhishamtrehan/themedconsult
|
6824436d5000bf9740acfb78c11e2de41440f5e9
|
[
"MIT"
] | 91
|
2019-11-11T15:41:26.000Z
|
2022-03-21T04:17:18.000Z
|
recorder/src/test/flashwavrecorder/MicrophoneSamplesEventTest.as
|
bhishamtrehan/themedconsult
|
6824436d5000bf9740acfb78c11e2de41440f5e9
|
[
"MIT"
] | 81
|
2015-01-04T06:57:17.000Z
|
2021-09-09T02:23:22.000Z
|
package flashwavrecorder {
import flashwavrecorder.events.MicrophoneSamplesEvent;
import org.hamcrest.assertThat;
import org.hamcrest.core.isA;
import org.hamcrest.object.equalTo;
public class MicrophoneSamplesEventTest {
[Test]
public function should_have_static_constant_property_in_type_of_string():void {
// then
assertThat(MicrophoneSamplesEvent.RAW_SAMPLES_DATA, isA(String));
}
[Test]
public function should_have_public_type_property_equal_to_its_static_constant():void {
// when
var microphoneSamplesEvent:MicrophoneSamplesEvent = new MicrophoneSamplesEvent([]);
// then
assertThat(microphoneSamplesEvent.type, equalTo(MicrophoneSamplesEvent.RAW_SAMPLES_DATA));
}
[Test]
public function should_allow_getting_samples_array_provided_while_initialization():void {
// given
var samples:Array = new Array(0.1, 0.2, 0.3);
// when
var microphoneSamplesEvent:MicrophoneSamplesEvent = new MicrophoneSamplesEvent(samples);
// then
assertThat(microphoneSamplesEvent.samples, equalTo(samples));
}
}
}
| 29.694444
| 94
| 0.778297
|
924c6e36f3b311d9c360d32b584140134c1bc720
| 5,559
|
as
|
ActionScript
|
src/as/com/threerings/msoy/ui/BubblePopup.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 21
|
2015-04-30T10:28:47.000Z
|
2021-06-23T23:00:45.000Z
|
src/as/com/threerings/msoy/ui/BubblePopup.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 36
|
2015-07-29T20:50:57.000Z
|
2021-09-18T22:37:25.000Z
|
src/as/com/threerings/msoy/ui/BubblePopup.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 35
|
2015-04-30T10:29:41.000Z
|
2022-02-15T21:17:01.000Z
|
//
// $Id$
package com.threerings.msoy.ui {
import flash.display.BlendMode;
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.text.AntiAliasType;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import caurina.transitions.Tweener;
import com.threerings.msoy.chat.client.ChatOverlay;
import com.threerings.msoy.client.MsoyContext;
import com.threerings.msoy.client.PlaceBox;
import com.threerings.msoy.utils.TextUtil;
/**
* Simple notification bubble to draw the user's attention to something in the interface.
*/
public class BubblePopup extends Sprite
{
/**
* Fades in a bubble as an overlay and fades it out again. If the user hovers over it, it fades
* back in. If the user clicks it, it goes away.
* @param parent the place box to overlay the bubble
* @param str the string to show in the bubble
* @param gloc the global location where the tail of the bubble should be
*/
public static function showHelpBubble (
ctx :MsoyContext, target :DisplayObject, message :String, yOffset :int = 0,
showTail :Boolean = true) :void
{
var p :Point = target.localToGlobal(new Point(target.width / 2, yOffset));
// TODO: We should be using the PopUpManager so we can position anywhere, not just
// inside the placebox.
var parent :PlaceBox = ctx.getTopPanel().getPlaceContainer();
p = parent.globalToLocal(p);
// TODO: orient bubble tail based on the edge of the container the new point is closest to
var bubble :BubblePopup = new BubblePopup(message, showTail);
bubble.x = p.x;
bubble.y = p.y;
bubble.alpha = 0;
parent.addOverlay(bubble, PlaceBox.LAYER_HELP_BUBBLES);
// helper to remove the bubble from the place box
var remove :Function = function () :void {
parent.removeOverlay(bubble);
};
// helper to fade out the bubble
var fadeOut :Function = function (delay :Number) :void {
Tweener.addTween(bubble,
{ alpha: 0.0, time: FADE_OUT_DURATION, delay: delay, onComplete: remove });
};
// fade in and fade out if there is no other user input
Tweener.addTween(bubble, { alpha: 1.0, time: FADE_IN_DURATION });
fadeOut(SOLID_DURATION + FADE_IN_DURATION);
// mouse over makes solid and stops all fades
bubble.addEventListener(MouseEvent.MOUSE_OVER, function (evt :MouseEvent) :void {
Tweener.removeTweens(bubble);
bubble.alpha = 1.0;
});
// mouse out restarts the fade
bubble.addEventListener(MouseEvent.MOUSE_OUT, function (evt :MouseEvent) :void {
Tweener.removeTweens(bubble);
fadeOut(SOLID_DURATION);
});
// click dismisses
bubble.addEventListener(MouseEvent.CLICK, function (evt :MouseEvent) :void {
Tweener.removeTweens(bubble);
remove();
});
}
/**
* Creates a new notification bubble.
*/
public function BubblePopup (message :String, showTail :Boolean)
{
// NB: 0, 0 is the tip of the tail
var format :TextFormat = ChatOverlay.createChatFormat();
var text :TextField = new TextField();
text.multiline = true;
text.wordWrap = true;
text.selectable = false;
text.autoSize = TextFieldAutoSize.LEFT;
text.antiAliasType = AntiAliasType.ADVANCED;
TextUtil.setText(text, TextUtil.parseLinks(message, format, true, true), format);
text.width = WIDTH - PADDING * 2;
addChild(text);
// position just inside the bubble
text.x = -TAIL_TIP_X + PADDING;
text.y = -TAIL_HEIGHT - PADDING - text.height;
// rectangle outline
graphics.lineStyle(1, OUTLINE);
graphics.beginFill(FILL);
graphics.drawRoundRect(-TAIL_TIP_X, -TAIL_HEIGHT - PADDING * 2 - text.height, WIDTH,
text.height + PADDING * 2, ROUNDING);
graphics.endFill();
if (showTail) {
// tail interior
graphics.lineStyle(1, FILL);
graphics.beginFill(FILL);
graphics.drawRect(-TAIL_BASE_X + 1, -TAIL_HEIGHT - PADDING / 2, TAIL_BASE_WIDTH - 2,
PADDING / 2);
drawTailWedge();
graphics.endFill();
// tail exterior
graphics.lineStyle(1, OUTLINE);
drawTailWedge();
}
// make sure our children get the alpha setting too (contrary to flash documentation)
blendMode = BlendMode.LAYER;
}
protected function drawTailWedge () :void
{
graphics.moveTo(-TAIL_BASE_X, -TAIL_HEIGHT);
graphics.lineTo(0, 0);
graphics.lineTo(-TAIL_BASE_X + TAIL_BASE_WIDTH, -TAIL_HEIGHT);
}
protected static const WIDTH :int = 160;
protected static const PADDING :int = 5;
protected static const ROUNDING :int = 12;
protected static const OUTLINE :int = 0x000000;
protected static const FILL :int = 0xffffff;
protected static const TAIL_BASE_X :int = 10;
protected static const TAIL_BASE_WIDTH :int = 20;
protected static const TAIL_TIP_X :int = 30;
protected static const TAIL_HEIGHT :int = 18;
protected static const FADE_IN_DURATION :Number = 0.75;
protected static const SOLID_DURATION :Number = 3.0;
protected static const FADE_OUT_DURATION :Number = 2.0;
}
}
| 35.183544
| 99
| 0.64562
|
f7823429fb7693b6f5039f02afd281c17bbb9a66
| 1,160
|
as
|
ActionScript
|
Entry/src/rumorPlot/model/cfg/PlotInfosConfig.as
|
w2h/SomeTool
|
5f4df7bd6e226ce984bf6bd7264e9e790dd1e8ac
|
[
"MIT"
] | 6
|
2016-10-13T18:08:03.000Z
|
2021-05-30T20:46:51.000Z
|
Entry/src/rumorPlot/model/cfg/PlotInfosConfig.as
|
w2h/SomeTool
|
5f4df7bd6e226ce984bf6bd7264e9e790dd1e8ac
|
[
"MIT"
] | null | null | null |
Entry/src/rumorPlot/model/cfg/PlotInfosConfig.as
|
w2h/SomeTool
|
5f4df7bd6e226ce984bf6bd7264e9e790dd1e8ac
|
[
"MIT"
] | 1
|
2016-10-13T18:17:38.000Z
|
2016-10-13T18:17:38.000Z
|
package rumorPlot.model.cfg
{
import flash.utils.Dictionary;
import rumorPlot.model.info.PlotInfo;
public class PlotInfosConfig
{
public var plotIDDict:Dictionary;
public function PlotInfosConfig()
{
this.plotIDDict = new Dictionary();
super();
}
public function addPlotInfo(param1:XML) : PlotInfo
{
var _loc2_:PlotInfo = new PlotInfo();
_loc2_.decode(param1);
this.plotIDDict[_loc2_.plotID] = _loc2_;
return _loc2_;
}
public function getPlotInfoByID(param1:uint) : PlotInfo
{
var _loc2_:PlotInfo = null;
if(this.plotIDDict[param1])
{
_loc2_ = this.plotIDDict[param1];
}
return _loc2_;
}
public function havePlotID(param1:int) : Boolean
{
var _loc2_:Boolean = this.plotIDDict.hasOwnProperty(param1);
return _loc2_;
}
public function encode() : XML
{
return null;
}
public function dispose() : void
{
this.plotIDDict = null;
}
}
}
| 22.307692
| 69
| 0.548276
|
147598474fa8d432bd8fc18e62b332d8537dd604
| 263
|
as
|
ActionScript
|
src/kabam/rotmg/news/controller/NewsDataUpdatedSignal.as
|
GhostRealm/prodmafia-client
|
56cfbecfc8ee7ff5534095c30d4b52bb6ace2bc6
|
[
"MIT"
] | 5
|
2020-10-30T20:20:54.000Z
|
2021-10-16T09:40:39.000Z
|
src/kabam/rotmg/news/controller/NewsDataUpdatedSignal.as
|
ppmaks/TKMafia-VIP
|
eb3784cbac3b3faaabba27bd3fabe5de2486763f
|
[
"MIT"
] | null | null | null |
src/kabam/rotmg/news/controller/NewsDataUpdatedSignal.as
|
ppmaks/TKMafia-VIP
|
eb3784cbac3b3faaabba27bd3fabe5de2486763f
|
[
"MIT"
] | 5
|
2020-11-14T14:45:20.000Z
|
2022-03-18T04:06:11.000Z
|
package kabam.rotmg.news.controller {
import kabam.rotmg.news.model.NewsCellVO;
import org.osflash.signals.Signal;
public class NewsDataUpdatedSignal extends Signal {
public function NewsDataUpdatedSignal() {
super(Vector.<NewsCellVO>);
}
}
}
| 18.785714
| 51
| 0.745247
|
2430a5d8d23eb312fc3dc51aa3608e1be02f081d
| 21,740
|
as
|
ActionScript
|
example/src/StarlingRoot.as
|
tuarua/Google-Maps-ANE
|
3e922246820c938e5aa4abdd4f3a02574c2b9d7f
|
[
"Apache-2.0"
] | 24
|
2017-08-22T11:57:25.000Z
|
2021-02-23T06:50:49.000Z
|
example/src/StarlingRoot.as
|
tuarua/Google-Maps-ANE
|
3e922246820c938e5aa4abdd4f3a02574c2b9d7f
|
[
"Apache-2.0"
] | 25
|
2017-10-12T06:26:43.000Z
|
2019-06-07T19:03:33.000Z
|
example/src/StarlingRoot.as
|
tuarua/Google-Maps-ANE
|
3e922246820c938e5aa4abdd4f3a02574c2b9d7f
|
[
"Apache-2.0"
] | 9
|
2017-09-15T02:10:59.000Z
|
2018-11-01T03:31:06.000Z
|
package {
import com.tuarua.GoogleMaps;
import com.tuarua.fre.ANEError;
import com.tuarua.googlemaps.CameraPosition;
import com.tuarua.googlemaps.Circle;
import com.tuarua.googlemaps.ColorARGB;
import com.tuarua.googlemaps.Coordinate;
import com.tuarua.googlemaps.GoogleMapsEvent;
import com.tuarua.googlemaps.GroundOverlay;
import com.tuarua.googlemaps.MapProvider;
import com.tuarua.googlemaps.MapType;
import com.tuarua.googlemaps.Marker;
import com.tuarua.googlemaps.Polygon;
import com.tuarua.googlemaps.Polyline;
import com.tuarua.googlemaps.CoordinateBounds;
import com.tuarua.googlemaps.Settings;
import com.tuarua.googlemaps.StrokePattern;
import com.tuarua.googlemaps.StrokePatternType;
import com.tuarua.googlemaps.VisibleRegion;
import com.tuarua.googlemaps.permissions.PermissionEvent;
import com.tuarua.googlemaps.permissions.PermissionStatus;
import com.tuarua.location.Address;
import com.tuarua.location.LocationEvent;
import flash.desktop.NativeApplication;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.events.Event;
import flash.geom.Rectangle;
import starling.core.Starling;
import starling.display.Sprite;
import starling.events.ResizeEvent;
import starling.events.Touch;
import starling.events.TouchEvent;
import starling.events.TouchPhase;
import starling.utils.AssetManager;
import views.SimpleButton;
public class StarlingRoot extends Sprite {
private var mapView:GoogleMaps;
[Embed(source="pin_b.png")]
public static const pinImage:Class;
[Embed(source="newark_nj_1922.jpg")]
public static const newarkImage:Class;
private var firstMarkerId:String;
private var btn:SimpleButton = new SimpleButton("clear me");
private var btn2:SimpleButton = new SimpleButton("set viewPort");
private var btn3:SimpleButton = new SimpleButton("toggle visible");
private var btn4:SimpleButton = new SimpleButton("Dublin");
private var btn5:SimpleButton = new SimpleButton("Night");
private var btn6:SimpleButton = new SimpleButton("Satellite");
private var btn7:SimpleButton = new SimpleButton("Find me");
private var btn8:SimpleButton = new SimpleButton("Zoom In");
private var btn9:SimpleButton = new SimpleButton("Capture");
private static const nightStyle:String = "[{\"featureType\":\"all\",\"elementType\":\"geometry\"," +
"\"stylers\":[{\"color\":\"#242f3e\"}]},{\"featureType\":\"all\",\"elementType\":\"labels.text.stroke\"," +
"\"stylers\":[{\"lightness\":-80}]},{\"featureType\":\"administrative\",\"elementType\":\"labels.text.fill\"," +
"\"stylers\":[{\"color\":\"#746855\"}]},{\"featureType\":\"administrative.locality\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#d59563\"}]},{\"featureType\":\"poi\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#d59563\"}]},{\"featureType\":\"poi.park\"," +
"\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#263c3f\"}]},{\"featureType\":\"poi.park\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#6b9a76\"}]},{\"featureType\":\"road\"," +
"\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#2b3544\"}]},{\"featureType\":\"road\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#9ca5b3\"}]},{\"featureType\":\"road.arterial\"," +
"\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#38414e\"}]},{\"featureType\":\"road.arterial\"," +
"\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#212a37\"}]},{\"featureType\":\"road.highway\"," +
"\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#746855\"}]},{\"featureType\":\"road.highway\"," +
"\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#1f2835\"}]},{\"featureType\":\"road.highway\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#f3d19c\"}]},{\"featureType\":\"road.local\"," +
"\"elementType\":\"geometry.fill\",\"stylers\":[{\"color\":\"#38414e\"}]},{\"featureType\":\"road.local\"," +
"\"elementType\":\"geometry.stroke\",\"stylers\":[{\"color\":\"#212a37\"}]},{\"featureType\":\"transit\"," +
"\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#2f3948\"}]},{\"featureType\":\"transit.station\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#d59563\"}]},{\"featureType\":\"water\"," +
"\"elementType\":\"geometry\",\"stylers\":[{\"color\":\"#17263c\"}]},{\"featureType\":\"water\"," +
"\"elementType\":\"labels.text.fill\",\"stylers\":[{\"color\":\"#515c6d\"}]},{\"featureType\":\"water\"," +
"\"elementType\":\"labels.text.stroke\",\"stylers\":[{\"lightness\":-20}]}]";
public function StarlingRoot() {
}
public function start(assets:AssetManager):void {
NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExiting);
var _assets:AssetManager = assets;
GoogleMaps.key = "xxxx";
GoogleMaps.mapProvider = MapProvider.GOOGLE;
try {
mapView = GoogleMaps.mapView;
} catch(e:ANEError) {
trace(e.message);
return;
}
var viewPort:Rectangle = new Rectangle(0, 100, stage.stageWidth, stage.stageHeight - 100);
var coordinate:Coordinate = new Coordinate(53.836549, -6.393717);
var settings:Settings = new Settings();
settings.myLocationButtonEnabled = false;
mapView.myLocationEnabled = true;
mapView.buildingsEnabled = false;
try {
mapView.initMap(viewPort, coordinate, 12.0, settings, Starling.current.contentScaleFactor);
} catch (e:ANEError) {
trace(e.source);
trace(e.message);
trace(e.getStackTrace());
trace(e.errorID);
}
mapView.addEventListener(GoogleMapsEvent.ON_READY, onMapReady);
mapView.addEventListener(GoogleMapsEvent.ON_LOADED, onMapsLoaded);
mapView.addEventListener(GoogleMapsEvent.DID_TAP_AT, onDidTapAt);
mapView.addEventListener(GoogleMapsEvent.DID_LONG_PRESS_AT, onDidLongPressAt);
mapView.addEventListener(GoogleMapsEvent.DID_TAP_MARKER, onDidTapMarker);
mapView.addEventListener(GoogleMapsEvent.DID_BEGIN_DRAGGING, onDidBeginDragging);
mapView.addEventListener(GoogleMapsEvent.DID_END_DRAGGING, onDidEndDragging);
mapView.addEventListener(GoogleMapsEvent.DID_DRAG, onDidDrag);
mapView.addEventListener(GoogleMapsEvent.ON_CAMERA_MOVE_STARTED, onCameraMoveStarted);
//mapView.addEventListener(GoogleMapsEvent.ON_CAMERA_MOVE, onCameraMove);
mapView.addEventListener(GoogleMapsEvent.ON_CAMERA_IDLE, onCameraIdle);
mapView.addEventListener(LocationEvent.LOCATION_UPDATED, onLocationUpdated);
mapView.addEventListener(LocationEvent.ON_ADDRESS_LOOKUP, onAddressLookup);
mapView.addEventListener(PermissionEvent.ON_PERMISSION_STATUS, onPermissionStatus);
mapView.visible = true; //map is invisible by default when inited
btn.x = 10;
btn8.y = btn7.y = btn3.y = btn2.y = btn.y = 10;
btn9.y = btn6.y = btn5.y = btn4.y = 60;
btn.addEventListener(TouchEvent.TOUCH, onAddGroundOverlay);
addChild(btn);
btn2.x = 100;
btn2.addEventListener(TouchEvent.TOUCH, onSetViewPort);
addChild(btn2);
btn3.x = 190;
btn3.addEventListener(TouchEvent.TOUCH, onToggleVisible);
addChild(btn3);
btn4.x = 10;
btn4.addEventListener(TouchEvent.TOUCH, onDublin);
addChild(btn4);
btn5.x = 100;
btn5.addEventListener(TouchEvent.TOUCH, onNightStyle);
addChild(btn5);
btn6.x = 190;
btn6.addEventListener(TouchEvent.TOUCH, onMapType);
addChild(btn6);
btn7.x = 280;
btn7.addEventListener(TouchEvent.TOUCH, onFindMe);
addChild(btn7);
btn8.x = 370;
btn8.addEventListener(TouchEvent.TOUCH, onZoomIn);
addChild(btn8);
btn9.x = 280;
btn9.addEventListener(TouchEvent.TOUCH, onCapture);
addChild(btn9);
stage.addEventListener(Event.RESIZE, onResize);
}
private function onAddressLookup(event:LocationEvent):void {
var coord:Coordinate = event.coordinate;
var address:Address = event.address;
if (coord && address) {
trace(coord.latitude, coord.longitude, " as address: ", address.formattedAddress);
trace(address.name);
trace(address.street);
trace(address.city);
trace(address.postalCode);
trace(address.country);
}
}
private function onMapsLoaded(event:GoogleMapsEvent):void {
trace(event);
}
private function onCapture(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn9);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.addEventListener(GoogleMapsEvent.ON_BITMAP_READY, onBitmapReady);
mapView.capture(0, 0, stage.stageWidth, (stage.stageHeight - 100) / 2);
}
}
private function onBitmapReady(event:GoogleMapsEvent):void {
trace(event);
var bmd:BitmapData = mapView.getCapture();
if (bmd) {
trace(bmd.width, bmd.height);
var bmp:Bitmap = new Bitmap(bmd);
bmp.y = 100 * Starling.contentScaleFactor;
mapView.visible = false;
Starling.current.nativeStage.addChild(bmp);
}
}
private function onCameraMoveStarted(event:GoogleMapsEvent):void {
switch (event.params.reason) {
case GoogleMapsEvent.CAMERA_MOVE_REASON_GESTURE:
trace("Camera move started", "CAMERA_MOVE_REASON_GESTURE");
break;
case GoogleMapsEvent.CAMERA_MOVE_REASON_API_ANIMATION:
trace("Camera move started", "CAMERA_MOVE_REASON_API_ANIMATION");
break;
case GoogleMapsEvent.CAMERA_MOVE_REASON_DEVELOPER_ANIMATION:
trace("Camera move started", "CAMERA_MOVE_REASON_DEVELOPER_ANIMATION");
break;
}
}
private function onCameraMove(event:GoogleMapsEvent):void {
var props:Object = event.params;
trace("latlng:", props.latitude, props.longitude, "zoom", props.zoom, "tilt", props.tilt, "bearing", props.bearing);
}
private static function onCameraIdle(event:GoogleMapsEvent):void {
trace(event);
}
private function onMapReady(event:GoogleMapsEvent):void {
trace(event);
var coordinate:Coordinate = new Coordinate(53.836549, -6.393717);
var marker:Marker = new Marker(coordinate, "Dunleer", "Home");
marker.color = ColorARGB.GREEN;
marker.icon = (new pinImage() as Bitmap).bitmapData;
marker.isFlat = false;
marker.isTappable = false;
marker.isDraggable = true;
mapView.addMarker(marker);
firstMarkerId = marker.id;
trace("uuid for marker", firstMarkerId);
// Polyline
/*var points:Vector.<Coordinate> = new Vector.<Coordinate>();
points.push(new Coordinate(-35.016, 143.321));
points.push(new Coordinate(-34.747, 145.592));
points.push(new Coordinate(-34.364, 147.891));
points.push(new Coordinate(-33.501, 150.217));
points.push(new Coordinate(-32.306, 149.248));
points.push(new Coordinate(-32.491, 147.309));
var polyline:Polyline = new Polyline(points, ColorARGB.GREEN);
mapView.addPolyline(polyline);
var cameraPosition:CameraPosition = new CameraPosition();
cameraPosition.centerAt = new Coordinate(-23.684, 133.903);
cameraPosition.zoom = 4.0;
mapView.moveCamera(cameraPosition, false);*/
//Polygon #1
/*var points:Vector.<Coordinate> = new Vector.<Coordinate>();
points.push(new Coordinate(-27.457, 153.040));
points.push(new Coordinate(-33.852, 151.211));
points.push(new Coordinate(-37.813, 144.962));
points.push(new Coordinate(-34.928, 138.599));
var polygon:Polygon = new Polygon(points);
polygon.fillColor = ColorARGB.WHITE;
polygon.strokeColor = ColorARGB.BLACK;
mapView.addPolygon(polygon);
var cameraPosition:CameraPosition = new CameraPosition();
cameraPosition.centerAt = new Coordinate(-23.684, 133.903);
cameraPosition.zoom = 4.0;
mapView.moveCamera(cameraPosition, false);*/
//Polygon #2
/*var points:Vector.<Coordinate> = new Vector.<Coordinate>();
var holes:Vector.<Coordinate> = new Vector.<Coordinate>();
points.push(new Coordinate(0, 0));
points.push(new Coordinate(0, 5));
points.push(new Coordinate(3, 5));
points.push(new Coordinate(3, 0));
points.push(new Coordinate(0, 0));
holes.push(new Coordinate(1, 1));
holes.push(new Coordinate(1, 2));
holes.push(new Coordinate(2, 2));
holes.push(new Coordinate(2, 1));
holes.push(new Coordinate(1, 1));
var polygon:Polygon = new Polygon(points);
polygon.holes.push(holes);
polygon.fillColor = ColorARGB.BLUE;
mapView.addPolygon(polygon);
var cameraPosition:CameraPosition = new CameraPosition();
cameraPosition.centerAt = new Coordinate(0, 0);
cameraPosition.zoom = 6.0;
mapView.moveCamera(cameraPosition, false);*/
}
private function onDidEndDragging(event:GoogleMapsEvent):void {
trace(event);
var uuid:String = event.params.id as String;
var marker:Marker = mapView.markers[uuid] as Marker;
trace("end drag marker", uuid, marker.title, "new coordinate", marker.coordinate.latitude, marker.coordinate.longitude);
}
private function onDidBeginDragging(event:GoogleMapsEvent):void {
trace(event);
var uuid:String = event.params as String;
var marker:Marker = mapView.markers[uuid] as Marker;
trace("begin drag marker", uuid, marker.title);
}
private function onDidDrag(event:GoogleMapsEvent):void {
//trace(event);
}
private function onLocationUpdated(event:LocationEvent):void {
var coordinate:Coordinate = event.coordinate;
trace("user found at", coordinate.latitude, coordinate.longitude);
var cameraPosition:CameraPosition = new CameraPosition();
cameraPosition.centerAt = coordinate;
mapView.moveCamera(cameraPosition);
}
private function onPermissionStatus(event:PermissionEvent):void {
trace(event);
var status:int = event.params.status;
switch (status) {
case PermissionStatus.ALWAYS:
case PermissionStatus.WHEN_IN_USE:
mapView.showUserLocation();
break;
case PermissionStatus.DENIED:
case PermissionStatus.NOT_DETERMINED:
case PermissionStatus.RESTRICTED:
trace("Not allowed to use location services");
break;
case PermissionStatus.SHOW_RATIONALE:
trace("Show a rationale");
break;
}
}
private function onUpdateMarker(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
var marker:Marker = mapView.markers[firstMarkerId];
if (marker) {
marker.color = ColorARGB.CYAN;
marker.title = "Updated title";
}
}
}
private function onZoomIn(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn8);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.animationDuration = 500;
mapView.zoomIn(true); // mapView.zoomOut();
}
}
private function onAddCircle(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
var circle:Circle = new Circle(new Coordinate(53.836549, -6.393717));
circle.fillColor = 0x807A007A; //purple 50% alpha
circle.radius = 2000;
circle.strokeWidth = 20.0;
circle.strokeColor = ColorARGB.GREEN;
circle.strokePattern = new StrokePattern(StrokePatternType.DOTTED, 100, 100);
mapView.addCircle(circle);
}
}
private function onAddGroundOverlay(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
var jersey:Coordinate = new Coordinate(40.7321273, -74.2227811);
var newPosition:CameraPosition = new CameraPosition();
newPosition.centerAt = jersey;
newPosition.zoom = 12.0;
mapView.moveCamera(newPosition);
var southWest:Coordinate = new Coordinate(40.712216, -74.22655);
var northEast:Coordinate = new Coordinate(40.773941, -74.12544);
var overlayBounds:CoordinateBounds = new CoordinateBounds(southWest, northEast);
var overlay:GroundOverlay = new GroundOverlay(overlayBounds, (new newarkImage() as Bitmap).bitmapData);
mapView.addGroundOverlay(overlay);
}
}
private function onGeoLookup(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.reverseGeocodeLocation(new Coordinate(51.5033640, -0.1276250));
//mapView.forwardGeocodeLocation("Dalvik, Iceland");
}
}
private function onScrollBy(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.scrollBy(0, -(mapView.viewPort.height * 0.5), false);
}
}
private function onClear(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.clear();
}
}
private function onSetBounds(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn);
if (touch != null && touch.phase == TouchPhase.ENDED) {
var vancouver:Coordinate = new Coordinate(49.26, -123.11);
var calgary:Coordinate = new Coordinate(51.05, -114.05);
mapView.setBounds(new CoordinateBounds(vancouver, calgary));
}
}
private function onSetViewPort(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn2);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.viewPort = new Rectangle(0, 200, 400, 400);
}
}
private function onToggleVisible(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn3);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.visible = !mapView.visible;
}
}
private function onDublin(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn4);
if (touch != null && touch.phase == TouchPhase.ENDED) {
var dublin:Coordinate = new Coordinate(53.341273, -6.2887817);
var newPosition:CameraPosition = new CameraPosition();
newPosition.centerAt = dublin;
newPosition.zoom = 10.0;
newPosition.bearing = 90;
newPosition.tilt = 30;
mapView.moveCamera(newPosition, true);
}
}
private function onNightStyle(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn5);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.style = nightStyle;
}
}
private function onMapType(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn6);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.mapType = MapType.SATELLITE;
}
}
private function onFindMe(event:TouchEvent):void {
var touch:Touch = event.getTouch(btn7);
if (touch != null && touch.phase == TouchPhase.ENDED) {
mapView.requestPermissions();
}
}
private function onDidTapMarker(event:GoogleMapsEvent):void {
var uuid:String = event.params as String;
var marker:Marker = mapView.markers[uuid] as Marker;
trace("tapped marker", uuid, marker.title);
}
private function onDidTapAt(event:GoogleMapsEvent):void {
var coordinate:Coordinate = event.params as Coordinate;
trace("tapped at", coordinate.latitude, coordinate.longitude);
}
private function onDidLongPressAt(event:GoogleMapsEvent):void {
var coordinate:Coordinate = event.params as Coordinate;
trace("long pressed at", coordinate.latitude, coordinate.longitude);
}
public function onResize(event:ResizeEvent):void {
var current:Starling = Starling.current;
var scale:Number = current.contentScaleFactor;
stage.stageWidth = event.width / scale;
stage.stageHeight = event.height / scale;
current.viewPort.width = stage.stageWidth * scale;
current.viewPort.height = stage.stageHeight * scale;
mapView.viewPort = new Rectangle(0, 100, stage.stageWidth, stage.stageHeight - 100);
}
/**
* It's very important to call dispose(); on any ANEs when the app is exiting.
*/
private function onExiting(event:Event):void {
GoogleMaps.dispose();
}
}
}
| 41.174242
| 128
| 0.634913
|
bd2d0f245f843cf59b8d0a5b1a0e1c05d104a4a0
| 306
|
as
|
ActionScript
|
PfApiTest/com/playfab/AdminModels/GetServerBuildInfoRequest.as
|
PlayFab/ActionScriptSDK
|
982e7844309d63c81d544bb136ff462f2fdf1141
|
[
"Apache-2.0"
] | 20
|
2015-05-01T09:09:41.000Z
|
2020-04-14T10:48:45.000Z
|
PfApiTest/com/playfab/AdminModels/GetServerBuildInfoRequest.as
|
PlayFab/ActionScriptSDK
|
982e7844309d63c81d544bb136ff462f2fdf1141
|
[
"Apache-2.0"
] | 20
|
2015-07-24T19:57:58.000Z
|
2015-11-14T00:59:55.000Z
|
PfApiTest/com/playfab/AdminModels/GetServerBuildInfoRequest.as
|
PlayFab/ActionScriptSDK
|
982e7844309d63c81d544bb136ff462f2fdf1141
|
[
"Apache-2.0"
] | 7
|
2015-05-06T06:59:14.000Z
|
2021-02-20T15:25:04.000Z
|
package com.playfab.AdminModels
{
public class GetServerBuildInfoRequest
{
public var BuildId:String;
public function GetServerBuildInfoRequest(data:Object=null)
{
if(data == null)
return;
BuildId = data.BuildId;
}
}
}
| 18
| 67
| 0.565359
|
38e1ccc5cff90309336f5374092e6308efc1dc3f
| 585
|
as
|
ActionScript
|
src/away3d/loaders/utils/TextureLoader.as
|
gkravas/Gamestone
|
180ad7bb22ef36088e7e82601b2aa900c2812a2b
|
[
"MIT"
] | null | null | null |
src/away3d/loaders/utils/TextureLoader.as
|
gkravas/Gamestone
|
180ad7bb22ef36088e7e82601b2aa900c2812a2b
|
[
"MIT"
] | null | null | null |
src/away3d/loaders/utils/TextureLoader.as
|
gkravas/Gamestone
|
180ad7bb22ef36088e7e82601b2aa900c2812a2b
|
[
"MIT"
] | null | null | null |
package away3d.loaders.utils
{
import flash.display.Loader;
import flash.net.URLRequest;
import flash.system.LoaderContext;
/**
* Used to store the name and loader reference of an external texture image.
*/
public class TextureLoader extends Loader
{
public function TextureLoader()
{
super();
}
private var _filename:String;
public function get filename():String
{
return _filename;
}
override public function load(request:URLRequest, context:LoaderContext=null):void
{
_filename = request.url;
super.load(request, context);
}
}
}
| 19.5
| 84
| 0.711111
|
3d40ee2b6d5e95907112aea701489e65e4334a78
| 3,244
|
as
|
ActionScript
|
common-snapshot/src/com/neopets/games/marketing/destination/despicableMe/widgets/TriviaPopUp.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | 1
|
2021-06-23T08:53:53.000Z
|
2021-06-23T08:53:53.000Z
|
common-snapshot/src/com/neopets/games/marketing/destination/despicableMe/widgets/TriviaPopUp.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | null | null | null |
common-snapshot/src/com/neopets/games/marketing/destination/despicableMe/widgets/TriviaPopUp.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | null | null | null |
/**
* This class handles sending getting and displaying trivia questions.
*
* @langversion ActionScript 3.0
* @playerversion Flash 9.0
* @author David Cary
* @since 04.09.2010
*/
package com.neopets.games.marketing.destination.despicableMe.widgets
{
//----------------------------------------
// IMPORTS
//----------------------------------------
import flash.display.MovieClip;
import flash.display.InteractiveObject;
import flash.display.SimpleButton;
import flash.display.DisplayObject;
import flash.text.TextField;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.EventDispatcher;
import com.neopets.games.marketing.destination.despicableMe.widgets.TriviaCallButton;
import com.neopets.games.marketing.destination.despicableMe.widgets.BasicPopUp;
import com.neopets.util.general.GeneralFunctions;
import com.neopets.util.display.DisplayUtils;
import com.neopets.projects.destination.destinationV3.Parameters;
import com.neopets.projects.destination.destinationV3.AbsView;
public class TriviaPopUp extends BasicPopUp
{
//----------------------------------------
// CONSTANTS
//----------------------------------------
//----------------------------------------
// VARIABLES
//----------------------------------------
protected var _submitButton:InteractiveObject;
protected var _loggedIn:Boolean;
//----------------------------------------
// CONSTRUCTOR
//----------------------------------------
public function TriviaPopUp():void {
super();
// set up components
_submitButton = getChildByName("submit_btn") as InteractiveObject;
// check login status
var tag:String = Parameters.userName;
//tag = "Grue"; // comment in to test logged in status locally
loggedIn = (tag != null && tag != AbsView.GUEST_USER);
}
//----------------------------------------
// GETTERS AND SETTORS
//----------------------------------------
public function get loggedIn():Boolean { return _loggedIn; }
public function set loggedIn(bool:Boolean) {
_loggedIn = bool;
if(_submitButton != null) _submitButton.visible = _loggedIn;
}
override public function set sharedDispatcher(disp:EventDispatcher) {
// clear listeners
if(_sharedDispatcher != null) {
_sharedDispatcher.removeEventListener(TriviaCallButton.BROADCAST_EVENT,onPopUpRequest);
_sharedDispatcher.removeEventListener(POPUP_SHOWN,onPopUpShown);
}
_sharedDispatcher = disp;
_dispatcherClass = GeneralFunctions.getClassOf(_sharedDispatcher);
// set up listeners
if(_sharedDispatcher != null) {
_sharedDispatcher.addEventListener(TriviaCallButton.BROADCAST_EVENT,onPopUpRequest);
_sharedDispatcher.addEventListener(POPUP_SHOWN,onPopUpShown);
}
}
//----------------------------------------
// PUBLIC METHODS
//----------------------------------------
//----------------------------------------
// PROTECTED METHODS
//----------------------------------------
//----------------------------------------
// PRIVATE METHODS
//----------------------------------------
//----------------------------------------
// EVENT LISTENERS
//----------------------------------------
}
}
| 32.118812
| 91
| 0.567509
|
fb535ef40c010b30fb6569d04f49a635138f93c5
| 2,543
|
as
|
ActionScript
|
Manantiales/FlexManantialesCommon/src/main/flex/mx/ecosur/multigame/manantiales/token/SuggestionToken.as
|
ecosur-sistemas-complejos/MultiGame-Games
|
9f446d0899bb20898a2213512f0d05ba8d1b72a5
|
[
"AFL-3.0"
] | null | null | null |
Manantiales/FlexManantialesCommon/src/main/flex/mx/ecosur/multigame/manantiales/token/SuggestionToken.as
|
ecosur-sistemas-complejos/MultiGame-Games
|
9f446d0899bb20898a2213512f0d05ba8d1b72a5
|
[
"AFL-3.0"
] | 6
|
2020-06-30T23:18:47.000Z
|
2022-02-01T00:58:27.000Z
|
Manantiales/FlexManantialesCommon/src/main/flex/mx/ecosur/multigame/manantiales/token/SuggestionToken.as
|
ecosur-sistemas-complejos/MultiGame-Games
|
9f446d0899bb20898a2213512f0d05ba8d1b72a5
|
[
"AFL-3.0"
] | null | null | null |
//copyright
package mx.ecosur.multigame.manantiales.token
{
import mx.ecosur.multigame.enum.Color;
import mx.ecosur.multigame.manantiales.token.ManantialesToken;
import mx.ecosur.multigame.manantiales.entity.Ficha;
import mx.ecosur.multigame.manantiales.entity.Suggestion;
import mx.ecosur.multigame.manantiales.enum.TokenType;
[ResourceBundle("ManantialesCommon")]
public class SuggestionToken extends ManantialesToken {
private var _suggestion:Suggestion;
public function SuggestionToken (suggestion:Suggestion) {
super();
_tooltip = resourceManager.getString("Manantiales", "manantiales.suggestion")
" [" + suggestion.move + "]";
_suggestion = suggestion;
var destination:Ficha = Ficha(suggestion.move.destinationCell);
switch (destination.type) {
case TokenType.FOREST:
_label = "F";
_type = TokenType.FOREST;
break;
case TokenType.INTENSIVE:
_label = "I";
_type = TokenType.INTENSIVE;
break;
case TokenType.MODERATE:
_label = "M";
_type = TokenType.MODERATE;
break;
case TokenType.SILVOPASTORAL:
_label = "S";
_type = TokenType.SILVOPASTORAL;
break;
case TokenType.VIVERO:
_label = "V";
_type = TokenType.VIVERO;
break;
default:
break;
}
alpha = .45;
}
override public function get colorCode():uint {
var ret:uint = _cell.colorCode;
switch (_suggestion.suggestor.color) {
case Color.BLUE:
ret = 0x0000BB;
break;
case Color.GREEN:
ret = 0x00BB00;
break;
case Color.RED:
ret = 0xBB0000;
break;
case Color.YELLOW:
ret = 0xFFCC00;
break;
default:
break;
}
return ret;
}
override public function stopBlink():void{
if(_blinkAnim.isPlaying){
_blinkAnim.stop();
}
this.alpha = 0.5;
}
}
}
| 30.638554
| 89
| 0.482501
|
08308f67d31fbee0b18e5dfc2caaf068e54b9a4d
| 673
|
as
|
ActionScript
|
fla/org/papervision3d/core/utils/virtualmouse/VirtualMouseMouseEvent.as
|
aidswidjaja/PyongyangRacer
|
6ea17a4c17154964f5a66e32574eb6fa14b90381
|
[
"Apache-2.0"
] | 1
|
2022-01-31T03:14:25.000Z
|
2022-01-31T03:14:25.000Z
|
fla/org/papervision3d/core/utils/virtualmouse/VirtualMouseMouseEvent.as
|
aidswidjaja/PyongyangRacer
|
6ea17a4c17154964f5a66e32574eb6fa14b90381
|
[
"Apache-2.0"
] | 1
|
2022-03-21T01:15:50.000Z
|
2022-03-21T01:15:50.000Z
|
fla/org/papervision3d/core/utils/virtualmouse/VirtualMouseMouseEvent.as
|
aidswidjaja/PyongyangRacer
|
6ea17a4c17154964f5a66e32574eb6fa14b90381
|
[
"Apache-2.0"
] | null | null | null |
package org.papervision3d.core.utils.virtualmouse
{
import flash.display.InteractiveObject;
import flash.events.MouseEvent;
public class VirtualMouseMouseEvent extends MouseEvent implements IVirtualMouseEvent
{
public function VirtualMouseMouseEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:Number = NaN, param5:Number = NaN, param6:InteractiveObject = null, param7:Boolean = false, param8:Boolean = false, param9:Boolean = false, param10:Boolean = false, param11:int = 0)
{
super(param1,param2,param3,param4,param5,param6,param7,param8,param9,param10,param11);
}
}
}
| 42.0625
| 297
| 0.716196
|
edc533fcca4e049b7999777ff7fb2681aa0374cd
| 2,111
|
as
|
ActionScript
|
src/kabam/rotmg/game/view/components/TabTextView.as
|
dot1991/ProdMafia-4
|
6562fa78eaa3f7bb1f077dbf639dac3aba8994cd
|
[
"MIT"
] | null | null | null |
src/kabam/rotmg/game/view/components/TabTextView.as
|
dot1991/ProdMafia-4
|
6562fa78eaa3f7bb1f077dbf639dac3aba8994cd
|
[
"MIT"
] | null | null | null |
src/kabam/rotmg/game/view/components/TabTextView.as
|
dot1991/ProdMafia-4
|
6562fa78eaa3f7bb1f077dbf639dac3aba8994cd
|
[
"MIT"
] | null | null | null |
package kabam.rotmg.game.view.components {
import com.company.ui.BaseSimpleText;
import com.company.util.AssetLibrary;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.geom.ColorTransform;
public class TabTextView extends TabView {
public function TabTextView(param1:int, param2:Sprite, param3:BaseSimpleText) {
super(param1);
this.initBackground(param2);
if (param3) {
this.initTabText(param3);
}
}
private var background:Sprite;
private var text:BaseSimpleText;
private var badgeBG:Bitmap;
private var badgeIcon:Bitmap;
override public function setSelected(param1:Boolean):void {
var _loc2_:ColorTransform = this.background.transform.colorTransform;
_loc2_.color = !!param1 ? 2368034 : 7039594;
this.background.transform.colorTransform = _loc2_;
}
public function setBadge(param1:int):void {
var _loc2_:* = undefined;
if (this.badgeIcon == null) {
this.badgeIcon = new Bitmap();
this.badgeIcon.bitmapData = AssetLibrary.getImageFromSet("lofiInterface", 110);
this.badgeIcon.x = this.x - 10;
this.badgeIcon.y = 5;
_loc2_ = 1.5;
this.badgeIcon.scaleY = _loc2_;
this.badgeIcon.scaleX = _loc2_;
addChild(this.badgeIcon);
this.badgeBG = new Bitmap();
this.badgeBG.bitmapData = AssetLibrary.getImageFromSet("lofiInterface", 110);
this.badgeBG.x = this.x - 12;
this.badgeBG.y = 3;
_loc2_ = 2;
this.badgeBG.scaleY = _loc2_;
this.badgeBG.scaleX = _loc2_;
addChild(this.badgeBG);
}
_loc2_ = param1 > 0;
this.badgeBG.visible = _loc2_;
this.badgeIcon.visible = _loc2_;
}
private function initBackground(param1:Sprite):void {
this.background = param1;
addChild(param1);
}
private function initTabText(param1:BaseSimpleText):void {
this.text = param1;
param1.x = 5;
addChild(param1);
}
}
}
| 31.984848
| 91
| 0.624822
|
3e529f1720dec4788404fa13756d271067b970c0
| 310
|
as
|
ActionScript
|
DataExampleApp/src/events/SiteChangeEvent.as
|
renaun/QNXUIExamples
|
a455f437fba192a9a2725dab34126c486d3a8381
|
[
"MIT"
] | 1
|
2021-01-14T09:25:11.000Z
|
2021-01-14T09:25:11.000Z
|
DataExampleApp/src/events/SiteChangeEvent.as
|
renaun/QNXUIExamples
|
a455f437fba192a9a2725dab34126c486d3a8381
|
[
"MIT"
] | null | null | null |
DataExampleApp/src/events/SiteChangeEvent.as
|
renaun/QNXUIExamples
|
a455f437fba192a9a2725dab34126c486d3a8381
|
[
"MIT"
] | null | null | null |
package events
{
import flash.events.Event;
import vo.SiteVO;
public class SiteChangeEvent extends Event
{
public static var SITE_CHANGE:String = "siteChange";
public function SiteChangeEvent(siteVO:SiteVO)
{
site = siteVO;
super("siteChange", bubbles, cancelable);
}
public var site:SiteVO;
}
}
| 16.315789
| 53
| 0.745161
|
3efb72d8e3102a87151b73ddace7f23d8567db87
| 1,801
|
as
|
ActionScript
|
framework_src/freswift_native_extension/src/com/tuarua/FreSwift.as
|
Klug76/Swift-IOS-ANE
|
198ee21a0bc7037416758b38daef0d8e8225c05a
|
[
"Apache-2.0"
] | 52
|
2017-03-11T14:55:48.000Z
|
2022-03-29T21:14:12.000Z
|
framework_src/freswift_native_extension/src/com/tuarua/FreSwift.as
|
Klug76/Swift-IOS-ANE
|
198ee21a0bc7037416758b38daef0d8e8225c05a
|
[
"Apache-2.0"
] | 21
|
2017-04-04T17:39:27.000Z
|
2022-03-30T13:46:05.000Z
|
framework_src/freswift_native_extension/src/com/tuarua/FreSwift.as
|
Klug76/Swift-IOS-ANE
|
198ee21a0bc7037416758b38daef0d8e8225c05a
|
[
"Apache-2.0"
] | 17
|
2017-09-14T08:10:11.000Z
|
2022-03-16T07:20:19.000Z
|
/*
* Copyright 2017 Tua Rua Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.tuarua {
import flash.events.EventDispatcher;
import flash.external.ExtensionContext;
import flash.system.Capabilities;
public class FreSwift extends EventDispatcher {
private static const NAME:String = "FreSwift";
private static var ctx:ExtensionContext;
public function FreSwift() {
if (Capabilities.os.toLowerCase().indexOf("mac os") == -1) return;
trace("[" + NAME + "] Initalizing ANE...");
try {
ctx = ExtensionContext.createExtensionContext("com.tuarua." + NAME, null);
ctx.call("initFreSwift");
} catch (e:Error) {
trace(e.message);
trace(e.getStackTrace());
trace(e.errorID);
trace(e.name);
trace("[" + NAME + "] ANE Not loaded properly. Future calls will fail.");
}
}
public static function dispose():void {
if (Capabilities.os.toLowerCase().indexOf("mac os") == -1) return;
if (!ctx) {
trace("[" + NAME + "] Error. ANE Already in a disposed or failed state...");
return;
}
trace("[" + NAME + "] Unloading ANE...");
ctx.dispose();
ctx = null;
}
}
}
| 32.745455
| 88
| 0.622432
|
454701231a896b6dc285c6f55a8bbe39f79326e1
| 1,853
|
as
|
ActionScript
|
src/helloWorld/commandHandlers/DeleteStringCommandHandler.as
|
CadetEditor/CoreEditor-HelloWorld-Example-as
|
f0ecf9941bd026c989fd0b4ab758a20e32585365
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2021-01-06T19:52:05.000Z
|
2021-01-06T19:52:05.000Z
|
src/helloWorld/commandHandlers/DeleteStringCommandHandler.as
|
CadetEditor/CoreEditor-HelloWorld-Example-as
|
f0ecf9941bd026c989fd0b4ab758a20e32585365
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
src/helloWorld/commandHandlers/DeleteStringCommandHandler.as
|
CadetEditor/CoreEditor-HelloWorld-Example-as
|
f0ecf9941bd026c989fd0b4ab758a20e32585365
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2018-06-29T06:46:09.000Z
|
2018-06-29T06:46:09.000Z
|
package helloWorld.commandHandlers
{
import core.app.operations.ChangePropertyOperation;
import core.app.operations.RemoveItemOperation;
import core.app.operations.UndoableCompoundOperation;
import core.appEx.core.commandHandlers.ICommandHandler;
import core.editor.CoreEditor;
import helloWorld.contexts.StringListContext;
public class DeleteStringCommandHandler implements ICommandHandler
{
public function DeleteStringCommandHandler()
{
}
public function execute(parameters:Object):void
{
// Grab a reference to the Context we're interested in
var context:StringListContext = CoreEditor.contextManager.getLatestContextOfType(StringListContext);
// Because we could be deleting multiple items, it's worth creating a CompoundOperation.
// Even though we add each individual 'RemoveItemOperation' to this compound, removing
// all these items will be seen as a single Operation, and so calling the UNDO Command
// will add all the items back in one go.
var compoundOperation:UndoableCompoundOperation = new UndoableCompoundOperation();
compoundOperation.label = "Delete Item(s)";
var selectedItems:Array = context.selection.source;
for each ( var item:String in selectedItems )
{
var removeItemOperation:RemoveItemOperation = new RemoveItemOperation( item, context.dataProvider );
compoundOperation.addOperation(removeItemOperation);
}
// Even though we have removed the items from the dataProvider, the Context's selection still contains them.
// We need to make sure that the Context's selection is set to [].
var clearSelectionOperation:ChangePropertyOperation = new ChangePropertyOperation( context.selection, "source", [] );
compoundOperation.addOperation(clearSelectionOperation);
context.operationManager.addOperation(compoundOperation);
}
}
}
| 42.113636
| 120
| 0.781975
|
a0401895dc742f5c097870bd80cd4f1a3f099769
| 14,807
|
as
|
ActionScript
|
src/org/flexlite/domUI/managers/impl/ToolTipManagerImpl.as
|
grandracer/framework
|
727151ec8913044417e473912bce59aeeaa854b3
|
[
"MIT"
] | null | null | null |
src/org/flexlite/domUI/managers/impl/ToolTipManagerImpl.as
|
grandracer/framework
|
727151ec8913044417e473912bce59aeeaa854b3
|
[
"MIT"
] | null | null | null |
src/org/flexlite/domUI/managers/impl/ToolTipManagerImpl.as
|
grandracer/framework
|
727151ec8913044417e473912bce59aeeaa854b3
|
[
"MIT"
] | null | null | null |
package org.flexlite.domUI.managers.impl
{
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.utils.Timer;
import flash.utils.getQualifiedClassName;
import org.flexlite.domCore.dx_internal;
import org.flexlite.domUI.components.ToolTip;
import org.flexlite.domUI.core.DomGlobals;
import org.flexlite.domUI.core.IContainer;
import org.flexlite.domUI.core.IInvalidating;
import org.flexlite.domUI.core.IToolTip;
import org.flexlite.domUI.core.IUIComponent;
import org.flexlite.domUI.core.IVisualElementContainer;
import org.flexlite.domUI.core.PopUpPosition;
import org.flexlite.domUI.events.ToolTipEvent;
import org.flexlite.domUI.managers.ILayoutManagerClient;
import org.flexlite.domUI.managers.ISystemManager;
import org.flexlite.domUI.managers.IToolTipManager;
import org.flexlite.domUI.managers.IToolTipManagerClient;
import org.flexlite.domUtils.SharedMap;
use namespace dx_internal;
[ExcludeClass]
/**
* 工具提示管理器实现类
* @author DOM
*/
public class ToolTipManagerImpl implements IToolTipManager
{
/**
* 构造函数
*/
public function ToolTipManagerImpl()
{
super();
}
/**
* 初始化完成的标志
*/
private var initialized:Boolean = false;
/**
* 用于鼠标经过一个对象后计时一段时间开始显示ToolTip
*/
private var showTimer:Timer;
/**
* 用于ToolTip显示后计时一段时间自动隐藏。
*/
private var hideTimer:Timer;
/**
* 用于当已经显示了一个ToolTip,鼠标快速经过多个显示对象时立即切换显示ToolTip。
*/
private var scrubTimer:Timer;
/**
* 当前的toolTipData
*/
private var currentTipData:Object;
/**
* 上一个ToolTip显示对象
*/
private var previousTarget:IToolTipManagerClient;
private var _currentTarget:IToolTipManagerClient;
/**
* 当前的IToolTipManagerClient组件
*/
public function get currentTarget():IToolTipManagerClient
{
return _currentTarget;
}
public function set currentTarget(value:IToolTipManagerClient):void
{
_currentTarget = value;
}
private var _currentToolTip:DisplayObject;
/**
* 当前的ToolTip显示对象;如果未显示ToolTip,则为 null。
*/
public function get currentToolTip():IToolTip
{
return _currentToolTip as IToolTip;
}
public function set currentToolTip(value:IToolTip):void
{
_currentToolTip = value as DisplayObject;
}
private var _enabled:Boolean = true;
/**
* 如果为 true,则当用户将鼠标指针移至组件上方时,ToolTipManager 会自动显示工具提示。
* 如果为 false,则不会显示任何工具提示。
*/
public function get enabled():Boolean
{
return _enabled;
}
public function set enabled(value:Boolean):void
{
if(_enabled==value)
return;
_enabled = value;
if(!_enabled&¤tTarget)
{
currentTarget = null;
targetChanged();
previousTarget = currentTarget;
}
}
private var _hideDelay:Number = 10000;
/**
* 自工具提示出现时起,ToolTipManager要隐藏此提示前所需等待的时间量(以毫秒为单位)。默认值:10000。
*/
public function get hideDelay():Number
{
return _hideDelay;
}
public function set hideDelay(value:Number):void
{
_hideDelay = value;
}
private var _scrubDelay:Number = 100;
/**
* 当第一个ToolTip显示完毕后,若在此时间间隔内快速移动到下一个组件上,就直接显示ToolTip而不延迟一段时间。默认值:100。
*/
public function get scrubDelay():Number
{
return _scrubDelay;
}
public function set scrubDelay(value:Number):void
{
_scrubDelay = value;
}
private var _showDelay:Number = 200;
/**
* 当用户将鼠标移至具有工具提示的组件上方时,等待 ToolTip框出现所需的时间(以毫秒为单位)。
* 若要立即显示ToolTip框,请将toolTipShowDelay设为0。默认值:200。
*/
public function get showDelay():Number
{
return _showDelay;
}
public function set showDelay(value:Number):void
{
_showDelay = value;
}
private var _toolTipClass:Class = ToolTip;
/**
* 全局默认的创建工具提示要用到的类。
*/
public function get toolTipClass():Class
{
return _toolTipClass;
}
public function set toolTipClass(value:Class):void
{
_toolTipClass = value;
}
/**
* 初始化
*/
private function initialize():void
{
if (!showTimer)
{
showTimer = new Timer(0, 1);
showTimer.addEventListener(TimerEvent.TIMER,
showTimer_timerHandler);
}
if (!hideTimer)
{
hideTimer = new Timer(0, 1);
hideTimer.addEventListener(TimerEvent.TIMER,
hideTimer_timerHandler);
}
if (!scrubTimer)
scrubTimer = new Timer(0, 1);
initialized = true;
}
/**
* 注册需要显示ToolTip的组件
* @param target 目标组件
* @param oldToolTip 之前的ToolTip数据
* @param newToolTip 现在的ToolTip数据
*/
public function registerToolTip(target:DisplayObject,
oldToolTip:Object,
newToolTip:Object):void
{
var hasOld:Boolean = oldToolTip!=null&&oldToolTip!="";
var hasNew:Boolean = newToolTip!=null&&newToolTip!="";
if (!hasOld && hasNew)
{
target.addEventListener(MouseEvent.MOUSE_OVER,
toolTipMouseOverHandler);
target.addEventListener(MouseEvent.MOUSE_OUT,
toolTipMouseOutHandler);
if (mouseIsOver(target))
showImmediately(target);
}
else if (hasOld&&!hasNew)
{
target.removeEventListener(MouseEvent.MOUSE_OVER,
toolTipMouseOverHandler);
target.removeEventListener(MouseEvent.MOUSE_OUT,
toolTipMouseOutHandler);
if (mouseIsOver(target))
hideImmediately(target);
}
else if(hasNew&¤tToolTip&¤tTarget===target)
{
currentTipData = newToolTip;
initializeTip();
}
}
/**
* 检测鼠标是否处于目标对象上
*/
private function mouseIsOver(target:DisplayObject):Boolean
{
if (!target || !target.stage)
return false;
if ((target.stage.mouseX == 0) && (target.stage.mouseY == 0))
return false;
if (target is ILayoutManagerClient && !ILayoutManagerClient(target).initialized)
return false;
return target.hitTestPoint(target.stage.mouseX,
target.stage.mouseY, true);
}
/**
* 立即显示ToolTip标志
*/
private var showImmediatelyFlag:Boolean = false;
/**
* 立即显示目标组件的ToolTip
*/
private function showImmediately(target:DisplayObject):void
{
showImmediatelyFlag = true;
checkIfTargetChanged(target);
showImmediatelyFlag = false;
}
/**
* 立即隐藏目标组件的ToolTip
*/
private function hideImmediately(target:DisplayObject):void
{
checkIfTargetChanged(null);
}
/**
* 检查当前的鼠标下的IToolTipManagerClient组件是否发生改变
*/
private function checkIfTargetChanged(displayObject:DisplayObject):void
{
if (!enabled)
return;
findTarget(displayObject);
if (currentTarget != previousTarget)
{
targetChanged();
previousTarget = currentTarget;
}
}
/**
* 向上遍历查询,直到找到第一个当前鼠标下的IToolTipManagerClient组件。
*/
private function findTarget(displayObject:DisplayObject):void
{
while (displayObject)
{
if (displayObject is IToolTipManagerClient)
{
currentTipData = IToolTipManagerClient(displayObject).toolTip;
if (currentTipData != null)
{
currentTarget = displayObject as IToolTipManagerClient;
return;
}
}
displayObject = displayObject.parent;
}
currentTipData = null;
currentTarget = null;
}
/**
* 当前的IToolTipManagerClient组件发生改变
*/
private function targetChanged():void
{
if (!initialized)
initialize()
var event:ToolTipEvent;
if (previousTarget && currentToolTip)
{
event = new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
event.toolTip = currentToolTip;
previousTarget.dispatchEvent(event);
}
reset();
if (currentTarget)
{
if (!currentTipData)
return;
if (_showDelay==0||showImmediatelyFlag||scrubTimer.running)
{
createTip();
initializeTip();
positionTip();
showTip();
}
else
{
showTimer.delay = _showDelay;
showTimer.start();
}
}
}
/**
* toolTip实例缓存表
*/
private var toolTipCacheMap:SharedMap = new SharedMap;
/**
* 创建ToolTip显示对象
*/
private function createTip():void
{
var tipClass:Class = currentTarget.toolTipClass;
if(!tipClass)
{
tipClass = toolTipClass;
}
var key:String = getQualifiedClassName(tipClass);
currentToolTip = toolTipCacheMap.get(key);
if(!currentToolTip)
{
currentToolTip = new tipClass();
toolTipCacheMap.set(key,currentToolTip);
if(currentToolTip is InteractiveObject)
InteractiveObject(currentToolTip).mouseEnabled = false;
if(currentToolTip is DisplayObjectContainer)
DisplayObjectContainer(currentToolTip).mouseChildren = false;
}
toolTipContainer.addElement(currentToolTip);
}
/**
* 获取工具提示弹出层
*/
private function get toolTipContainer():IContainer
{
var sm:ISystemManager;
if(_currentTarget is IUIComponent)
sm = IUIComponent(_currentTarget).systemManager;
if(!sm)
sm = DomGlobals.systemManager;
return sm.toolTipContainer;
}
/**
* 初始化ToolTip显示对象
*/
private function initializeTip():void
{
currentToolTip.toolTipData = currentTipData;
if (currentToolTip is IInvalidating)
IInvalidating(currentToolTip).validateNow();
}
/**
* 设置ToolTip位置
*/
private function positionTip():void
{
var x:Number;
var y:Number;
var sm:DisplayObjectContainer = currentToolTip.parent;
var toolTipWidth:Number = currentToolTip.layoutBoundsWidth;
var toolTipHeight:Number = currentToolTip.layoutBoundsHeight;
var rect:Rectangle = DisplayObject(currentTarget).getRect(sm);
var centerX:Number = rect.left+(rect.width - toolTipWidth)*0.5;
var centetY:Number = rect.top+(rect.height - toolTipHeight)*0.5;
switch(currentTarget.toolTipPosition)
{
case PopUpPosition.BELOW:
x = centerX;
y = rect.bottom;
break;
case PopUpPosition.ABOVE:
x = centerX;
y = rect.top-toolTipHeight;
break;
case PopUpPosition.LEFT:
x = rect.left-toolTipWidth;
y = centetY;
break;
case PopUpPosition.RIGHT:
x = rect.right;
y = centetY;
break;
case PopUpPosition.CENTER:
x = centerX;
y = centetY;
break;
case PopUpPosition.TOP_LEFT:
x = rect.left;
y = rect.top;
break;
default:
x = sm.mouseX + 10;
y = sm.mouseY + 20;
break;
}
var offset:Point = currentTarget.toolTipOffset;
if(offset)
{
x += offset.x;
y = offset.y;
}
var screenWidth:Number = sm.width;
var screenHeight:Number = sm.height;
if (x + toolTipWidth > screenWidth)
x = screenWidth - toolTipWidth;
if (y + toolTipHeight > screenHeight)
y = screenHeight - toolTipHeight;
if(x<0)
x = 0;
if(y<0)
y = 0;
currentToolTip.x = x;
currentToolTip.y = y;
}
/**
* 显示ToolTip
*/
private function showTip():void
{
var event:ToolTipEvent =
new ToolTipEvent(ToolTipEvent.TOOL_TIP_SHOW);
event.toolTip = currentToolTip;
currentTarget.dispatchEvent(event);
DomGlobals.stage.addEventListener(MouseEvent.MOUSE_DOWN,
stage_mouseDownHandler);
if (_hideDelay == 0)
{
hideTip();
}
else if (_hideDelay < Infinity)
{
hideTimer.delay = _hideDelay;
hideTimer.start();
}
}
/**
* 隐藏ToolTip
*/
private function hideTip():void
{
if (previousTarget&¤tToolTip)
{
var event:ToolTipEvent =
new ToolTipEvent(ToolTipEvent.TOOL_TIP_HIDE);
event.toolTip = currentToolTip;
previousTarget.dispatchEvent(event);
}
if (previousTarget)
{
DomGlobals.stage.removeEventListener(MouseEvent.MOUSE_DOWN,
stage_mouseDownHandler);
}
reset();
}
/**
* 移除当前的ToolTip对象并重置所有计时器。
*/
private function reset():void
{
showTimer.reset();
hideTimer.reset();
if(currentToolTip)
{
var tipParent:DisplayObjectContainer = currentToolTip.parent;
if(tipParent is IVisualElementContainer)
IVisualElementContainer(tipParent).removeElement(currentToolTip);
else if(tipParent)
tipParent.removeChild(_currentToolTip);
currentToolTip = null;
scrubTimer.delay = scrubDelay;
scrubTimer.reset();
if (scrubDelay > 0)
{
scrubTimer.delay = scrubDelay;
scrubTimer.start();
}
}
}
/**
* 使用指定的ToolTip数据,创建默认的ToolTip类的实例,然后在舞台坐标中的指定位置显示此实例。
* 保存此方法返回的对 ToolTip 的引用,以便将其传递给destroyToolTip()方法销毁实例。
* @param toolTipData ToolTip数据
* @param x 舞台坐标x
* @param y 舞台坐标y
* @return 创建的ToolTip实例引用
*/
public function createToolTip(toolTipData:String, x:Number, y:Number):IToolTip
{
var toolTip:IToolTip = new toolTipClass() as IToolTip;
toolTipContainer.addElement(toolTip);
toolTip.toolTipData = toolTipData;
if (currentToolTip is IInvalidating)
IInvalidating(currentToolTip).validateNow();
var pos:Point = toolTip.parent.globalToLocal(new Point(x,y));
toolTip.x = pos.x;
toolTip.y = pos.y;
return toolTip;
}
/**
* 销毁由createToolTip()方法创建的ToolTip实例。
* @param toolTip 要销毁的ToolTip实例
*/
public function destroyToolTip(toolTip:IToolTip):void
{
var tipParent:DisplayObjectContainer = toolTip.parent;
if(tipParent is IVisualElementContainer)
IVisualElementContainer(tipParent).removeElement(toolTip);
else if(tipParent&&toolTip is DisplayObject)
tipParent.removeChild(toolTip as DisplayObject);
}
/**
* 鼠标经过IToolTipManagerClient组件
*/
private function toolTipMouseOverHandler(event:MouseEvent):void
{
checkIfTargetChanged(DisplayObject(event.target));
}
/**
* 鼠标移出IToolTipManagerClient组件
*/
private function toolTipMouseOutHandler(event:MouseEvent):void
{
checkIfTargetChanged(event.relatedObject);
}
/**
* 显示ToolTip的计时器触发。
*/
private function showTimer_timerHandler(event:TimerEvent):void
{
if (currentTarget)
{
createTip();
initializeTip();
positionTip();
showTip();
}
}
/**
* 隐藏ToolTip的计时器触发
*/
private function hideTimer_timerHandler(event:TimerEvent):void
{
hideTip();
}
/**
* 舞台上按下鼠标
*/
private function stage_mouseDownHandler(event:MouseEvent):void
{
reset();
}
}
}
| 23.92084
| 84
| 0.649895
|
745cbd0168a7c06dfea8a64b88e2bc2298a855c7
| 4,906
|
as
|
ActionScript
|
YCanvasMapLibrary/src/main/actionscript/sk/yoz/ycanvas/map/managers/MouseTransformationManager.as
|
marcusbrose/YCanvas
|
149a2e88160168b220f313192bc441d047276710
|
[
"MIT"
] | 39
|
2015-01-21T11:20:53.000Z
|
2021-09-10T17:59:58.000Z
|
YCanvasMapLibrary/src/main/actionscript/sk/yoz/ycanvas/map/managers/MouseTransformationManager.as
|
rozdonmobile/YCanvas
|
6aada50d8c4c7d6f9739de6de81194379569b383
|
[
"MIT"
] | 5
|
2015-07-17T17:43:27.000Z
|
2019-04-30T17:19:59.000Z
|
YCanvasMapLibrary/src/main/actionscript/sk/yoz/ycanvas/map/managers/MouseTransformationManager.as
|
rozdonmobile/YCanvas
|
6aada50d8c4c7d6f9739de6de81194379569b383
|
[
"MIT"
] | 19
|
2015-01-21T13:18:24.000Z
|
2021-09-10T17:59:59.000Z
|
package sk.yoz.ycanvas.map.managers
{
import flash.display.Stage;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.geom.Point;
import sk.yoz.ycanvas.map.YCanvasMap;
import sk.yoz.ycanvas.map.valueObjects.Limit;
import starling.core.Starling;
/**
* Transformation manager implementation for mouse interactions.
*/
public class MouseTransformationManager extends AbstractTransformationManager
{
private var last:Point;
public function MouseTransformationManager(canvas:YCanvasMap,
limit:Limit, transitionDuration:Number=.5)
{
super(canvas, limit, transitionDuration);
}
override public function dispose():void
{
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onStageMouseWheel);
super.dispose();
}
override public function set allowMove(value:Boolean):void
{
if(allowMove == value)
return;
super.allowMove = value
if(allowMove)
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageMouseDown);
else
stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageMouseDown);
}
override public function set allowZoom(value:Boolean):void
{
if(allowZoom == value)
return;
super.allowZoom = value;
if(allowZoom)
stage.addEventListener(MouseEvent.MOUSE_WHEEL, onStageMouseWheel);
else
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onStageMouseWheel);
}
override protected function set allowInteractions(value:Boolean):void
{
if(allowInteractions == value)
return;
super.allowInteractions = value;
if(allowInteractions)
stage.addEventListener(Event.MOUSE_LEAVE, onStageMouseLeave);
else
stage.removeEventListener(Event.MOUSE_LEAVE, onStageMouseLeave);
}
private function get stage():Stage
{
return Starling.current.nativeStage;
}
private function get globalPointInTweenTarget():Point
{
var targetCenter:Point =
new Point(transformationTarget.centerX, transformationTarget.centerY);
var globalPoint:Point = new Point(stage.mouseX, stage.mouseY);
var point:Point = controller.globalToViewPort(globalPoint);
var matrix:Matrix = controller.getConversionMatrix(
targetCenter,
transformationTarget.scale,
transformationTarget.rotation, controller.viewPort);
matrix.invert();
return matrix.transformPoint(point);
}
private function get globalPointOnCanvas():Point
{
return controller.globalToCanvas(new Point(stage.mouseX, stage.mouseY));
}
private function hitTest(x:Number, y:Number):Boolean
{
return controller.hitTestComponent(x, y);
}
override protected function stop():void
{
super.stop();
stage.removeEventListener(MouseEvent.MOUSE_UP, onStageMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onStageMouseMove);
}
private function onStageMouseDown(event:MouseEvent):void
{
if(!hitTest(event.stageX, event.stageY))
return;
last = globalPointInTweenTarget;
stage.addEventListener(MouseEvent.MOUSE_UP, onStageMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, onStageMouseMove);
}
private function onStageMouseMove(event:MouseEvent):void
{
var current:Point = globalPointInTweenTarget;
moveByTween(last.x - current.x, last.y - current.y);
last = globalPointInTweenTarget;
}
private function onStageMouseUp(event:MouseEvent):void
{
stop();
}
private function onStageMouseWheel(event:MouseEvent):void
{
if(!hitTest(event.stageX, event.stageY))
return;
const step:Number = 1.25;
var delta:Number = event.delta < 0 ? 1 / step : step;
var point:Point = globalPointOnCanvas;
point.x = limitCenterX(point.x);
point.y = limitCenterY(point.y);
scaleByTween(delta, point);
}
private function onStageMouseLeave(event:Event):void
{
stop();
}
}
}
| 33.60274
| 86
| 0.578272
|
68ce4e39f25f208f30b918c0cd2a2561ff3c6f00
| 160
|
as
|
ActionScript
|
test/issues/Issue69.as
|
prominic/as3hx-forked-for-moonshine-ide
|
902c7c13571ee901f70af97073e01abe9bbc0629
|
[
"MIT"
] | 132
|
2015-01-12T17:23:45.000Z
|
2022-03-20T20:41:08.000Z
|
test/issues/Issue69.as
|
prominic/as3hx-forked-for-moonshine-ide
|
902c7c13571ee901f70af97073e01abe9bbc0629
|
[
"MIT"
] | 197
|
2015-01-12T17:11:47.000Z
|
2021-11-08T23:10:05.000Z
|
test/issues/Issue69.as
|
prominic/as3hx-forked-for-moonshine-ide
|
902c7c13571ee901f70af97073e01abe9bbc0629
|
[
"MIT"
] | 48
|
2015-01-26T10:16:40.000Z
|
2022-03-16T11:28:35.000Z
|
package {
public class Issue69 {
public function Issue69() {
var s:String = "";
var c:String = s.charAt();
}
}
}
| 20
| 38
| 0.45625
|
17ae20503d330ffdd38a273d4650234941fb62af
| 3,745
|
as
|
ActionScript
|
src/breezetest/BreezeTest.as
|
GetBreeze/breeze-test
|
76fc73fb88575062397b4d9297ee62d63d75cb90
|
[
"MIT"
] | 14
|
2017-01-06T20:22:43.000Z
|
2021-12-20T02:21:23.000Z
|
src/breezetest/BreezeTest.as
|
GetBreeze/breeze-test
|
76fc73fb88575062397b4d9297ee62d63d75cb90
|
[
"MIT"
] | null | null | null |
src/breezetest/BreezeTest.as
|
GetBreeze/breeze-test
|
76fc73fb88575062397b4d9297ee62d63d75cb90
|
[
"MIT"
] | 2
|
2017-09-29T00:03:03.000Z
|
2019-11-03T19:56:34.000Z
|
/*
* MIT License
*
* Copyright (c) 2017 Digital Strawberry LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*/
package breezetest
{
import flash.display.DisplayObject;
import flash.events.EventDispatcher;
import flash.events.UncaughtErrorEvents;
public class BreezeTest extends EventDispatcher
{
public static const VERSION:String = "1.0.0";
private var _testSuites:Array = [];
private var _index:int = 0;
private var _runner:TestSuiteRunner;
private var _result:BreezeTestResult;
private var _uncaughtErrorEvents:UncaughtErrorEvents;
// You can override the BreezeTestOutput class to provide your own output format
public var output:BreezeTestOutput = new BreezeTestOutput();
public function BreezeTest(root:DisplayObject):void
{
super();
if(root == null)
{
throw new ArgumentError("Parameter root cannot be null.");
}
_uncaughtErrorEvents = root.loaderInfo.uncaughtErrorEvents;
}
public function add(value:*):void
{
if(value is Array)
{
for each(var obj:* in value)
{
add(obj);
}
}
else if(value is Class)
{
_testSuites.push(value);
}
else
{
throw new ArgumentError('Invalid arguments, must be an array of classes or a single class');
}
}
public function run():void
{
output.testSuitesStart(this);
_result = new BreezeTestResult();
next();
}
private function next():void
{
if(_index >= _testSuites.length)
{
testsComplete();
return;
}
var testClass:Class = _testSuites[_index++] as Class;
_runner = new TestSuiteRunner(new testClass(), _uncaughtErrorEvents);
_runner.addEventListener(TestSuiteRunnerEvent.TEST_METHOD_START, testMethodStart);
_runner.addEventListener(TestSuiteRunnerEvent.TEST_METHOD_END, testMethodEnd);
_runner.addEventListener(TestSuiteRunnerEvent.TEST_CLASS_END, testSuiteEnd);
output.testSuiteStart(_runner);
_runner.run();
}
private function testSuiteEnd(event:TestSuiteRunnerEvent):void
{
output.testSuiteEnd(event.testRunner);
_result.testSuiteResults.push(event.testRunner.result);
next();
}
private function testMethodStart(event:TestSuiteRunnerEvent):void
{
output.testMethodStart(event.testRunner, event.result);
}
private function testMethodEnd(event:TestSuiteRunnerEvent):void
{
output.testMethodEnd(event.testRunner, event.result);
}
private function testsComplete():void
{
output.testSuitesEnd(this);
dispatchEvent(new BreezeTestEvent(BreezeTestEvent.TESTS_COMPLETE, this));
}
public function get result():BreezeTestResult
{
return _result;
}
public function get success():Boolean
{
return _result.passed;
}
}
}
| 24.966667
| 96
| 0.731909
|
d70f94292a4b9bd593d34e9aff8ec48e383cad77
| 13,339
|
as
|
ActionScript
|
src/main/actionscript/org/as3commons/logging/api/ILogger.as
|
vpmedia/vpmedia-as3
|
7bf2f410181b8c59e9b5dd3fdf6e62cdd9f9ae18
|
[
"MIT"
] | 1
|
2019-03-06T03:18:23.000Z
|
2019-03-06T03:18:23.000Z
|
src/main/actionscript/org/as3commons/logging/api/ILogger.as
|
vpmedia/vpmedia-as3
|
7bf2f410181b8c59e9b5dd3fdf6e62cdd9f9ae18
|
[
"MIT"
] | null | null | null |
src/main/actionscript/org/as3commons/logging/api/ILogger.as
|
vpmedia/vpmedia-as3
|
7bf2f410181b8c59e9b5dd3fdf6e62cdd9f9ae18
|
[
"MIT"
] | null | null | null |
/*
* Copyright (c) 2008-2009 the original author or authors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.as3commons.logging.api {
/**
* A <code>ILogger</code> defines the public access for any kind of logging
* request.
*
* <p><code>ILogger</code> offers the common methods to log your traces like
* <code>debug</code>, <code>info</code>, <code>warning</code>, <code>error</code>,
* <code>fatal</code>. Each of these methods gets treated separately by the
* logging framework.</p>
*
* <p>The message statements allow the use of parameters. Using the parameter
* is actually more efficient than using <code>String</code> concatination.</p>
*
* <listing>
* logger.info( "{x}x{y}", this ); // good
* logger.info( this.x+"x"+this.y ); // bad
* </listing>
*
* <p>Parameters are indicated by two curly braces <code>{}</code>. If it contains
* no property then the parameter will be used.</p>
*
* <listing>
* logger.info( "{}", this ); // this.toString();
* </listing>
*
* <p>It is possible to adress deep properties too:</p>
* <listing>
* logger.info( "{a.b}", {a:{b:"Hello World"}} ); // "Hello World"
* </listing>
*
* <p><b>Performance Note:</b> If you have a log statement that does intense
* processing or intense stringification it will be executed no matter if a log
* target is actually in place.</p>
*
* <listing>
* // This will call the complexStringifcation no matter if it will do actually
* // something.
* logger.info( complexStringification() );
*
* if( logger.infoEnabled ) {
* // will just call the stringification in case the info is enabled
* logger.info( complexStringification() );
* }
* </listing>
*
* @author Martin Heidegger
* @since 3
* @see LoggerFactory
* @see org.as3commons.logging.api#getLogger()
* @see org.as3commons.logging.api#getNamedLogger()
*/
public interface ILogger {
/**
* The name of this <code>ILogger</code>.
*/
function get name():String;
/**
* The short form of the name.
*
* <p>The name of a <code>ILogger</code> is usually [package].[class]. The
* short name contains only the name of [class], in other words: the content
* after the last ".".</p>
*
* @example If the name is <code>com.some.MyClass</code> then the short
* name is <code>MyClass</code>.
* @see #name
*/
function get shortName():String
/**
* Returns the person that this logger created.
*
* <p>For person based log statements loggers contain a optional information
* that can be used to filter for persons that created the logggers</p>
*
* <p>Can be <code>null</code></p>
*/
function get person():String;
/**
* The context in which the this logger was called.
*
* <p>To be used for inheritance based design. If you want to differenciate
* between where it is written and where it is called.</p>
*
* <p>Can be <code>null</code></p>
*/
function get context(): String;
/**
* Returns the short form of the context.
*
* <p>The context of a <code>ILogger</code> is usually [package].[class]. The
* short name contains only the name of [class], in other words: the content
* after the last ".".</p>
*
* @example If the context is <code>com.some.MyClass</code> then the short
* name is <code>MyClass</code>.
*
* @return short form of the context.
* @see #context
*/
function get shortContext(): String;
/**
* Logs a message for debug purposes.
*
* <p>Debug messages should be messages that ease the debugging of an
* application.</p>
*
* <p>A message can contain multiple placeholder that are filled with
* the parameter.</p>
* <listing>
* logger.debug("Hello {}", "Hello"); // Hello World
* logger.debug("{} {}", "A"); // A A
* </listing>
*
* <p>The parameter can also reference to the properties of the parameter.</p>
* <listing>
* logger.debug("{0} {1}", ["Hello", "World"]); // Hello World
* logger.debug("{a} {b}", {a:"Hello", b:"World"}); // Hello Hello
* </listing>
*
* <p>Deep inspection also works as reference definition.</p>
* <listing>
* logger.debug("{a.b} {a.c}", {a:{b:"Hello", c:"World"}}); // Hello World
* </listing>
*
* <p>Without a parameter passed in the message will be used as parameter.</p>
* <listing>
* logger.debug({hello:"world"});
* logger.debug("{}", {hello:"world"}); // Both calls are equal!
* </listing>
*
* <p>If both the message and the parameter is available then the String
* representation of the message is used. This is important for some intelligent
* .toString operations (that create log statements)</p>
* <listing>
* logger.debug({}, {hello:"world"});
* logger.debug({}.toString(), {hello:"world"}); // Both calls are equal!
* </listing>
*
* @param message Message that should be logged.
* @param parameter Parameter to be used for inspection.
*/
function debug(message:*, parameter:*=null):void;
/**
* Logs a message for notification purposes.
*
* <p>Notification messages should be messages that highlight interesting
* informations about what happens in the the application.</p>
*
* <p>A message can contain multiple placeholder that are filled with
* the parameter.</p>
* <listing>
* logger.info("Hello {}", "Hello"); // Hello World
* logger.info("{} {}", "A"); // A A
* </listing>
*
* <p>The parameter can also reference to the properties of the parameter.</p>
* <listing>
* logger.info("{0} {1}", ["Hello", "World"]); // Hello World
* logger.info("{a} {b}", {a:"Hello", b:"World"}); // Hello Hello
* </listing>
*
* <p>Deep inspection also works as reference definition.</p>
* <listing>
* logger.info("{a.b} {a.c}", {a:{b:"Hello", c:"World"}}); // Hello World
* </listing>
*
* <p>Without a parameter passed in the message will be used as parameter.</p>
* <listing>
* logger.info({hello:"world"});
* logger.info("{}", {hello:"world"}); // Both calls are equal!
* </listing>
*
* <p>If both the message and the parameter is available then the String
* representation of the message is used. This is important for some intelligent
* .toString operations (that create log statements)</p>
* <listing>
* logger.info({}, {hello:"world"});
* logger.info({}.toString(), {hello:"world"}); // Both calls are equal!
* </listing>
*
* @param message Message that should be logged.
* @param parameter Parameter to be used for inspection.
*/
function info(message:*, parameter:*=null):void;
/**
* Logs a message for warning about a undesirable application state.
*
* <p>A message can contain multiple placeholder that are filled with
* the parameter.</p>
* <listing>
* logger.warn("Hello {}", "Hello"); // Hello World
* logger.warn("{} {}", "A"); // A A
* </listing>
*
* <p>The parameter can also reference to the properties of the parameter.</p>
* <listing>
* logger.warn("{0} {1}", ["Hello", "World"]); // Hello World
* logger.warn("{a} {b}", {a:"Hello", b:"World"}); // Hello Hello
* </listing>
*
* <p>Deep inspection also works as reference definition.</p>
* <listing>
* logger.warn("{a.b} {a.c}", {a:{b:"Hello", c:"World"}}); // Hello World
* </listing>
*
* <p>Without a parameter passed in the message will be used as parameter.</p>
* <listing>
* logger.warn({hello:"world"});
* logger.warn("{}", {hello:"world"}); // Both calls are equal!
* </listing>
*
* <p>If both the message and the parameter is available then the String
* representation of the message is used. This is important for some intelligent
* .toString operations (that create log statements)</p>
* <listing>
* logger.warn({}, {hello:"world"});
* logger.warn({}.toString(), {hello:"world"}); // Both calls are equal!
* </listing>
*
* @param message Message that should be logged.
* @param parameter Parameter to be used for inspection.
*/
function warn(message:*, parameter:*=null):void;
/**
* Logs a message to notify about an error that was dodged by the application.
*
* <p>The Error level is designated to be used in case an error occurred
* and the error could be dodged. It should contain hints about why
* that error occurs and if there is a common case where this error occurs.</p>
*
* <p>A message can contain multiple placeholder that are filled with
* the parameter.</p>
* <listing>
* logger.error("Hello {}", "Hello"); // Hello World
* logger.error("{} {}", "A"); // A A
* </listing>
*
* <p>The parameter can also reference to the properties of the parameter.</p>
* <listing>
* logger.error("{0} {1}", ["Hello", "World"]); // Hello World
* logger.error("{a} {b}", {a:"Hello", b:"World"}); // Hello Hello
* </listing>
*
* <p>Deep inspection also works as reference definition.</p>
* <listing>
* logger.error("{a.b} {a.c}", {a:{b:"Hello", c:"World"}}); // Hello World
* </listing>
*
* <p>Without a parameter passed in the message will be used as parameter.</p>
* <listing>
* logger.error({hello:"world"});
* logger.error("{}", {hello:"world"}); // Both calls are equal!
* </listing>
*
* <p>If both the message and the parameter is available then the String
* representation of the message is used. This is important for some intelligent
* .toString operations (that create log statements)</p>
* <listing>
* logger.error({}, {hello:"world"});
* logger.error({}.toString(), {hello:"world"}); // Both calls are equal!
* </listing>
*
* @param message Message that should be logged.
* @param parameter Parameter to be used for inspection.
*/
function error(message:*, parameter:*=null):void;
/**
* Logs a message to notify about an error that broke the application and
* couldn't be fixed automatically.
*
* <p>A message can contain multiple placeholder that are filled with
* the parameter.</p>
* <listing>
* logger.fatal("Hello {}", "Hello"); // Hello World
* logger.fatal("{} {}", "A"); // A A
* </listing>
*
* <p>The parameter can also reference to the properties of the parameter.</p>
* <listing>
* logger.fatal("{0} {1}", ["Hello", "World"]); // Hello World
* logger.fatal("{a} {b}", {a:"Hello", b:"World"}); // Hello Hello
* </listing>
*
* <p>Deep inspection also works as reference definition.</p>
* <listing>
* logger.fatal("{a.b} {a.c}", {a:{b:"Hello", c:"World"}}); // Hello World
* </listing>
*
* <p>Without a parameter passed in the message will be used as parameter.</p>
* <listing>
* logger.fatal({hello:"world"});
* logger.fatal("{}", {hello:"world"}); // Both calls are equal!
* </listing>
*
* <p>If both the message and the parameter is available then the String
* representation of the message is used. This is important for some intelligent
* .toString operations (that create log statements)</p>
* <listing>
* logger.fatal({}, {hello:"world"});
* logger.fatal({}.toString(), {hello:"world"}); // Both calls are equal!
* </listing>
*
* @param message Message that should be logged.
* @param parameter Parameter to be used for inspection.
*/
function fatal(message:*, parameter:*=null):void;
/**
* <code>true</code> if <code>debug</code> actually does something.
* @see #debug()
*/
function get debugEnabled():Boolean;
/**
* <code>true</code> if <code>info</code> actually does something.
* @see #info()
*/
function get infoEnabled():Boolean;
/**
* <code>true</code> if <code>warn</code> actually does something.
* @see #warn()
*/
function get warnEnabled():Boolean;
/**
* <code>true</code> if <code>error</code> actually does something.
* @see #error()
*/
function get errorEnabled():Boolean;
/**
* <code>true</code> if <code>fatal</code> works.
* @see #fatal()
*/
function get fatalEnabled():Boolean;
}
}
| 36.051351
| 84
| 0.62306
|
171b8f1ba2fa0c1c68673c0618e180005e8eaaff
| 1,318
|
as
|
ActionScript
|
RoleObject_1_0_0/src/com/roleobject/loader/RoleMaterialLoader.as
|
mingfanwang/MyClient2
|
d5e3c52a9f9dcb1e5d70b85af375d9f0882f172c
|
[
"BSD-3-Clause"
] | 1
|
2021-06-22T22:50:34.000Z
|
2021-06-22T22:50:34.000Z
|
RoleObject_1_0_0/src/com/roleobject/loader/RoleMaterialLoader.as
|
mingfanwang/MyClient2
|
d5e3c52a9f9dcb1e5d70b85af375d9f0882f172c
|
[
"BSD-3-Clause"
] | null | null | null |
RoleObject_1_0_0/src/com/roleobject/loader/RoleMaterialLoader.as
|
mingfanwang/MyClient2
|
d5e3c52a9f9dcb1e5d70b85af375d9f0882f172c
|
[
"BSD-3-Clause"
] | null | null | null |
package com.roleobject.loader
{
import flash.events.Event;
import flash.events.IOErrorEvent;
/**
* 角色材质加载
* @author 王明凡
*/
public class RoleMaterialLoader extends ExtendLoader
{
private var loaderArr:Array;
private var mediaArr:Array;
//循环加载个数
private var loopCount:int;
//循环加载错误
private var loopError:Boolean=false;
public function RoleMaterialLoader()
{
loaderArr=new Array();
}
public function onRoleMaterialLoader(mediaArr:Array):void
{
this.mediaArr=mediaArr;
loopLoad();
}
public function loopLoad():void
{
super.extendOnLoaderURL(mediaArr[loopCount],MEL_LOADERINFO);
}
override protected function onLoadByteComplete(e:Event):void
{
if(loopError)
return;
loaderArr.push(this.getLoader());
if((loopCount+1)==mediaArr.length)
{
this.dispatchEvent(e);
}
else
{
loopCount++;
loopLoad();
}
}
override protected function onIoError(e:IOErrorEvent):void
{
if(!loopError)
this.dispatchEvent(e);
this.loopError=true;
}
public function getLoaderArr():Array
{
return loaderArr;
}
override public function clear():void
{
loaderArr=null;
mediaArr=null;
loopCount=0;
super.clear();
}
}
}
| 19.969697
| 64
| 0.636571
|
f12ac0b5dd274264dcdfb5075a8c4b4fe9975489
| 17,493
|
as
|
ActionScript
|
src/com/evernote/edam/notestore/NotesMetadataList.as
|
evernote/evernote-sdk-as3
|
246ea49eacc6d5e5d03f860b286503d2c3e5ef60
|
[
"Apache-2.0",
"BSD-2-Clause"
] | 5
|
2015-01-05T15:23:41.000Z
|
2020-10-01T01:48:35.000Z
|
src/com/evernote/edam/notestore/NotesMetadataList.as
|
evernote/evernote-sdk-as3
|
246ea49eacc6d5e5d03f860b286503d2c3e5ef60
|
[
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null |
src/com/evernote/edam/notestore/NotesMetadataList.as
|
evernote/evernote-sdk-as3
|
246ea49eacc6d5e5d03f860b286503d2c3e5ef60
|
[
"Apache-2.0",
"BSD-2-Clause"
] | 5
|
2015-01-20T21:10:24.000Z
|
2021-06-24T11:26:51.000Z
|
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package com.evernote.edam.notestore {
import org.apache.thrift.Set;
import org.apache.thrift.type.BigInteger;
import flash.utils.ByteArray;
import flash.utils.Dictionary;
import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;
import com.evernote.edam.notestore.NoteMetadata;
/**
* This structure is returned from calls to the findNotesMetadata function to
* give the high-level metadata about a subset of Notes that are found to
* match a specified NoteFilter in a search.
*
* <dl>
* <dt>startIndex</dt>
* <dd>
* The starting index within the overall set of notes. This
* is also the number of notes that are "before" this list in the set.
* </dd>
*
* <dt>totalNotes</dt>
* <dd>
* The number of notes in the larger set. This can be used
* to calculate how many notes are "after" this note in the set.
* (I.e. remaining = totalNotes - (startIndex + notes.length) )
* </dd>
*
* <dt>notes</dt>
* <dd>
* The list of metadata for Notes in this range. The set of optional fields
* that are set in each metadata structure will depend on the
* NotesMetadataResultSpec provided by the caller when the search was
* performed. Only the 'guid' field will be guaranteed to be set in each
* Note.
* </dd>
*
* <dt>stoppedWords</dt>
* <dd>
* If the NoteList was produced using a text based search
* query that included words that are not indexed or searched by the service,
* this will include a list of those ignored words.
* </dd>
*
* <dt>searchedWords</dt>
* <dd>
* If the NoteList was produced using a text based search
* query that included viable search words or quoted expressions, this will
* include a list of those words. Any stopped words will not be included
* in this list.
* </dd>
*
* <dt>updateCount</dt>
* <dd>
* Indicates the total number of transactions that have
* been committed within the account. This reflects (for example) the
* number of discrete additions or modifications that have been made to
* the data in this account (tags, notes, resources, etc.).
* This number is the "high water mark" for Update Sequence Numbers (USN)
* within the account.
* </dd>
* </dl>
*/
public class NotesMetadataList implements TBase {
private static const STRUCT_DESC:TStruct = new TStruct("NotesMetadataList");
private static const START_INDEX_FIELD_DESC:TField = new TField("startIndex", TType.I32, 1);
private static const TOTAL_NOTES_FIELD_DESC:TField = new TField("totalNotes", TType.I32, 2);
private static const NOTES_FIELD_DESC:TField = new TField("notes", TType.LIST, 3);
private static const STOPPED_WORDS_FIELD_DESC:TField = new TField("stoppedWords", TType.LIST, 4);
private static const SEARCHED_WORDS_FIELD_DESC:TField = new TField("searchedWords", TType.LIST, 5);
private static const UPDATE_COUNT_FIELD_DESC:TField = new TField("updateCount", TType.I32, 6);
private var _startIndex:int;
public static const STARTINDEX:int = 1;
private var _totalNotes:int;
public static const TOTALNOTES:int = 2;
private var _notes:Array;
public static const NOTES:int = 3;
private var _stoppedWords:Array;
public static const STOPPEDWORDS:int = 4;
private var _searchedWords:Array;
public static const SEARCHEDWORDS:int = 5;
private var _updateCount:int;
public static const UPDATECOUNT:int = 6;
private var __isset_startIndex:Boolean = false;
private var __isset_totalNotes:Boolean = false;
private var __isset_updateCount:Boolean = false;
public static const metaDataMap:Dictionary = new Dictionary();
{
metaDataMap[STARTINDEX] = new FieldMetaData("startIndex", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32));
metaDataMap[TOTALNOTES] = new FieldMetaData("totalNotes", TFieldRequirementType.REQUIRED,
new FieldValueMetaData(TType.I32));
metaDataMap[NOTES] = new FieldMetaData("notes", TFieldRequirementType.REQUIRED,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, NoteMetadata)));
metaDataMap[STOPPEDWORDS] = new FieldMetaData("stoppedWords", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING)));
metaDataMap[SEARCHEDWORDS] = new FieldMetaData("searchedWords", TFieldRequirementType.OPTIONAL,
new ListMetaData(TType.LIST,
new FieldValueMetaData(TType.STRING)));
metaDataMap[UPDATECOUNT] = new FieldMetaData("updateCount", TFieldRequirementType.OPTIONAL,
new FieldValueMetaData(TType.I32));
}
{
FieldMetaData.addStructMetaDataMap(NotesMetadataList, metaDataMap);
}
public function NotesMetadataList() {
}
public function get startIndex():int {
return this._startIndex;
}
public function set startIndex(startIndex:int):void {
this._startIndex = startIndex;
this.__isset_startIndex = true;
}
public function unsetStartIndex():void {
this.__isset_startIndex = false;
}
// Returns true if field startIndex is set (has been assigned a value) and false otherwise
public function isSetStartIndex():Boolean {
return this.__isset_startIndex;
}
public function get totalNotes():int {
return this._totalNotes;
}
public function set totalNotes(totalNotes:int):void {
this._totalNotes = totalNotes;
this.__isset_totalNotes = true;
}
public function unsetTotalNotes():void {
this.__isset_totalNotes = false;
}
// Returns true if field totalNotes is set (has been assigned a value) and false otherwise
public function isSetTotalNotes():Boolean {
return this.__isset_totalNotes;
}
public function get notes():Array {
return this._notes;
}
public function set notes(notes:Array):void {
this._notes = notes;
}
public function unsetNotes():void {
this.notes = null;
}
// Returns true if field notes is set (has been assigned a value) and false otherwise
public function isSetNotes():Boolean {
return this.notes != null;
}
public function get stoppedWords():Array {
return this._stoppedWords;
}
public function set stoppedWords(stoppedWords:Array):void {
this._stoppedWords = stoppedWords;
}
public function unsetStoppedWords():void {
this.stoppedWords = null;
}
// Returns true if field stoppedWords is set (has been assigned a value) and false otherwise
public function isSetStoppedWords():Boolean {
return this.stoppedWords != null;
}
public function get searchedWords():Array {
return this._searchedWords;
}
public function set searchedWords(searchedWords:Array):void {
this._searchedWords = searchedWords;
}
public function unsetSearchedWords():void {
this.searchedWords = null;
}
// Returns true if field searchedWords is set (has been assigned a value) and false otherwise
public function isSetSearchedWords():Boolean {
return this.searchedWords != null;
}
public function get updateCount():int {
return this._updateCount;
}
public function set updateCount(updateCount:int):void {
this._updateCount = updateCount;
this.__isset_updateCount = true;
}
public function unsetUpdateCount():void {
this.__isset_updateCount = false;
}
// Returns true if field updateCount is set (has been assigned a value) and false otherwise
public function isSetUpdateCount():Boolean {
return this.__isset_updateCount;
}
public function setFieldValue(fieldID:int, value:*):void {
switch (fieldID) {
case STARTINDEX:
if (value == null) {
unsetStartIndex();
} else {
this.startIndex = value;
}
break;
case TOTALNOTES:
if (value == null) {
unsetTotalNotes();
} else {
this.totalNotes = value;
}
break;
case NOTES:
if (value == null) {
unsetNotes();
} else {
this.notes = value;
}
break;
case STOPPEDWORDS:
if (value == null) {
unsetStoppedWords();
} else {
this.stoppedWords = value;
}
break;
case SEARCHEDWORDS:
if (value == null) {
unsetSearchedWords();
} else {
this.searchedWords = value;
}
break;
case UPDATECOUNT:
if (value == null) {
unsetUpdateCount();
} else {
this.updateCount = value;
}
break;
default:
throw new ArgumentError("Field " + fieldID + " doesn't exist!");
}
}
public function getFieldValue(fieldID:int):* {
switch (fieldID) {
case STARTINDEX:
return this.startIndex;
case TOTALNOTES:
return this.totalNotes;
case NOTES:
return this.notes;
case STOPPEDWORDS:
return this.stoppedWords;
case SEARCHEDWORDS:
return this.searchedWords;
case UPDATECOUNT:
return this.updateCount;
default:
throw new ArgumentError("Field " + fieldID + " doesn't exist!");
}
}
// Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
public function isSet(fieldID:int):Boolean {
switch (fieldID) {
case STARTINDEX:
return isSetStartIndex();
case TOTALNOTES:
return isSetTotalNotes();
case NOTES:
return isSetNotes();
case STOPPEDWORDS:
return isSetStoppedWords();
case SEARCHEDWORDS:
return isSetSearchedWords();
case UPDATECOUNT:
return isSetUpdateCount();
default:
throw new ArgumentError("Field " + fieldID + " doesn't exist!");
}
}
public function read(iprot:TProtocol):void {
var field:TField;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id)
{
case STARTINDEX:
if (field.type == TType.I32) {
this.startIndex = iprot.readI32();
this.__isset_startIndex = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case TOTALNOTES:
if (field.type == TType.I32) {
this.totalNotes = iprot.readI32();
this.__isset_totalNotes = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case NOTES:
if (field.type == TType.LIST) {
{
var _list126:TList = iprot.readListBegin();
this.notes = new Array();
for (var _i127:int = 0; _i127 < _list126.size; ++_i127)
{
var _elem128:NoteMetadata;
_elem128 = new NoteMetadata();
_elem128.read(iprot);
this.notes.push(_elem128);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case STOPPEDWORDS:
if (field.type == TType.LIST) {
{
var _list129:TList = iprot.readListBegin();
this.stoppedWords = new Array();
for (var _i130:int = 0; _i130 < _list129.size; ++_i130)
{
var _elem131:String;
_elem131 = iprot.readString();
this.stoppedWords.push(_elem131);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case SEARCHEDWORDS:
if (field.type == TType.LIST) {
{
var _list132:TList = iprot.readListBegin();
this.searchedWords = new Array();
for (var _i133:int = 0; _i133 < _list132.size; ++_i133)
{
var _elem134:String;
_elem134 = iprot.readString();
this.searchedWords.push(_elem134);
}
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case UPDATECOUNT:
if (field.type == TType.I32) {
this.updateCount = iprot.readI32();
this.__isset_updateCount = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!__isset_startIndex) {
throw new TProtocolError(TProtocolError.UNKNOWN, "Required field 'startIndex' was not found in serialized data! Struct: " + toString());
}
if (!__isset_totalNotes) {
throw new TProtocolError(TProtocolError.UNKNOWN, "Required field 'totalNotes' was not found in serialized data! Struct: " + toString());
}
validate();
}
public function write(oprot:TProtocol):void {
validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(START_INDEX_FIELD_DESC);
oprot.writeI32(this.startIndex);
oprot.writeFieldEnd();
oprot.writeFieldBegin(TOTAL_NOTES_FIELD_DESC);
oprot.writeI32(this.totalNotes);
oprot.writeFieldEnd();
if (this.notes != null) {
oprot.writeFieldBegin(NOTES_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.notes.length));
for each (var elem135:* in this.notes) {
elem135.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (this.stoppedWords != null) {
if (isSetStoppedWords()) {
oprot.writeFieldBegin(STOPPED_WORDS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.stoppedWords.length));
for each (var elem136:* in this.stoppedWords) {
oprot.writeString(elem136);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (this.searchedWords != null) {
if (isSetSearchedWords()) {
oprot.writeFieldBegin(SEARCHED_WORDS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRING, this.searchedWords.length));
for each (var elem137:* in this.searchedWords) {
oprot.writeString(elem137);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (isSetUpdateCount()) {
oprot.writeFieldBegin(UPDATE_COUNT_FIELD_DESC);
oprot.writeI32(this.updateCount);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
public function toString():String {
var ret:String = new String("NotesMetadataList(");
var first:Boolean = true;
ret += "startIndex:";
ret += this.startIndex;
first = false;
if (!first) ret += ", ";
ret += "totalNotes:";
ret += this.totalNotes;
first = false;
if (!first) ret += ", ";
ret += "notes:";
if (this.notes == null) {
ret += "null";
} else {
ret += this.notes;
}
first = false;
if (isSetStoppedWords()) {
if (!first) ret += ", ";
ret += "stoppedWords:";
if (this.stoppedWords == null) {
ret += "null";
} else {
ret += this.stoppedWords;
}
first = false;
}
if (isSetSearchedWords()) {
if (!first) ret += ", ";
ret += "searchedWords:";
if (this.searchedWords == null) {
ret += "null";
} else {
ret += this.searchedWords;
}
first = false;
}
if (isSetUpdateCount()) {
if (!first) ret += ", ";
ret += "updateCount:";
ret += this.updateCount;
first = false;
}
ret += ")";
return ret;
}
public function validate():void {
// check for required fields
// alas, we cannot check 'startIndex' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'totalNotes' because it's a primitive and you chose the non-beans generator.
if (notes == null) {
throw new TProtocolError(TProtocolError.UNKNOWN, "Required field 'notes' was not present! Struct: " + toString());
}
// check that fields of type enum have valid values
}
}
}
| 31.97989
| 144
| 0.591036
|
94f3a4325d9503e167cfd6cc3a1543b9b7b37e64
| 524
|
as
|
ActionScript
|
media/streams/Spectrum.as
|
bitfade/actionscript
|
a13fa84352255437d89cce824f7a779ccc42aea7
|
[
"MIT"
] | null | null | null |
media/streams/Spectrum.as
|
bitfade/actionscript
|
a13fa84352255437d89cce824f7a779ccc42aea7
|
[
"MIT"
] | null | null | null |
media/streams/Spectrum.as
|
bitfade/actionscript
|
a13fa84352255437d89cce824f7a779ccc42aea7
|
[
"MIT"
] | null | null | null |
/*
This class is used to hold stream properties
*/
package bitfade.media.streams {
import flash.media.*
import flash.events.*
import flash.net.URLRequest
import flash.utils.*
import bitfade.utils.*
public class Spectrum extends bitfade.media.streams.Audio {
public function Spectrum() {
addClass()
super()
}
public static function addClass():void {
Stream.addStreamType("Spectrum");
}
override public function get type():String {
return "Spectrum"
}
}
}
/* commentsOK */
| 15.878788
| 60
| 0.681298
|
a2a8c7d2b5284c670bbff10d5635cba5d17b9cb2
| 6,070
|
as
|
ActionScript
|
Mvc/src/com/game/framework/views/Mediator.as
|
nbvghost/actionscript3-mvc
|
e512d8aa95d4e45a78c7cbbb5ae82c695a524b29
|
[
"Apache-2.0"
] | 2
|
2018-02-08T06:07:16.000Z
|
2018-02-08T06:07:26.000Z
|
Mvc/src/com/game/framework/views/Mediator.as
|
nbvghost/actionscript3-mvc
|
e512d8aa95d4e45a78c7cbbb5ae82c695a524b29
|
[
"Apache-2.0"
] | null | null | null |
Mvc/src/com/game/framework/views/Mediator.as
|
nbvghost/actionscript3-mvc
|
e512d8aa95d4e45a78c7cbbb5ae82c695a524b29
|
[
"Apache-2.0"
] | null | null | null |
package com.game.framework.views {
import com.asvital.dev.Log;
import com.game.framework.FW;
import com.game.framework.data.AlertDialogBuilder;
import com.game.framework.error.OperateError;
import com.game.framework.events.AssetsEvent;
import com.game.framework.events.DissolveEvent;
import com.game.framework.ifaces.INotifyData;
import com.game.framework.ifaces.ITargetID;
import com.game.framework.ifaces.IURL;
import com.game.framework.models.NotifyData;
import flash.utils.getQualifiedClassName;
/**
*
* Mediiator 被执行消失了。
*
*/
[Event(name="dissolve", type="com.game.framework.events.DissolveEvent")]
/**
* MediaAssetItem.intiView() 被执行将发送 (Mediator.DEFAULT_TYPE,DEFAULT_NOTIFY)消息。
* MVC 的 父级 ,要重写 viewDrawed 方法和 name 方法
* @see com.game.framework.net.MediaAssetItem#initView()
*@author sixf
*/
public class Mediator extends BaseMediator {
private var _notiys:Vector.<Object>;
protected var isSkinLoad:Boolean = false;
/**
* 为空
*/
public static const NONE:String="none";
/**
* 默认 Mediator 又被初始化的消息类型,主要用于模块的初始化
*/
public static const RE_INIT_TYPE:String = "mediator_re_init_type";
/**
* 暂时离开了。
*/
public static const OUT_TYPE:String="out_type";
/**
*
*/
public static const IN_TYPE:String="in_type";
/**
* 默认 Mediator 又被初始化的消息
*/
public static const RE_INIT_NOTIFY:NotifyData = new NotifyData(RE_INIT_TYPE, "Mediator 又被 initView !");
/**
* 默认 Mediator 又被初始化的消息类型
*/
public static const INIT_TYPE:String = "mediator_init_type";
/**
* 默认 Mediator 又被初始化的消息
*/
public static const INIT_NOTIFY:NotifyData = new NotifyData(INIT_TYPE, "Mediator 被 initView !");
private var _isOutStage:Boolean = false;
private var _keepLiveMsg:Boolean = false;
FW var isdissolve:Boolean = false;
/**
* 实例化时,传入 ICreateView 视图对象
* @param view
* @see com.game.framework.interfaces.ICreateView
*/
public function Mediator() {
_notiys = new Vector.<Object>();
}
/**
* 当模块 不可见时,是否还继续收到消息?》 default:false
*/
public function get keepLiveMsg():Boolean
{
return _keepLiveMsg;
}
/**
* @private
*/
public function set keepLiveMsg(value:Boolean):void
{
_keepLiveMsg = value;
}
/**
* 是否离开了 Stage ,如果这个显示不在显示列表 ,则不会在发消息。default:false
*/
public function get isOutStage():Boolean
{
return _isOutStage;
}
/**
* @private
*/
public function set isOutStage(value:Boolean):void
{
_isOutStage = value;
}
override protected function onViewCompleteHandler(event:AssetsEvent):void {
view.removeEventListener(AssetsEvent.COMPLETE_LOAD, onViewCompleteHandler);
viewOver();
}
protected function viewOver():void{
reSendNotify();
isSkinLoad = true;
viewDrawed(view);
this.dispatchEvent(new AssetsEvent(AssetsEvent.COMPLETE_LOAD));
}
/**
* 消失</br>
* 模块消失,但并不释放内存,释放内存还是会根据,Mediator 周期来的。要释放内存很使用,dispose 方法 </br>
*
*
*/
protected function dissolve():void{
if(FW::isdissolve==false){
if(this.uimanager && this.view){
uimanager.removeEnterFrame(view);
uimanager.removeReSize(view);
uimanager.removeTimerRun(view);
}
if(this.uimanager){
uimanager.removeEnterFrame(this);
uimanager.removeReSize(this);
uimanager.removeTimerRun(this);
}
FW::isdissolve=true;
this.dispatchEvent(new DissolveEvent(DissolveEvent.DISSOLVE));
}
}
/**
* 弹出一个窗口,
* @param dialogID 指定窗口的ID,
* @param isNewCreate 是否新创建实例,还是用旧的、。
*
*/
protected function showDialog(dialogID:ITargetID):void{
var alertdialog:AlertDialog;
var alertBuilder:AlertDialogBuilder =onCreateDialog(dialogID);
if(alertBuilder==null){
Log.out("当你要弹出一个窗口的时候,请确认 窗口的描述细说");
return;
}
alertBuilder.targetID = dialogID;
if(alertBuilder.view==null){
Log.out("AlertDialogBuilder.view 属性表示您要弹出窗口的地址!(唯一的)。如果放空,将不处理。");
return;
}
alertdialog = AlertDialog.getAlertDialog(alertBuilder.view);
if(alertdialog==null){
alertdialog = new AlertDialog(this);
}
alertdialog.Builder=alertBuilder;
alertdialog.show();
}
/**
* 关闭窗口
* @param dialogID
*
*/
protected function dismiss(targetURL:IURL):void{
var alertdialog:AlertDialog = AlertDialog.getAlertDialog(targetURL);
if(alertdialog!=null){
alertdialog.dismiss();
}else{
Log.out(" 没有找到 dialogID:"+targetURL+"的弹出框!");
}
}
/**
* 关闭所有的出现的窗口
*
*/
protected function dismissAll():void{
AlertDialog.dismissAll();
}
/**
* 根据 dialogID 返回 给 AlertDialog 用的 AlertDialogBuilder
* @param dialogID
* @return
*
*/
protected function onCreateDialog(dialogID:ITargetID):AlertDialogBuilder{
throw new OperateError("请重写 onCreateDialog 方法,因为 showDialog 方法。",this);
return null;
}
/**
* 终极释放,什么都没有了。
*
*/
override public function dispose():void
{
_notiys.splice(0,_notiys.length);
super.dispose();
}
/**
* 信息列队,用于在资源没有加载完成时,存储消息,该列对消息,会在资源加载完成后,被执行。
* @param notify
*
*/
public function push(name:String, notify:INotifyData):void {
_notiys.push({"name": name, "notify": notify});
if (isSkinLoad) {
reSendNotify();
}
}
/**
* 消息 列表 遍历
*
*/
private function reSendNotify():void {
if(_isOutStage && _keepLiveMsg==false){
Log.info("mediator 接收到对方发来的消息,但由于 不在 可视区域,并且 keepLiveMsg 属性为 false。");
return;
}
var currrentObj:Object;
while (_notiys.length > 0) {
currrentObj = _notiys.shift();
this.handerNotify(currrentObj.name,currrentObj.notify);
//改成事件驱动
//FW::disHanderNotify(currrentObj.name, currrentObj.notify);
}
}
}
}
| 22.819549
| 106
| 0.628666
|
c63481343701dd73f2c53a3e29e3f3a2e374c316
| 1,589
|
as
|
ActionScript
|
Source Flash/scripts/game/view/effects/BloodNumberCreater.as
|
itspaiva/DDTank4.1
|
99d67ca8ad15851b8a37e9dddf2f3f9018c770e4
|
[
"MIT"
] | 4
|
2021-11-13T07:22:26.000Z
|
2022-02-21T20:38:53.000Z
|
Source Flash/scripts/game/view/effects/BloodNumberCreater.as
|
itspaiva/DDTank4.1
|
99d67ca8ad15851b8a37e9dddf2f3f9018c770e4
|
[
"MIT"
] | null | null | null |
Source Flash/scripts/game/view/effects/BloodNumberCreater.as
|
itspaiva/DDTank4.1
|
99d67ca8ad15851b8a37e9dddf2f3f9018c770e4
|
[
"MIT"
] | 7
|
2021-11-13T07:22:31.000Z
|
2022-02-15T07:08:09.000Z
|
package game.view.effects
{
import com.pickgliss.ui.ComponentFactory;
import flash.display.Bitmap;
import flash.display.BitmapData;
public class BloodNumberCreater
{
private var greenData:Vector.<BitmapData>;
private var redData:Vector.<BitmapData>;
public function BloodNumberCreater()
{
super();
this.init();
}
private function init() : void
{
this.redData = new Vector.<BitmapData>();
this.greenData = new Vector.<BitmapData>();
var _loc1_:int = 0;
while(_loc1_ < 10)
{
this.redData.push(ComponentFactory.Instance.creatBitmapData("asset.game.bloodNUm" + _loc1_ + "Asset"));
this.greenData.push(ComponentFactory.Instance.creatBitmapData("asset.game.bloodNUma" + _loc1_ + "Asset"));
_loc1_++;
}
}
public function createGreenNum(param1:int) : Bitmap
{
var _loc2_:Bitmap = new Bitmap(this.greenData[param1]);
return _loc2_;
}
public function createRedNum(param1:int) : Bitmap
{
var _loc2_:Bitmap = new Bitmap(this.redData[param1]);
return _loc2_;
}
public function dispose() : void
{
var _loc1_:int = 0;
while(_loc1_ < 10)
{
this.redData[_loc1_].dispose();
this.redData[_loc1_] = null;
this.greenData[_loc1_].dispose();
this.greenData[_loc1_] = null;
_loc1_++;
}
}
}
}
| 26.483333
| 118
| 0.553178
|
2382246c7523debcdf8429c483094fbd1ce7a5b0
| 7,834
|
as
|
ActionScript
|
SJGame/src/SJ/Game/Platform/SPlatformPPZHUSHOUIOS.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | 1
|
2021-06-09T23:39:11.000Z
|
2021-06-09T23:39:11.000Z
|
SJGame/src/SJ/Game/Platform/SPlatformPPZHUSHOUIOS.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | null | null | null |
SJGame/src/SJ/Game/Platform/SPlatformPPZHUSHOUIOS.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | null | null | null |
package SJ.Game.Platform
{
/**
* 回调地址更改方式: 开发者后台配置
*/
import flash.desktop.NativeApplication;
import flash.display.StageOrientation;
import flash.events.InvokeEvent;
import flash.utils.getTimer;
import SJ.Common.Constants.ConstGlobal;
import SJ.Common.Constants.ConstNetCommand;
import SJ.Game.SocketServer.SocketCommand_receipt;
import SJ.Game.SocketServer.SocketManager;
import SJ.Game.SocketServer.SocketMessage;
import SJ.Game.data.CJDataManager;
import SJ.Game.data.CJDataOfPlatformReceipt;
import SJ.Game.data.config.CJDataOfRechargeProperty;
import SJ.Game.data.json.Json_recharge_setting;
import SJ.Game.event.CJSocketEvent;
import SJ.Game.lang.CJLang;
import SJ.Game.layer.CJConfirmMessageBox;
import SJ.Game.utils.SApplicationUtils;
import engine_starling.SApplication;
import engine_starling.utils.Logger;
import engine_starling.utils.SPlatformUtils;
import ppEvents.PPClosePageViewEvent;
import ppEvents.PPCloseWebViewEvent;
import ppEvents.PPLogOffEvent;
import ppEvents.PPLoginEvent;
import ppEvents.PPPayEvent;
import ppEvents.PPVerifyingUpdatePassEvent;
import starling.core.Starling;
import starling.events.Event;
import starling.events.TouchEvent;
public class SPlatformPPZHUSHOUIOS extends SPlatformDefault
{
private var _logger:Logger = Logger.getInstance(SPlatformPPZHUSHOUIOS);
private var _uid:String = "";
private var _sessionId:String = "";
private var _CpOrderId:String = "";
private var _PayConins:int = 0;
private var _ane:PPAne = PPAne.getInstance();
private var _time: int;
public function SPlatformPPZHUSHOUIOS()
{
super();
}
override public function startup(params:Object):void
{
var dataReceipt:CJDataOfPlatformReceipt = CJDataManager.o.getData("CJDataOfPlatformReceipt");
dataReceipt.addEventListener(CJDataOfPlatformReceipt.RECEIPT_FAILED, _onReceiptFailed);
_ane.initSDKPlatform(1971,"7236b7403243e22ebd2fdbe82b197db2",10,true,true,true,true,"关闭充值提示语",true,true,false,false);
_ane.addEventListener(PPClosePageViewEvent.PP_CLOSEPAGEVIEW_EVENT,ppClosePageViewEvent);
_ane.addEventListener(PPCloseWebViewEvent.PP_CLOSEWEBVIEW_EVENT,ppCloseWebViewEvent);
_ane.addEventListener(PPLoginEvent.PP_LOGIN_EVENT,ppLoginEvent);
_ane.addEventListener(PPLogOffEvent.PP_LOGOFF_EVENT,ppLogOffEvent);
_ane.addEventListener(PPPayEvent.PP_PAY_EVENT,ppPayEvent);
_ane.addEventListener(PPVerifyingUpdatePassEvent.PP_VERIFYINGUPDATEPASS_EVENT,ppVerifyingUpdatePassEvent);
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,
function invokeHandler(event:InvokeEvent):void{
if(event.arguments.length > 0){
_ane.alixPayResult(event.arguments[0]);
}
});
_dispatch_init(true);
}
private function _onOrientation(event: TouchEvent):void
{
if (getTimer() < _time + 1000)
return;
if(Starling.current.nativeStage.orientation != StageOrientation.ROTATED_RIGHT)
{
Starling.current.nativeStage.setOrientation(StageOrientation.ROTATED_RIGHT);
}
SApplication.UIRootNode.stage.removeEventListener(starling.events.TouchEvent.TOUCH, _onOrientation);
}
override public function login(callback:Function):void
{
_ane.showLoginView();
}
override public function logout(callback:Function):void
{
_ane.showCenterView();
}
private function _onReceiptFailed(e: Event):void
{
CJConfirmMessageBox(CJLang("receipt_tip")
,function ():void{
var dataReceipt:CJDataOfPlatformReceipt = CJDataManager.o.getData("CJDataOfPlatformReceipt");
dataReceipt.clearVerifyreceiptTimes();
dataReceipt.checkAndSend();
},function():void
{
var dataReceipt:CJDataOfPlatformReceipt = CJDataManager.o.getData("CJDataOfPlatformReceipt");
dataReceipt.completeReceipt();
},
CJLang("RECHARGE_TRYAGAIN"),
CJLang("RECHARGE_CANCEL"));
}
override public function getproducts():void
{
// 获取配置数据
var arrayProductData:Array = _getConfigPlatformProductData();
dispatchEventWith(SPlatformEvents.EventGetProducts, false, arrayProductData);
}
override public function pay(orderSerial:String, PayConins:Number, paydesc:String, callback:Function):int
{
var cfgData:Json_recharge_setting = CJDataOfRechargeProperty.o.getProperty(orderSerial);
_CpOrderId = cfgData.rechargeid;
//_PayConins的单位是元
_PayConins = cfgData.rmbnum / 100;
SocketManager.o.addEventListener(CJSocketEvent.SocketEventData, _onRpcReturn);
SocketCommand_receipt.createOrderId("" + ConstGlobal.CHANNEL, SPlatformUtils.getApplicationVersion(), _CpOrderId);
return 0;
}
private function _onRpcReturn(e:Event):void{
var msg:SocketMessage = e.data as SocketMessage;
if(msg.getCommand() == ConstNetCommand.CS_RECEIPT_CREATEORDER)
{
if (msg.retcode == 0)
{
var rechargeid:String = _CpOrderId;
_CpOrderId = JSON.stringify({"receipt": msg.retparams["orderId"], "rechargeid":rechargeid});
var dataReceipt:CJDataOfPlatformReceipt = CJDataManager.o.getData("CJDataOfPlatformReceipt");
dataReceipt.saveDataToCache(ConstGlobal.CHANNELID, _CpOrderId);
Logger.log("PP助手 exchangeGoods CpOrderId: ", _CpOrderId);
SApplication.UIRootNode.stage.addEventListener(starling.events.TouchEvent.TOUCH, _onOrientation);
_time = getTimer();
_ane.exchangeGoods(_PayConins, msg.retparams["orderId"], "金币", "0", 0);
}
SocketManager.o.removeEventListener(CJSocketEvent.SocketEventData, _onRpcReturn);
}
}
override public function uid():String
{
return _uid;
}
override public function SessionId():String
{
return _sessionId;
}
/**
* 关闭客户端页面回调事件,
* @param e
* 当前关闭页面名称
*/
private function ppClosePageViewEvent(e:PPClosePageViewEvent):void
{
var paramClosePageCode:int = parseInt(e.typeEvent);
if (paramClosePageCode == PPAppConfig.PPLoginViewPageCode)
{
Starling.juggler.delayCall(_ane.showLoginView, 2);
}
else if(paramClosePageCode == PPAppConfig.PPRegisterViewPageCode)
{
Starling.juggler.delayCall(_ane.showLoginView, 2);
}
else if(paramClosePageCode == PPAppConfig.PPUpdatePwdViewPageCode)
{
Starling.juggler.delayCall(_ane.showLoginView, 2);
}
else if(paramClosePageCode == PPAppConfig.PPAlertSecurityViewPageCode)
{
PPAppConfig.PPCenterViewPageCode
}
}
/**
* 兑换道具成功的回调,只有余额大于所购买道具时才响应该回调事件
* @param e
*
*/
private function ppPayEvent(e:PPPayEvent):void
{
// TODO Auto-generated method stub
var paramPPPayResultCode:int = parseInt(e.typeEvent);
if(paramPPPayResultCode == PPAppConfig.PPPayResultCodeSucceed){
dispatchEventWith(SPlatformEvents.EventBuy, false, _CpOrderId);
}
}
/**
* 注销事件的回调
* @param e
*
*/
private function ppLogOffEvent(e:PPLogOffEvent):void
{
// TODO Auto-generated method stub
SApplicationUtils.exit();
}
/**
*登录成功回调
* @param e ,
* String token
*/
private function ppLoginEvent(e:PPLoginEvent):void
{
// TODO Auto-generated method stub
_sessionId = e.typeEvent;
_uid = _ane.currentUserId();
//_ane.currentUserName();
//登录验证成功
_ane.getUserInfoSecurity();
_dispatch_login(true, "");
}
/**
* 关闭Web页面的回调。
* @param e
* String 当前的页面名称
*/
private function ppCloseWebViewEvent(e:PPCloseWebViewEvent):void
{
// TODO Auto-generated method stub
var paramCloseWebPageCode:int = parseInt(e.typeEvent);
if (paramCloseWebPageCode == PPAppConfig.PPWebViewCodeRechargeAndExchange)
{
dispatchEventWith(SPlatformEvents.EventBuy, false, _CpOrderId);
}
}
/**
* 检查游戏版本更新完成回调
* @param e
* 完毕后弹出登录页面
*/
private function ppVerifyingUpdatePassEvent(e:PPVerifyingUpdatePassEvent):void
{
_ane.showLoginView();
}
}
}
| 30.130769
| 120
| 0.742788
|
a6cfb1a8b75c5e3eb58cc3c80cf005319bb8c793
| 7,087
|
as
|
ActionScript
|
CoverageViewerTests/src/com/allurent/coverage/view/model/CoverageViewerPMTest.as
|
qickrooms/flexcover
|
8386a57974f0bee3e8c32469976d7a971c06bc4d
|
[
"Unlicense"
] | null | null | null |
CoverageViewerTests/src/com/allurent/coverage/view/model/CoverageViewerPMTest.as
|
qickrooms/flexcover
|
8386a57974f0bee3e8c32469976d7a971c06bc4d
|
[
"Unlicense"
] | null | null | null |
CoverageViewerTests/src/com/allurent/coverage/view/model/CoverageViewerPMTest.as
|
qickrooms/flexcover
|
8386a57974f0bee3e8c32469976d7a971c06bc4d
|
[
"Unlicense"
] | null | null | null |
/*
* Copyright (c) 2008 Allurent, Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.allurent.coverage.view.model
{
import com.adobe.ac.util.EmptyOneTimeIntervalStub;
import com.adobe.ac.util.OneTimeIntervalStub;
import com.allurent.coverage.ControllerMock;
import com.allurent.coverage.CoverageModelData;
import com.allurent.coverage.event.CoverageEvent;
import com.allurent.coverage.model.CoverageModel;
import flash.events.InvokeEvent;
import flash.filesystem.File;
import flexunit.framework.EventfulTestCase;
public class CoverageViewerPMTest extends EventfulTestCase
{
private var model:CoverageViewerPM;
private var controllerMock:ControllerMock;
override public function setUp():void
{
controllerMock = new ControllerMock();
model = new CoverageViewerPM(controllerMock,
new OneTimeIntervalStub());
model.setup();
}
public function testIfHeaderGetsEnabled():void
{
model.enabled = true;
assertTrue("expected enabled", model.headerPM.enabled);
}
public function testIfBrowserGetsEnabled():void
{
model.enabled = true;
assertTrue("expected enabled", model.browserPM.enabled);
}
public function testHandleCoverageModelChange():void
{
assertNull("expected no coverageModels", model.coverageModels);
var event:CoverageEvent = new CoverageEvent(
CoverageEvent.COVERAGE_MODEL_CHANGE,
CoverageModelData.createCoverageModel()
);
//controllerMock.mock.method("dispatchEvent").dispatchesEvent( event ).once;
model.controller.dispatchEvent(event);
//controllerMock.mock.verify();
assertNotNull("expected coverageModels", model.coverageModels);
assertFalse("showMessageOverlay", model.showMessageOverlay);
}
public function testHandleCoverageModelChangeWithEmptyModel():void
{
var empty:CoverageModel = CoverageModelData.createCoverageModel();
empty.clear();
assertNull("expected no coverageModels", model.coverageModels);
var event:CoverageEvent = new CoverageEvent(
CoverageEvent.COVERAGE_MODEL_CHANGE,
empty
);
model.controller.dispatchEvent(event);
assertNull("expected coverageModels", model.coverageModels);
}
public function testHandleCoverageModelChangeWithoutModel():void
{
assertNull("expected no coverageModels", model.coverageModels);
var event:CoverageEvent = new CoverageEvent(
CoverageEvent.COVERAGE_MODEL_CHANGE,
null
);
model.controller.dispatchEvent(event);
assertNull("expected coverageModels", model.coverageModels);
}
public function testNoMessageOverlayAtStartup():void
{
assertFalse("expected no showMessageOverlay", model.showMessageOverlay);
}
public function testShowMessageOverlayOnHandlingRecordingEnd():void
{
var controller:ControllerMock = new ControllerMock(true);
var event:CoverageEvent = new CoverageEvent(
CoverageEvent.RECORDING_END
);
//controller.mock.method("dispatchEvent").withArgs(event).once.dispatchesEvent(event).once;
controller.mock.method("applyCoverageData").withNoArgs.once;
model = new CoverageViewerPM(controller,
new OneTimeIntervalStub());
model.setup();
model.controller.dispatchEvent(event);
controller.mock.verify();
assertFalse("expected showMessageOverlay", model.showMessageOverlay);
}
public function testBlockScreenWhileCommandlineOptionsAreProcessed():void
{
model = new CoverageViewerPM(new ControllerMock(),
new EmptyOneTimeIntervalStub());
//The entry level MXML will dispatch this event.
var event:InvokeEvent = new InvokeEvent(InvokeEvent.INVOKE);
model.handleInvoke(event);
assertTrue("expected showMessageOverlay", model.showMessageOverlay);
}
public function testIfMessageOverlayIsShownOnFileDragDrop():void
{
model = new CoverageViewerPM(new ControllerMock(),
new EmptyOneTimeIntervalStub());
var event:InvokeEvent = new InvokeEvent(InvokeEvent.INVOKE);
model.handleDragDrop(new Array(new File()));
assertTrue("expected showMessageOverlay", model.showMessageOverlay);
}
public function testIfParsingStartsOnFileDragDrop():void
{
var controller:ControllerMock = new ControllerMock();
model = new CoverageViewerPM(controller,
new OneTimeIntervalStub());
var dropSource:Array = new Array(new File());
controller.mock.method("processFileArgument").withArgs(dropSource).once;
model.handleDragDrop(dropSource);
}
}
}
| 42.692771
| 104
| 0.587978
|
81f1f7379c03c088975d85284598052aa8727183
| 29,230
|
as
|
ActionScript
|
source/fairygui/Transition.as
|
xlsfs/FairyGUI-layabox
|
c86a8ddbf499dbef7fe06816096b7a406cfae810
|
[
"MIT"
] | null | null | null |
source/fairygui/Transition.as
|
xlsfs/FairyGUI-layabox
|
c86a8ddbf499dbef7fe06816096b7a406cfae810
|
[
"MIT"
] | null | null | null |
source/fairygui/Transition.as
|
xlsfs/FairyGUI-layabox
|
c86a8ddbf499dbef7fe06816096b7a406cfae810
|
[
"MIT"
] | null | null | null |
package fairygui {
import fairygui.utils.ColorMatrix;
import fairygui.utils.ToolSet;
import laya.filters.ColorFilter;
import laya.utils.Handler;
import laya.utils.Tween;
public class Transition {
public var name: String;
public var autoPlayRepeat: Number = 1;
public var autoPlayDelay: Number = 0;
private var _owner: GComponent;
private var _ownerBaseX: Number = 0;
private var _ownerBaseY: Number = 0;
private var _items: Vector.<TransitionItem>;
private var _totalTimes: Number = 0;
private var _totalTasks: Number = 0;
private var _playing: Boolean = false;
private var _onComplete: Handler;
private var _options: Number = 0;
private var _reversed: Boolean;
private var _maxTime: Number = 0;
private var _autoPlay:Boolean;
public const OPTION_IGNORE_DISPLAY_CONTROLLER: Number = 1;
public const OPTION_AUTO_STOP_DISABLED:int = 2;
public const OPTION_AUTO_STOP_AT_END:int = 4;
private const FRAME_RATE: Number = 24;
public function Transition(owner: GComponent) {
this._owner = owner;
this._items = new Vector.<TransitionItem>();
}
public function get autoPlay():Boolean
{
return _autoPlay;
}
public function set autoPlay(value:Boolean):void
{
if (_autoPlay != value)
{
_autoPlay = value;
if (_autoPlay)
{
if (_owner.onStage)
play(null, autoPlayRepeat, autoPlayDelay);
}
else
{
if (!_owner.onStage)
stop(false, true);
}
}
}
public function play(onComplete: Handler = null, times: Number = 1,delay: Number = 0):void {
this._play(onComplete,times,delay,false);
}
public function playReverse(onComplete: Handler = null, times: Number = 1,delay: Number = 0):void {
this._play(onComplete,times,delay,true);
}
public function changeRepeat(value:int):void
{
_totalTimes = value;
}
private function _play(onComplete: Handler = null, times: Number = 1,delay: Number = 0,reversed:Boolean=false):void {
this.stop();
this._totalTimes = times;
this._reversed = reversed;
this.internalPlay(delay);
this._playing = this._totalTasks > 0;
if(this._playing) {
this._onComplete = onComplete;
if((this._options & this.OPTION_IGNORE_DISPLAY_CONTROLLER) != 0) {
var cnt: Number = this._items.length;
for(var i: Number = 0;i < cnt;i++) {
var item: TransitionItem = this._items[i];
if(item.target != null && item.target != this._owner)
item.displayLockToken = item.target.addDisplayLock();
}
}
}
else if(onComplete != null) {
onComplete.run();
}
}
public function stop(setToComplete: Boolean = true,processCallback: Boolean = false):void {
if(this._playing) {
this._playing = false;
this._totalTasks = 0;
this._totalTimes = 0;
var handler: Handler = this._onComplete;
this._onComplete = null;
var cnt: Number = this._items.length;
var i:Number;
var item:TransitionItem;
if(this._reversed) {
for(i = cnt-1;i>=0;i--) {
item = this._items[i];
if(item.target == null)
continue;
this.stopItem(item,setToComplete);
}
}
else {
for(i = 0;i < cnt;i++) {
item = this._items[i];
if(item.target == null)
continue;
this.stopItem(item,setToComplete);
}
}
if(processCallback && handler != null) {
handler.run();
}
}
}
private function stopItem(item:TransitionItem, setToComplete:Boolean):void {
if (item.displayLockToken!=0)
{
item.target.releaseDisplayLock(item.displayLockToken);
item.displayLockToken = 0;
}
if (item.type == TransitionActionType.ColorFilter && item.filterCreated)
item.target.filters = null;
if(item.completed)
return;
if(item.tweener != null) {
item.tweener.clear();
item.tweener = null;
}
if(item.type == TransitionActionType.Transition) {
var trans: Transition = GComponent(item.target).getTransition(item.value.s);
if(trans != null)
trans.stop(setToComplete,false);
}
else if(item.type == TransitionActionType.Shake) {
Laya.timer.clear(item, item.__shake);
item.target._gearLocked = true;
item.target.setXY(item.target.x - item.startValue.f1,item.target.y - item.startValue.f2);
item.target._gearLocked = false;
}
else {
if(setToComplete) {
if(item.tween) {
if(!item.yoyo || item.repeat % 2 == 0)
this.applyValue(item,this._reversed?item.startValue:item.endValue);
else
this.applyValue(item,this._reversed?item.endValue:item.startValue);
}
else if(item.type != TransitionActionType.Sound)
this.applyValue(item,item.value);
}
}
}
public function dispose():void
{
if (!_playing)
return;
_playing = false;
var cnt:int = _items.length;
for (var i:int = 0; i < cnt; i++)
{
var item:TransitionItem = _items[i];
if (item.target == null || item.completed)
continue;
if (item.tweener != null)
{
item.tweener.clear();
item.tweener = null;
}
if (item.type == TransitionActionType.Transition)
{
var trans:Transition = GComponent(item.target).getTransition(item.value.s);
if (trans != null)
trans.dispose();
}
else if (item.type == TransitionActionType.Shake)
{
Laya.timer.clear(item, item.__shake);
}
}
}
public function get playing(): Boolean {
return this._playing;
}
public function setValue(label: String,...args):void {
var cnt: Number = this._items.length;
var value: TransitionValue;
for(var i: Number = 0;i < cnt;i++) {
var item: TransitionItem = this._items[i];
if(item.label == null && item.label2 == null)
continue;
if(item.label == label) {
if(item.tween)
value = item.startValue;
else
value = item.value;
}
else if(item.label2 == label) {
value = item.endValue;
}
else
continue;
switch(item.type) {
case TransitionActionType.XY:
case TransitionActionType.Size:
case TransitionActionType.Pivot:
case TransitionActionType.Scale:
case TransitionActionType.Skew:
value.b1 = true;
value.b2 = true;
value.f1 = parseFloat(args[0]);
value.f2 = parseFloat(args[1]);
break;
case TransitionActionType.Alpha:
value.f1 = parseFloat(args[0]);
break;
case TransitionActionType.Rotation:
value.i = parseInt(args[0]);
break;
case TransitionActionType.Color:
value.s = args[0];
break;
case TransitionActionType.Animation:
value.i = parseInt(args[0]);
if(args.length > 1)
value.b = args[1];
break;
case TransitionActionType.Visible:
value.b = args[0];
break;
case TransitionActionType.Sound:
value.s = args[0];
if(args.length > 1)
value.f1 = parseFloat(args[1]);
break;
case TransitionActionType.Transition:
value.s = args[0];
if(args.length > 1)
value.i = parseInt(args[1]);
break;
case TransitionActionType.Shake:
value.f1 = parseFloat(args[0]);
if(args.length > 1)
value.f2 = parseFloat(args[1]);
break;
case TransitionActionType.ColorFilter:
value.f1 = parseFloat(args[0]);
value.f2 = parseFloat(args[1]);
value.f3 = parseFloat(args[2]);
value.f4 = parseFloat(args[3]);
break;
}
}
}
public function setHook(label: String, callback:Handler):void {
var cnt: Number = this._items.length;
for(var i: Number = 0;i < cnt;i++) {
var item: TransitionItem = this._items[i];
if(item.label == label)
{
item.hook = callback;
break;
}
else if(item.label2 == label)
{
item.hook2 = callback;
break;
}
}
}
public function clearHooks():void {
var cnt: Number = this._items.length;
for(var i: Number = 0;i < cnt;i++) {
var item: TransitionItem = this._items[i];
item.hook = null;
item.hook2 = null;
}
}
public function setTarget(label:String, newTarget:GObject):void
{
var cnt:int = _items.length;
for (var i:int = 0; i < cnt; i++)
{
var item:TransitionItem = _items[i];
if (item.label == label)
item.targetId = newTarget.id;
}
}
public function setDuration(label:String, value:Number):void
{
var cnt:int = _items.length;
for (var i:int = 0; i < cnt; i++)
{
var item:TransitionItem = _items[i];
if (item.tween && item.label == label)
item.duration = value;
}
}
public function updateFromRelations(targetId: String,dx: Number,dy: Number):void {
var cnt: Number = this._items.length;
if(cnt == 0)
return;
for(var i: Number = 0;i < cnt;i++) {
var item: TransitionItem = this._items[i];
if(item.type == TransitionActionType.XY && item.targetId == targetId) {
if(item.tween) {
item.startValue.f1 += dx;
item.startValue.f2 += dy;
item.endValue.f1 += dx;
item.endValue.f2 += dy;
}
else {
item.value.f1 += dx;
item.value.f2 += dy;
}
}
}
}
internal function OnOwnerRemovedFromStage():void
{
if ((_options & OPTION_AUTO_STOP_DISABLED) == 0)
stop((_options & OPTION_AUTO_STOP_AT_END) != 0 ? true : false, false);
}
private function internalPlay(delay: Number=0):void {
this._ownerBaseX = this._owner.x;
this._ownerBaseY = this._owner.y;
this._totalTasks = 0;
var cnt: Number = this._items.length;
var startTime: Number;
var item:TransitionItem;
for(var i: Number = 0;i < cnt;i++) {
item = this._items[i];
if(item.targetId)
item.target = this._owner.getChildById(item.targetId);
else
item.target = this._owner;
if(item.target == null)
continue;
if(item.tween) {
if(this._reversed)
startTime = delay + this._maxTime - item.time - item.duration;
else
startTime = delay + item.time;
if(startTime>0)
{
_totalTasks++;
item.completed = false;
item.tweener = Tween.to(item.value, {}, startTime*1000, null, Handler.create(this, this.__delayCall,[item]));
item.tweener.update = null;
}
else
this.startTween(item);
}
else {
if(this._reversed)
startTime = delay + this._maxTime - item.time;
else
startTime = delay + item.time;
if(startTime == 0)
this.applyValue(item,item.value);
else {
item.completed = false;
this._totalTasks++;
item.tweener = Tween.to(item.value, {}, startTime*1000, null, Handler.create(this, this.__delayCall2,[item]));
item.tweener.update = null;
}
}
}
}
private function prepareValue(item: TransitionItem,toProps:Object,reversed: Boolean = false):void {
var startValue:TransitionValue;
var endValue:TransitionValue;
if(reversed)
{
startValue = item.endValue;
endValue = item.startValue;
}
else
{
startValue = item.startValue;
endValue = item.endValue;
}
switch(item.type) {
case TransitionActionType.XY:
case TransitionActionType.Size:
if(item.type==TransitionActionType.XY)
{
if (item.target == _owner)
{
if(!startValue.b1)
startValue.f1 = 0;
if(!startValue.b2)
startValue.f2 = 0;
}
else
{
if(!startValue.b1)
startValue.f1 = item.target.x;
if(!startValue.b2)
startValue.f2 = item.target.y;
}
}
else
{
if(!startValue.b1)
startValue.f1 = item.target.width;
if(!startValue.b2)
startValue.f2 = item.target.height;
}
item.value.f1 = startValue.f1;
item.value.f2 = startValue.f2;
if(!endValue.b1)
endValue.f1 = item.value.f1;
if(!endValue.b2)
endValue.f2 = item.value.f2;
item.value.b1 = startValue.b1 || endValue.b1;
item.value.b2 = startValue.b2 || endValue.b2;
toProps.f1 = endValue.f1;
toProps.f2 = endValue.f2;
break;
case TransitionActionType.Scale:
case TransitionActionType.Skew:
item.value.f1 = startValue.f1;
item.value.f2 = startValue.f2;
toProps.f1 = endValue.f1;
toProps.f2 = endValue.f2;
break;
case TransitionActionType.Alpha:
item.value.f1 = startValue.f1;
toProps.f1 = endValue.f1;
break;
case TransitionActionType.Rotation:
item.value.i = startValue.i;
toProps.i = endValue.i;
break;
case TransitionActionType.ColorFilter:
item.value.f1 = startValue.f1;
item.value.f2 = startValue.f2;
item.value.f3 = startValue.f3;
item.value.f4 = startValue.f4;
toProps.f1 = endValue.f1;
toProps.f2 = endValue.f2;
toProps.f3 = endValue.f3;
toProps.f4 = endValue.f4;
break;
}
toProps.dummy = 0;
}
private function startTween(item: TransitionItem):void {
var toProps: Object = {};
this.prepareValue(item,toProps,this._reversed);
this.applyValue(item,item.value);
var completeHandler:Handler;
if(item.repeat!=0) {
item.tweenTimes = 0;
completeHandler = Handler.create(this, this.__tweenRepeatComplete, [item]);
}
else
completeHandler = Handler.create(this, this.__tweenComplete, [item]);
_totalTasks++;
item.completed = false;
item.tweener = Tween.to(item.value,
toProps,
item.duration*1000,
item.easeType,
completeHandler);
item.tweener.update = Handler.create(this, this.__tweenUpdate, [item], false);
if(item.hook != null)
item.hook.run();
}
private function __delayCall(item: TransitionItem):void {
item.tweener = null;
_totalTasks--;
this.startTween(item);
}
private function __delayCall2(item: TransitionItem):void {
item.tweener = null;
this._totalTasks--;
item.completed = true;
this.applyValue(item,item.value);
if(item.hook != null)
item.hook.run();
this.checkAllComplete();
}
private function __tweenUpdate(item: TransitionItem):void {
this.applyValue(item,item.value);
}
private function __tweenComplete(item: TransitionItem):void {
item.tweener = null;
this._totalTasks--;
item.completed = true;
if(item.hook2 != null)
item.hook2.run();
this.checkAllComplete();
}
private function __tweenRepeatComplete(item: TransitionItem):void {
item.tweenTimes++;
if(item.repeat==-1 || item.tweenTimes < item.repeat + 1) {
var toProps:Object = {};
var reversed: Boolean;
if(item.yoyo) {
if(this._reversed)
reversed = item.tweenTimes % 2 == 0;
else
reversed = item.tweenTimes % 2 == 1;
}
else
reversed = this._reversed;
this.prepareValue(item,toProps,reversed);
item.tweener = Tween.to(item.value,
toProps,
item.duration * 1000,
item.easeType,
Handler.create(this, this.__tweenRepeatComplete, [item]));
item.tweener.update = Handler.create(this, this.__tweenUpdate, [item], false);
}
else
this.__tweenComplete(item);
}
private function __playTransComplete(item: TransitionItem):void {
this._totalTasks--;
item.completed = true;
this.checkAllComplete();
}
private function checkAllComplete():void {
if(this._playing && this._totalTasks == 0) {
if(this._totalTimes < 0) {
//不立刻调用的原因是egret.Tween在onComplete之后,还会调用onChange
Laya.timer.callLater(this, this.internalPlay);
}
else {
this._totalTimes--;
if(this._totalTimes > 0)
Laya.timer.callLater(this, this.internalPlay);
else {
this._playing = false;
var cnt: Number = this._items.length;
for (var i:int = 0; i < cnt; i++)
{
var item:TransitionItem = _items[i];
if (item.target != null)
{
if (item.displayLockToken!=0)
{
item.target.releaseDisplayLock(item.displayLockToken);
item.displayLockToken = 0;
}
if (item.filterCreated)
{
item.filterCreated = false;
item.target.filters = null;
}
}
}
if(this._onComplete != null) {
var handler: Handler = this._onComplete;
this._onComplete = null;
handler.run();
}
}
}
}
}
private function applyValue(item: TransitionItem,value: TransitionValue):void {
item.target._gearLocked = true;
switch(item.type) {
case TransitionActionType.XY:
if(item.target == this._owner) {
var f1: Number = 0,f2: Number = 0;
if(!value.b1)
f1 = item.target.x;
else
f1 = value.f1 + this._ownerBaseX;
if(!value.b2)
f2 = item.target.y;
else
f2 = value.f2 + this._ownerBaseY;
item.target.setXY(f1,f2);
}
else {
if(!value.b1)
value.f1 = item.target.x;
if(!value.b2)
value.f2 = item.target.y;
item.target.setXY(value.f1,value.f2);
}
break;
case TransitionActionType.Size:
if(!value.b1)
value.f1 = item.target.width;
if(!value.b2)
value.f2 = item.target.height;
item.target.setSize(value.f1,value.f2);
break;
case TransitionActionType.Pivot:
item.target.setPivot(value.f1,value.f2);
break;
case TransitionActionType.Alpha:
item.target.alpha = value.f1;
break;
case TransitionActionType.Rotation:
item.target.rotation = value.i;
break;
case TransitionActionType.Scale:
item.target.setScale(value.f1,value.f2);
break;
case TransitionActionType.Skew:
item.target.setSkew(value.f1, value.f2);
break;
case TransitionActionType.Color:
IColorGear(item.target).color = value.s;
break;
case TransitionActionType.Animation:
if(!value.b1)
value.i = IAnimationGear(item.target).frame;
IAnimationGear(item.target).frame = value.i;
IAnimationGear(item.target).playing = value.b;
break;
case TransitionActionType.Visible:
item.target.visible = value.b;
break;
case TransitionActionType.Transition:
var trans: fairygui.Transition = GComponent(item.target).getTransition(value.s);
if(trans != null) {
if(value.i == 0)
trans.stop(false,true);
else if(trans.playing)
trans._totalTimes = value.i;
else {
item.completed = false;
this._totalTasks++;
if(this._reversed)
trans.playReverse(Handler.create(this, this.__playTransComplete,[item]), item.value.i);
else
trans.play(Handler.create(this, this.__playTransComplete, [item]), item.value.i);
}
}
break;
case TransitionActionType.Sound:
var pi: PackageItem = UIPackage.getItemByURL(value.s);
if(pi)
GRoot.inst.playOneShotSound(pi.owner.getItemAssetURL(pi));
else
GRoot.inst.playOneShotSound(value.s);
break;
case TransitionActionType.Shake:
item.startValue.f1 = 0;//offsetX
item.startValue.f2 = 0;//offsetY
item.startValue.f3 = item.value.f2;//shakePeriod
item.startValue.i = Laya.timer.currTimer;//startTime
Laya.timer.frameLoop(1, item, item.__shake, [this]);
this._totalTasks++;
item.completed = false;
break;
case TransitionActionType.ColorFilter:
var arr:Array = item.target.filters;
if(!arr || !(arr[0] is ColorFilter))
item.filterCreated = true;
var cm:ColorMatrix = new ColorMatrix();
cm.adjustBrightness(value.f1);
cm.adjustContrast(value.f2);
cm.adjustSaturation(value.f3);
cm.adjustHue(value.f4);
arr = [new ColorFilter(cm)];
item.target.filters = arr;
break;
}
item.target._gearLocked = false;
}
public function __shakeItem(item:TransitionItem):void {
var r: Number = Math.ceil(item.value.f1 * item.startValue.f3 / item.value.f2);
var rx: Number = (Math.random() * 2 - 1) * r;
var ry: Number = (Math.random() * 2 - 1) * r;
rx = rx > 0 ? Math.ceil(rx) : Math.floor(rx);
ry = ry > 0 ? Math.ceil(ry) : Math.floor(ry);
item.target._gearLocked = true;
item.target.setXY(item.target.x - item.startValue.f1 + rx, item.target.y - item.startValue.f2 + ry);
item.target._gearLocked = false;
item.startValue.f1 = rx;
item.startValue.f2 = ry;
var t: Number = Laya.timer.currTimer;
item.startValue.f3 -= (t - item.startValue.i) / 1000;
item.startValue.i = t;
if(item.startValue.f3 <= 0) {
item.target._gearLocked= true;
item.target.setXY(item.target.x - item.startValue.f1,item.target.y - item.startValue.f2);
item.target._gearLocked = false;
item.completed = true;
this._totalTasks--;
Laya.timer.clear(item, item.__shake);
this.checkAllComplete();
}
}
public function setup(xml: Object):void {
this.name = xml.getAttribute("name");
var str: String = xml.getAttribute("options");
if(str)
this._options = parseInt(str);
str = xml.getAttribute("autoPlay");
if(str)
this._autoPlay = str=="true";
if(this._autoPlay) {
str = xml.getAttribute("autoPlayRepeat");
if(str)
this.autoPlayRepeat = parseInt(str);
str = xml.getAttribute("autoPlayDelay");
if(str)
this.autoPlayDelay = parseFloat(str);
}
var col: Array = xml.childNodes;
var length1: Number = col.length;
for(var i1: Number = 0;i1 < length1;i1++) {
var cxml: Object = col[i1];
if(cxml.nodeName!="item")
continue;
var item: TransitionItem = new TransitionItem();
this._items.push(item);
item.time = parseInt(cxml.getAttribute("time")) / this.FRAME_RATE;
item.targetId = cxml.getAttribute("target");
str = cxml.getAttribute("type");
switch(str) {
case "XY":
item.type = TransitionActionType.XY;
break;
case "Size":
item.type = TransitionActionType.Size;
break;
case "Scale":
item.type = TransitionActionType.Scale;
break;
case "Pivot":
item.type = TransitionActionType.Pivot;
break;
case "Alpha":
item.type = TransitionActionType.Alpha;
break;
case "Rotation":
item.type = TransitionActionType.Rotation;
break;
case "Color":
item.type = TransitionActionType.Color;
break;
case "Animation":
item.type = TransitionActionType.Animation;
break;
case "Visible":
item.type = TransitionActionType.Visible;
break;
case "Sound":
item.type = TransitionActionType.Sound;
break;
case "Transition":
item.type = TransitionActionType.Transition;
break;
case "Shake":
item.type = TransitionActionType.Shake;
break;
case "ColorFilter":
item.type = TransitionActionType.ColorFilter;
break;
case "Skew":
item.type = TransitionActionType.Skew;
break;
default:
item.type = TransitionActionType.Unknown;
break;
}
item.tween = cxml.getAttribute("tween") == "true";
item.label = cxml.getAttribute("label");
if(item.tween) {
item.duration = parseInt(cxml.getAttribute("duration")) / this.FRAME_RATE;
if(item.time + item.duration > this._maxTime)
this._maxTime = item.time + item.duration;
str = cxml.getAttribute("ease");
if(str)
item.easeType = ToolSet.parseEaseType(str);
str = cxml.getAttribute("repeat");
if(str)
item.repeat = parseInt(str);
item.yoyo = cxml.getAttribute("yoyo") == "true";
item.label2 = cxml.getAttribute("label2");
var v: String = cxml.getAttribute("endValue");
if(v) {
this.decodeValue(item.type,cxml.getAttribute("startValue"),item.startValue);
this.decodeValue(item.type,v,item.endValue);
}
else {
item.tween = false;
this.decodeValue(item.type,cxml.getAttribute("startValue"),item.value);
}
}
else {
if(item.time > this._maxTime)
this._maxTime = item.time;
this.decodeValue(item.type,cxml.getAttribute("value"),item.value);
}
}
}
private function decodeValue(type: Number,str: String,value: TransitionValue):void {
var arr: Array;
switch(type) {
case TransitionActionType.XY:
case TransitionActionType.Size:
case TransitionActionType.Pivot:
case TransitionActionType.Skew:
arr = str.split(",");
if(arr[0] == "-") {
value.b1 = false;
}
else {
value.f1 = parseFloat(arr[0]);
value.b1 = true;
}
if(arr[1] == "-") {
value.b2 = false;
}
else {
value.f2 = parseFloat(arr[1]);
value.b2 = true;
}
break;
case TransitionActionType.Alpha:
value.f1 = parseFloat(str);
break;
case TransitionActionType.Rotation:
value.i = parseInt(str);
break;
case TransitionActionType.Scale:
arr = str.split(",");
value.f1 = parseFloat(arr[0]);
value.f2 = parseFloat(arr[1]);
break;
case TransitionActionType.Color:
value.s = str;
break;
case TransitionActionType.Animation:
arr = str.split(",");
if(arr[0] == "-") {
value.b1 = false;
}
else {
value.i = parseInt(arr[0]);
value.b1 = true;
}
value.b = arr[1] == "p";
break;
case TransitionActionType.Visible:
value.b = str == "true";
break;
case TransitionActionType.Sound:
arr = str.split(",");
value.s = arr[0];
if(arr.length > 1) {
var intv: Number = parseInt(arr[1]);
if(intv == 0 || intv == 100)
value.f1 = 1;
else
value.f1 = intv / 100;
}
else
value.f1 = 1;
break;
case TransitionActionType.Transition:
arr = str.split(",");
value.s = arr[0];
if(arr.length > 1)
value.i = parseInt(arr[1]);
else
value.i = 1;
break;
case TransitionActionType.Shake:
arr = str.split(",");
value.f1 = parseFloat(arr[0]);
value.f2 = parseFloat(arr[1]);
break;
case TransitionActionType.ColorFilter:
arr = str.split(",");
value.f1 = parseFloat(arr[0]);
value.f2 = parseFloat(arr[1]);
value.f3 = parseFloat(arr[2]);
value.f4 = parseFloat(arr[3]);
break;
}
}
}
}
import fairygui.GObject;
import laya.utils.Ease;
import laya.utils.Handler;
import laya.utils.Tween;
class TransitionActionType {
public static const XY: int = 0;
public static const Size: int = 1;
public static const Scale: int = 2;
public static const Pivot: int = 3;
public static const Alpha: int = 4;
public static const Rotation: int = 5;
public static const Color: int = 6;
public static const Animation: int = 7;
public static const Visible:int = 8;
public static const Sound:int=9;
public static const Transition:int=10;
public static const Shake:int = 11;
public static const ColorFilter:int = 12;
public static const Skew:int = 13;
public static const Unknown:int = 14;
}
class TransitionItem {
public var time: Number = 0;
public var targetId: String;
public var type: Number = 0;
public var duration: Number = 0;
public var value: TransitionValue;
public var startValue: TransitionValue;
public var endValue: TransitionValue;
public var easeType: Function;
public var repeat: Number = 0;
public var yoyo: Boolean = false;
public var tween: Boolean = false;
public var label: String;
public var label2: String;
public var hook: Handler;
public var hook2: Handler;
public var tweenTimes: Number = 0;
public var tweener: Tween;
public var completed: Boolean = false;
public var target: GObject;
public var filterCreated:Boolean;
public var displayLockToken:int = 0;
public function TransitionItem() {
this.easeType = Ease.quadOut;
this.value = new TransitionValue();
this.startValue = new TransitionValue();
this.endValue = new TransitionValue();
}
public function __shake(trans:Object):void {
trans.__shakeItem(this);
}
}
class TransitionValue {
public var f1: Number = 0;
public var f2: Number = 0;
public var f3: Number = 0;
public var f4:Number;
public var i: Number = 0;
public var b: Boolean = false;
public var s: String;
public var b1: Boolean = true;
public var b2: Boolean = true;
}
| 28.214286
| 120
| 0.60284
|
276d97f7a4d7717bf1b7a0994ad6c42239e57b98
| 370
|
as
|
ActionScript
|
test/org/osflash/vanilla/testdata/PersonPublicFieldsMetadata.as
|
projectkit/as3-travisci
|
2672b129121440f03329964931637232e103a492
|
[
"MIT"
] | 28
|
2015-01-11T23:27:38.000Z
|
2021-02-03T21:15:19.000Z
|
test/org/osflash/vanilla/testdata/PersonPublicFieldsMetadata.as
|
projectkit/as3-travisci
|
2672b129121440f03329964931637232e103a492
|
[
"MIT"
] | 3
|
2015-03-20T13:07:04.000Z
|
2016-04-13T11:48:10.000Z
|
test/org/osflash/vanilla/testdata/PersonPublicFieldsMetadata.as
|
projectkit/as3-travisci
|
2672b129121440f03329964931637232e103a492
|
[
"MIT"
] | 9
|
2015-06-11T06:03:32.000Z
|
2019-05-29T14:12:22.000Z
|
package org.osflash.vanilla.testdata
{
/**
* The fields of this VO don't map to the properties of the source object, we defined Marshalling rules in the
* Metadata to create the correct mappings.
*/
public class PersonPublicFieldsMetadata
{
[Marshall (field="myName")]
public var name : String;
[Marshall (field="myAge")]
public var age : uint;
}
}
| 23.125
| 111
| 0.705405
|
71cf6ec48317ea54f4e0addb5751208a4f3afbb1
| 613
|
as
|
ActionScript
|
src/com/likya/pinara/containers/StatuConst.as
|
likyateknoloji/pinaraui-royale
|
0adedeaa01b9ae5dab89382dc078caa2eb3c992c
|
[
"Apache-2.0"
] | null | null | null |
src/com/likya/pinara/containers/StatuConst.as
|
likyateknoloji/pinaraui-royale
|
0adedeaa01b9ae5dab89382dc078caa2eb3c992c
|
[
"Apache-2.0"
] | 11
|
2018-10-01T19:27:32.000Z
|
2018-10-13T16:30:01.000Z
|
src/com/likya/pinara/containers/StatuConst.as
|
likyateknoloji/pinaraui-royale
|
0adedeaa01b9ae5dab89382dc078caa2eb3c992c
|
[
"Apache-2.0"
] | null | null | null |
package com.likya.pinara.containers
{
public class StatuConst
{
public static const FILTER_ALL:int = -1;
public static const FILTER_READY:int = 0;
public static const FILTER_WAITING:int = 1;
public static const FILTER_WORKING:int = 2;
public static const FILTER_SUCCESSFUL:int = 3;
public static const FILTER_FAILED:int = 4;
public static const FILTER_TIMEOUT:int = 5;
public static const FILTER_SKIPPED:int = 6;
public static const FILTER_STOPPED:int = 7;
public static const FILTER_PAUSED:int = 8;
public static const FILTER_DISABLED:int = 9;
public function StatuConst() {}
}
}
| 30.65
| 48
| 0.745514
|
a993198bffa57370eac8793795b839593f9c076a
| 7,484
|
as
|
ActionScript
|
src/main/as3/org/as3collections/utils/QueueUtil.as
|
flsilva/as3collections
|
6b407c3327bc89343223c776f39fa229a08d7a59
|
[
"MIT"
] | 1
|
2016-08-02T23:01:34.000Z
|
2016-08-02T23:01:34.000Z
|
src/main/as3/org/as3collections/utils/QueueUtil.as
|
flsilva/as3collections
|
6b407c3327bc89343223c776f39fa229a08d7a59
|
[
"MIT"
] | null | null | null |
src/main/as3/org/as3collections/utils/QueueUtil.as
|
flsilva/as3collections
|
6b407c3327bc89343223c776f39fa229a08d7a59
|
[
"MIT"
] | null | null | null |
/*
* Licensed under the MIT License
*
* Copyright 2010 (c) Flávio Silva, http://flsilva.com
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.opensource.org/licenses/mit-license.php
*/
package org.as3collections.utils
{
import flash.errors.IllegalOperationError;
import org.as3collections.IQueue;
import org.as3collections.queues.TypedQueue;
import org.as3collections.queues.UniqueQueue;
/**
* A utility class to work with implementations of the <code>IQueue</code> interface.
*
* @author Flávio Silva
*/
public class QueueUtil
{
/**
* <code>QueueUtil</code> is a static class and shouldn't be instantiated.
*
* @throws IllegalOperationError <code>QueueUtil</code> is a static class and shouldn't be instantiated.
*/
public function QueueUtil()
{
throw new IllegalOperationError("QueueUtil is a static class and shouldn't be instantiated.");
}
/**
* Returns a new <code>TypedQueue</code> with the <code>wrapList</code> argument wrapped.
*
* @example
*
* <listing version="3.0">
* import org.as3collections.IQueue;
* import org.as3collections.queues.LinearQueue;
* import org.as3collections.queues.TypedQueue;
* import org.as3collections.utils.QueueUtil;
*
* var q1:IQueue = new LinearQueue([1, 5, 3, 7]);
*
* var queue1:IQueue = QueueUtil.getTypedQueue(q1);
*
* queue1 // [1,5,3,7]
* queue1.size(): // 4
* queue1.isEmpty() // false
*
* queue1.poll() // 1
* queue1 // [5,3,7]
*
* queue1.offer(2) // true
* queue1 // [5,3,7,2]
*
* queue1.offer(5) // true
* queue1 // [5,3,7,2,5]
*
* queue1.offer("a") // false
* queue1 // [5,3,7,2,5]
*
* queue1.add("a") // ClassCastError: Invalid element type. element: a | type: String | expected type: int
* </listing>
*
* @param wrapQueue the target queue to be wrapped by the <code>TypedQueue</code>.
* @param type the type of the elements allowed by the returned <code>TypedQueue</code>.
* @throws ArgumentError if the <code>queue</code> argument is <code>null</code>.
* @throws ArgumentError if the <code>type</code> argument is <code>null</code>.
* @throws org.as3coreaddendum.errors.ClassCastError if the types of one or more elements in the <code>wrapQueue</code> argument are incompatible with the <code>type</code> argument.
* @return a new <code>TypedQueue</code> with the <code>queue</code> argument wrapped.
*/
public static function getTypedQueue(wrapQueue:IQueue, type:*): TypedQueue
{
return new TypedQueue(wrapQueue, type);
}
/**
* Returns a new <code>UniqueQueue</code> with the <code>wrapQueue</code> argument wrapped.
*
* @example
*
* <listing version="3.0">
* import org.as3collections.IQueue;
* import org.as3collections.queues.LinearQueue;
* import org.as3collections.queues.UniqueQueue;
* import org.as3collections.utils.QueueUtil;
*
* var q1:IQueue = new LinearQueue([1, 5, 3, 7]);
*
* var queue1:IQueue = new UniqueQueue(q1); // you can use this way
*
* //var queue1:IQueue = QueueUtil.getUniqueQueue(q1); // or you can use this way
*
* queue1 // [1,5,3,7]
* queue1.size() // 4
* queue1.isEmpty() // false
*
* queue1.poll() // 1
* queue1 // [5,3,7]
*
* queue1.offer(2) // true
* queue1 // [5,3,7,2]
*
* queue1.offer(5) // false
* queue1 // [5,3,7,2]
*
* queue1.add(5) // Error: UniqueQueue is a unique queue and does not allow duplicated elements. Requested element: 5
* </listing>
*
* @param wrapQueue the target queue to be wrapped by the <code>UniqueQueue</code>.
* @throws ArgumentError if the <code>queue</code> argument is <code>null</code>.
* @return a new <code>UniqueQueue</code> with the <code>queue</code> argument wrapped.
*/
public static function getUniqueQueue(wrapQueue:IQueue): UniqueQueue
{
return new UniqueQueue(wrapQueue);
}
/**
* Returns a new <code>TypedQueue</code> that wraps a new <code>UniqueQueue</code> that wraps the <code>wrapQueue</code> argument.
* <p>The result will be a unique and typed array queue, despite of the return type <code>TypedQueue</code>.</p>
*
* @example
*
* <listing version="3.0">
* import org.as3collections.IQueue;
* import org.as3collections.queues.Queue;
* import org.as3collections.queues.TypedQueue;
* import org.as3collections.utils.QueueUtil;
*
* var q1:IQueue = new LinearQueue([1, 5, 3, 7]);
*
* var queue1:IQueue = QueueUtil.getUniqueTypedQueue(q1, int);
*
* queue1 // [1,5,3,7]
* queue1.size() // 4
* queue1.isEmpty() // false
*
* queue1.poll() // 1
* queue1 // [5,3,7]
*
* queue1.offer(2) // true
* queue1 // [5,3,7,2]
*
* queue1.offer(5) // false
* queue1 // [5,3,7,2]
*
* queue1.add(5) // Error: UniqueQueue is a unique queue and does not allow duplicated elements. Requested element: 5
*
* queue1.offer("a") // false
* queue1 // [5,3,7,2]
*
* queue1.add("a") // ClassCastError: Invalid element type. element: a | type: String | expected type: int
* </listing>
*
* @param wrapQueue the target queue to be wrapped.
* @param type the type of the elements allowed by the returned <code>TypedQueue</code>.
* @throws ArgumentError if the <code>queue</code> argument is <code>null</code>.
* @throws ArgumentError if the <code>type</code> argument is <code>null</code>.
* @throws org.as3coreaddendum.errors.ClassCastError if the types of one or more elements in the <code>wrapQueue</code> argument are incompatible with the <code>type</code> argument.
* @return a new <code>TypedQueue</code> with the <code>queue</code> argument wrapped.
*/
public static function getUniqueTypedQueue(wrapQueue:IQueue, type:*): TypedQueue
{
return new TypedQueue(new UniqueQueue(wrapQueue), type);
}
}
}
| 38.57732
| 188
| 0.621726
|
4afe9c1935098c13cbbc02f42182b62903364b6c
| 1,401
|
as
|
ActionScript
|
as3SDK/EventBigCloud.as
|
claymodel/bigcloud
|
ee7e69bc428fcf495e135bceec11356bf22b94dc
|
[
"MIT"
] | null | null | null |
as3SDK/EventBigCloud.as
|
claymodel/bigcloud
|
ee7e69bc428fcf495e135bceec11356bf22b94dc
|
[
"MIT"
] | null | null | null |
as3SDK/EventBigCloud.as
|
claymodel/bigcloud
|
ee7e69bc428fcf495e135bceec11356bf22b94dc
|
[
"MIT"
] | null | null | null |
package com.bigcloud
{
public class EventBigCloud
{
private var _key:String;
private var _segmentationKey:String;
private var _segmentationValue:String;
private var _count:int;
private var _sum:Number;
private var _timestamp:Number;
public function EventBigCloud ()
{
_key = null;
_segmentationKey = null;
_segmentationValue = null;
_count = 0;
_sum = 0;
_timestamp = 0;
}
public function get key():String
{
return _key;
}
public function set key ( value:String ):void
{
_key = value;
}
public function get segmentationKey():String
{
return _segmentationKey;
}
public function set segmentationKey ( value:String ):void
{
_segmentationKey = value;
}
public function get segmentationValue():String
{
return _segmentationValue;
}
public function set segmentationValue ( value:String ):void
{
_segmentationValue = value;
}
public function get count():int
{
return _count;
}
public function set count ( value:int ):void
{
_count = value;
}
public function get sum():Number
{
return _sum;
}
public function set sum ( value:Number ):void
{
_sum = value;
}
public function get timestamp():Number
{
return _timestamp;
}
public function set timestamp ( value:Number ):void
{
_timestamp = value;
}
}
}
| 16.879518
| 61
| 0.64454
|
31043b96f564572fe1e4f268b922ebe72e0c22b9
| 813
|
as
|
ActionScript
|
src/net/wooga/selectors/SelectorFactory.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
src/net/wooga/selectors/SelectorFactory.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
src/net/wooga/selectors/SelectorFactory.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
package net.wooga.selectors {
import net.wooga.selectors.usagepatterns.SelectorGroup;
import net.wooga.selectors.usagepatterns.SelectorPool;
public interface SelectorFactory {
function initializeWith(rootObject:Object, externalPropertySource:ExternalPropertySource = null):void;
function createSelector(selectorString:String):SelectorGroup;
function createSelectorPool():SelectorPool;
function addPseudoClass(className:String, pseudoClassType:Class, constructorArguments:Array=null):void;
function setSelectorAdapterForType(adapterType:Class, objectType:Class):void;
function setDefaultSelectorAdapter(adapterType:Class):void;
function createSelectorAdapterFor(object:Object, overrideDefaultSelectorAdapter:Class = null):void;
function removeSelectorAdapterOf(object:Object):void;
}
}
| 35.347826
| 105
| 0.835178
|
7809ea0bdfde18d28ae95ef48e0e29cd766f577f
| 2,372
|
as
|
ActionScript
|
examples/src/com/hsharma/hungryHero/ui/SoundButton.as
|
matrix3d/spritejs
|
0fd5792f4db6127f17e57011cc034782ec933dda
|
[
"MIT"
] | 99
|
2015-12-01T08:42:16.000Z
|
2021-02-04T01:48:20.000Z
|
test/src/com/hsharma/hungryHero/ui/SoundButton.as
|
weimingtom/spriteflexjs
|
6545f09f3ff6329eeceacaa5122a83503bd40e97
|
[
"MIT"
] | 28
|
2016-02-15T18:28:05.000Z
|
2021-07-06T07:40:20.000Z
|
test/src/com/hsharma/hungryHero/ui/SoundButton.as
|
weimingtom/spriteflexjs
|
6545f09f3ff6329eeceacaa5122a83503bd40e97
|
[
"MIT"
] | 32
|
2015-12-01T19:03:41.000Z
|
2022-01-06T14:08:54.000Z
|
/**
*
* Hungry Hero Game
* http://www.hungryherogame.com
*
* Copyright (c) 2012 Hemanth Sharma (www.hsharma.com). All rights reserved.
*
* This ActionScript source code is free.
* You can redistribute and/or modify it in accordance with the
* terms of the accompanying Simplified BSD License Agreement.
*
*/
package com.hsharma.hungryHero.ui
{
import com.hsharma.hungryHero.Assets;
import com.hsharma.hungryHero.Button;
import com.hsharma.hungryHero.StarlingMovieClip;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.MovieClip;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
/**
* This class is the sound/mute button.
*
* @author hsharma
*
*/
public class SoundButton extends Button
{
/** Animation shown when sound is playing. */
private var mcUnmuteState:StarlingMovieClip;
/** Image shown when the sound is muted. */
private var imageMuteState:Shape;
public function SoundButton()
{
//super(new BitmapData(com.hsharma.hungryHero.Assets.getAtlas().getTexture("soundOff").width, com.hsharma.hungryHero.Assets.getAtlas().getTexture("soundOff").height, true, 0));
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
/**
* On added to stage.
* @param event
*
*/
private function onAddedToStage(event:Event):void
{
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
setButtonTextures();
showUnmuteState();
}
/**
* Set textures for button states.
*
*/
private function setButtonTextures():void
{
// Normal state - image
mcUnmuteState = new StarlingMovieClip(com.hsharma.hungryHero.Assets.getAtlas().getTextures("soundOn"), 3);
this.addChild(mcUnmuteState);
// Selected state - animation
imageMuteState =new Shape
Assets.getAtlas().getTexture(imageMuteState.graphics,"soundOff");
this.addChild(imageMuteState);
}
/**
* Show Off State - Show the mute symbol (sound is muted).
*
*/
public function showUnmuteState():void
{
mcUnmuteState.visible = true;
imageMuteState.visible = false;
}
/**
* Show On State - Show the unmute animation (sound is playing).
*
*/
public function showMuteState():void
{
mcUnmuteState.visible = false;
imageMuteState.visible = true;
}
}
}
| 24.708333
| 179
| 0.697723
|
9e1e62debe01a61261f6724f1c27882d36289d71
| 3,627
|
as
|
ActionScript
|
src/as/com/threerings/msoy/applets/net/Downloader.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 21
|
2015-04-30T10:28:47.000Z
|
2021-06-23T23:00:45.000Z
|
src/as/com/threerings/msoy/applets/net/Downloader.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 36
|
2015-07-29T20:50:57.000Z
|
2021-09-18T22:37:25.000Z
|
src/as/com/threerings/msoy/applets/net/Downloader.as
|
VirtueDev/synced_repo
|
adc1b61ad68402492386fa011e4c628d6588c800
|
[
"BSD-3-Clause"
] | 35
|
2015-04-30T10:29:41.000Z
|
2022-02-15T21:17:01.000Z
|
//
// $Id$
package com.threerings.msoy.applets.net {
import flash.events.ErrorEvent;
import flash.events.Event;
import flash.events.HTTPStatusEvent;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import mx.containers.TitleWindow;
import mx.controls.ProgressBar;
import mx.controls.TextArea;
import mx.events.CloseEvent;
import mx.managers.PopUpManager;
import com.threerings.util.ValueEvent;
import com.threerings.flex.FlexUtil;
import com.threerings.msoy.applets.AppletContext;
public class Downloader extends TitleWindow
{
public function Downloader (ctx :AppletContext)
{
title = ctx.APPLET.get("t.downloading");
showCloseButton = true;
addEventListener(CloseEvent.CLOSE, handleClose);
_loader = new URLLoader();
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, handleDownloadStatus);
_loader.addEventListener(IOErrorEvent.IO_ERROR, handleDownloadError);
_loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleDownloadError);
_loader.addEventListener(Event.COMPLETE, handleDownloadComplete);
_progress = new ProgressBar();
_progress.percentWidth = 100;
FlexUtil.setVisible(_progress, false);
_progress.source = _loader;
addChild(_progress);
PopUpManager.addPopUp(this, ctx.getApplication(), true);
PopUpManager.centerPopUp(this);
}
public function startDownload (url :String = null, forcedName :String = null) :void
{
if (url == null) {
return;
}
_forcedName = forcedName;
FlexUtil.setVisible(_progress, true);
_url = url;
_loader.load(new URLRequest(url));
}
protected function handleDownloadStatus (event :HTTPStatusEvent) :void
{
//_status.text = "HTTP Status: " + event.status;
// I'm pretty sure certain URLs will give a status and that's it, so we
// need to be prepared to stop the download here.
//downloadStopped();
}
protected function handleDownloadError (event :ErrorEvent) :void
{
var status :TextArea = new TextArea();
status.percentWidth = 100;
status.editable = false;
status.setStyle("borderStyle", "none");
status.text = "Error downloading: " + event.text;
addChild(status);
downloadStopped();
}
protected function downloadStopped () :void
{
FlexUtil.setVisible(_progress, false);
}
protected function handleDownloadComplete (event :Event) :void
{
close([ makeFilename(_url), _loader.data ]);
}
protected function makeFilename (url :String) :String
{
if (_forcedName != null) {
return _forcedName;
}
return url.substr(url.lastIndexOf("/") + 1); // works even if index is -1
}
protected function handleClose (event :CloseEvent) :void
{
close();
}
protected function close (returnValue :Object = null) :void
{
try {
_loader.close();
} catch (err :Error) {
// ignore
}
PopUpManager.removePopUp(this);
dispatchEvent(new ValueEvent(Event.COMPLETE, returnValue));
}
protected var _loader :URLLoader;
protected var _progress :ProgressBar;
protected var _url :String;
/** If non-null, a forced filename to use with this download. */
protected var _forcedName :String;
}
}
| 27.687023
| 89
| 0.663634
|
12d201cca380f6831084f258e8dcb504294f6a75
| 8,385
|
as
|
ActionScript
|
src/org/actionstep/toolTip/ASToolTip.as
|
shyndman/ActionStep
|
452d86d597ac4e2e9d86f25dfbadbfcd73e6e5eb
|
[
"BSD-3-Clause"
] | 2
|
2015-07-07T23:46:25.000Z
|
2021-05-22T07:14:19.000Z
|
src/org/actionstep/toolTip/ASToolTip.as
|
shyndman/ActionStep
|
452d86d597ac4e2e9d86f25dfbadbfcd73e6e5eb
|
[
"BSD-3-Clause"
] | null | null | null |
src/org/actionstep/toolTip/ASToolTip.as
|
shyndman/ActionStep
|
452d86d597ac4e2e9d86f25dfbadbfcd73e6e5eb
|
[
"BSD-3-Clause"
] | 1
|
2021-05-22T07:14:25.000Z
|
2021-05-22T07:14:25.000Z
|
/* See LICENSE for copyright and terms of use */
import org.actionstep.ASTextRenderer;
import org.actionstep.ASUtils;
import org.actionstep.NSEvent;
import org.actionstep.NSNotification;
import org.actionstep.NSPoint;
import org.actionstep.NSRect;
import org.actionstep.NSSize;
import org.actionstep.NSTimer;
import org.actionstep.NSView;
import org.actionstep.NSWindow;
import org.actionstep.themes.ASTheme;
/**
* This class represents a tool tip. It handles styling, mouse events and
* positioning.
*
* This class should never be used directly. If you wish to use tool tips in
* your views, please see <code>NSView#setToolTip</code> or
* <code>NSView#addToolTipRectOwnerUserData</code>.
*
* @author Scott Hyndman
*/
class org.actionstep.toolTip.ASToolTip extends ASTextRenderer {
private static var g_instance:ASToolTip;
private static var g_window:NSWindow;
private var m_showTimer:NSTimer;
private var m_hideTimer:NSTimer;
private var m_ttPosition:NSPoint;
private var m_curView:NSView;
private var m_hideOnMouseMove:Boolean;
/**
* Since there is only ever one tooltip at a time, the contructor is private
* and access to the instance is provided through
* <code>#getInstance()</code>.
*/
private function ASToolTip() {
super();
m_showTimer = new NSTimer();
m_hideTimer = new NSTimer();
m_rightMargin = m_leftMargin = m_topMargin = m_bottomMargin = 2;
setStyleCSS(ASTheme.current().toolTipStyleCss());
//setUsesEmbeddedFonts(ASTheme.current().isToolTipFontEmbedded());
setAutomaticResize(true);
setWordWrap(false);
}
/**
* Initializes the tooltip with a size.
*/
public function initWithFrame(frame:NSRect):ASToolTip {
super.initWithFrame(frame);
return this;
}
/**
* Adds a drop shadow to the tooltip.
*/
public function createMovieClips():Void {
super.createMovieClips();
m_textField.selectable = false;
}
//******************************************************
//* Describing the object
//******************************************************
/**
* Returns a string representation of the tool tip.
*/
public function description():String {
return "ASToolTip(text=" + text() + ")";
}
//******************************************************
//* Properties
//******************************************************
/**
* Sets the text of the tooltip.
*
* This is overriden to apply styling tags and to fix layout issues.
*/
public function setText(text:String):Void {
super.setText("<tipText>" + text + "</tipText>");
//
// FIXME: This is bad. Figure out another way to do this.
//
m_automaticResize = false;
setFrameSize(frame().size.subtractSize(new NSSize(5, 5)));
m_automaticResize = true;
}
/**
* Returns the view for which this tooltip is currently showing text.
*/
public function currentView():NSView {
return m_curView;
}
//******************************************************
//* Private methods
//******************************************************
/**
* Called by the timer to show the tool tip.
*/
private function showToolTip(timer:NSTimer, event:NSEvent):Void {
var str:String;
var ttp:Object = event.userData.__tipTextProvider;
if (ASUtils.respondsToSelector(ttp, "viewStringForToolTipPointUserData")) {
str = ttp["viewStringForToolTipPointUserData"](
event.view,
event.userData.tag,
event.mouseLocation,
event.userData);
} else {
str = ttp.toString();
}
//
// Do nothing if no tooltip.
//
if (str == null) {
return;
}
//
// setText will result in frame changing size, and a notification
// will be posted. onFrameChange recieves this notification and does
// its thing
//
setText(str);
setNeedsDisplay(true);
setHidden(false);
resizeWindow();
g_window.rootView().setHidden(false);
g_window.display();
//
// Record whether we should hide on a mouse move event.
//
m_hideOnMouseMove = event.userData.__hideOnMouseMove;
//
// Start autopop timer.
//
resetAutoPopTimer();
}
/**
* Hides the tooltip.
*/
public function hideToolTip():Void {
mouseExited();
}
/**
* Resizes the tooltip window for proper display. This method also accounts
* for any shifting that may need to occur if the tooltip is too long to
* display where it should.
*/
private function resizeWindow():Void {
var b:NSRect = bounds();
//
// This is kind of bad, but whatever. We probably should be targeting
// some known mouse location.
//
var ms:NSPoint = new NSPoint(_root._xmouse, _root._ymouse);
var pt:NSPoint = ms.translate(0, 24);
//
// Zero out window so it doesn't interfere with stage sizes.
//
g_window.setFrame(NSRect.ZeroRect);
//
// Account for stage size
//
if (pt.x + b.size.width > Stage.width) {
pt.x = Stage.width - b.size.width;
}
if (pt.y + b.size.height > Stage.height) {
pt.y = ms.translate(0, -b.size.height - 4).y;
}
g_window.setFrame(NSRect.withOriginSize(pt, b.size));
}
//******************************************************
//* Events Handlers
//******************************************************
/**
* Begins the initial delay timer.
*/
public function mouseEntered(event:NSEvent):Void {
resetShowTimer(event);
}
/**
* Resets the autopop timer.
*/
public function mouseMoved(event:NSEvent):Void {
if (isHidden()) {
resetShowTimer(event);
}
else if (m_hideOnMouseMove) {
hideToolTip();
}
}
/**
* Stops the wait timer and hides the tooltip.
*/
public function mouseExited(event:NSEvent):Void {
m_curView = null;
m_showTimer.invalidate();
m_hideTimer.invalidate();
setHidden(true);
g_window.rootView().setHidden(true);
}
//******************************************************
//* Helper Methods
//******************************************************
private function resetShowTimer(event:NSEvent):Void
{
m_curView = event.view;
m_showTimer.invalidate();
m_showTimer.initWithFireDateIntervalTargetSelectorUserInfoRepeats(
new Date(), ASTheme.current().toolTipInitialDelay(), this,
"showToolTip",
event.copyWithZone(), false);
}
private function resetAutoPopTimer():Void
{
stopAutoPopTimer();
m_hideTimer.initWithFireDateIntervalTargetSelectorUserInfoRepeats(
new Date(), ASTheme.current().toolTipAutoPopDelay(), this,
"hideToolTip", null, false);
}
private function stopAutoPopTimer():Void
{
m_hideTimer.invalidate();
}
//******************************************************
//* Drawing
//******************************************************
public function drawRect(aRect:NSRect):Void {
m_graphics.clear();
ASTheme.current().drawToolTipWithRectInView(aRect, this);
}
//******************************************************
//* Singleton and Initialization Stuff
//******************************************************
/**
* @return Singleton instance of ASToolTip.
*/
public static function getInstance():ASToolTip {
return g_instance;
}
/**
* Creates the top level window in which tool tips are drawn.
*/
private static function createToolTipWindow():NSWindow {
var window:NSWindow = new NSWindow();
//
// These sizes are changed later
//
window.initWithContentRectSwf(new NSRect(0, 0, 2000, 2000),
ASTheme.current().toolTipSwf());
//
// Define event handlers for the window
//
var delegate:Object = new Object();
delegate.windowDidDisplay = function(notification:NSNotification) {
window.setLevel(NSWindow.NSModalPanelWindowLevel);
};
window.setDelegate(delegate);
return window;
}
private static var g_constructed:Boolean;
/**
* Run automatically when NSApplication is constructed.
*/
private static function initialize():Void {
if (g_constructed) {
return;
}
g_instance = new ASToolTip();
g_instance.initWithFrame(new NSRect(0, 0, 300, 150));
g_window = createToolTipWindow();
g_window.contentView().addSubview(g_instance);
g_instance.setText("init text");
g_instance.resizeWindow();
g_window.display();
g_instance.setHidden(true);
g_window.rootView().setHidden(true);
// existence will not be felt
g_window.canBecomeKeyWindow = g_window.canBecomeMainWindow =
function():Boolean {
return false;
};
g_constructed = true;
}
}
| 25.18018
| 77
| 0.62743
|
2c9d7abe1199be67c7c62e7ef56aeaa0bca8f679
| 682
|
as
|
ActionScript
|
swf/com/playata/framework/display/lib/flash/FlashRichLabelArea.as
|
lukastechhonda/BigBangEmpireBot
|
5d5666c9d06111dc079f61b6038e2338d21fc8a7
|
[
"MIT"
] | 1
|
2019-10-31T13:49:58.000Z
|
2019-10-31T13:49:58.000Z
|
swf/com/playata/framework/display/lib/flash/FlashRichLabelArea.as
|
lukastechhonda/BigBangEmpireBot
|
5d5666c9d06111dc079f61b6038e2338d21fc8a7
|
[
"MIT"
] | 11
|
2018-09-30T15:17:00.000Z
|
2022-02-13T11:52:26.000Z
|
swf/com/playata/framework/display/lib/flash/FlashRichLabelArea.as
|
Zweer/BigBangEmpireBot
|
d0fd04118822bf0eb6fffd271ce944f0475c5998
|
[
"MIT"
] | 6
|
2018-06-18T18:43:46.000Z
|
2021-03-03T21:48:43.000Z
|
package com.playata.framework.display.lib.flash
{
import com.playata.framework.core.TypedObject;
import com.playata.framework.display.ui.controls.IRichLabelArea;
import flash.text.TextField;
public class FlashRichLabelArea extends FlashRichTextField implements IRichLabelArea
{
public function FlashRichLabelArea(param1:TypedObject, param2:TextField = null)
{
super(param1,param2);
_textField.multiline = true;
interactionEnabled = false;
}
public static function fromNative(param1:TextField) : FlashRichLabelArea
{
return new FlashRichLabelArea(null,param1);
}
}
}
| 28.416667
| 87
| 0.68915
|
d7a264ecb74edead9168cc58dbfa55c0ff590fe7
| 4,864
|
as
|
ActionScript
|
tests/GAv4/com/google/analytics/BridgeTest.as
|
mrthuanvn/gaforflash
|
708906f38764cb3c1a644d8e9883b6bbce867afe
|
[
"Apache-2.0"
] | 1
|
2021-01-11T12:42:06.000Z
|
2021-01-11T12:42:06.000Z
|
tests/GAv4/com/google/analytics/BridgeTest.as
|
mrthuanvn/gaforflash
|
708906f38764cb3c1a644d8e9883b6bbce867afe
|
[
"Apache-2.0"
] | null | null | null |
tests/GAv4/com/google/analytics/BridgeTest.as
|
mrthuanvn/gaforflash
|
708906f38764cb3c1a644d8e9883b6bbce867afe
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright 2008 Adobe Systems Inc., 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Contributor(s):
* Zwetan Kjukov <zwetan@gmail.com>.
*/
package com.google.analytics
{
import com.google.analytics.external.JavascriptProxy;
import com.google.analytics.v4.Bridge;
import library.ASTUce.framework.TestCase;
/**
* those tests requires
* - to be run with a SWF embedded in HTML
* - the HTML to include the ga.js code
* <script src="http://www.google-analytics.com/ga.js"></script>
* - the flash param allowscriptaccess = always
*/
public class BridgeTest extends TestCase
{
private var _js:JavascriptProxy;
private var _bridge:Bridge;
public function BridgeTest(name:String="")
{
super(name);
}
public function setUp():void
{
_js = new JavascriptProxy();
if( !_js.isAvailable() )
{
return;
}
var data:XML =
<script>
<![CDATA[
function()
{
pT = _gat._getTracker("UA-332-1");
x = {};
x.y = {};
x.y.z = _gat._getTracker("UA-321-0");
_GATracker = {};
//alert( "pT="+pT );
}
]]>
</script>;
_js.executeBlock( data );
}
public function testAlreadyExistingValidTracker():void
{
if( !_js.isAvailable() )
{
return;
}
_bridge = new Bridge( "pT", _js );
assertTrue( _bridge.hasTrackingAccount( "pT" ) );
assertEquals( "UA-332-1", _bridge.getAccount() );
}
public function testAlreadyExistingValidTracker2():void
{
if( !_js.isAvailable() )
{
return;
}
_bridge = new Bridge( "x.y.z", _js );
assertTrue( _bridge.hasTrackingAccount( "x.y.z" ) );
assertEquals( "UA-321-0", _bridge.getAccount() );
}
public function testAlreadyExistingInvalidTracker():void
{
if( !_js.isAvailable() )
{
return;
}
try
{
_bridge = new Bridge( "foobar", _js );
}
catch( e:Error )
{
return;
}
fail();
}
public function testCreateTrackingObject():void
{
if( !_js.isAvailable() )
{
return;
}
_bridge = new Bridge( "UA-332-1", _js );
assertTrue( _bridge.hasTrackingAccount( "UA-332-1" ) );
assertEquals( "UA-332-1", _bridge.getAccount() );
}
// public function testJSObjExists():void
// {
// if( !_js.isAvailable() )
// {
// return;
// }
//
// var o1:Boolean = _bridge.jsTrackingObjExists("pT");
// var o2:Boolean = _bridge.jsTrackingObjExists("_GATracker['test']");
// var o3:Boolean = _bridge.jsTrackingObjExists("_GATracker.test");
// var o4:Boolean = _bridge.jsTrackingObjExists("document");
// var o5:Boolean = _bridge.jsTrackingObjExists("_GATracker['testBig']");
//
// assertEquals(true, o1);
// assertEquals(true, o2);
// assertEquals(true, o3);
// assertEquals(false, o4);
// assertEquals(false, o5);
// }
// public function testCreateTrackingObject():void
// {
// if( !_js.isAvailable() )
// {
// return;
// }
//
// var acctID:String = "UA-8-3";
// var oName1:String = _bridge.createJSTrackingObject(acctID);
//
// assertEquals("_GATracker['"+acctID+"']", oName1);
// }
}
}
| 29.658537
| 84
| 0.469778
|
d904d6c2c4d7d44e3fb90593f0cd16f7a7c74ef5
| 332
|
as
|
ActionScript
|
source/fairygui/DisplayListItem.as
|
xlsfs/FairyGUI-layabox
|
c86a8ddbf499dbef7fe06816096b7a406cfae810
|
[
"MIT"
] | null | null | null |
source/fairygui/DisplayListItem.as
|
xlsfs/FairyGUI-layabox
|
c86a8ddbf499dbef7fe06816096b7a406cfae810
|
[
"MIT"
] | null | null | null |
source/fairygui/DisplayListItem.as
|
xlsfs/FairyGUI-layabox
|
c86a8ddbf499dbef7fe06816096b7a406cfae810
|
[
"MIT"
] | null | null | null |
package fairygui
{
public class DisplayListItem
{
public var packageItem:PackageItem;
public var type:String;
public var desc:Object;
public var listItemCount:int;
public function DisplayListItem(packageItem:PackageItem, type:String)
{
this.packageItem = packageItem;
this.type = type;
}
}
}
| 20.75
| 72
| 0.704819
|
3c7989e8144f789d31696fd867d386b9b39bfff6
| 705
|
as
|
ActionScript
|
src/utils/GlobalConstValues.as
|
zrong/dragonbones-for-cocos2d-x
|
62acc9388551caf6b1b8d5233ef7174f0dfee88c
|
[
"MIT"
] | 24
|
2015-01-02T20:43:35.000Z
|
2021-02-21T07:46:56.000Z
|
src/utils/GlobalConstValues.as
|
ywl19891989/dragonbones-for-cocos2d-x
|
afb8a42de0f4f6f1a1c63c72f8a88263b73a731d
|
[
"MIT"
] | null | null | null |
src/utils/GlobalConstValues.as
|
ywl19891989/dragonbones-for-cocos2d-x
|
afb8a42de0f4f6f1a1c63c72f8a88263b73a731d
|
[
"MIT"
] | 15
|
2015-01-25T21:06:05.000Z
|
2020-08-14T09:06:38.000Z
|
package utils{
public class GlobalConstValues {
public static const SWF_SUFFIX:String = ".swf";
public static const PNG_SUFFIX:String = ".png";
public static const ZIP_SUFFIX:String = ".zip";
public static const OUTPUT_SUFFIX:String = "_output";
public static const SKELETON_XML_NAME:String = "skeleton.xml";
public static const TEXTURE_ATLAS_XML_NAME:String = "texture.xml";
public static const TEXTURE_NAME:String = "texture";
//====2013-08-30 zrong start
public static const SKELETON_AND_TEXTURE_XML_NAME:String = "skeleton_and_texture.xml";
public static const XML_SUFFIX:String = ".xml";
public static const PLIST_SUFFIX:String = ".plist";
//====2013-08-30 zrong end
}
}
| 41.470588
| 88
| 0.743262
|
a81fef67e81df01beadbad126f9180d1a07df983
| 704
|
as
|
ActionScript
|
Mypleer flash as3/src/starline/player/Main.as
|
starline/mypleer
|
491f432dc94f2b1fbc38a4e0d15a176b6b96be98
|
[
"Apache-2.0"
] | null | null | null |
Mypleer flash as3/src/starline/player/Main.as
|
starline/mypleer
|
491f432dc94f2b1fbc38a4e0d15a176b6b96be98
|
[
"Apache-2.0"
] | null | null | null |
Mypleer flash as3/src/starline/player/Main.as
|
starline/mypleer
|
491f432dc94f2b1fbc38a4e0d15a176b6b96be98
|
[
"Apache-2.0"
] | null | null | null |
package starline.player {
import flash.display.Sprite;
/**
* @author Guzhva Andrey
* @site http://aguzhva.com
* @date 14.10.2012
*/
public class Main extends Sprite {
// Static Vars
public static const MP_API_URL:String = 'https://mypleer.com/api.php';
public static const CS_SERVER_URL:String = 'http://cs.mypleer.com';
public static const SKINS_FOLDER:String = '/app/skins/';
public static const STATIONS_FOLDER:String = '/app/stations/';
public static const VIEWER_ID:int = 1;
public static const APP_ID:int = 1611909;
public static const APP_SECRET:String = 'gsCklp2aw47785';
public function Main() {
// что-то
}
}
}
| 25.142857
| 75
| 0.65625
|
125e5c5a29e1762bd1a2841c25f389dd58103ba7
| 1,158
|
as
|
ActionScript
|
NaitoAir/FinalFlash/NaitoMemorial/src/core/AppController.as
|
ninapavlich/NaitoLegacyProject
|
87a5eb91eaecf6d6d859a05e6a264e15a203f136
|
[
"MIT"
] | null | null | null |
NaitoAir/FinalFlash/NaitoMemorial/src/core/AppController.as
|
ninapavlich/NaitoLegacyProject
|
87a5eb91eaecf6d6d859a05e6a264e15a203f136
|
[
"MIT"
] | null | null | null |
NaitoAir/FinalFlash/NaitoMemorial/src/core/AppController.as
|
ninapavlich/NaitoLegacyProject
|
87a5eb91eaecf6d6d859a05e6a264e15a203f136
|
[
"MIT"
] | null | null | null |
package core
{
import command.*;
import events.AppEvent;
import events.Dispatcher;
import events.StateChangeEvent;
import flash.events.Event;
/**
*
* @author Nina Pavlich
*
* @overview
* bind event constants to command classes in the FrontController
* init() // adds commands to the FrontController for the different types of events; Each of the event types are a kind of Command.
*/
public class AppController
{
public static function init():void
{
var fc:SingletonFrontController = SingletonFrontController.instance;
fc.addCommand(AppEvent.LOADING, AppStartCommand);
fc.addCommand(AppEvent.TO_ATTRACT, ToAttractCommand);
fc.addCommand(AppEvent.TO_ABOUT, ToAboutCommand);
fc.addCommand(AppEvent.TO_OVERVIEW, ToOverviewCommand);
fc.addCommand(AppEvent.TO_FILTERS, ToFiltersCommand);
fc.addCommand(AppEvent.TO_FILTER, ToFilterCommand);
fc.addCommand(AppEvent.TO_STORY, ToStoryCommand);
fc.addCommand(AppEvent.TO_IMAGE, LoadImageCommand);
Dispatcher.getInstance().dispatchEvent(new Event(AppEvent.LOADING));
}
}
}
| 25.733333
| 133
| 0.707254
|
e76206deccea874b43c62bd7de029a0119fff47a
| 86
|
as
|
ActionScript
|
data/DofusInvoker/scripts/cmodule/lua_wrapper/_iolib.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 10
|
2019-11-10T21:24:38.000Z
|
2021-05-24T23:56:36.000Z
|
data/DofusInvoker/scripts/cmodule/lua_wrapper/_iolib.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 15
|
2021-01-27T21:41:58.000Z
|
2021-03-03T16:47:19.000Z
|
data/DofusInvoker/scripts/cmodule/lua_wrapper/_iolib.as
|
bot4dofus/Datafus
|
126838a84b0e41d5486d735aa38d78deeb8d6681
|
[
"MIT"
] | 3
|
2021-11-08T22:58:20.000Z
|
2022-02-09T22:22:33.000Z
|
package cmodule.lua_wrapper
{
const _iolib:int = gstaticInitter.alloc(96,8);
}
| 17.2
| 50
| 0.709302
|
42849867abd8570173a50e910daff541a9fe7a55
| 279
|
as
|
ActionScript
|
data/DofusInvoker/scripts/com/ankamagames/dofus/Constants_BOOK_READER_APP.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 10
|
2019-11-10T21:24:38.000Z
|
2021-05-24T23:56:36.000Z
|
data/DofusInvoker/scripts/com/ankamagames/dofus/Constants_BOOK_READER_APP.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 15
|
2021-01-27T21:41:58.000Z
|
2021-03-03T16:47:19.000Z
|
data/DofusInvoker/scripts/com/ankamagames/dofus/Constants_BOOK_READER_APP.as
|
bot4dofus/Datafus
|
126838a84b0e41d5486d735aa38d78deeb8d6681
|
[
"MIT"
] | 3
|
2021-11-08T22:58:20.000Z
|
2022-02-09T22:22:33.000Z
|
package com.ankamagames.dofus
{
import mx.core.ByteArrayAsset;
[ExcludeClass]
public class Constants_BOOK_READER_APP extends ByteArrayAsset
{
public function Constants_BOOK_READER_APP()
{
super();
}
}
}
| 17.4375
| 65
| 0.591398
|
605068b02506d76b0f20a3282b34726599df8886
| 14,002
|
as
|
ActionScript
|
modules/phono-flex/modules/phono-as3xmpp/src/mx/collaboration/xmpp/protocol/XMPPStream.as
|
creativeprogramming/PhonoSDK
|
64a8cc7e0346ebca0200918d583525b8750a19af
|
[
"Apache-2.0"
] | 1
|
2019-06-12T19:54:52.000Z
|
2019-06-12T19:54:52.000Z
|
modules/phono-flex/modules/phono-as3xmpp/src/mx/collaboration/xmpp/protocol/XMPPStream.as
|
creativeprogramming/PhonoSDK
|
64a8cc7e0346ebca0200918d583525b8750a19af
|
[
"Apache-2.0"
] | null | null | null |
modules/phono-flex/modules/phono-as3xmpp/src/mx/collaboration/xmpp/protocol/XMPPStream.as
|
creativeprogramming/PhonoSDK
|
64a8cc7e0346ebca0200918d583525b8750a19af
|
[
"Apache-2.0"
] | null | null | null |
/*
Adobe Systems Incorporated(r) Source Code License Agreement
Copyright(c) 2005 Adobe Systems Incorporated. All rights reserved.
Please read this Source Code License Agreement carefully before using
the source code.
Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license, to reproduce,
prepare derivative works of, publicly display, publicly perform, and
distribute this source code and such derivative works in source or
object code form without any attribution requirements.
The name "Adobe Systems Incorporated" must not be used to endorse or promote products
derived from the source code without prior written permission.
You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and
against any loss, damage, claims or lawsuits, including attorney's
fees that arise or result from your use or distribution of the source
code.
THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA
OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package mx.collaboration.xmpp.protocol
{
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import mx.collaboration.xmpp.protocol.channels.*;
import mx.collaboration.xmpp.protocol.events.*;
import mx.collaboration.xmpp.protocol.extensions.Bind;
import mx.collaboration.xmpp.protocol.extensions.Session;
import mx.collaboration.xmpp.protocol.extensions.ExtensionManager;
import mx.collaboration.xmpp.protocol.packets.*;
use namespace xmpp_internal;
/**
* A stream error has occured.
*/
[Event("error")]
/**
* You have connected to the server and been authenticated using the
* mechanism specified in setAuthenticator.
*/
[Event("connect")]
/**
* This connection to the XMPP server has been closed.
*/
[Event("disconnect")]
/**
* A new packet has been received. There is no filter on this
* event, all packets that are received will throw a data event.
* To get a filtered data collection mechanism see XMPPStream.createPacketCollector
* and xmpp.PacketCollector.
*/
[Event("data")]
/**
* An XMPPStream represents a connection to an XMPP server and allows receiving
* and sending of packets to that server.
<pre>
var stream = new XMPPStream();
// replace [AT] with the real symbol, ASDocs freaked out
stream.authenticator = new DigestAuthenticator("ddura[AT]jabberserver.com/Trillian","secretpass");
stream.channel = new SocketChannel("jabberserver.com",5222);
stream.addEventListener(StreamEvent.CONNECT_SUCCESS,onConnectSucceed);
stream.addEventListener(StreamEvent.CONNECT_FAILURE,onConnectFail);
stream.addEventListener(StreamEvent.DISCONNECT,onDisconnect);
var collector = stream.createPacketCollector( new filters.IDFilter("myid") );
collector.addEventListener(PacketCollectorEvent.DATA, onReceivePacketWithMyID);
stream.connect("jabberserver.com",5222);
function onConnectSucceed(event:StreamEvent)
{
trace("We are connected and authenticated!");
}
function onConnectFail(event:StreamEvent)
{
trace("Connection has failed. Either we can't connect to the server, or couldn't authenticate.");
}
function onDisconnect(event:StreamEvent)
{
trace("We were disconnected from the server.");
}
function onReceivePacketWithMyID(event:PacketCollectorEvent)
{
trace("I got a packet with my ID!");
var packetwithid:Packet = event.packet;
}
</pre>
*/
public class XMPPStream extends EventDispatcher
{
private var _channel:Channel;
private var _connected:Boolean;
private var _host:String;
private var _port:uint;
private var _jid:JID;
private var _availableChannels:Array;
private var _registry:ChannelRegistry;
private var _authenticator:Authenticator;
private var _callbackMap:Array;
private var _sessionID:String;
private var _isAuthenticated:Boolean = false;
private var bindNs:Namespace = new Namespace("urn:ietf:params:xml:ns:xmpp-bind");
private var sessionNs:Namespace = new Namespace("urn:ietf:params:xml:ns:xmpp-session");
private static var _streamCount:Number = 0;
public var _streamID:Number;
public var extensionManager:ExtensionManager;
public function XMPPStream():void
{
_streamCount++;
_streamID = _streamCount;
_callbackMap = new Array();
extensionManager = new ExtensionManager();
}
/**
* Connect to the XMPP server using the available channel. The default channels
* are specified in the setChannel description. Other channels may be specified
* by using the setChannel method.
*/
public function connect():void
{
// trace(_streamID+": XMPPStream.connect()");
_channel.connect();
}
/**
* @private
*/
public function authenticate(auth:Authenticator):void
{
// trace(_streamID+": XMPPStream.authenticate()");
_authenticator = auth;
_authenticator.stream = this;
_authenticator.channel = _channel;
_authenticator.addEventListener( AuthenticatorEvent.SUCCESS, onAuthenticationSuccess );
_authenticator.addEventListener( AuthenticatorEvent.FAILURE, onAuthenticationFailure );
_authenticator.authenticate();
}
/**
* Returns true if the connection is active.
*/
public function isConnected():Boolean
{
return _connected;
}
/**
* Disconnects from the XMPP server, closing the stream.
*/
public function disconnect():void
{
_channel.disconnect();
}
/**
* Sends a packet to the XMPP Server.
*/
public function sendPacket(packet:Packet, callbackFunction:Function=null ):void
{
if(callbackFunction != null)
_callbackMap[packet.id] = callbackFunction;
_channel.sendData(packet.toXML());
}
/**
* Returns the callback function that correlates with this packet id.
*/
private function getCallbackFunction(id:String):Function
{
return _callbackMap[id];
}
/**
* Sets the specified authenticatication class for the connection. When connect is
* called, and the stream is established with the server, the authenticator takes
* over and authenticates the client using the credentials provided in the authenticator.
* We might default to a certian set of authenticators. XMPP supports numerous authentication
* mechanisms, including:
* - Plain Text
* - MD5
* - SASL (Digest-MD5, Anonymous, External, etc.)
*/
public function set authenticator(auth:Authenticator):void
{
_authenticator = auth;
}
public function get authenticator():Authenticator
{
return _authenticator;
}
/**
* Sets the channel that this stream will use.
*/
public function set channel(channelArg:Channel):void
{
_channel = channelArg;
_channel.addEventListener(ChannelEvent.CONNECT,onChannelConnect);
_channel.addEventListener(ChannelEvent.DISCONNECT, onChannelDisconnect);
_channel.addEventListener(ChannelEvent.DATA, onChannelData);
_channel.addEventListener(ChannelEvent.ERROR, onChannelError);
}
public function get channel():Channel
{
return _channel;
}
/*
public function set host(hostArg:String)
{
_host = hostArg;
}
public function get host():String
{
return _host;
}
public function set port(portArg:uint)
{
_port = portArg;
}
public function get port():uint
{
return _uint;
}
*/
/**
* @private
*/
public function set sessionID(sessionIDArg:String):void
{
this._sessionID = sessionIDArg;
}
/**
* @private
*/
public function get sessionID():String
{
return _sessionID;
}
/**
* The JID of the user connecting to the XMPP server. Sometimes, when authenticating, the
* full JID is not known until authentication and resource binding are complete. If the
* JID is changed after these steps, then this JID will be updated at that time by the
* authenticator.
*/
public function set userJID(jid:JID):void
{
_jid = jid;
}
public function get userJID():JID
{
return _jid;
}
/**
* @private
*/
public function onChannelConnect(event:ChannelEvent):void
{
_sessionID = _channel.streamInfo.@id.toString();
// If the authenticator is already specified, then lets
// go ahead and begin authentication.
if(_authenticator != null && !_isAuthenticated)
{
authenticate(_authenticator);
}
// Do we need to ask for a resource binding?
if(channel.streamFeatures.bindNs::bind.length() > 0)
{
var bindIq:IQPacket = new IQPacket();
bindIq.type = IQPacket.TYPE_SET;
bindIq.id = "bind:1";
var bindExt:Bind = new Bind();
if (_jid && _jid.resource) bindExt.resource = _jid.resource;
bindIq.addExtension(bindExt);
sendPacket(bindIq, onBind);
}
}
private function onBind(packet:Packet):void
{
if (packet.hasExtensionType(Bind))
{
var bind:Bind = packet.getExtensionByType(Bind) as Bind;
if (bind.jid) {
_jid = bind.jid;
}
// Do we need to ask for a session?
if(channel.streamFeatures.sessionNs::session.length() > 0) {
var sessionIq:IQPacket = new IQPacket();
sessionIq.type = IQPacket.TYPE_SET;
sessionIq.id = "session:1";
var sessionExt:Session = new Session();
sessionIq.addExtension(sessionExt);
sendPacket(sessionIq, onSession);
}
else
{
// All done
dispatchEvent( new XMPPStreamEvent(XMPPStreamEvent.CONNECT) );
}
}
}
private function onSession(packet:Packet):void
{
if (packet.type == IQPacket.TYPE_RESULT) {
// All done
dispatchEvent( new XMPPStreamEvent(XMPPStreamEvent.CONNECT) );
} else {
dispatchEvent( new XMPPStreamEvent(XMPPStreamEvent.ERROR) );
}
}
/**
* @private
*/
public function onChannelDisconnect(event:ChannelEvent):void
{
_connected = false;
dispatchEvent( new XMPPStreamEvent(XMPPStreamEvent.DISCONNECT) );
}
/**
* @private
*/
public function onChannelData( event:ChannelEvent ):void
{
var packet:Packet = Packet.createPacket( event.data, this );
if(packet != null)
{
var callback:Function = getCallbackFunction(packet.id);
if(callback != null)
callback(packet);
if( _connected )
dispatchEvent( new XMPPStreamEvent( XMPPStreamEvent.DATA, true, false, packet ) );
}
}
/**
* @private
*/
public function onChannelError( event:ChannelEvent ):void
{
var error:* = event.data;
dispatchEvent( new XMPPStreamEvent( XMPPStreamEvent.ERROR, true, false, null, error ) );
}
/**
* @private
*/
public function onAuthenticationSuccess(event:AuthenticatorEvent):void
{
_connected = true;
_isAuthenticated = true;
// Will become connected on session or bind success
//if (_jid) dispatchEvent( new XMPPStreamEvent(XMPPStreamEvent.CONNECT) );
}
/**
* @private
*/
public function onAuthenticationFailure(event:AuthenticatorEvent):void
{
_isAuthenticated = false;
}
}
} //package mx.collaboration.xmpp.protocol
| 33.821256
| 107
| 0.599414
|
c1e47de92c08218a18308ac36f768da106bb8aab
| 2,169
|
as
|
ActionScript
|
starling/src/starling/filters/IFilterHelper.as
|
githubrontian/Starling-Framework
|
3458ceaf1b3eaa57d62bd9d045e79f8ae48873d9
|
[
"BSD-2-Clause-FreeBSD"
] | 1,193
|
2015-01-02T00:47:14.000Z
|
2022-03-31T05:58:31.000Z
|
starling/src/starling/filters/IFilterHelper.as
|
githubrontian/Starling-Framework
|
3458ceaf1b3eaa57d62bd9d045e79f8ae48873d9
|
[
"BSD-2-Clause-FreeBSD"
] | 493
|
2015-01-07T21:06:34.000Z
|
2022-03-24T07:17:42.000Z
|
starling/src/starling/filters/IFilterHelper.as
|
githubrontian/Starling-Framework
|
3458ceaf1b3eaa57d62bd9d045e79f8ae48873d9
|
[
"BSD-2-Clause-FreeBSD"
] | 403
|
2015-01-08T20:20:08.000Z
|
2022-03-17T00:26:06.000Z
|
// =================================================================================================
//
// Starling Framework
// Copyright Gamua GmbH. All Rights Reserved.
//
// This program is free software. You can redistribute and/or modify it
// in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================
package starling.filters
{
import flash.geom.Rectangle;
import starling.display.DisplayObject;
import starling.textures.Texture;
/** An interface describing the methods available on the <code>helper</code> object passed
* to the <code>process</code> call of fragment filters. It provides information about the
* target object and methods to acquire and release pass textures.
*
* @see FragmentFilter#process()
*/
public interface IFilterHelper
{
/** Gets a pass texture from the pool, or creates a new one (cleared and ready to be used
* as render target). Its size is dictated by the bounds of the target display object
* plus padding.
*
* <p>Beware: each call of this method counts as one render pass. For performance reasons,
* the filter may be configured to render the last pass directly to the back buffer. In
* that case, this method will return <code>null</code> for the last pass! That's the
* sign for the <code>process</code> method to draw to the back buffer. If you receive
* <code>null</code> too soon, the filter class probably didn't correctly override
* <code>numPasses</code>.</p>
*/
function getTexture(resolution:Number=1.0):Texture;
/** Puts a texture back into the pool to be reused later (or to be disposed
* with the pool). */
function putTexture(texture:Texture):void;
/** The bounds of the target object (plus padding) in stage coordinates. */
function get targetBounds():Rectangle;
/** The display object the filter is currently attached to. */
function get target():DisplayObject;
}
}
| 43.38
| 100
| 0.606731
|
0bb1d70cca43040bab4c38c82b49e66ef110052c
| 4,398
|
as
|
ActionScript
|
modules/module-paint/src/net/psykosoft/psykopaint2/crop/CropModule.as
|
pagienet/psykopaint2-application
|
b4082322b0d67742ea6ab94cbb4fd704ecfcb3ef
|
[
"Unlicense"
] | 2
|
2015-12-07T22:19:29.000Z
|
2021-01-02T22:28:53.000Z
|
modules/module-paint/src/net/psykosoft/psykopaint2/crop/CropModule.as
|
pagienet/psykopaint2-application
|
b4082322b0d67742ea6ab94cbb4fd704ecfcb3ef
|
[
"Unlicense"
] | null | null | null |
modules/module-paint/src/net/psykosoft/psykopaint2/crop/CropModule.as
|
pagienet/psykopaint2-application
|
b4082322b0d67742ea6ab94cbb4fd704ecfcb3ef
|
[
"Unlicense"
] | 1
|
2016-05-10T12:08:29.000Z
|
2016-05-10T12:08:29.000Z
|
package net.psykosoft.psykopaint2.crop
{
import flash.display.BitmapData;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.geom.Rectangle;
import flash.ui.Keyboard;
import net.psykosoft.psykopaint2.base.utils.io.CameraRollImageOrientation;
import net.psykosoft.psykopaint2.base.utils.misc.ModuleBase;
import net.psykosoft.psykopaint2.base.utils.misc.TrackedBitmapData;
import net.psykosoft.psykopaint2.core.CoreModule;
import net.psykosoft.psykopaint2.core.configuration.CoreSettings;
import net.psykosoft.psykopaint2.core.models.EaselRectModel;
import net.psykosoft.psykopaint2.core.models.NavigationStateType;
import net.psykosoft.psykopaint2.core.signals.RequestHideSplashScreenSignal;
import net.psykosoft.psykopaint2.core.signals.RequestNavigationStateChangeSignal;
import net.psykosoft.psykopaint2.crop.configuration.CropConfig;
import net.psykosoft.psykopaint2.crop.signals.NotifyCropModuleSetUpSignal;
import net.psykosoft.psykopaint2.crop.signals.RequestDestroyCropModuleSignal;
import net.psykosoft.psykopaint2.crop.signals.RequestSetupCropModuleSignal;
import net.psykosoft.psykopaint2.paint.configuration.PaintSettings;
public class CropModule extends ModuleBase
{
private var _coreModule:CoreModule;
private var _moduleSetUp : Boolean = true;
public function CropModule( core:CoreModule = null ) {
super();
_coreModule = core;
if( CoreSettings.NAME == "" ) CoreSettings.NAME = "CropModule";
if( !_coreModule ) {
addEventListener( Event.ADDED_TO_STAGE, onAddedToStage );
}
}
// ---------------------------------------------------------------------
// Listeners.
// ---------------------------------------------------------------------
private function onAddedToStage( event:Event ):void {
removeEventListener( Event.ADDED_TO_STAGE, onAddedToStage );
initialize();
}
// ---------------------------------------------------------------------
// Initialization.
// ---------------------------------------------------------------------
public function initialize():void {
trace( this, "initializing..." );
// Init core module.
if( !_coreModule )
initStandalone();
else {
PaintSettings.isStandalone = false;
init();
}
}
private function onCoreModuleReady():void {
init();
_coreModule.injector.getInstance(RequestHideSplashScreenSignal).dispatch();
_coreModule.startEnterFrame();
setupStandaloneModule();
if ( !CoreSettings.RUNNING_ON_iPAD ) stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
}
private function onKeyUp(event : KeyboardEvent) : void
{
if (event.keyCode != Keyboard.F4) return;
_moduleSetUp = !_moduleSetUp;
if (_moduleSetUp)
setupStandaloneModule();
else
destroyStandaloneModule();
}
private function setupStandaloneModule() : void
{
graphics.clear();
var tempData : BitmapData = new TrackedBitmapData(2048, 2048, false);
tempData.perlinNoise(64, 64, 8, 50, true, true);
_coreModule.injector.getInstance(EaselRectModel).rect = new Rectangle(200, 200, 500, 500);
_coreModule.injector.getInstance(RequestNavigationStateChangeSignal).dispatch(NavigationStateType.HOME_ON_EASEL);
_coreModule.injector.getInstance(NotifyCropModuleSetUpSignal).addOnce(onCropModuleSetUp);
_coreModule.injector.getInstance(RequestSetupCropModuleSignal).dispatch(tempData, CameraRollImageOrientation.ROTATION_0);
}
private function destroyStandaloneModule() : void
{
graphics.beginFill(0xffffff);
graphics.drawRect(0, 0, 500, 500);
graphics.endFill();
_coreModule.injector.getInstance(RequestDestroyCropModuleSignal).dispatch();
_coreModule.injector.getInstance(RequestNavigationStateChangeSignal).dispatch(NavigationStateType.HOME_ON_EASEL);
}
private function onCropModuleSetUp() : void
{
_coreModule.injector.getInstance(RequestNavigationStateChangeSignal).dispatch(NavigationStateType.CROP);
}
private function initStandalone() : void
{
PaintSettings.isStandalone = true;
_coreModule = new CoreModule();
_coreModule.isStandalone = false;
_coreModule.moduleReadySignal.addOnce(onCoreModuleReady);
addChild(_coreModule);
}
private function init() : void
{
// Initialize robotlegs for this module.
new CropConfig(_coreModule.injector);
// Notify potential super modules.
moduleReadySignal.dispatch();
}
}
}
| 34.359375
| 124
| 0.720555
|
33bae14755593d410d322b21b1aaa40b69b839e2
| 2,951
|
as
|
ActionScript
|
Source/Away3D/src/sunag/sea3d/objects/SEAScript.as
|
sunag/sea3d
|
0533fb0e1192915a50f2d0c38d7570d64dc37be2
|
[
"MIT"
] | 458
|
2015-01-03T03:19:33.000Z
|
2022-03-28T02:23:56.000Z
|
Source/Away3D/src/sunag/sea3d/objects/SEAScript.as
|
MatthewAllen123123/Game
|
6a71da644aec9b9c56f8cd11038b64f833f65227
|
[
"MIT"
] | 13
|
2015-05-12T07:24:13.000Z
|
2022-03-11T08:08:17.000Z
|
Source/Away3D/src/sunag/sea3d/objects/SEAScript.as
|
MatthewAllen123123/Game
|
6a71da644aec9b9c56f8cd11038b64f833f65227
|
[
"MIT"
] | 92
|
2015-01-14T14:38:23.000Z
|
2022-03-11T04:12:28.000Z
|
/*
*
* Copyright (c) 2013 Sunag Entertainment
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package sunag.sea3d.objects
{
import flash.utils.IDataInput;
import sunag.sunag;
import sunag.sea3d.SEA;
import sunag.sea3d.field.FieldData;
import sunag.utils.ByteArrayUtils;
import sunag.utils.DataTable;
use namespace sunag;
public class SEAScript extends SEAObject
{
public static const TYPE:String = "code";
public static var DETAILED:Boolean = false;
public var source:String;
public function SEAScript(name:String, sea:SEA, type:String=TYPE)
{
super(name, type, sea);
}
public override function load():void
{
source = data.readUTFBytes(data.length);
}
public static function readScriptList(data:IDataInput, sea:SEA):Array
{
var list:Array = [],
count:int = data.readUnsignedByte();
var i:int = 0;
while ( i < count )
{
var attrib:int = data.readUnsignedByte(),
numParams:int,
script:Object = {};
script.priority = (attrib & 1) | (attrib & 2);
if (attrib & 4)
{
var j:int, name:String;
numParams = data.readUnsignedByte();
if (DETAILED)
{
script.params = [];
for(j = 0; j < numParams; j++)
{
name = ByteArrayUtils.readUTFTiny(data);
var type:int = data.readUnsignedByte();
script.params[j] = new FieldData(name, type, DataTable.readToken(type, data, sea));
}
}
else
{
script.params = {};
for ( j = 0; j < numParams; j++ )
{
name = ByteArrayUtils.readUTFTiny(data);
script.params[name] = DataTable.readObject(data, sea);
}
}
}
if (attrib & 8)
{
script.method = ByteArrayUtils.readUTFTiny(data);
}
script.tag = sea.getSEAObject(data.readUnsignedInt());
list[i++] = script;
}
return list;
}
}
}
| 26.585586
| 90
| 0.657404
|
a0ff8170e25b15961f6593e9c82fd6152f249359
| 1,906
|
as
|
ActionScript
|
src/org/typefest/transitions/keytween/KeyTween.as
|
hanamura/as3tf
|
513a0446997277514c5adaaffe2c4dd4240825b9
|
[
"MIT"
] | 1
|
2016-05-09T14:24:35.000Z
|
2016-05-09T14:24:35.000Z
|
src/org/typefest/transitions/keytween/KeyTween.as
|
hanamura/as3tf
|
513a0446997277514c5adaaffe2c4dd4240825b9
|
[
"MIT"
] | null | null | null |
src/org/typefest/transitions/keytween/KeyTween.as
|
hanamura/as3tf
|
513a0446997277514c5adaaffe2c4dd4240825b9
|
[
"MIT"
] | null | null | null |
/*
Copyright (c) 2011 Taro Hanamura
See LICENSE.txt for full license information.
*/
package org.typefest.transitions.keytween {
import flash.events.EventDispatcher;
public class KeyTween extends EventDispatcher {
///// target & key
protected var _target:* = null;
protected var _key:* = null;
public function get target():* { return _target }
public function get key():* { return _key }
///// value
protected var _value:* = 0;
protected var _dest:* = 0;
public function get value():* { return _value }
public function get dest():* { return _dest }
public function set dest(_:*):void {
if (_dest !== _) {
_dest = _;
_check();
dispatchEvent(new KeyTweenEvent(KeyTweenEvent.DEST_CHANGE));
}
}
///// filter
protected var _filter:Function = null;
public function get filter():Function { return _filter }
public function set filter(_:Function):void { _filter = _ }
///// synced
public function get synced():Boolean { return _value === _dest }
//---------------------------------------
// constructor
//---------------------------------------
public function KeyTween(target:*, key:*, filter:Function = null) {
super();
_target = target;
_key = key;
_filter = filter;
_init();
}
//---------------------------------------
// init
//---------------------------------------
protected function _init():void {
_dest = _value = _target[_key];
}
//---------------------------------------
// sync
//---------------------------------------
public function sync():void {
_value = _dest;
_target[_key] = _filter is Function ? _filter(_value) : _value;
_check();
}
//---------------------------------------
// update
//---------------------------------------
protected function _check():void {}
}
}
| 20.276596
| 69
| 0.501049
|
345e836542afaaabf06739ee01e83a588e2c3ea8
| 553
|
as
|
ActionScript
|
clients/flash/generated/flash/src/org/openapitools/client/model/GithubRepositorieslinks.as
|
PankTrue/swaggy-jenkins
|
aca35a7cca6e1fcc08bd399e05148942ac2f514b
|
[
"MIT"
] | 23
|
2017-08-01T12:25:26.000Z
|
2022-01-25T03:44:11.000Z
|
clients/flash/generated/flash/src/org/openapitools/client/model/GithubRepositorieslinks.as
|
PankTrue/swaggy-jenkins
|
aca35a7cca6e1fcc08bd399e05148942ac2f514b
|
[
"MIT"
] | 35
|
2017-06-14T03:28:15.000Z
|
2022-02-14T10:25:54.000Z
|
clients/flash/generated/flash/src/org/openapitools/client/model/GithubRepositorieslinks.as
|
PankTrue/swaggy-jenkins
|
aca35a7cca6e1fcc08bd399e05148942ac2f514b
|
[
"MIT"
] | 11
|
2017-08-31T19:00:20.000Z
|
2021-12-19T12:04:12.000Z
|
package org.openapitools.client.model {
import org.openapitools.client.model.Link;
[XmlRootNode(name="GithubRepositorieslinks")]
public class GithubRepositorieslinks {
[XmlElement(name="self")]
public var self: Link = NaN;
[XmlElement(name="_class")]
public var class: String = null;
public function toString(): String {
var str: String = "GithubRepositorieslinks: ";
str += " (self: " + self + ")";
str += " (class: " + class + ")";
return str;
}
}
}
| 25.136364
| 54
| 0.576854
|
66fa96a79b5a8432750be3c24f9a1276e95604b3
| 765
|
as
|
ActionScript
|
clients/flash/air-client/src/org/bigbluebutton/air/deskshare/DeskshareConfig.as
|
thong-hoczita/bigbluebutton
|
612b294e89e708eddb150d4dc7b17349bce21ef5
|
[
"MIT"
] | null | null | null |
clients/flash/air-client/src/org/bigbluebutton/air/deskshare/DeskshareConfig.as
|
thong-hoczita/bigbluebutton
|
612b294e89e708eddb150d4dc7b17349bce21ef5
|
[
"MIT"
] | null | null | null |
clients/flash/air-client/src/org/bigbluebutton/air/deskshare/DeskshareConfig.as
|
thong-hoczita/bigbluebutton
|
612b294e89e708eddb150d4dc7b17349bce21ef5
|
[
"MIT"
] | null | null | null |
package org.bigbluebutton.air.deskshare {
import org.bigbluebutton.air.deskshare.views.DeskshareViewMediator;
import org.bigbluebutton.lib.deskshare.views.IDeskshareView;
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap;
import robotlegs.bender.framework.api.IConfig;
public class DeskshareConfig implements IConfig {
[Inject]
public var mediatorMap:IMediatorMap;
[Inject]
public var signalCommandMap:ISignalCommandMap;
public function configure():void {
mediators();
}
/**
* Maps view mediators to views.
*/
private function mediators():void {
mediatorMap.map(IDeskshareView).toMediator(DeskshareViewMediator);
}
}
}
| 24.677419
| 75
| 0.768627
|
45441863fcec1dbcd2cf04cadcbd941642255c6a
| 683
|
as
|
ActionScript
|
src/Bezel/Events/IngameKeyDownEvent.as
|
ZS-NVB/BezelModLoader
|
78bbc62e7382f451c697316a7dd4447461ada4a7
|
[
"MIT"
] | 5
|
2020-07-07T15:52:25.000Z
|
2021-07-11T14:21:46.000Z
|
src/Bezel/Events/IngameKeyDownEvent.as
|
ZS-NVB/BezelModLoader
|
78bbc62e7382f451c697316a7dd4447461ada4a7
|
[
"MIT"
] | 6
|
2020-10-12T02:45:03.000Z
|
2022-02-04T04:01:25.000Z
|
src/Bezel/Events/IngameKeyDownEvent.as
|
ZS-NVB/BezelModLoader
|
78bbc62e7382f451c697316a7dd4447461ada4a7
|
[
"MIT"
] | 6
|
2020-02-20T13:31:53.000Z
|
2022-01-26T10:19:01.000Z
|
package Bezel.Events
{
/**
* ...
* @author Hellrage
*/
import Bezel.Events.Persistence.IngameKeyDownEventArgs;
import flash.events.Event;
public class IngameKeyDownEvent extends Event
{
private var _eventArgs:IngameKeyDownEventArgs;
public function get eventArgs():IngameKeyDownEventArgs
{
return _eventArgs;
}
public override function clone():Event
{
return new IngameKeyDownEvent(type, eventArgs, bubbles, cancelable);
}
public function IngameKeyDownEvent(type:String, eventArgs:IngameKeyDownEventArgs, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
this._eventArgs = eventArgs;
}
}
}
| 21.34375
| 133
| 0.736457
|
f352d545f333fb8829c3e90f6ff68fc90cdd27d0
| 8,878
|
as
|
ActionScript
|
Support/data/completions/frameworks/flash_cs3/fl/video/VideoPlayer.as
|
simongregory/actionscript3-tmbundle
|
bb76f18706fdba78ffce2dd7d32ed3d2c061ba1a
|
[
"MIT"
] | 5
|
2015-06-06T16:21:12.000Z
|
2021-07-08T07:23:18.000Z
|
Support/data/completions/frameworks/flash_cs3/fl/video/VideoPlayer.as
|
simongregory/actionscript3-tmbundle
|
bb76f18706fdba78ffce2dd7d32ed3d2c061ba1a
|
[
"MIT"
] | 3
|
2015-10-04T18:31:10.000Z
|
2019-05-07T19:39:29.000Z
|
Support/data/completions/frameworks/flash_cs3/fl/video/VideoPlayer.as
|
simongregory/actionscript3-tmbundle
|
bb76f18706fdba78ffce2dd7d32ed3d2c061ba1a
|
[
"MIT"
] | 6
|
2015-02-10T20:10:26.000Z
|
2016-09-27T20:42:12.000Z
|
package fl.video
{
import flash.events.*;
import flash.geom.Rectangle;
import flash.media.*;
import flash.net.*;
import flash.utils.*;
public class VideoPlayer extends Video
{
internal static var BUFFER_EMPTY : String;
internal static var BUFFER_FULL : String;
internal static var BUFFER_FLUSH : String;
protected var _state : String;
internal var _cachedState : String;
internal var _bufferState : String;
internal var _sawPlayStop : Boolean;
internal var _cachedPlayheadTime : Number;
protected var _metadata : Object;
protected var _registrationX : Number;
protected var _registrationY : Number;
protected var _registrationWidth : Number;
protected var _registrationHeight : Number;
internal var _startingPlay : Boolean;
internal var _invalidSeekTime : Boolean;
internal var _invalidSeekRecovery : Boolean;
internal var _readyDispatched : Boolean;
internal var _autoResizeDone : Boolean;
internal var _lastUpdateTime : Number;
internal var lastUpdateTimeStuckCount : Number;
internal var _sawSeekNotify : Boolean;
protected var _ncMgr : INCManager;
public static var iNCManagerClass : Object;
protected var _ns : NetStream;
internal var _currentPos : Number;
internal var _atEnd : Boolean;
internal var _atEndCheckPlayhead : Number;
protected var _streamLength : Number;
protected var _align : String;
protected var _scaleMode : String;
protected var _autoPlay : Boolean;
protected var _autoRewind : Boolean;
protected var _contentPath : String;
protected var _bufferTime : Number;
protected var _isLive : Boolean;
protected var _volume : Number;
protected var _soundTransform : SoundTransform;
protected var __visible : Boolean;
internal var _hiddenForResize : Boolean;
internal var _hiddenForResizeMetadataDelay : Number;
internal var _hiddenRewindPlayheadTime : Number;
protected var _videoWidth : int;
protected var _videoHeight : int;
internal var _prevVideoWidth : int;
internal var _prevVideoHeight : int;
internal var oldBounds : Rectangle;
internal var oldRegistrationBounds : Rectangle;
internal var _updateTimeTimer : Timer;
internal var _updateProgressTimer : Timer;
internal var _idleTimeoutTimer : Timer;
internal var _autoResizeTimer : Timer;
internal var _rtmpDoStopAtEndTimer : Timer;
internal var _rtmpDoSeekTimer : Timer;
internal var _httpDoSeekTimer : Timer;
internal var _httpDoSeekCount : Number;
internal var _finishAutoResizeTimer : Timer;
internal var _delayedBufferingTimer : Timer;
internal var waitingForEnough : Boolean;
internal var baselineProgressTime : Number;
internal var startProgressTime : Number;
internal var totalDownloadTime : Number;
internal var totalProgressTime : Number;
public static const DEFAULT_UPDATE_TIME_INTERVAL : Number;
public static const DEFAULT_UPDATE_PROGRESS_INTERVAL : Number;
public static const DEFAULT_IDLE_TIMEOUT_INTERVAL : Number;
internal static const AUTO_RESIZE_INTERVAL : Number;
internal static const DEFAULT_AUTO_RESIZE_PLAYHEAD_TIMEOUT : Number;
internal var autoResizePlayheadTimeout : Number;
internal static const DEFAULT_AUTO_RESIZE_METADATA_DELAY_MAX : Number;
internal var autoResizeMetadataDelayMax : Number;
internal static const FINISH_AUTO_RESIZE_INTERVAL : Number;
internal static const RTMP_DO_STOP_AT_END_INTERVAL : Number;
internal static const RTMP_DO_SEEK_INTERVAL : Number;
internal static const HTTP_DO_SEEK_INTERVAL : Number;
internal static const DEFAULT_HTTP_DO_SEEK_MAX_COUNT : Number;
internal var httpDoSeekMaxCount : Number;
internal static const HTTP_DELAYED_BUFFERING_INTERVAL : Number;
internal static const DEFAULT_LAST_UPDATE_TIME_STUCK_COUNT_MAX : int;
internal var lastUpdateTimeStuckCountMax : int;
internal var _cmdQueue : Array;
public function set scaleX (xs:Number) : Void;
public function set scaleY (ys:Number) : Void;
public function set x (x:Number) : Void;
public function set y (y:Number) : Void;
public function set width (w:Number) : Void;
public function set height (h:Number) : Void;
public function get registrationX () : Number;
public function set registrationX (x:Number) : Void;
public function get registrationY () : Number;
public function set registrationY (y:Number) : Void;
public function get registrationWidth () : Number;
public function set registrationWidth (w:Number) : Void;
public function get registrationHeight () : Number;
public function set registrationHeight (h:Number) : Void;
public function get videoWidth () : int;
public function get videoHeight () : int;
public function get visible () : Boolean;
public function set visible (v:Boolean) : Void;
public function get align () : String;
public function set align (s:String) : Void;
public function get scaleMode () : String;
public function set scaleMode (s:String) : Void;
public function get autoRewind () : Boolean;
public function set autoRewind (flag:Boolean) : Void;
public function get playheadTime () : Number;
public function set playheadTime (position:Number) : Void;
public function get source () : String;
public function get volume () : Number;
public function set volume (aVol:Number) : Void;
public function get soundTransform () : SoundTransform;
public function set soundTransform (st:SoundTransform) : Void;
public function get isRTMP () : Boolean;
public function get isLive () : Boolean;
public function get state () : String;
public function get stateResponsive () : Boolean;
public function get bytesLoaded () : uint;
public function get bytesTotal () : uint;
public function get totalTime () : Number;
public function get bufferTime () : Number;
public function set bufferTime (aTime:Number) : Void;
public function get idleTimeout () : Number;
public function set idleTimeout (aTime:Number) : Void;
public function get playheadUpdateInterval () : Number;
public function set playheadUpdateInterval (aTime:Number) : Void;
public function get progressInterval () : Number;
public function set progressInterval (aTime:Number) : Void;
public function get ncMgr () : INCManager;
public function get netConnection () : NetConnection;
public function get netStream () : NetStream;
public function get metadata () : Object;
public function VideoPlayer (width:int = 320, height:int = 240);
public function setSize (width:Number, height:Number) : void;
public function setScale (scaleX:Number, scaleY:Number) : void;
public function play (url:String =null, totalTime:Number =NaN, isLive:Boolean =false) : void;
public function playWhenEnoughDownloaded () : void;
public function load (url:String, totalTime:Number =NaN, isLive:Boolean =false) : void;
internal function _load (url:String, totalTime:Number, isLive:Boolean) : void;
public function pause () : void;
public function stop () : void;
public function seek (time:Number) : void;
public function close () : void;
internal function doUpdateTime (e:TimerEvent =null) : void;
internal function doUpdateProgress (e:TimerEvent) : void;
internal function checkEnoughDownloaded (curBytesLoaded:uint, curBytesTotal:uint) : void;
internal function checkReadyForPlay (curBytesLoaded:uint, curBytesTotal:uint) : void;
internal function rtmpNetStatus (e:NetStatusEvent) : void;
internal function httpNetStatus (e:NetStatusEvent) : void;
public function ncConnected () : void;
public function ncReconnected () : void;
internal function onMetaData (info:Object) : void;
internal function onCuePoint (info:Object) : void;
internal function setState (s:String, execQueued:Boolean =true) : void;
internal function setStateFromCachedState (execQueued:Boolean =true) : void;
internal function createINCManager () : void;
internal function rtmpDoStopAtEnd (e:TimerEvent =null) : void;
internal function rtmpDoSeek (e:TimerEvent) : void;
internal function httpDoStopAtEnd () : void;
internal function httpDoSeek (e:TimerEvent) : void;
internal function closeNS (updateCurrentPos:Boolean =false) : void;
internal function doDelayedBuffering (e:TimerEvent) : void;
internal function _pause (doPause:Boolean) : void;
internal function _play (startTime:int =0, endTime:int =-1) : void;
internal function _seek (time:Number) : void;
internal function isXnOK () : Boolean;
internal function startAutoResize () : void;
internal function doAutoResize (e:TimerEvent =null) : void;
internal function finishAutoResize (e:TimerEvent =null) : void;
internal function _createStream () : void;
internal function _setUpStream () : void;
internal function doIdleTimeout (e:TimerEvent) : void;
internal function flushQueuedCmds () : void;
internal function execQueuedCmds () : void;
internal function queueCmd (type:Number, url:String =null, isLive:Boolean =false, time:Number =NaN) : void;
}
}
| 47.989189
| 109
| 0.76515
|
3baf27df02248ec7bd53f0ff714d02fa389bb3ef
| 454
|
as
|
ActionScript
|
src/com/utils/ImageUtil.as
|
shavenzov/IShow
|
a7f85347c7f7084ed24ea1cc09345205df53a4f9
|
[
"MIT"
] | null | null | null |
src/com/utils/ImageUtil.as
|
shavenzov/IShow
|
a7f85347c7f7084ed24ea1cc09345205df53a4f9
|
[
"MIT"
] | null | null | null |
src/com/utils/ImageUtil.as
|
shavenzov/IShow
|
a7f85347c7f7084ed24ea1cc09345205df53a4f9
|
[
"MIT"
] | null | null | null |
package com.utils
{
import flash.display.DisplayObject;
import flash.geom.Point;
public class ImageUtil
{
public static function getScaledSize( image : DisplayObject,size : Number ) : Point
{
var k : Number;
if ( image.width >= image.height )
{
k = image.width / size;
return new Point( size, image.height / k );
}
k = image.height / size;
return new Point( image.width / k, size );
}
}
}
| 18.916667
| 85
| 0.605727
|
45d4f023e5cc9cd92f4b493cb3940ca9e17a9b9d
| 371
|
as
|
ActionScript
|
test/net/wooga/fixtures/tools/getAdapterForObject.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
test/net/wooga/fixtures/tools/getAdapterForObject.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
test/net/wooga/fixtures/tools/getAdapterForObject.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
package net.wooga.fixtures.tools {
import net.wooga.selectors.displaylist.DisplayObjectSelectorAdapter;
import net.wooga.selectors.selectoradapter.SelectorAdapter;
public function getAdapterForObject(object:Object):SelectorAdapter {
var adapter:DisplayObjectSelectorAdapter = new DisplayObjectSelectorAdapter();
adapter.register(object);
return adapter;
}
}
| 28.538462
| 80
| 0.824798
|
84bfa8875a33d9f8dc1ccdc4ae862a89a92c0c8c
| 537
|
as
|
ActionScript
|
Zcup/src/com/zcup/core/net/socket/ICodec.as
|
mldongs/ZCup
|
6f848ee624c3d08c8fd19f982cecb8072cf00a79
|
[
"MIT"
] | 2
|
2015-01-13T12:53:44.000Z
|
2015-01-13T12:53:47.000Z
|
Zcup/src/com/zcup/core/net/socket/ICodec.as
|
mldongs/ZCup
|
6f848ee624c3d08c8fd19f982cecb8072cf00a79
|
[
"MIT"
] | null | null | null |
Zcup/src/com/zcup/core/net/socket/ICodec.as
|
mldongs/ZCup
|
6f848ee624c3d08c8fd19f982cecb8072cf00a79
|
[
"MIT"
] | null | null | null |
package com.zcup.core.net.socket
{
import flash.utils.ByteArray;
/**
* 编码器接口
* @author: mldongs
* @qq: 25772076
* @time:Mar 3, 2011 3:22:08 PM
*
**/
public interface ICodec
{
/**
* 解码.
* @param data 指socket缓冲区中的数组,它将不同时刻接收的数据变成一个数组.
* 在解码的过程中将数中的数据拼接起来就形成了一个Socket数据流.
* @return 返回一个解码后的对象数组.
*
*/
function deCode(data:Array):Array;
/**
* 编码.
* @param data 传入需要编码的数据对象,将对象及其分隔符一起写入到ByteArray.
* @return
*
*/
function enCode(data:Object):ByteArray;
}
}
| 17.322581
| 52
| 0.60149
|
af3e978a81075dee3300d9de84326a37460437e5
| 4,369
|
as
|
ActionScript
|
mcs/psc_tests/tamarin-redux/tests/performance/sunspider-0.9.1/js/access-nbody.as
|
sushihangover/PlayScript
|
a2b7c04e176ddb0ddbc16999e5a5902a1e15b563
|
[
"Apache-2.0"
] | 20
|
2015-07-14T07:30:28.000Z
|
2021-11-12T07:41:34.000Z
|
avmplus/test/performance/sunspider-0.9.1/js/access-nbody.as
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 83
|
2015-07-16T01:31:41.000Z
|
2016-01-13T02:15:47.000Z
|
avmplus/test/performance/sunspider-0.9.1/js/access-nbody.as
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 10
|
2015-06-14T14:39:59.000Z
|
2021-11-12T07:41:35.000Z
|
/* The Great Computer Language Shootout
http://shootout.alioth.debian.org/
contributed by Isaac Gouy */
var PI = 3.141592653589793;
var SOLAR_MASS = 4 * PI * PI;
var DAYS_PER_YEAR = 365.24;
function Body(x,y,z,vx,vy,vz,mass){
this.x = x;
this.y = y;
this.z = z;
this.vx = vx;
this.vy = vy;
this.vz = vz;
this.mass = mass;
}
Body.prototype.offsetMomentum = function(px,py,pz) {
this.vx = -px / SOLAR_MASS;
this.vy = -py / SOLAR_MASS;
this.vz = -pz / SOLAR_MASS;
return this;
}
function Jupiter(){
return new Body(
4.84143144246472090e+00,
-1.16032004402742839e+00,
-1.03622044471123109e-01,
1.66007664274403694e-03 * DAYS_PER_YEAR,
7.69901118419740425e-03 * DAYS_PER_YEAR,
-6.90460016972063023e-05 * DAYS_PER_YEAR,
9.54791938424326609e-04 * SOLAR_MASS
);
}
function Saturn(){
return new Body(
8.34336671824457987e+00,
4.12479856412430479e+00,
-4.03523417114321381e-01,
-2.76742510726862411e-03 * DAYS_PER_YEAR,
4.99852801234917238e-03 * DAYS_PER_YEAR,
2.30417297573763929e-05 * DAYS_PER_YEAR,
2.85885980666130812e-04 * SOLAR_MASS
);
}
function Uranus(){
return new Body(
1.28943695621391310e+01,
-1.51111514016986312e+01,
-2.23307578892655734e-01,
2.96460137564761618e-03 * DAYS_PER_YEAR,
2.37847173959480950e-03 * DAYS_PER_YEAR,
-2.96589568540237556e-05 * DAYS_PER_YEAR,
4.36624404335156298e-05 * SOLAR_MASS
);
}
function Neptune(){
return new Body(
1.53796971148509165e+01,
-2.59193146099879641e+01,
1.79258772950371181e-01,
2.68067772490389322e-03 * DAYS_PER_YEAR,
1.62824170038242295e-03 * DAYS_PER_YEAR,
-9.51592254519715870e-05 * DAYS_PER_YEAR,
5.15138902046611451e-05 * SOLAR_MASS
);
}
function Sun(){
return new Body(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SOLAR_MASS);
}
function NBodySystem(bodies){
this.bodies = bodies;
var px = 0.0;
var py = 0.0;
var pz = 0.0;
var size = this.bodies.length;
for (var i=0; i<size; i++){
var b = this.bodies[i];
var m = b.mass;
px += b.vx * m;
py += b.vy * m;
pz += b.vz * m;
}
this.bodies[0].offsetMomentum(px,py,pz);
}
NBodySystem.prototype.advance = function(dt){
var dx, dy, dz, distance, mag;
var size = this.bodies.length;
for (var i=0; i<size; i++) {
var bodyi = this.bodies[i];
for (var j=i+1; j<size; j++) {
var bodyj = this.bodies[j];
dx = bodyi.x - bodyj.x;
dy = bodyi.y - bodyj.y;
dz = bodyi.z - bodyj.z;
distance = Math.sqrt(dx*dx + dy*dy + dz*dz);
mag = dt / (distance * distance * distance);
bodyi.vx -= dx * bodyj.mass * mag;
bodyi.vy -= dy * bodyj.mass * mag;
bodyi.vz -= dz * bodyj.mass * mag;
bodyj.vx += dx * bodyi.mass * mag;
bodyj.vy += dy * bodyi.mass * mag;
bodyj.vz += dz * bodyi.mass * mag;
}
}
for (var i=0; i<size; i++) {
var body = this.bodies[i];
body.x += dt * body.vx;
body.y += dt * body.vy;
body.z += dt * body.vz;
}
}
NBodySystem.prototype.energy = function(){
var dx, dy, dz, distance;
var e = 0.0;
var size = this.bodies.length;
for (var i=0; i<size; i++) {
var bodyi = this.bodies[i];
e += 0.5 * bodyi.mass *
( bodyi.vx * bodyi.vx
+ bodyi.vy * bodyi.vy
+ bodyi.vz * bodyi.vz );
for (var j=i+1; j<size; j++) {
var bodyj = this.bodies[j];
dx = bodyi.x - bodyj.x;
dy = bodyi.y - bodyj.y;
dz = bodyi.z - bodyj.z;
distance = Math.sqrt(dx*dx + dy*dy + dz*dz);
e -= (bodyi.mass * bodyj.mass) / distance;
}
}
return e;
}
// main entry point for running testcase
function runTest(){
var ret;
for ( var n = 3; n <= 24; n *= 2 ) {
(function(){
var bodies = new NBodySystem( Array(
Sun(),Jupiter(),Saturn(),Uranus(),Neptune()
));
var max = n * 100;
ret = bodies.energy();
for (var i=0; i<max; i++){
bodies.advance(0.01);
}
ret = bodies.energy();
})();
}
} //runTest()
// warm up run of testcase
runTest();
var startTime = new Date();
runTest();
var time = new Date() - startTime;
print("metric time " + time);
| 24.272222
| 61
| 0.569009
|
403ba7dcd17653f1d8fa41211bec28601a2f76b7
| 8,352
|
as
|
ActionScript
|
src/game/UI.as
|
VisualStudioEX3/Aquanoid
|
8f570a838920de905ccc8d42d4137ae51baf3b98
|
[
"MIT"
] | 1
|
2021-01-19T19:50:24.000Z
|
2021-01-19T19:50:24.000Z
|
src/game/UI.as
|
VisualStudioEX3/Aquanoid
|
8f570a838920de905ccc8d42d4137ae51baf3b98
|
[
"MIT"
] | null | null | null |
src/game/UI.as
|
VisualStudioEX3/Aquanoid
|
8f570a838920de905ccc8d42d4137ae51baf3b98
|
[
"MIT"
] | null | null | null |
package game
{
import org.flixel.*;
public class UI extends FlxGroup
{
[Embed (source = "../../content/graphics/game/UI/faces/face_success.png")] private var face_success_img:Class;
[Embed (source = "../../content/graphics/game/UI/faces/face_oops.png")] private var face_oops_img:Class;
[Embed (source = "../../content/graphics/game/UI/faces/face_goodjob.png")] private var face_goodjob_img:Class;
[Embed (source = "../../content/graphics/game/UI/faces/face_gameover.png")] private var face_gameover_img:Class;
private var face_success:FlxSprite;
private var face_oops:FlxSprite;
private var face_goodJob:FlxSprite;
private var face_gameOver:FlxSprite;
[Embed (source = "../../content/graphics/game/UI/messages/msg_success.png")] private var msg_success_img:Class;
[Embed (source = "../../content/graphics/game/UI/messages/msg_oops!.png")] private var msg_oops_img:Class;
[Embed (source = "../../content/graphics/game/UI/messages/msg_goodjob.png")] private var msg_goodjob_img:Class;
[Embed (source = "../../content/graphics/game/UI/messages/msg_gameover.png")] private var msg_gameover_img:Class;
[Embed (source = "../../content/graphics/game/UI/messages/msg_dont.png")] private var msg_dont_img:Class;
[Embed (source = "../../content/graphics/game/UI/messages/msg_finishgame.png")] private var msg_finishgame_img:Class;
private var msg_success:FlxSprite;
private var msg_oops:FlxSprite;
private var msg_goodjob:FlxSprite;
private var msg_gameover:FlxSprite;
private var msg_dont:FlxSprite;
private var msg_finishgame:FlxSprite;
[Embed (source = "../../content/graphics/game/UI/label_score.png")] private var score_img:Class;
private var label_score:FlxSprite;
[Embed (source = "../../content/graphics/game/UI/label_level.png")] private var lbl_level_img:Class;
[Embed (source = "../../content/graphics/game/UI/numbers_font.png")] private var digits_img:Class;
private var label_level:FlxSprite;
private var num_level:Array;
[Embed (source = "../../content/audio/sounds/game/voices/Dont.mp3")] private var face_dont_snd:Class;
[Embed (source = "../../content/audio/sounds/game/voices/GoodJob.mp3")] private var face_goodjob_snd:Class;
[Embed (source = "../../content/audio/sounds/game/voices/ImSorry.mp3")] private var face_imsorry_snd:Class;
[Embed (source = "../../content/audio/sounds/game/voices/Oops.mp3")] private var face_oops_snd:Class;
[Embed (source = "../../content/audio/sounds/game/voices/Success.mp3")] private var face_success_snd:Class;
[Embed (source = "../../content/audio/sounds/game/voices/YouWin.mp3")] private var face_youwin_snd:Class;
private var timer_ui:FlxTimer;
private var sprite_score:LabelScore;
private var lives:ShowLives;
private var soundLocked:Boolean = false;
public function UI()
{
label_score = new FlxSprite(410, 32, score_img);
add(label_score);
sprite_score = new LabelScore();
add(sprite_score);
label_level = new FlxSprite(415, 0, lbl_level_img);
add(label_level);
num_level = new Array(new FlxSprite(), new FlxSprite());
var num:FlxSprite = num_level[0];
num.loadGraphic(digits_img, false, false, 23, 24);
num.x = 500;
num.y = 8;
num.frameWidth = 23;
num.frameHeight = 24;
num.frames = 10;
num.frame = uint(Global.Level.toString().charAt(0));
add(num);
if (Global.Level > 9)
{
num = num_level[1];
num.loadGraphic(digits_img, false, false, 23, 24);
num.x = 500 + 23;
num.y = 8;
num.frameWidth = 23;
num.frameHeight = 24;
num.frames = 10;
num.frame = uint(Global.Level.toString().charAt(1));
add(num);
}
face_success = new FlxSprite(450, 146, face_success_img);
face_success.visible = true;
add(face_success);
face_oops = new FlxSprite(450, 146, face_oops_img);
face_oops.visible = false;
add(face_oops);
face_goodJob = new FlxSprite(450, 146, face_goodjob_img);
face_goodJob.visible = false;
add(face_goodJob);
face_gameOver = new FlxSprite(450, 146, face_gameover_img);
face_gameOver.visible = false;
add(face_gameOver);
msg_oops = new FlxSprite(430, 350, msg_oops_img);
msg_oops.visible = false;
add(msg_oops);
msg_goodjob = new FlxSprite(450, 350, msg_goodjob_img);
msg_goodjob.visible = false;
add(msg_goodjob);
msg_dont = new FlxSprite(450, 350, msg_dont_img);
msg_dont.visible = false;
add(msg_dont);
msg_success = new FlxSprite(380, 320, msg_success_img);
msg_success.visible = false;
add(msg_success);
msg_gameover = new FlxSprite(32, 200, msg_gameover_img);
msg_gameover.visible = false;
add(msg_gameover);
msg_finishgame = new FlxSprite(20, 150, msg_finishgame_img);
msg_finishgame.visible = false;
add(msg_finishgame);
lives = new ShowLives();
add(lives);
timer_ui = new FlxTimer();
}
public function Success():void
{
if (!soundLocked)
{
if (Global.fx_active) FlxG.play(face_success_snd);
soundLocked = true;
}
timer_ui.stop();
face_success.visible = false;
face_oops.visible = false;
face_goodJob.visible = true;
face_gameOver.visible = false;
msg_oops.visible = false;
msg_goodjob.visible = false;
msg_dont.visible = false;
msg_success.visible = true;
msg_gameover.visible = false;
msg_finishgame.visible = false;
timer_ui.stop();
timer_ui.start(3, 1, onResetUIToDefault);
}
public function Oops():void
{
if (Global.Balls > 0)
{
if (Global.fx_active) FlxG.play(face_oops_snd);
face_success.visible = false;
face_oops.visible = true;
face_goodJob.visible = false;
face_gameOver.visible = false;
msg_oops.visible = true;
msg_goodjob.visible = false;
msg_dont.visible = false;
msg_success.visible = false;
msg_gameover.visible = false;
msg_finishgame.visible = false;
timer_ui.stop();
timer_ui.start(3, 1, onResetUIToDefault);
}
}
public function Dont():void
{
if (Global.Balls > 0)
{
if (Global.fx_active) FlxG.play(face_dont_snd);
face_success.visible = false;
face_oops.visible = false;
face_goodJob.visible = false;
face_gameOver.visible = true;
msg_oops.visible = false;
msg_goodjob.visible = false;
msg_dont.visible = true;
msg_success.visible = false;
msg_gameover.visible = false;
msg_finishgame.visible = false;
if (Global.Balls > 0)
{
timer_ui.stop();
timer_ui.start(3, 1, onResetUIToDefault);
}
}
}
public function GoodJob():void
{
if (Global.Balls > 0)
{
if (Global.fx_active) FlxG.play(face_goodjob_snd);
face_success.visible = false;
face_oops.visible = false;
face_goodJob.visible = true;
face_gameOver.visible = false;
msg_oops.visible = false;
msg_goodjob.visible = true;
msg_dont.visible = false;
msg_success.visible = false;
msg_gameover.visible = false;
msg_finishgame.visible = false;
timer_ui.stop();
timer_ui.start(3, 1, onResetUIToDefault);
}
}
public function GameOver():void
{
if (Global.fx_active) FlxG.play(face_imsorry_snd);
timer_ui.stop();
face_success.visible = false;
face_oops.visible = false;
face_goodJob.visible = false;
face_gameOver.visible = true;
msg_oops.visible = false;
msg_goodjob.visible = false;
msg_dont.visible = false;
msg_success.visible = false;
msg_gameover.visible = false;
msg_finishgame.visible = false;
}
public function FinishGame():void
{
if (Global.fx_active) FlxG.play(face_youwin_snd);
timer_ui.stop();
face_success.visible = false;
face_oops.visible = false;
face_goodJob.visible = true;
face_gameOver.visible = false;
msg_oops.visible = false;
msg_goodjob.visible = true;
msg_dont.visible = false;
msg_success.visible = false;
msg_gameover.visible = false;
msg_finishgame.visible = true;
}
private function onResetUIToDefault(timer:FlxTimer):void
{
face_success.visible = true;
face_oops.visible = false;
face_goodJob.visible = false;
face_gameOver.visible = false;
msg_oops.visible = false;
msg_goodjob.visible = false;
msg_dont.visible = false;
}
}
}
| 29.408451
| 119
| 0.68283
|
f910c1cfa163f90e794bd7da5708c060f2084b83
| 2,689
|
as
|
ActionScript
|
flash-client/src/com/facebook/graph/data/api/post/FacebookPostPrivacy.as
|
stokegames/tileworld
|
240e72b86462746b54dcd6884d932b30fd3fa0d6
|
[
"MIT"
] | 1
|
2016-04-25T14:10:39.000Z
|
2016-04-25T14:10:39.000Z
|
flash-client/src/com/facebook/graph/data/api/post/FacebookPostPrivacy.as
|
skywardarts/tileworld
|
240e72b86462746b54dcd6884d932b30fd3fa0d6
|
[
"MIT"
] | null | null | null |
flash-client/src/com/facebook/graph/data/api/post/FacebookPostPrivacy.as
|
skywardarts/tileworld
|
240e72b86462746b54dcd6884d932b30fd3fa0d6
|
[
"MIT"
] | 2
|
2016-01-14T06:13:46.000Z
|
2016-04-25T14:11:51.000Z
|
package com.facebook.graph.data.api.post
{
import com.facebook.graph.core.facebook_internal;
import com.facebook.graph.data.api.core.AbstractFacebookGraphObject;
use namespace facebook_internal;
/**
* An object that defines the privacy setting of a post.
* @see http://developers.facebook.com/docs/reference/api/post
*/
public class FacebookPostPrivacy extends AbstractFacebookGraphObject
{
/**
* The value field may specify one of the following JSON strings: EVERYONE, CUSTOM, ALL_FRIENDS, NETWORKS_FRIENDS, FRIENDS_OF_FRIENDS.
*/
public var value:String;
/**
* The friends field must be specified if value is set to CUSTOM and contain one of the following JSON strings:
* EVERYONE, NETWORKS_FRIENDS (when the object can be seen by networks and friends), FRIENDS_OF_FRIENDS, ALL_FRIENDS, SOME_FRIENDS, SELF, or NO_FRIENDS (when the object can be seen by a network only).
*/
public var friends:String;
/**
* The networks field may contain a comma-separated list of network IDs that can see the object, or 1 for all of a user's network.
*/
public var networks:Array;
/**
* The allow field must be specified when the friends value is set to SOME_FRIENDS and must specify a comma-separated list of user IDs and friend list IDs that 'can' see the post.
*/
public var allow:Array;
/**
* The deny field may be specified if the friends field is set to SOME_FRIENDS and must specify a comma-separated list of user IDs and friend list IDs that 'cannot' see the post.
*/
public var deny:Array;
/**
* The privacy value description.
*/
public var description:String;
/**
* Creates a new FacebookPostPrivacy.
*/
public function FacebookPostPrivacy()
{
}
/**
* Populates and returns a new FacebookPostPrivacy from a decoded JSON object.
*
* @param result A decoded JSON object.
*
* @return A new FacebookPostPrivacy.
*/
public static function fromJSON( result:Object ):FacebookPostPrivacy
{
var privacy:FacebookPostPrivacy = new FacebookPostPrivacy();
privacy.fromJSON( result );
return privacy;
}
/**
* @inheritDoc
*/
override protected function setPropertyValue( property:String, value:* ):void
{
switch( property )
{
case "networks":
case "allow":
case "deny":
this[ property ] = value is Array ? value : value is String ? String( value ).split( "," ) : [ value ];
break;
default:
super.setPropertyValue( property, value );
break;
}
}
/**
* @inheritDoc
*/
override public function toString():String
{
return facebook_internal::toString( [ "value" ] );
}
}
}
| 28.606383
| 202
| 0.689476
|
314c0917c486c89f72f6a2c3d1959caf907778c8
| 34,624
|
as
|
ActionScript
|
data/DofusInvoker/scripts/com/ankamagames/dofus/logic/game/fight/managers/BuffManager.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 10
|
2019-11-10T21:24:38.000Z
|
2021-05-24T23:56:36.000Z
|
data/DofusInvoker/scripts/com/ankamagames/dofus/logic/game/fight/managers/BuffManager.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 15
|
2021-01-27T21:41:58.000Z
|
2021-03-03T16:47:19.000Z
|
data/DofusInvoker/scripts/com/ankamagames/dofus/logic/game/fight/managers/BuffManager.as
|
bot4dofus/Datafus
|
126838a84b0e41d5486d735aa38d78deeb8d6681
|
[
"MIT"
] | 3
|
2021-11-08T22:58:20.000Z
|
2022-02-09T22:22:33.000Z
|
package com.ankamagames.dofus.logic.game.fight.managers
{
import com.ankama.dofus.enums.ActionIds;
import com.ankamagames.berilia.managers.KernelEventsManager;
import com.ankamagames.dofus.datacenter.effects.instances.EffectInstanceDice;
import com.ankamagames.dofus.datacenter.spells.Spell;
import com.ankamagames.dofus.datacenter.spells.SpellLevel;
import com.ankamagames.dofus.internalDatacenter.spells.SpellWrapper;
import com.ankamagames.dofus.kernel.Kernel;
import com.ankamagames.dofus.logic.game.fight.fightEvents.FightEventsHelper;
import com.ankamagames.dofus.logic.game.fight.frames.FightBattleFrame;
import com.ankamagames.dofus.logic.game.fight.frames.FightEntitiesFrame;
import com.ankamagames.dofus.logic.game.fight.miscs.ActionIdProtocol;
import com.ankamagames.dofus.logic.game.fight.miscs.StatBuffFactory;
import com.ankamagames.dofus.logic.game.fight.types.BasicBuff;
import com.ankamagames.dofus.logic.game.fight.types.CastingSpell;
import com.ankamagames.dofus.logic.game.fight.types.SpellBuff;
import com.ankamagames.dofus.logic.game.fight.types.StatBuff;
import com.ankamagames.dofus.logic.game.fight.types.StateBuff;
import com.ankamagames.dofus.logic.game.fight.types.TriggeredBuff;
import com.ankamagames.dofus.misc.lists.FightHookList;
import com.ankamagames.dofus.misc.lists.HookList;
import com.ankamagames.dofus.misc.utils.GameDebugManager;
import com.ankamagames.dofus.network.types.game.actions.fight.AbstractFightDispellableEffect;
import com.ankamagames.dofus.network.types.game.actions.fight.FightTemporaryBoostEffect;
import com.ankamagames.dofus.network.types.game.actions.fight.FightTemporaryBoostStateEffect;
import com.ankamagames.dofus.network.types.game.actions.fight.FightTemporaryBoostWeaponDamagesEffect;
import com.ankamagames.dofus.network.types.game.actions.fight.FightTemporarySpellBoostEffect;
import com.ankamagames.dofus.network.types.game.actions.fight.FightTemporarySpellImmunityEffect;
import com.ankamagames.dofus.network.types.game.actions.fight.FightTriggeredEffect;
import com.ankamagames.dofus.network.types.game.context.fight.GameFightFighterInformations;
import com.ankamagames.jerakine.logger.Log;
import com.ankamagames.jerakine.logger.Logger;
import com.ankamagames.jerakine.utils.errors.SingletonError;
import flash.utils.Dictionary;
import flash.utils.getQualifiedClassName;
public class BuffManager
{
public static const INCREMENT_MODE_SOURCE:int = 1;
public static const INCREMENT_MODE_TARGET:int = 2;
protected static const _log:Logger = Log.getLogger(getQualifiedClassName(BuffManager));
private static var _self:BuffManager;
private var _buffs:Dictionary;
public var spellBuffsToIgnore:Vector.<CastingSpell>;
public function BuffManager()
{
this._buffs = new Dictionary();
this.spellBuffsToIgnore = new Vector.<CastingSpell>();
super();
if(_self)
{
throw new SingletonError();
}
}
public static function getInstance() : BuffManager
{
if(!_self)
{
_self = new BuffManager();
}
return _self;
}
public static function makeBuffFromEffect(effect:AbstractFightDispellableEffect, castingSpell:CastingSpell, actionId:uint) : BasicBuff
{
var buff:BasicBuff = null;
var effectInstanceDice:EffectInstanceDice = null;
var criticalEffect:Boolean = false;
var level:SpellLevel = null;
var ftbwde:FightTemporaryBoostWeaponDamagesEffect = null;
var ftsie:FightTemporarySpellImmunityEffect = null;
var spellLevel:SpellLevel = null;
var effects:Vector.<EffectInstanceDice> = null;
var effid:EffectInstanceDice = null;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Creation du buff " + effect.uid);
}
switch(true)
{
case effect is FightTemporarySpellBoostEffect:
buff = new SpellBuff(effect as FightTemporarySpellBoostEffect,castingSpell,actionId);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : type SpellBuff");
}
break;
case effect is FightTriggeredEffect:
buff = new TriggeredBuff(effect as FightTriggeredEffect,castingSpell,actionId);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : type TriggeredBuff");
}
break;
case effect is FightTemporaryBoostWeaponDamagesEffect:
ftbwde = effect as FightTemporaryBoostWeaponDamagesEffect;
buff = new BasicBuff(effect,castingSpell,actionId,ftbwde.weaponTypeId,ftbwde.delta,ftbwde.weaponTypeId);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : type BasicBuff avec FightTemporaryBoostWeaponDamagesEffect");
}
break;
case effect is FightTemporaryBoostStateEffect:
buff = new StateBuff(effect as FightTemporaryBoostStateEffect,castingSpell,actionId);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : type StateBuff");
}
break;
case effect is FightTemporarySpellImmunityEffect:
ftsie = effect as FightTemporarySpellImmunityEffect;
buff = new BasicBuff(effect,castingSpell,actionId,ftsie.immuneSpellId,null,null);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : type BasicBuff avec FightTemporarySpellImmunityEffect");
}
break;
case effect is FightTemporaryBoostEffect:
buff = StatBuffFactory.createStatBuff(effect as FightTemporaryBoostEffect,castingSpell,actionId);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : type StatBuff");
}
}
buff.id = effect.uid;
var spellLevelsId:int = -1;
var spell:Spell = Spell.getSpellById(effect.spellId);
for each(level in spell.spellLevelsInfo)
{
for each(effectInstanceDice in level.effects)
{
if(effectInstanceDice.effectUid == effect.effectId)
{
spellLevelsId = level.id;
break;
}
}
if(spellLevelsId == -1)
{
for each(effectInstanceDice in level.criticalEffect)
{
if(effectInstanceDice.effectUid == effect.effectId)
{
spellLevelsId = level.id;
criticalEffect = true;
break;
}
}
}
if(spellLevelsId != -1)
{
break;
}
}
if(spellLevelsId != -1)
{
spellLevel = SpellLevel.getLevelById(spellLevelsId);
effects = !criticalEffect ? spellLevel.effects : spellLevel.criticalEffect;
for each(effid in effects)
{
if(effid.effectUid == effect.effectId)
{
buff.effect.triggers = effid.triggers;
buff.effect.targetMask = effid.targetMask;
buff.effect.effectElement = effid.effectElement;
break;
}
}
buff.castingSpell.spellRank = spellLevel;
}
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + effect.uid + " : sort lanceur " + buff.castingSpell.spell.name + " (" + buff.castingSpell.spell.id + ") niveau " + buff.castingSpell.spellRank.grade + " par " + buff.castingSpell.casterId);
}
return buff;
}
public function destroy() : void
{
_self = null;
this.spellBuffsToIgnore.length = 0;
}
public function decrementDuration(targetId:Number) : void
{
this.incrementDuration(targetId,-1);
}
public function synchronize() : void
{
var entityId:* = null;
var buffItem:BasicBuff = null;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Annulation du disabled sur tous les buffs");
}
for(entityId in this._buffs)
{
for each(buffItem in this._buffs[entityId])
{
if(buffItem.disabled)
{
buffItem.onReenable();
}
}
}
}
public function incrementDuration(targetId:Number, delta:int, dispellEffect:Boolean = false, incrementMode:int = 1) : void
{
var targetBuffs:Array = null;
var buffItem:BasicBuff = null;
var modified:Boolean = false;
var skipBuffUpdate:Boolean = false;
var spell:CastingSpell = null;
var currentFighterId:Number = NaN;
var newBuffs:Dictionary = new Dictionary();
for each(targetBuffs in this._buffs)
{
for each(buffItem in targetBuffs)
{
if(dispellEffect && buffItem is TriggeredBuff && TriggeredBuff(buffItem).delay > 0)
{
if(newBuffs[buffItem.targetId] == null)
{
newBuffs[buffItem.targetId] = [];
}
newBuffs[buffItem.targetId].push(buffItem);
}
else if(incrementMode == INCREMENT_MODE_SOURCE && buffItem.aliveSource == targetId || incrementMode == INCREMENT_MODE_TARGET && buffItem.targetId == targetId)
{
if(incrementMode == INCREMENT_MODE_SOURCE && (this.spellBuffsToIgnore.length || buffItem.sourceJustReaffected))
{
skipBuffUpdate = false;
for each(spell in this.spellBuffsToIgnore)
{
if(spell.castingSpellId == buffItem.castingSpell.castingSpellId && spell.casterId == targetId)
{
skipBuffUpdate = true;
break;
}
}
if(buffItem.sourceJustReaffected)
{
skipBuffUpdate = true;
buffItem.sourceJustReaffected = false;
}
if(skipBuffUpdate)
{
if(newBuffs[buffItem.targetId] == null)
{
newBuffs[buffItem.targetId] = [];
}
newBuffs[buffItem.targetId].push(buffItem);
continue;
}
}
modified = buffItem.incrementDuration(delta,dispellEffect);
if(buffItem.active)
{
if(newBuffs[buffItem.targetId] == null)
{
newBuffs[buffItem.targetId] = [];
}
newBuffs[buffItem.targetId].push(buffItem);
if(modified)
{
KernelEventsManager.getInstance().processCallback(FightHookList.BuffUpdate,buffItem.id,buffItem.targetId);
}
}
else
{
buffItem.onRemoved();
KernelEventsManager.getInstance().processCallback(FightHookList.BuffRemove,buffItem,buffItem.targetId,"CoolDown");
currentFighterId = CurrentPlayedFighterManager.getInstance().currentFighterId;
}
}
else
{
if(newBuffs[buffItem.targetId] == null)
{
newBuffs[buffItem.targetId] = [];
}
newBuffs[buffItem.targetId].push(buffItem);
}
}
}
this._buffs = newBuffs;
FightEventsHelper.sendAllFightEvent(true);
}
public function markFinishingBuffs(targetId:Number, currentTurnIsEnding:Boolean = true) : void
{
var buffItem:BasicBuff = null;
var buffWillEndBeforeTargetTurn:Boolean = false;
var casterIndex:int = 0;
var targetIndex:int = 0;
var currentFighterIndex:int = 0;
var i:int = 0;
var fightersCount:int = 0;
var fighterId:Number = NaN;
var fightBattleFrame:FightBattleFrame = Kernel.getWorker().getFrame(FightBattleFrame) as FightBattleFrame;
if(fightBattleFrame == null)
{
return;
}
var currentFighterId:Number = fightBattleFrame.currentPlayerId;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Recherche des buffs de " + targetId + " qui vont finir durant le tour (combattant actuel " + currentFighterId + ") currentTurnIsEnding " + currentTurnIsEnding);
}
if(this._buffs[targetId] == null)
{
return;
}
for each(buffItem in this._buffs[targetId])
{
if(buffItem.duration == 1)
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] - Buff " + buffItem.uid + " n\'a plus qu\'un tour (aliveSource " + buffItem.aliveSource + " sourceJustReaffected " + buffItem.sourceJustReaffected + ")");
}
buffWillEndBeforeTargetTurn = false;
casterIndex = -1;
targetIndex = -1;
currentFighterIndex = -1;
i = 0;
for(fightersCount = fightBattleFrame.fightersList.length; i < fightersCount; )
{
fighterId = fightBattleFrame.fightersList[i];
if(fighterId == buffItem.aliveSource)
{
if(buffItem.sourceJustReaffected)
{
buffItem.sourceJustReaffected = false;
}
else
{
casterIndex = i;
}
}
if(fighterId == buffItem.targetId)
{
targetIndex = i;
}
if(fighterId == currentFighterId)
{
currentFighterIndex = i;
}
i++;
}
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Index des combattants pour ce buff : lanceur " + casterIndex + ", cible " + targetIndex + " combattant actuel " + currentFighterIndex);
}
if(casterIndex == -1 || targetIndex == -1 || currentFighterIndex == -1)
{
_log.warn("Error when marking finishing buff, fighters cannot be found ");
return;
}
if(casterIndex == targetIndex)
{
if(currentFighterIndex == targetIndex && !currentTurnIsEnding)
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] cible = target = combattant actuel et ce n\'est pas une fin de tour, on ne desactive pas");
}
continue;
}
buffWillEndBeforeTargetTurn = true;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] cible = target, le buff doit etre desactivé");
}
}
else if(currentFighterIndex == targetIndex && currentTurnIsEnding)
{
buffWillEndBeforeTargetTurn = true;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] fin du tour de la cible, le buff doit etre desactivé");
}
}
else
{
if(casterIndex > targetIndex)
{
if(currentFighterIndex >= casterIndex)
{
currentFighterIndex -= fightersCount;
}
casterIndex -= fightersCount;
}
_log.debug("[BUFFS DEBUG] ---> Index des combattants pour ce buff : lanceur " + casterIndex + ", cible " + targetIndex + " combattant actuel " + currentFighterIndex);
if(currentFighterIndex < casterIndex || currentFighterIndex > targetIndex)
{
buffWillEndBeforeTargetTurn = true;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] le combattant actuel n\'est pas entre le caster et la target, le buff doit etre desactivé");
}
}
}
if(buffWillEndBeforeTargetTurn)
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buffItem.uid + " doit être désactivé, il ne doit plus être affiché dans les stats du combattant");
}
BasicBuff(buffItem).onDisabled();
}
}
}
}
public function addBuff(buff:BasicBuff, applyBuff:Boolean = true) : void
{
var sameBuff:BasicBuff = null;
var actualBuff:BasicBuff = null;
if(!this._buffs[buff.targetId])
{
this._buffs[buff.targetId] = [];
}
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Ajout du buff " + buff.uid + " sur " + buff.targetId);
}
var buffsCount:int = this._buffs[buff.targetId].length;
for(var i:int = 0; i < buffsCount; )
{
actualBuff = this._buffs[buff.targetId][i];
if(buff.equals(actualBuff))
{
sameBuff = actualBuff;
break;
}
i++;
}
if(!sameBuff || buff.actionId === ActionIds.ACTION_CHARACTER_BOOST_THRESHOLD)
{
this._buffs[buff.targetId].push(buff);
}
else
{
if(sameBuff is TriggeredBuff && sameBuff.effect.triggers.indexOf("|") != -1 || sameBuff.castingSpell.spellRank && sameBuff.castingSpell.spellRank.maxStack > 0 && sameBuff.stack && sameBuff.stack.length == sameBuff.castingSpell.spellRank.maxStack)
{
return;
}
sameBuff.add(buff);
}
if(applyBuff)
{
buff.onApplied();
}
if(!sameBuff)
{
KernelEventsManager.getInstance().processCallback(FightHookList.BuffAdd,buff.id,buff.targetId);
}
else
{
KernelEventsManager.getInstance().processCallback(FightHookList.BuffUpdate,sameBuff.id,sameBuff.targetId);
}
}
public function updateBuff(buff:BasicBuff) : Boolean
{
var oldBuff:BasicBuff = null;
var targetId:Number = buff.targetId;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Mise à jour du buff " + buff.uid + " sur " + buff.targetId);
}
if(!this._buffs[targetId])
{
return false;
}
var i:int = this.getBuffIndex(targetId,buff.id);
if(i == -1)
{
return false;
}
this._buffs[targetId][i].onRemoved();
this._buffs[targetId][i].updateParam(buff.param1,buff.param2,buff.param3,buff.id);
oldBuff = this._buffs[targetId][i];
if(!oldBuff)
{
return false;
}
oldBuff.onApplied();
KernelEventsManager.getInstance().processCallback(FightHookList.BuffUpdate,oldBuff.id,targetId);
return true;
}
public function dispell(targetId:Number, forceUndispellable:Boolean = false, critical:Boolean = false, dying:Boolean = false) : void
{
var buff:BasicBuff = null;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Desenvoutement de tous les buffs de " + targetId);
}
var newBuffs:Array = [];
for each(buff in this._buffs[targetId])
{
if(buff.canBeDispell(forceUndispellable,int.MIN_VALUE,dying))
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " doit être retiré");
}
KernelEventsManager.getInstance().processCallback(FightHookList.BuffRemove,buff.id,targetId,"Dispell");
buff.onRemoved();
}
else
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " reste");
}
newBuffs.push(buff);
}
}
this._buffs[targetId] = newBuffs;
}
public function dispellSpell(targetId:Number, spellId:uint, forceUndispellable:Boolean = false, critical:Boolean = false, dying:Boolean = false) : void
{
var buff:BasicBuff = null;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Desenvoutement de tous les buffs du sort " + spellId + " de " + targetId);
}
var newBuffs:Array = [];
var currentFighterId:Number = CurrentPlayedFighterManager.getInstance().currentFighterId;
for each(buff in this._buffs[targetId])
{
if(spellId == buff.castingSpell.spell.id && buff.canBeDispell(forceUndispellable,int.MIN_VALUE,dying))
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " doit être retiré");
}
buff.onRemoved();
KernelEventsManager.getInstance().processCallback(FightHookList.BuffRemove,buff,targetId,"Dispell");
}
else
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " reste");
}
newBuffs.push(buff);
}
}
this._buffs[targetId] = newBuffs;
}
public function dispellUniqueBuff(targetId:Number, boostUID:int, forceUndispellable:Boolean = false, dying:Boolean = false, ultimateDebuff:Boolean = true) : void
{
var isState:Boolean = false;
var i:int = this.getBuffIndex(targetId,boostUID);
if(i == -1)
{
return;
}
var buff:BasicBuff = this._buffs[targetId][i];
if(buff.canBeDispell(forceUndispellable,!!ultimateDebuff ? int(boostUID) : int(int.MIN_VALUE),dying))
{
if(buff.stack && buff.stack.length > 1 && !dying)
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Desenvoutement du buff stacké " + boostUID + " de " + targetId);
}
buff.onRemoved();
isState = false;
switch(buff.actionId)
{
case ActionIds.ACTION_BOOST_SPELL_BASE_DMG:
buff.param1 = buff.stack[0].param1;
buff.param2 -= buff.stack[0].param2;
buff.param3 -= buff.stack[0].param3;
break;
case ActionIds.ACTION_CHARACTER_PUNISHMENT:
buff.param1 -= buff.stack[0].param2;
break;
case ActionIds.ACTION_FIGHT_SET_STATE:
case ActionIds.ACTION_FIGHT_UNSET_STATE:
isState = true;
break;
default:
buff.param1 -= buff.stack[0].param1;
buff.param2 -= buff.stack[0].param2;
buff.param3 -= buff.stack[0].param3;
}
buff.stack.shift();
buff.refreshDescription();
if(!isState)
{
buff.onApplied();
}
KernelEventsManager.getInstance().processCallback(FightHookList.BuffUpdate,buff.id,buff.targetId);
}
else
{
KernelEventsManager.getInstance().processCallback(FightHookList.BuffRemove,buff.id,targetId,"Dispell");
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Desenvoutement du buff " + boostUID + " de " + targetId);
}
this._buffs[targetId].splice(this._buffs[targetId].indexOf(buff),1);
buff.onRemoved();
if(targetId == CurrentPlayedFighterManager.getInstance().currentFighterId)
{
KernelEventsManager.getInstance().processCallback(HookList.CharacterStatsList);
SpellWrapper.refreshAllPlayerSpellHolder(targetId);
}
}
}
}
public function removeLinkedBuff(sourceId:Number, forceUndispellable:Boolean = false, dying:Boolean = false) : Array
{
var buffList:Array = null;
var buffListCopy:Array = null;
var buff:BasicBuff = null;
var impactedTarget:Array = [];
var entitiesFrame:FightEntitiesFrame = Kernel.getWorker().getFrame(FightEntitiesFrame) as FightEntitiesFrame;
var fightBattleFrame:FightBattleFrame = Kernel.getWorker().getFrame(FightBattleFrame) as FightBattleFrame;
var infos:GameFightFighterInformations = entitiesFrame.getEntityInfos(sourceId) as GameFightFighterInformations;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Retrait des buffs lancés par " + sourceId);
}
for each(buffList in this._buffs)
{
buffListCopy = [];
for each(buff in buffList)
{
buffListCopy.push(buff);
}
for each(buff in buffListCopy)
{
if(buff.source == sourceId)
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " doit être retiré");
}
this.dispellUniqueBuff(buff.targetId,buff.id,forceUndispellable,dying,false);
if(impactedTarget.indexOf(buff.targetId) == -1)
{
impactedTarget.push(buff.targetId);
}
if(dying && infos.stats.summoned && infos.stats.summoner != fightBattleFrame.currentPlayerId)
{
buff.aliveSource = infos.stats.summoner;
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " doit être reaffecté à l\'invocateur " + infos.stats.summoner);
}
}
}
}
}
return impactedTarget;
}
public function reaffectBuffs(sourceId:Number) : void
{
var next:Number = NaN;
var frame:FightBattleFrame = null;
var dontDecrementBuffThisTurn:Boolean = false;
var buffList:Array = null;
var buff:BasicBuff = null;
var entity:GameFightFighterInformations = this.fightEntitiesFrame.getEntityInfos(sourceId) as GameFightFighterInformations;
if(entity.stats.summoned)
{
next = this.getNextFighter(sourceId);
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Réaffectation des buffs lancés par " + sourceId + ", le nouveau \'lanceur\' sera " + next);
}
frame = Kernel.getWorker().getFrame(FightBattleFrame) as FightBattleFrame;
dontDecrementBuffThisTurn = false;
if(frame.currentPlayerId == sourceId)
{
dontDecrementBuffThisTurn = true;
}
for each(buffList in this._buffs)
{
for each(buff in buffList)
{
if(buff.aliveSource == sourceId)
{
if(GameDebugManager.getInstance().buffsDebugActivated)
{
_log.debug("[BUFFS DEBUG] Buff " + buff.uid + " doit être reaffecté");
}
buff.aliveSource = next;
buff.sourceJustReaffected = dontDecrementBuffThisTurn;
}
}
}
}
}
private function getNextFighter(sourceId:Number) : Number
{
var fighter:Number = NaN;
var frame:FightBattleFrame = Kernel.getWorker().getFrame(FightBattleFrame) as FightBattleFrame;
if(frame == null)
{
return 0;
}
var found:Boolean = false;
for each(fighter in frame.fightersList)
{
if(found)
{
return fighter;
}
if(fighter == sourceId)
{
found = true;
}
}
if(found)
{
return frame.fightersList[0];
}
return 0;
}
public function getFighterInfo(targetId:Number) : GameFightFighterInformations
{
return this.fightEntitiesFrame.getEntityInfos(targetId) as GameFightFighterInformations;
}
public function getAllBuff(targetId:Number) : Array
{
return this._buffs[targetId];
}
public function getLifeThreshold(targetId:Number) : uint
{
var buff:BasicBuff = null;
var lifeThreshold:uint = 0;
var targetBuffs:Array = this._buffs[targetId];
if(!targetBuffs)
{
return 0;
}
for(var index:uint = 0; index < targetBuffs.length; index++)
{
buff = targetBuffs[index];
if(buff && !buff.removed && buff.actionId === ActionIdProtocol.ACTION_CHARACTER_BOOST_THRESHOLD && buff is StatBuff)
{
lifeThreshold = Math.max(lifeThreshold,(buff as StatBuff).delta);
}
}
return lifeThreshold;
}
public function resetTriggerCount(targetId:Number) : Boolean
{
var buff:BasicBuff = null;
for each(buff in this._buffs[targetId])
{
if(buff is TriggeredBuff)
{
TriggeredBuff(buff).triggerCount = 0;
return true;
}
}
return false;
}
public function getBuff(buffId:uint, playerId:Number) : BasicBuff
{
var buff:BasicBuff = null;
for each(buff in this._buffs[playerId])
{
if(buffId == buff.id)
{
return buff;
}
}
return null;
}
private function get fightEntitiesFrame() : FightEntitiesFrame
{
return Kernel.getWorker().getFrame(FightEntitiesFrame) as FightEntitiesFrame;
}
private function getBuffIndex(targetId:Number, buffId:int) : int
{
var i:* = null;
var subBuff:BasicBuff = null;
for(i in this._buffs[targetId])
{
if(buffId == this._buffs[targetId][i].id)
{
return int(i);
}
for each(subBuff in (this._buffs[targetId][i] as BasicBuff).stack)
{
if(buffId == subBuff.id)
{
return int(i);
}
}
}
return -1;
}
}
}
| 41.715663
| 259
| 0.524954
|
623296c0e8589b8c9e2eaa6946046480007f8cee
| 3,286
|
as
|
ActionScript
|
mcs/psc_tests/tamarin-redux/tests/acceptance/misc/invalid_opcodes.as
|
sushihangover/PlayScript
|
a2b7c04e176ddb0ddbc16999e5a5902a1e15b563
|
[
"Apache-2.0"
] | 20
|
2015-07-14T07:30:28.000Z
|
2021-11-12T07:41:34.000Z
|
avmplus/test/acceptance/misc/invalid_opcodes.as
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 83
|
2015-07-16T01:31:41.000Z
|
2016-01-13T02:15:47.000Z
|
avmplus/test/acceptance/misc/invalid_opcodes.as
|
vidkidz/crossbridge
|
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
|
[
"MIT"
] | 10
|
2015-06-14T14:39:59.000Z
|
2021-11-12T07:41:35.000Z
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import avmplus.Domain;
import flash.utils.ByteArray;
import avmplus.System;
import com.adobe.test.Assert;
// var SECTION = "Misc Tests";
// var VERSION = "";
// var TITLE = "Verify that invalid opcodes are rejected by the verifier";
var invalidOpcodes:Array = [
0,
0x0A,
0x0B,
0x22, // OP_pushfloat
0x33, // OP_lix8
0x34, // OP_lix16
0x3F,
0x4B, // OP_callsuperid
0x4D, // OP_callinterface
0x54,
0x5B, // OP_findpropglobalstrict
0x5C, // OP_findpropglobal
0x69,
0x6B,
0x79, // OP_convert_f
0x7A, // OP_convert_num
0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE,
0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF
];
/*
* The bytecode array is from the following abcasm code:
*
* function m() {
* // Try to use the internal opcode OP_lix8 = 0x33
* 0x33
* }
*
* The invalid opcode is at bytecode[0x1E]
*
*/
var bytecode:Array = [0x10, 0, 0x2E, 0,
1, 1, 1, 0x02,
1, 0x6D, 1, 1,
1, 1, 0, 0,
1, 0, 0, 0,
1, 0, 0, 1,
0, 0, 1, 0,
0, 1,
0x33, // This is the opcode that gets changed on each loop
0,0
];
var ba:ByteArray = new ByteArray();
var valid_new_opcodes:Array = new Array();
if(System.swfVersion>=15){
// Float support enabled; add the new opcodes as "valid".
valid_new_opcodes.push(0x22); // OP_pushfloat
valid_new_opcodes.push(0x79); // OP_convert_f
valid_new_opcodes.push(0x7A); // OP_convert_num
}
for (var i = 0; i < bytecode.length; i++) {
ba.writeByte(bytecode[i]);
}
var d:Domain = new Domain(Domain.currentDomain);
var expected:String = 'VerifyError: Error #1011';
var actual:String;
for (var i = 0; i < invalidOpcodes.length; i++) {
actual = 'no error';
ba[0x1E] = invalidOpcodes[i]; // set the invalid opcode
if(valid_new_opcodes.indexOf(ba[0x1E])>=0)
continue; // opcode is now valid...
try {
d.loadBytes(ba);
} catch (v:VerifyError) {
actual = v.toString().substr(0,expected.length);
if (v.toString().length > expected.length) {
// debugger build, also test the error message
var opcodeMsg = 'contained illegal opcode '+invalidOpcodes[i].toString();
Assert.expectEq('opcode: '+invalidOpcodes[i]+' check illegal opcode message == actual illegal opcode', true, v.toString().search(opcodeMsg) > 0);
print(v.toString())
}
} finally {
Assert.expectEq('Testing invalid opcode: '+invalidOpcodes[i], expected, actual);
}
}
| 30.425926
| 157
| 0.589166
|
94406b70974329787ef63a1d4a0744cf9f67c30b
| 1,593
|
as
|
ActionScript
|
src/flash/text/engine/SpaceJustifier.as
|
paolodm/shumway
|
75c8d387b48a2f2e561eb4bc3458162b7cc71b16
|
[
"Apache-2.0"
] | 3
|
2015-03-27T01:14:12.000Z
|
2016-05-05T17:28:16.000Z
|
src/flash/text/engine/SpaceJustifier.as
|
claus/shumway
|
924fc360749d11f9a2b076953bc8b2f0fa27fca2
|
[
"Apache-2.0"
] | 2
|
2015-02-27T02:53:54.000Z
|
2015-03-04T05:21:07.000Z
|
src/flash/text/engine/SpaceJustifier.as
|
claus/shumway
|
924fc360749d11f9a2b076953bc8b2f0fa27fca2
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright 2014 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package flash.text.engine {
[native(cls='SpaceJustifierClass')]
public final class SpaceJustifier extends TextJustifier {
public function SpaceJustifier(locale: String = "en", lineJustification: String = "unjustified",
letterSpacing: Boolean = false)
{
super(locale, lineJustification);
this.letterSpacing = letterSpacing;
}
public native function get letterSpacing(): Boolean;
public native function set letterSpacing(value: Boolean): void;
public native function get minimumSpacing(): Number;
public native function set minimumSpacing(value: Number): void;
public native function get optimumSpacing(): Number;
public native function set optimumSpacing(value: Number): void;
public native function get maximumSpacing(): Number;
public native function set maximumSpacing(value: Number): void;
public override function clone(): TextJustifier {
return new SpaceJustifier(locale, lineJustification, letterSpacing);
}
}
}
| 39.825
| 98
| 0.743252
|
7866e2a5440cf84bd356a11207056d5165ab2092
| 110
|
as
|
ActionScript
|
data/DofusInvoker/scripts/cmodule/lua_wrapper/___collate_substitute_table_ptr.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 10
|
2019-11-10T21:24:38.000Z
|
2021-05-24T23:56:36.000Z
|
data/DofusInvoker/scripts/cmodule/lua_wrapper/___collate_substitute_table_ptr.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 15
|
2021-01-27T21:41:58.000Z
|
2021-03-03T16:47:19.000Z
|
data/DofusInvoker/scripts/cmodule/lua_wrapper/___collate_substitute_table_ptr.as
|
bot4dofus/Datafus
|
126838a84b0e41d5486d735aa38d78deeb8d6681
|
[
"MIT"
] | 3
|
2021-11-08T22:58:20.000Z
|
2022-02-09T22:22:33.000Z
|
package cmodule.lua_wrapper
{
const ___collate_substitute_table_ptr:int = gstaticInitter.alloc(4,4);
}
| 22
| 74
| 0.772727
|
d8af8d048a8ab24da4bf7683319d0edc2a36f949
| 210
|
as
|
ActionScript
|
kag2d/Mods/ZFM+1.6.7f/Entities/Structures/Components/Load/Booster/Pad.as
|
agalera/kag2d_zfm-
|
3c3e81e24d7d6de229df994110fc044e05758411
|
[
"curl"
] | null | null | null |
kag2d/Mods/ZFM+1.6.7f/Entities/Structures/Components/Load/Booster/Pad.as
|
agalera/kag2d_zfm-
|
3c3e81e24d7d6de229df994110fc044e05758411
|
[
"curl"
] | null | null | null |
kag2d/Mods/ZFM+1.6.7f/Entities/Structures/Components/Load/Booster/Pad.as
|
agalera/kag2d_zfm-
|
3c3e81e24d7d6de229df994110fc044e05758411
|
[
"curl"
] | null | null | null |
// Pad.as
void onInit(CSprite@ this)
{
CSpriteLayer@ layer = this.addSpriteLayer("blood", "Pad.png", 8, 8);
layer.addAnimation("default", 0, false);
layer.animation.AddFrame(1);
layer.SetVisible(false);
}
| 21
| 69
| 0.7
|
537f205347fc5e3181643137281df129e890c33c
| 775
|
as
|
ActionScript
|
src/org/superkaka/kakalib/struct/BitmapFrameInfo.as
|
rainssong/RainsAsLib
|
7b9bf0e10f051259cb541d9007d6f34e3cfa43f2
|
[
"MIT"
] | 7
|
2015-01-13T08:34:30.000Z
|
2020-12-28T01:52:36.000Z
|
src/org/superkaka/kakalib/struct/BitmapFrameInfo.as
|
rainssong/RainsAsLib
|
7b9bf0e10f051259cb541d9007d6f34e3cfa43f2
|
[
"MIT"
] | null | null | null |
src/org/superkaka/kakalib/struct/BitmapFrameInfo.as
|
rainssong/RainsAsLib
|
7b9bf0e10f051259cb541d9007d6f34e3cfa43f2
|
[
"MIT"
] | 5
|
2015-07-10T03:11:54.000Z
|
2021-02-18T10:30:11.000Z
|
package org.superkaka.kakalib.struct
{
import flash.display.BitmapData;
/**
* ...
* @author kaka
* 位图帧信息
*/
public class BitmapFrameInfo
{
/**
* x轴偏移
*/
public var x:Number;
/**
* y轴偏移
*/
public var y:Number;
/**
* 位图数据
*/
public var bitmapData:BitmapData;
//=================静态管理===============
static private const map_data:Object = { };
/**
* 存储位图帧信息序列
* @param id
* @param data
*/
static public function storeBitmapFrameInfo(id:String, data:Vector.<BitmapFrameInfo>):void
{
map_data[id] = data;
}
/**
* 获取位图帧信息序列
* @param id
* @return
*/
static public function getBitmapFrameInfo(id:String):Vector.<BitmapFrameInfo>
{
return map_data[id];
}
}
}
| 14.090909
| 92
| 0.556129
|
8b5e2c7c1e969c8d3afbd170c32b2396b63b4899
| 3,170
|
as
|
ActionScript
|
Flare/flare.tests/src/flare/tests/SortTests.as
|
Jennythompson17/Visualisations
|
9908d24df5642aaed38fe437f9ee6cf9ee695d26
|
[
"BSD-3-Clause"
] | 83
|
2015-01-13T12:56:43.000Z
|
2022-03-30T19:59:01.000Z
|
flare.tests/src/flare/tests/SortTests.as
|
bsweger/Flare
|
f7c9d3f11ba22692fb8d4293b5ad77fe88b92dda
|
[
"BSD-3-Clause"
] | 1
|
2015-05-25T03:51:41.000Z
|
2015-05-25T03:51:41.000Z
|
flare.tests/src/flare/tests/SortTests.as
|
bsweger/Flare
|
f7c9d3f11ba22692fb8d4293b5ad77fe88b92dda
|
[
"BSD-3-Clause"
] | 26
|
2015-01-29T09:02:10.000Z
|
2022-03-27T18:52:17.000Z
|
package flare.tests
{
import flare.util.Displays;
import flare.util.Sort;
import flash.display.Shape;
import flash.display.Sprite;
import unitest.TestCase;
public class SortTests extends TestCase
{
public function SortTests() {
addTest("testSort");
addTest("testSortDisplayChildren");
}
// --------------------------------------------------------------------
private var a:Object = {x:1, y:1, z:1};
private var b:Object = {x:2, y:1, z:1};
private var c:Object = {x:3, y:2, z:1};
private var d:Object = {x:4, y:2, z:1};
private var e:Object = {x:5, y:3, z:2};
private var f:Object = {x:6, y:3, z:2};
private var g:Object = {x:7, y:4, z:2};
private var h:Object = {x:8, y:4, z:2};
public function testSort():void
{
var tests:Array = [
{
items:[a, b, c, d, e, f, g, h],
check:[h, g, f, e, d, c, b, a],
sort: Sort.$("-x")
},
{
items:[a, b, c, d, e, f, g, h],
check:[g, h, e, f, c, d, a, b],
sort: Sort.$("-y")
},
{
items:[a, b, c, d, e, f, g, h],
check:[e, f, g, h, a, b, c, d],
sort: Sort.$("-z", "+x")
},
{
items:[a, b, c, d, e, f, g, h],
check:[b, a, d, c, f, e, h, g],
sort: Sort.$("y", "-x")
},
{
items:[a, b, c, d, e, f, g, h],
check:[a, b, c, d, e, f, g, h],
sort: Sort.$("z", "y", "x")
},
{
items:[a, b, c, d, e, f, g, h],
check:[g, h, e, f, c, d, a, b],
sort: Sort.$(["-z", "-y", "x"])
},
];
for each (var test:Object in tests) {
test.items.sort(test.sort);
for (var i:int=0; i<test.items.length; ++i)
assertEquals(test.check[i], test.items[i]);
}
}
public function testSortDisplayChildren():void
{
var p:Sprite = new Sprite();
var sa:Shape = new Shape(); sa.x = a.x; sa.y = a.y;
var sb:Shape = new Shape(); sb.x = b.x; sb.y = b.y;
var sc:Shape = new Shape(); sc.x = c.x; sc.y = c.y;
var sd:Shape = new Shape(); sd.x = d.x; sd.y = d.y;
var se:Shape = new Shape(); se.x = e.x; se.y = e.y;
var sf:Shape = new Shape(); sf.x = f.x; sf.y = f.y;
var sg:Shape = new Shape(); sg.x = g.x; sg.y = g.y;
var sh:Shape = new Shape(); sh.x = h.x; sh.y = h.y;
var tests:Array = [
{
items:[sa, sb, sc, sd, se, sf, sg, sh],
check:[sh, sg, sf, se, sd, sc, sb, sa],
sort: Sort.$("-x")
},
{
items:[sa, sb, sc, sd, se, sf, sg, sh],
check:[sg, sh, se, sf, sc, sd, sa, sb],
sort: Sort.$("-y")
},
{
items:[sa, sb, sc, sd, se, sf, sg, sh],
check:[sb, sa, sd, sc, sf, se, sh, sg],
sort: Sort.$("y", "-x")
}
];
for each (var test:Object in tests) {
// clear children
for (var i:int=p.numChildren; --i>=0;)
p.removeChildAt(i);
// add children
for (i=0; i<test.items.length; ++i)
p.addChild(test.items[i]);
// sort
Displays.sortChildren(p, test.sort);
// check result
for (i=0; i<test.items.length; ++i)
assertEquals(test.check[i], p.getChildAt(i));
}
}
} // end of class SortTests
}
| 27.094017
| 74
| 0.466246
|
1266f5edbea78d77a054ce7b81e81293c5181c90
| 200
|
as
|
ActionScript
|
09-decorator-begin/src/my/patterns/decorators/Umbrella.as
|
fproject/design-patterns-training
|
813fbb5b8cc5da0055c809c5705fd47a836d74e3
|
[
"MIT"
] | null | null | null |
09-decorator-begin/src/my/patterns/decorators/Umbrella.as
|
fproject/design-patterns-training
|
813fbb5b8cc5da0055c809c5705fd47a836d74e3
|
[
"MIT"
] | null | null | null |
09-decorator-begin/src/my/patterns/decorators/Umbrella.as
|
fproject/design-patterns-training
|
813fbb5b8cc5da0055c809c5705fd47a836d74e3
|
[
"MIT"
] | null | null | null |
package my.patterns.decorators {
import my.patterns.runwaymodels.Model;
public class Umbrella extends Model {
override public function getDressed():String {
return "~umbrella";
}
}
}
| 20
| 50
| 0.715
|
eac49931eb19bf63531a8ac67653592c4a096e00
| 2,154
|
as
|
ActionScript
|
common-snapshot/src/com/neopets/games/inhouse/pinball/objects/abstract/MovingBlocker.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | 1
|
2021-06-23T08:53:53.000Z
|
2021-06-23T08:53:53.000Z
|
common-snapshot/src/com/neopets/games/inhouse/pinball/objects/abstract/MovingBlocker.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | null | null | null |
common-snapshot/src/com/neopets/games/inhouse/pinball/objects/abstract/MovingBlocker.as
|
vikiana/ShenkuuWarriorII
|
cd734d339b6237675f20ac0ab0b3726967bb0a49
|
[
"MIT"
] | null | null | null |
// This class simply adds a waypoint based movement function to the ball blocker class.
// Author: David Cary
// Last Updated: May 2008
package com.neopets.games.inhouse.pinball.objects.abstract
{
import flash.display.DisplayObject;
// Make sure to add this library to your publish settings.
import org.cove.ape.*;
public class MovingBlocker extends BallBlocker {
protected var path:Array;
protected var speed:Number;
protected var curIndex:int;
public function MovingBlocker() {
curIndex = -1;
speed = 4;
super();
}
// Movement Functions
protected function moveAlongPath(mp:AbstractParticle,hfacing:Boolean=false):void {
if(mp == null || path == null) return;
var pt_a:Vector;
var pt_b:Vector;
var dist:Number;
var dv:Vector;
// check if we have enough points for a line
if(path.length > 1) {
// star simulating motion along the path
if(curIndex < 0) curIndex = 1; // make sure we have a valid starting point
pt_a = mp.position;
var len:Number = speed;
do {
pt_b = path[curIndex];
dist = pt_b.distance(pt_a);
// check distance between points
if(dist >= 0) {
if(dist < len) {
// if our remaining movement is greater than this distance
// spend movement to go on to the next set of points
len -= dist;
pt_a = pt_b;
curIndex = (curIndex + 1) % path.length;
} else {
// if we don't have enough movement to go path this point,
// get as close to the point as we can.
dv = pt_b.minus(pt_a);
mp.velocity = dv.mult(len/dist);
len = 0;
}
} else break;
} while(len > 0);
} else {
if(path.length > 0) {
// check if we're close enough to snap to the point
pt_a = mp.position;
pt_b = path[0];
dist = pt_b.distance(pt_a);
if(dist > speed) {
dv = pt_b.minus(pt_a);
mp.position = pt_a.plus(dv.mult(speed/dist));
} else mp.position = pt_b;
}
}
// apply facing effect if applicable
if(hfacing) {
var dobj:DisplayObject = mp.sprite;
if(mp.velocity.x * dobj.scaleX < 0) dobj.scaleX *= -1;
}
}
}
}
| 27.974026
| 88
| 0.623027
|
b0e9240f13ce0f107f67a12e3c16a437958e67af
| 126
|
as
|
ActionScript
|
swf/com/playata/framework/display/ui/controls/IRichLabel.as
|
lukastechhonda/BigBangEmpireBot
|
5d5666c9d06111dc079f61b6038e2338d21fc8a7
|
[
"MIT"
] | 1
|
2019-10-31T13:49:58.000Z
|
2019-10-31T13:49:58.000Z
|
swf/com/playata/framework/display/ui/controls/IRichLabel.as
|
lukastechhonda/BigBangEmpireBot
|
5d5666c9d06111dc079f61b6038e2338d21fc8a7
|
[
"MIT"
] | 11
|
2018-09-30T15:17:00.000Z
|
2022-02-13T11:52:26.000Z
|
swf/com/playata/framework/display/ui/controls/IRichLabel.as
|
Zweer/BigBangEmpireBot
|
d0fd04118822bf0eb6fffd271ce944f0475c5998
|
[
"MIT"
] | 6
|
2018-06-18T18:43:46.000Z
|
2021-03-03T21:48:43.000Z
|
package com.playata.framework.display.ui.controls
{
public interface IRichLabel extends IRichTextField
{
}
}
| 15.75
| 53
| 0.706349
|
3edd95b7315213a2c68314e86869c1aec5dc035b
| 96,601
|
as
|
ActionScript
|
frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as
|
blackjyn/flex-sdk
|
61aa3601c8c57f2855e18e11fa16f4180de42e05
|
[
"ECL-2.0",
"Apache-2.0"
] | 2
|
2017-10-27T04:36:43.000Z
|
2021-01-02T23:53:38.000Z
|
frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as
|
blackjyn/flex-sdk
|
61aa3601c8c57f2855e18e11fa16f4180de42e05
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as
|
blackjyn/flex-sdk
|
61aa3601c8c57f2855e18e11fa16f4180de42e05
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package mx.managers.systemClasses
{
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.IEventDispatcher;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.geom.Point;
import flash.utils.Dictionary;
import mx.events.DynamicEvent;
import mx.events.FlexEvent;
import mx.events.FlexChangeEvent;
import mx.events.EventListenerRequest;
import mx.events.InterManagerRequest;
import mx.events.InvalidateRequestData;
import mx.events.Request;
import mx.events.SandboxMouseEvent;
import mx.events.SWFBridgeEvent;
import mx.events.SWFBridgeRequest;
import mx.core.EventPriority;
import mx.core.IChildList;
import mx.core.IFlexDisplayObject;
import mx.core.IFlexModuleFactory;
import mx.core.IRawChildrenContainer;
import mx.core.ISWFBridgeGroup;
import mx.core.ISWFBridgeProvider;
import mx.core.ISWFLoader;
import mx.core.IUIComponent;
import mx.core.mx_internal;
import mx.core.Singleton;
import mx.core.SWFBridgeGroup;
import mx.managers.IFocusManager;
import mx.managers.IFocusManagerContainer;
import mx.managers.IMarshalSystemManager;
import mx.managers.PopUpManagerChildList;
import mx.managers.ISystemManager;
import mx.managers.ISystemManagerChildManager;
import mx.managers.SystemManagerGlobals;
import mx.managers.SystemManagerProxy;
import mx.managers.marshalClasses.CursorManagerMarshalMixin;
import mx.managers.marshalClasses.DragManagerMarshalMixin;
import mx.managers.marshalClasses.FocusManagerMarshalMixin;
import mx.managers.marshalClasses.PopUpManagerMarshalMixin;
import mx.managers.marshalClasses.ToolTipManagerMarshalMixin;
import mx.utils.EventUtil;
import mx.utils.NameUtil;
import mx.utils.SecurityUtil;
use namespace mx_internal;
[ExcludeClass]
[Mixin]
public class MarshallingSupport implements IMarshalSystemManager, ISWFBridgeProvider
{
include "../../core/Version.as";
//--------------------------------------------------------------------------
//
// Class Method
//
//--------------------------------------------------------------------------
public static function init(fbs:IFlexModuleFactory):void
{
Singleton.registerClass("mx.managers::IMarshalSystemManager", MarshallingSupport);
}
/**
* @private
*/
private static function weakDependency():void { CursorManagerMarshalMixin};
/**
* @private
*/
private static function weakDependency2():void { DragManagerMarshalMixin };
/**
* @private
*/
private static function weakDependency3():void { FocusManagerMarshalMixin };
/**
* @private
*/
private static function weakDependency4():void { PopUpManagerMarshalMixin };
/**
* @private
*/
private static function weakDependency5():void { ToolTipManagerMarshalMixin };
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* <p>This is the starting point for all Flex applications.
* This class is set to be the root class of a Flex SWF file.
* Flash Player instantiates an instance of this class,
* causing this constructor to be called.</p>
*/
public function MarshallingSupport(systemManager:ISystemManager = null)
{
super();
if (!systemManager)
return;
this.systemManager = systemManager;
systemManager.addEventListener("invalidateParentSizeAndDisplayList", invalidateParentSizeAndDisplayListHandler);
systemManager.addEventListener("addEventListener", addEventListenerHandler);
systemManager.addEventListener("removeEventListener", removeEventListenerHandler);
systemManager.addEventListener("getVisibleApplicationRect", getVisibleApplicationRectHandler);
systemManager.addEventListener("deployMouseShields", deployMouseShieldsHandler);
systemManager.addEventListener("getScreen", Stage_resizeHandler);
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
awm.addEventListener("removeFocusManager", removeFocusManagerHandler);
awm.addEventListener("activateForm", activateFormHandler);
awm.addEventListener("activatedForm", activatedFormHandler);
awm.addEventListener("deactivateForm", deactivateFormHandler);
awm.addEventListener("deactivatedForm", deactivatedFormHandler);
awm.addEventListener("canActivateForm", canActivateFormHandler);
awm.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
childManager =
ISystemManagerChildManager(systemManager.getImplementation("mx.managers::ISystemManagerChildManager"));
if (useSWFBridge())
{
// create a bridge so we can talk to our parent.
swfBridgeGroup = new SWFBridgeGroup(systemManager);
swfBridgeGroup.parentBridge = DisplayObject(systemManager).loaderInfo.sharedEvents;
addParentBridgeListeners();
// send message to parent that we are ready.
// pass up the sandbox bridge to the parent so its knows who we are.
var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_NEW_APPLICATION);
bridgeEvent.data = swfBridgeGroup.parentBridge;
swfBridgeGroup.parentBridge.dispatchEvent(bridgeEvent);
// placeholder popups are started locally
addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
DisplayObject(systemManager).root.loaderInfo.addEventListener(Event.UNLOAD, unloadHandler, false, 0, true);
}
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
// every SM has to have this listener in case it is the SM for some child AD that contains a manager
// and the parent ADs don't have that manager.
sbRoot.addEventListener(InterManagerRequest.INIT_MANAGER_REQUEST, initManagerHandler, false, 0, true);
// once managers get initialized, they bounce things off the sandbox root
if (sbRoot == systemManager)
{
sbRoot.addEventListener(InterManagerRequest.SYSTEM_MANAGER_REQUEST, systemManagerHandler);
sbRoot.addEventListener(InterManagerRequest.DRAG_MANAGER_REQUEST, multiWindowRedispatcher);
// listened for w/o use of constants because of dependency issues
//addEventListener(InterDragManagerEvent.DISPATCH_DRAG_EVENT, multiWindowRedispatcher);
sbRoot.addEventListener("dispatchDragEvent", multiWindowRedispatcher);
sbRoot.addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
sbRoot.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
sbRoot.addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
sbRoot.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
sbRoot.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
sbRoot.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
sbRoot.addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
sbRoot.addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
sbRoot.addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
}
//--------------------------------------------------------------------------
//
// Variables
//
//--------------------------------------------------------------------------
/**
* @private
*/
private var systemManager:ISystemManager;
/**
* @private
*/
private var childManager:ISystemManagerChildManager;
//----------------------------------
// bridgeToFocusManager
//----------------------------------
/**
* @private
* Map a bridge to a FocusManager.
* This dictionary contains both the focus managers for this document as
* well as focus managers that are in documents contained inside of pop
* ups, if the system manager in that pop up requires a bridge to
* communicate with this system manager.
*
* The returned object is an object of type IFocusManager.
*/
private var _bridgeToFocusManager:Dictionary;
/**
* @private
*
* System Managers in child application domains use their parent's
* bridgeToFocusManager's Dictionary. The swfBridgeGroup property
* is maintained in the same way.
*/
mx_internal function get bridgeToFocusManager():Dictionary
{
if (Object(systemManager).topLevel)
return _bridgeToFocusManager;
else if (systemManager.topLevelSystemManager)
{
var topMP:MarshallingSupport = MarshallingSupport(systemManager.topLevelSystemManager.
getImplementation("mx.managers::IMarshalSystemManager"));
return topMP.bridgeToFocusManager;
}
return null;
}
mx_internal function set bridgeToFocusManager(bridgeToFMDictionary:Dictionary):void
{
if (Object(systemManager).topLevel)
_bridgeToFocusManager = bridgeToFMDictionary;
else if (systemManager.topLevelSystemManager)
{
var topMP:MarshallingSupport = MarshallingSupport(systemManager.topLevelSystemManager.
getImplementation("mx.managers::IMarshalSystemManager"));
topMP.bridgeToFocusManager = bridgeToFMDictionary;
}
}
//--------------------------------------------------------------------------
// swf bridge group
//--------------------------------------------------------------------------
/**
* @private
*
* Represents the related parent and child sandboxs this SystemManager may
* communicate with.
*/
private var _swfBridgeGroup:ISWFBridgeGroup;
public function get swfBridgeGroup():ISWFBridgeGroup
{
if (systemManager.isTopLevel())
return _swfBridgeGroup;
else if (systemManager.topLevelSystemManager)
{
var mp:IMarshalSystemManager =
IMarshalSystemManager(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
return mp.swfBridgeGroup;
}
return null;
}
public function set swfBridgeGroup(bridgeGroup:ISWFBridgeGroup):void
{
if (systemManager.isTopLevel())
_swfBridgeGroup = bridgeGroup;
else if (systemManager.topLevelSystemManager)
{
var mp:IMarshalSystemManager =
IMarshalSystemManager(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
mp.swfBridgeGroup = bridgeGroup;
}
}
//--------------------------------------------------------------------------
//
// Properties: ISWFBridgeProvider
//
//--------------------------------------------------------------------------
/**
* @inheritDoc
*/
public function get swfBridge():IEventDispatcher
{
if (swfBridgeGroup)
return swfBridgeGroup.parentBridge;
return null;
}
/**
* @inheritDoc
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public function get childAllowsParent():Boolean
{
try
{
return DisplayObject(systemManager).loaderInfo.childAllowsParent;
}
catch (error:Error)
{
//Error #2099: The loading object is not sufficiently loaded to provide this information.
}
return false; // assume the worst
}
/**
* @inheritDoc
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public function get parentAllowsChild():Boolean
{
try
{
return DisplayObject(systemManager).loaderInfo.parentAllowsChild;
}
catch (error:Error)
{
//Error #2099: The loading object is not sufficiently loaded to provide this information.
}
return false; // assume the worst
}
/**
* @private
*
* Used to locate untrusted forms. Maps string ids to Objects.
* The object make be the SystemManagerProxy of a form or it may be
* the bridge to the child application where the object lives.
*/
private var idToPlaceholder:Object;
private var eventProxy:EventProxy;
private var eventProxyRefCounts:Object = {};
//--------------------------------------------------------------------------
//
// Overridden methods: EventDispatcher
//
//--------------------------------------------------------------------------
/**
* @private
* Only create idle events if someone is listening.
*/
public function addEventListener(type:String, listener:Function,
useCapture:Boolean = false,
priority:int = 0,
useWeakReference:Boolean = false):Boolean
{
if (hasSWFBridges() || SystemManagerGlobals.topLevelSystemManagers.length > 1)
{
if (!eventProxy)
{
eventProxy = new EventProxy(systemManager);
}
var actualType:String = EventUtil.sandboxMouseEventMap[type];
if (actualType)
{
if (systemManager.isTopLevelRoot())
{
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
addEventListenerToSandboxes(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
}
else
{
Object(systemManager).$addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
}
addEventListenerToSandboxes(type, sandboxMouseListener, useCapture, priority, useWeakReference);
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers)
addEventListenerToOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture, priority, useWeakReference)
if (systemManager.getSandboxRoot() == systemManager)
{
if (eventProxyRefCounts[actualType] == null)
eventProxyRefCounts[actualType] = 1;
else
eventProxyRefCounts[actualType] ++;
Object(systemManager).$addEventListener(actualType, eventProxy.marshalListener,
useCapture, priority, useWeakReference);
if (actualType == MouseEvent.MOUSE_UP)
{
try
{
if (systemManager.stage)
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener,
useCapture, priority, useWeakReference);
else
Object(systemManager).$addEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener,
useCapture, priority, useWeakReference);
}
catch (e:SecurityError)
{
Object(systemManager).$addEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener,
useCapture, priority, useWeakReference);
}
}
}
// Set useCapture to false because we will never see an event
// marshalled in the capture phase.
Object(systemManager).$addEventListener(type, listener, false, priority, useWeakReference);
return false;
}
}
return true;
}
/**
* @private
*
* Test if this system manager has any sandbox bridges.
*
* @return true if there are sandbox bridges, false otherwise.
*/
private function hasSWFBridges():Boolean
{
return swfBridgeGroup != null;
}
/**
* @private
*/
public function removeEventListener(type:String, listener:Function,
useCapture:Boolean = false):Boolean
{
if (hasSWFBridges() || SystemManagerGlobals.topLevelSystemManagers.length > 1)
{
var actualType:String = EventUtil.sandboxMouseEventMap[type];
if (actualType)
{
if (systemManager.getSandboxRoot() == systemManager && eventProxy)
{
if (eventProxyRefCounts[actualType] != null)
eventProxyRefCounts[actualType] --;
if (eventProxyRefCounts[actualType] == null || eventProxyRefCounts[actualType] == 0)
{
delete eventProxyRefCounts[actualType];
Object(systemManager).$removeEventListener(actualType, eventProxy.marshalListener,
useCapture);
if (actualType == MouseEvent.MOUSE_UP)
{
try
{
if (systemManager.stage)
systemManager.stage.removeEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener,
useCapture);
}
catch (e:SecurityError)
{
}
// Remove both listeners in case the system manager was added
// or removed from the stage after the listener was added.
Object(systemManager).$removeEventListener(Event.MOUSE_LEAVE, eventProxy.marshalListener,
useCapture);
}
}
else
return false; // if we didn't actually remove, don't remove on the following lines either
}
if (!SystemManagerGlobals.changingListenersInOtherSystemManagers)
removeEventListenerFromOtherSystemManagers(type, otherSystemManagerMouseListener, useCapture);
removeEventListenerFromSandboxes(type, sandboxMouseListener, useCapture);
Object(systemManager).$removeEventListener(type, listener, false);
return false;
}
}
return true;
}
//--------------------------------------------------------------------------
//
// Methods: Focus
//
//--------------------------------------------------------------------------
/**
* @private
*
* New version of activate that does not require a
* IFocusManagerContainer.
*/
private function activateFormHandler(event:DynamicEvent):void
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// trace("SM: activate " + f + " " + forms.length);
if (awm.form)
{
if (awm.form != event.form && awm.forms.length > 1)
{
// Switch the active form.
if (isRemotePopUp(awm.form))
{
if (!areRemotePopUpsEqual(awm.form, event.form))
deactivateRemotePopUp(awm.form);
event.preventDefault();
}
}
}
}
private function activatedFormHandler(event:DynamicEvent):void
{
// trace("f = " + f);
if (isRemotePopUp(event.form))
{
activateRemotePopUp(event.form);
event.preventDefault();
}
}
/**
* @private
*
* New version of deactivate that works with remote pop ups.
*
*/
private function deactivateFormHandler(event:DynamicEvent):void
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// trace(">>SM: deactivate " + f);
if (awm.form)
{
// If there's more than one form and this is it, find a new form.
if (awm.form == event.form && awm.forms.length > 1)
{
if (isRemotePopUp(awm.form))
{
deactivateRemotePopUp(awm.form);
event.preventDefault();
}
}
}
}
private function deactivatedFormHandler(event:DynamicEvent):void
{
if (isRemotePopUp(event.form))
{
activateRemotePopUp(event.form);
event.preventDefault();
}
// trace("<<SM: deactivate " + f);
}
/**
* @private
*
* @return true if the form can be activated, false otherwise.
*/
private function canActivateFormHandler(request:Request):void
{
if (isRemotePopUp(request.value))
{
var remotePopUp:RemotePopUp = RemotePopUp(request.value);
var event:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST,
false, false, null,
remotePopUp.window);
IEventDispatcher(remotePopUp.bridge).dispatchEvent(event);
request.value = event.data;
request.preventDefault();
}
}
/**
* @private
*
* @return true if the form is a RemotePopUp, false if the form is IFocusManagerContainer.
*
*/
private static function isRemotePopUp(form:Object):Boolean
{
return !(form is IFocusManagerContainer);
}
/**
* @private
*
* @return true if form1 and form2 are both of type RemotePopUp and are equal, false otherwise.
*/
private static function areRemotePopUpsEqual(form1:Object, form2:Object):Boolean
{
if (!(form1 is RemotePopUp))
return false;
if (!(form2 is RemotePopUp))
return false;
var remotePopUp1:RemotePopUp = RemotePopUp(form1);
var remotePopUp2:RemotePopUp = RemotePopUp(form2);
if (remotePopUp1.window == remotePopUp2.window &&
remotePopUp1.bridge && remotePopUp2.bridge)
return true;
return false;
}
/**
* @private
*
* Find a remote form that is hosted by this system manager.
*
* @param window unique id of popUp within a bridged application
* @param bridge bridge of owning application.
*
* @return RemotePopUp if hosted by this system manager, false otherwise.
*/
private function findRemotePopUp(window:Object, bridge:IEventDispatcher):RemotePopUp
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// remove the placeholder from forms array
var n:int = awm.forms.length;
for (var i:int = 0; i < n; i++)
{
if (isRemotePopUp(awm.forms[i]))
{
var popUp:RemotePopUp = RemotePopUp(awm.forms[i]);
if (popUp.window == window &&
popUp.bridge == bridge)
return popUp;
}
}
return null;
}
/**
* Remote a remote form from the forms array.
*
* form Locally created remote form.
*/
private function removeRemotePopUp(form:RemotePopUp):void
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// remove popup from forms array
var n:int = awm.forms.length;
for (var i:int = 0; i < n; i++)
{
if (isRemotePopUp(awm.forms[i]))
{
if (awm.forms[i].window == form.window &&
awm.forms[i].bridge == form.bridge)
{
if (awm.forms[i] == form)
awm.deactivate(IFocusManagerContainer(form));
awm.forms.splice(i, 1);
break;
}
}
}
}
/**
* @private
*
* Activate a form that belongs to a system manager in another
* sandbox or peer application domain.
*
* @param form a RemotePopUp object.
* */
private function activateRemotePopUp(form:Object):void
{
var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST,
false, false,
form.bridge,
form.window);
var bridge:Object = form.bridge;
if (bridge)
bridge.dispatchEvent(request);
}
private function deactivateRemotePopUp(form:Object):void
{
var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST,
false, false,
form.bridge,
form.window);
var bridge:Object = form.bridge;
if (bridge)
bridge.dispatchEvent(request);
}
/**
* Test if two forms are equal.
*
* @param form1 - may be of type a DisplayObjectContainer or a RemotePopUp
* @param form2 - may be of type a DisplayObjectContainer or a RemotePopUp
*
* @return true if the forms are equal, false otherwise.
*/
private function areFormsEqual(form1:Object, form2:Object):Boolean
{
if (form1 == form2)
return true;
// if the forms are both remote forms, then compare them, otherwise
// return false.
if (form1 is RemotePopUp && form2 is RemotePopUp)
{
return areRemotePopUpsEqual(form1, form2);
}
return false;
}
/**
* @inheritDoc
*/
public function addFocusManager(f:IFocusManagerContainer):void
{
// trace("OLW: add focus manager" + f);
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
awm.forms.push(f);
// trace("END OLW: add focus manager" + f);
}
/**
* @inheritDoc
*/
public function removeFocusManagerHandler(event:FocusEvent):void
{
dispatchDeactivatedWindowEvent(DisplayObject(event.relatedObject));
}
//--------------------------------------------------------------------------
//
// Methods: Other
//
//--------------------------------------------------------------------------
/**
* @private
*
* Dispatch an invalidate request to invalidate the size and
* display list of the parent application.
*/
private function dispatchInvalidateRequest():void
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
var request:SWFBridgeRequest = new SWFBridgeRequest(
SWFBridgeRequest.INVALIDATE_REQUEST,
false, false,
bridge,
InvalidateRequestData.SIZE |
InvalidateRequestData.DISPLAY_LIST);
bridge.dispatchEvent(request);
}
//--------------------------------------------------------------------------
//
// Event handlers
//
//--------------------------------------------------------------------------
/**
* @private
* Track mouse clicks to see if we change top-level forms.
* Note that we get a FocusEvent here and not a MouseEvent because we
* use a FocusEvent to forward the MouseEvent to the mixin. That's
* why we use event.relatedObject here and not MouseEvent
*/
private function mouseDownHandler(event:FocusEvent):void
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
event.preventDefault();
// trace("SM:mouseDownHandler " + this);
// If an object was clicked that is inside another system manager
// in a bridged application, activate the current document because
// the bridge application is considered part of the main application.
// We also see mouse clicks on dialogs popped up from compatible applications.
var bridge:IEventDispatcher = getSWFBridgeOfDisplayObject(event.relatedObject as DisplayObject);
if (bridge && bridgeToFocusManager[bridge] == systemManager.document.focusManager)
{
// trace("SM:mouseDownHandler click in a bridged application");
if (systemManager.isTopLevelRoot())
awm.activate(IFocusManagerContainer(systemManager.document));
else
dispatchActivatedApplicationEvent();
return;
}
if (awm.numModalWindows == 0) // no modal windows are up
{
if (!systemManager.isTopLevelRoot() || awm.forms.length > 1)
{
var n:int = awm.forms.length;
var p:DisplayObject = DisplayObject(event.relatedObject);
var isApplication:Boolean = systemManager.document is IRawChildrenContainer ?
IRawChildrenContainer(systemManager.document).rawChildren.contains(p) :
systemManager.document.contains(p);
while (p)
{
for (var i:int = 0; i < n; i++)
{
var form_i:Object = isRemotePopUp(awm.forms[i]) ? awm.forms[i].window : awm.forms[i];
if (form_i == p)
{
var j:int = 0;
var index:int;
var newIndex:int;
var childList:IChildList;
if (((p != awm.form) && p is IFocusManagerContainer) ||
(!systemManager.isTopLevelRoot() && p == awm.form))
{
if (systemManager.isTopLevelRoot())
awm.activate(IFocusManagerContainer(p));
if (p == systemManager.document)
dispatchActivatedApplicationEvent();
else if (p is DisplayObject)
dispatchActivatedWindowEvent(DisplayObject(p));
}
if (systemManager.popUpChildren.contains(p))
childList = systemManager.popUpChildren;
else
childList = systemManager;
index = childList.getChildIndex(p);
newIndex = index;
//we need to reset n because activating p's
//FocusManager could have caused
//forms.length to have changed.
n = awm.forms.length;
for (j = 0; j < n; j++)
{
var f:DisplayObject;
var isRemotePopUp:Boolean = isRemotePopUp(awm.forms[j]);
if (isRemotePopUp)
{
if (awm.forms[j].window is String)
continue;
f = awm.forms[j].window;
}
else
f = awm.forms[j];
if (isRemotePopUp)
{
var fChildIndex:int = getChildListIndex(childList, f);
if (fChildIndex > index)
newIndex = Math.max(fChildIndex, newIndex);
}
else if (childList.contains(f))
if (childList.getChildIndex(f) > index)
newIndex = Math.max(childList.getChildIndex(f), newIndex);
}
if (newIndex > index && !isApplication)
childList.setChildIndex(p, newIndex);
return;
}
}
p = p.parent;
}
}
else
dispatchActivatedApplicationEvent();
}
}
/**
* @private
*
* Get the index of an object in a given child list.
*
* @return index of f in childList, -1 if f is not in childList.
*/
private static function getChildListIndex(childList:IChildList, f:Object):int
{
var index:int = -1;
try
{
index = childList.getChildIndex(DisplayObject(f));
}
catch (e:ArgumentError)
{
// index has been preset to -1 so just continue.
}
return index;
}
/**
* @private
*
* Handle request to unload
* Forward event, and do some cleanup
*/
private function beforeUnloadHandler(event:Event):void
{
if (systemManager.isTopLevel() && systemManager.stage)
{
var sandboxRoot:DisplayObject = systemManager.getSandboxRoot();
if (sandboxRoot != DisplayObject(systemManager))
sandboxRoot.removeEventListener(Event.RESIZE, Stage_resizeHandler);
}
removeParentBridgeListeners();
systemManager.dispatchEvent(event);
}
//--------------------------------------------------------------------------
//
// Sandbox Event handlers for messages from children
//
//--------------------------------------------------------------------------
/**
* @private
*
* Add a popup request handler for domain local request and
* remote domain requests.
*/
private function addPopupRequestHandler(event:Event):void
{
if (event.target != systemManager && event is SWFBridgeRequest)
return;
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
// If there is not for mutual trust between us an the child that wants the
// popup, then don't host the pop up.
if (event.target != systemManager)
{
var bridgeProvider:ISWFBridgeProvider = swfBridgeGroup.getChildBridgeProvider(
IEventDispatcher(event.target));
if (!SecurityUtil.hasMutualTrustBetweenParentAndChild(bridgeProvider))
{
return;
}
}
var topMost:Boolean;
// Need to have mutual trust between two application in order
// for an application to host another application's popup.
if (swfBridgeGroup.parentBridge &&
SecurityUtil.hasMutualTrustBetweenParentAndChild(this))
{
// ask the parent to host the popup
popUpRequest.requestor = swfBridgeGroup.parentBridge;
systemManager.getSandboxRoot().dispatchEvent(popUpRequest);
return;
}
// add popup as a child of this system manager
if (!popUpRequest.data.childList || popUpRequest.data.childList == PopUpManagerChildList.PARENT)
topMost = popUpRequest.data.parent && systemManager.popUpChildren.contains(popUpRequest.data.parent);
else
topMost = (popUpRequest.data.childList == PopUpManagerChildList.POPUP);
var children:IChildList;
children = topMost ? systemManager.popUpChildren : systemManager;
children.addChild(DisplayObject(popUpRequest.data.window));
if (popUpRequest.data.modal)
awm.numModalWindows++;
// add popup to the list of managed forms
var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.data.window, popUpRequest.requestor);
awm.forms.push(remoteForm);
if (!systemManager.isTopLevelRoot() && swfBridgeGroup)
{
// We've added the popup as far as it can go.
// Add a placeholder to the top level root application
var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST,
false, false,
popUpRequest.requestor,
{ window: popUpRequest.data.window });
request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(popUpRequest.data.window));
systemManager.dispatchEvent(request);
}
}
/**
* @private
*
* Message from a child system manager to
* remove the popup that was added by using the
* addPopupRequestHandler.
*/
private function removePopupRequestHandler(event:Event):void
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
if (swfBridgeGroup.parentBridge &&
SecurityUtil.hasMutualTrustBetweenParentAndChild(this))
{
// since there is mutual trust the popup is hosted by the parent.
popUpRequest.requestor = swfBridgeGroup.parentBridge;
systemManager.getSandboxRoot().dispatchEvent(popUpRequest);
return;
}
if (systemManager.popUpChildren.contains(popUpRequest.data.window))
systemManager.popUpChildren.removeChild(popUpRequest.data.window);
else
systemManager.removeChild(DisplayObject(popUpRequest.data.window));
if (popUpRequest.data.modal)
awm.numModalWindows--;
removeRemotePopUp(new RemotePopUp(popUpRequest.data.window, popUpRequest.requestor));
if (!systemManager.isTopLevelRoot() && swfBridgeGroup)
{
// if we got here we know the parent is untrusted, so remove placeholders
var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST,
false, false,
popUpRequest.requestor,
{placeHolderId: NameUtil.displayObjectToString(popUpRequest.data.window)
});
systemManager.dispatchEvent(request);
}
}
/**
* @private
*
* Handle request to add a popup placeholder.
* The placeholder represents an untrusted form that is hosted
* elsewhere.
*/
private function addPlaceholderPopupRequestHandler(event:Event):void
{
var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
if (event.target != systemManager && event is SWFBridgeRequest)
return;
if (!forwardPlaceholderRequest(popUpRequest, true))
{
// Create a RemotePopUp and add it.
var remoteForm:RemotePopUp = new RemotePopUp(popUpRequest.data.placeHolderId, popUpRequest.requestor);
awm.forms.push(remoteForm);
}
}
/**
* @private
*
* Handle request to add a popup placeholder.
* The placeholder represents an untrusted form that is hosted
* elsewhere.
*/
private function removePlaceholderPopupRequestHandler(event:Event):void
{
var popUpRequest:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
if (!forwardPlaceholderRequest(popUpRequest, false))
{
// remove the placeholder from forms array
var n:int = awm.forms.length;
for (var i:int = 0; i < n; i++)
{
if (isRemotePopUp(awm.forms[i]))
{
if (awm.forms[i].window == popUpRequest.data.placeHolderId &&
awm.forms[i].bridge == popUpRequest.requestor)
{
awm.forms.splice(i, 1);
break;
}
}
}
}
}
/**
* Forward a form event update the parent chain.
* Takes care of removing object references and substituting
* ids when an untrusted boundry is crossed.
*/
private function forwardFormEvent(event:SWFBridgeEvent):Boolean
{
if (systemManager.isTopLevelRoot())
return false;
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
if (bridge)
{
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
event.data.notifier = bridge;
if (sbRoot == systemManager)
{
if (!(event.data.window is String))
event.data.window = NameUtil.displayObjectToString(DisplayObject(event.data.window));
else
event.data.window = NameUtil.displayObjectToString(DisplayObject(systemManager)) + "." + event.data.window;
bridge.dispatchEvent(event);
}
else
{
if (event.data.window is String)
event.data.window = NameUtil.displayObjectToString(DisplayObject(systemManager)) + "." + event.data.window;
sbRoot.dispatchEvent(event);
}
}
return true;
}
/**
* Forward an AddPlaceholder request up the parent chain, if needed.
*
* @param request request to either add or remove a pop up placeholder.
* @param addPlaceholder true if adding a placeholder, false it removing a placeholder.
* @return true if the request was forwared, false otherwise
*/
private function forwardPlaceholderRequest(request:SWFBridgeRequest, addPlaceholder:Boolean):Boolean
{
// Only the top level root tracks the placeholders.
// If we are not the top level root then keep passing
// the message up the parent chain.
if (systemManager.isTopLevelRoot())
return false;
// If the window object is passed, then this is the first
// stop on the way up the parent chain.
var refObj:Object = null;
var oldId:String = null;
if (request.data.window)
{
refObj = request.data.window;
// null this ref out so untrusted parent cannot see
request.data.window = null;
}
else
{
refObj = request.requestor;
// prefix the existing id with the id of this object
oldId = request.data.placeHolderId;
request.data.placeHolderId = NameUtil.displayObjectToString(DisplayObject(systemManager)) + "." + request.data.placeHolderId;
}
if (addPlaceholder)
addPlaceholderId(request.data.placeHolderId, oldId, request.requestor, refObj);
else
removePlaceholderId(request.data.placeHolderId);
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
request.requestor = bridge;
if (sbRoot == systemManager)
bridge.dispatchEvent(request);
else
sbRoot.dispatchEvent(request);
return true;
}
/**
* One of the system managers in another sandbox deactivated and sent a message
* to the top level system manager. In response the top-level system manager
* needs to find a new form to activate.
*/
private function deactivateFormSandboxEventHandler(event:Event):void
{
// trace("bridgeDeactivateFormEventHandler");
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
if (event is SWFBridgeRequest)
return;
var bridgeEvent:SWFBridgeEvent = SWFBridgeEvent.marshal(event);
if (!forwardFormEvent(bridgeEvent))
{
// deactivate the form
if (isRemotePopUp(awm.form) &&
RemotePopUp(awm.form).window == bridgeEvent.data.window &&
RemotePopUp(awm.form).bridge == bridgeEvent.data.notifier)
awm.deactivate(awm.form);
}
}
/**
* A form in one of the system managers in another sandbox has been activated.
* The form being activate is identified.
* In response the top-level system manager needs to activate the given form
* and deactivate the currently active form, if any.
*/
private function activateFormSandboxEventHandler(event:Event):void
{
// trace("bridgeDeactivateFormEventHandler");
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// trace("bridgeActivateFormEventHandler");
var bridgeEvent:SWFBridgeEvent = SWFBridgeEvent.marshal(event);
if (!forwardFormEvent(bridgeEvent))
// just call activate on the remote form.
awm.activate(new RemotePopUp(bridgeEvent.data.window, bridgeEvent.data.notifier));
}
/**
* One of the system managers in another sandbox activated and sent a message
* to the top level system manager to deactivate this form. In response the top-level system manager
* needs to deactivate all other forms except the top level system manager's.
*/
private function activateApplicationSandboxEventHandler(event:Event):void
{
// trace("bridgeDeactivateFormEventHandler");
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// trace("bridgeActivateApplicationEventHandler");
if (!systemManager.isTopLevelRoot())
{
swfBridgeGroup.parentBridge.dispatchEvent(event);
return;
}
// An application was activated, active the main document.
awm.activate(IFocusManagerContainer(systemManager.document));
}
/**
* @private
*
* Re-dispatch events sent over the bridge to listeners on this
* system manager. PopUpManager is expected to listen to these
* events.
*/
private function modalWindowRequestHandler(event:Event):void
{
if (event is SWFBridgeRequest)
return;
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
if (!preProcessModalWindowRequest(request, systemManager.getSandboxRoot()))
return;
// Ensure a PopUpManager exists and dispatch the request it is
// listening for.
Singleton.getInstance("mx.managers::IPopUpManager");
systemManager.dispatchEvent(request);
}
/**
* @private
*
* Calculate the visible rectangle of the requesting application in this
* application. Forward the request to our parent to see this the rectangle
* is further reduced. Continue up the parent chain until the top level
* root parent is reached.
*/
private function getVisibleRectRequestHandler(event:Event):void
{
if (event is SWFBridgeRequest)
return;
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
var rect:Rectangle = Rectangle(request.data);
var owner:DisplayObject = DisplayObject(swfBridgeGroup.getChildBridgeProvider(request.requestor));
var localRect:Rectangle;
var forwardRequest:Boolean = true;
// Check if the request in a pop up. If it is then don't
// forward the request to our parent because we don't want
// to reduce the visible rect of the dialog base on the
// visible rect of applications in the main app.
if (!DisplayObjectContainer(systemManager.document).contains(owner))
forwardRequest = false;
if (owner is ISWFLoader)
localRect = ISWFLoader(owner).getVisibleApplicationRect();
else
{
localRect = owner.getBounds(DisplayObject(systemManager));
var pt:Point = DisplayObject(systemManager).localToGlobal(localRect.topLeft);
localRect.x = pt.x;
localRect.y = pt.y;
}
rect = rect.intersection(localRect); // update rect
request.data = rect;
// forward request
if (forwardRequest && useSWFBridge())
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
request.requestor = bridge;
bridge.dispatchEvent(request);
}
Object(event).data = request.data; // update request
}
/**
* @private
*
* Notify the topLevelRoot that we don't want the mouseCursor shown
* Forward upward if necessary.
*/
private function hideMouseCursorRequestHandler(event:Event):void
{
if (!systemManager.isTopLevelRoot() && event is SWFBridgeRequest)
return;
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
// forward request
if (!systemManager.isTopLevelRoot())
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
request.requestor = bridge;
bridge.dispatchEvent(request);
}
else if (eventProxy)
SystemManagerGlobals.showMouseCursor = false;
}
/**
* @private
*
* Ask the topLevelRoot if anybody don't want the mouseCursor shown
* Forward upward if necessary.
*/
private function showMouseCursorRequestHandler(event:Event):void
{
if (!systemManager.isTopLevelRoot() && event is SWFBridgeRequest)
return;
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
// forward request
if (!systemManager.isTopLevelRoot())
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
request.requestor = bridge;
bridge.dispatchEvent(request);
Object(event).data = request.data; // update request
}
else if (eventProxy)
Object(event).data = SystemManagerGlobals.showMouseCursor;
}
/**
* @private
*
* Ask the topLevelRoot if anybody don't want the mouseCursor shown
* Forward upward if necessary.
*/
private function resetMouseCursorRequestHandler(event:Event):void
{
if (!systemManager.isTopLevelRoot() && event is SWFBridgeRequest)
return;
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
// forward request
if (!systemManager.isTopLevelRoot())
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
request.requestor = bridge;
bridge.dispatchEvent(request);
}
else if (eventProxy)
SystemManagerGlobals.showMouseCursor = true;
}
private function resetMouseCursorTracking(event:Event):void
{
if (systemManager.isTopLevelRoot())
{
SystemManagerGlobals.showMouseCursor = true;
}
else if (swfBridgeGroup.parentBridge)
{
var cursorRequest:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST);
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
cursorRequest.requestor = bridge;
bridge.dispatchEvent(cursorRequest);
}
}
//--------------------------------------------------------------------------
//
// Sandbox Event handlers for messages from parent
//
//--------------------------------------------------------------------------
/**
* @private
*
* Sent by the SWFLoader to change the size of the application it loaded.
*/
private function setActualSizeRequestHandler(event:Event):void
{
var eObj:Object = Object(event);
IFlexDisplayObject(systemManager).setActualSize(eObj.data.width, eObj.data.height);
}
/**
* @private
*
* Get the size of this System Manager.
* Sent by a SWFLoader.
*/
private function getSizeRequestHandler(event:Event):void
{
var eObj:Object = Object(event);
eObj.data = { width: IFlexDisplayObject(systemManager).measuredWidth, height: IFlexDisplayObject(systemManager).measuredHeight};
}
/**
* @private
*
* Handle request to activate a particular form.
*
*/
private function activateRequestHandler(event:Event):void
{
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
// If data is a String, then we need to parse the id to find
// the form or the next bridge to pass the message to.
// If the data is a SystemMangerProxy we can just activate the
// form.
var child:Object = request.data;
var nextId:String = null;
if (request.data is String)
{
var placeholder:PlaceholderData = idToPlaceholder[request.data];
child = placeholder.data;
nextId = placeholder.id;
// check if the dialog is hosted on this system manager
if (nextId == null)
{
var popUp:RemotePopUp = findRemotePopUp(child, placeholder.bridge);
if (popUp)
{
activateRemotePopUp(popUp);
return;
}
}
}
if (child is SystemManagerProxy)
{
// activate request from the top-level system manager.
var smp:SystemManagerProxy = SystemManagerProxy(child);
var f:IFocusManagerContainer = findFocusManagerContainer(smp);
if (smp && f)
smp.activateByProxy(f);
}
else if (child is IFocusManagerContainer)
IFocusManagerContainer(child).focusManager.activate();
else if (child is IEventDispatcher)
{
request.data = nextId;
request.requestor = IEventDispatcher(child);
IEventDispatcher(child).dispatchEvent(request);
}
else
throw new Error(); // should never get here
}
/**
* @private
*
* Handle request to deactivate a particular form.
*
*/
private function deactivateRequestHandler(event:Event):void
{
var request:SWFBridgeRequest = SWFBridgeRequest.marshal(event);
var child:Object = request.data;
var nextId:String = null;
if (request.data is String)
{
var placeholder:PlaceholderData = idToPlaceholder[request.data];
child = placeholder.data;
nextId = placeholder.id;
// check if the dialog is hosted on this system manager
if (nextId == null)
{
var popUp:RemotePopUp = findRemotePopUp(child, placeholder.bridge);
if (popUp)
{
deactivateRemotePopUp(popUp);
return;
}
}
}
if (child is SystemManagerProxy)
{
// deactivate request from the top-level system manager.
var smp:SystemManagerProxy = SystemManagerProxy(child);
var f:IFocusManagerContainer = findFocusManagerContainer(smp);
if (smp && f)
smp.deactivateByProxy(f);
}
else if (child is IFocusManagerContainer)
IFocusManagerContainer(child).focusManager.deactivate();
else if (child is IEventDispatcher)
{
request.data = nextId;
request.requestor = IEventDispatcher(child);
IEventDispatcher(child).dispatchEvent(request);
return;
}
else
throw new Error();
}
//--------------------------------------------------------------------------
//
// Sandbox Event handlers for messages from either the
// parent or child
//
//--------------------------------------------------------------------------
/**
* Is the child in event.data this system manager or a child of this
* system manager?
*
* Set the data property to indicate if the display object is a child
*/
private function isBridgeChildHandler(event:Event):void
{
// if we are broadcasting messages, ignore the messages
// we send to ourselves.
if (event is SWFBridgeRequest)
return;
var eObj:Object = Object(event);
eObj.data = eObj.data && systemManager.rawChildren.contains(eObj.data as DisplayObject);
}
/**
* Can this form be activated. The current test is if the given pop up
* is visible and is enabled.
*
* Set the data property to indicate if can be activated
*/
private function canActivateHandler(event:Event):void
{
var eObj:Object = Object(event);
// If data is a String, then we need to parse the id to find
// the form or the next bridge to pass the message to.
// If the data is a SystemMangerProxy we can just activate the
// form.
var request:SWFBridgeRequest;
var child:Object = eObj.data;
var nextId:String = null;
if (eObj.data is String)
{
var placeholder:PlaceholderData = idToPlaceholder[eObj.data];
child = placeholder.data;
nextId = placeholder.id;
// check if the dialog is hosted on this system manager
if (nextId == null)
{
var popUp:RemotePopUp = findRemotePopUp(child, placeholder.bridge);
if (popUp)
{
request = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST,
false, false,
IEventDispatcher(popUp.bridge),
popUp.window);
if (popUp.bridge)
{
popUp.bridge.dispatchEvent(request);
eObj.data = request.data;
}
return;
}
}
}
if (child is SystemManagerProxy)
{
var smp:SystemManagerProxy = SystemManagerProxy(child);
var f:IFocusManagerContainer = findFocusManagerContainer(smp);
eObj.data = smp && f && canActivateLocalComponent(f);
}
else if (child is IFocusManagerContainer)
{
eObj.data = canActivateLocalComponent(child);
}
else if (child is IEventDispatcher)
{
var bridge:IEventDispatcher = IEventDispatcher(child);
request = new SWFBridgeRequest(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST,
false, false,
bridge,
nextId);
if (bridge)
{
bridge.dispatchEvent(request);
eObj.data = request.data;
}
}
else
throw new Error(); // should never get here
}
/**
* @private
*
* Test is a local component can be activated.
*/
private function canActivateLocalComponent(o:Object):Boolean
{
if (o is Sprite && o is IUIComponent &&
Sprite(o).visible && IUIComponent(o).enabled)
return true;
return false;
}
/**
* @private
*
* Test if a display object is in an applcation we want to communicate with over a bridge.
*
*/
public function isDisplayObjectInABridgedApplication(displayObject:DisplayObject):Boolean
{
return getSWFBridgeOfDisplayObject(displayObject) != null;
}
/**
* @private
*
* If a display object is in a bridged application, then return the SWFBridge
* that is used to communcation with that application. Otherwise return null.
*
* @param displayObject The object to test.
*
* @return The IEventDispather that represents the SWFBridge that should
* be used to communicate with this object, if the display object is in a
* bridge application. If the display object is not in a bridge application,
* then null is returned.
*
*/
private function getSWFBridgeOfDisplayObject(displayObject:DisplayObject):IEventDispatcher
{
if (swfBridgeGroup)
{
var request:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST,
false, false, null, displayObject);
var children:Array = swfBridgeGroup.getChildBridges();
var n:int = children.length;
for (var i:int = 0; i < n; i++)
{
var childBridge:IEventDispatcher = IEventDispatcher(children[i]);
// No need to test a child if it does not trust us, we will never see
// their display objects.
// Also, if the we don't trust the child don't send them a display object.
var bp:ISWFBridgeProvider = swfBridgeGroup.getChildBridgeProvider(childBridge);
if (SecurityUtil.hasMutualTrustBetweenParentAndChild(bp))
{
childBridge.dispatchEvent(request);
if (request.data == true)
return childBridge;
// reset data property
request.data = displayObject;
}
}
}
return null;
}
/**
* redispatch certian events to other top-level windows
*/
private function multiWindowRedispatcher(event:Event):void
{
if (!SystemManagerGlobals.dispatchingEventToOtherSystemManagers)
{
dispatchEventToOtherSystemManagers(event);
}
}
/**
* Create the requested manager.
*/
private function initManagerHandler(event:Event):void
{
if (!SystemManagerGlobals.dispatchingEventToOtherSystemManagers)
{
dispatchEventToOtherSystemManagers(event);
}
// if we are broadcasting messages, ignore the messages
// we send to ourselves.
if (event is InterManagerRequest)
return;
// initialize the registered manager implementation
var name:String = event["name"];
try
{
Singleton.getInstance(name);
}
catch (e:Error)
{
}
}
/**
* Adds a child to the requested childList.
*
* @param layer The child list that the child should be added to. The valid choices are
* "popUpChildren", "cursorChildren", and "toolTipChildren". The choices match the property
* names of ISystemManager and that is the list where the child is added.
*
* @param child The child to add.
*/
public function addChildToSandboxRoot(layer:String, child:DisplayObject):void
{
if (systemManager.getSandboxRoot() == systemManager)
{
systemManager[layer].addChild(child);
}
else
{
childManager.addingChild(child);
var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
me.name = layer + ".addChild";
me.value = child;
systemManager.getSandboxRoot().dispatchEvent(me);
childManager.childAdded(child);
}
}
/**
* Removes a child from the requested childList.
*
* @param layer The child list that the child should be removed from. The valid choices are
* "popUpChildren", "cursorChildren", and "toolTipChildren". The choices match the property
* names of ISystemManager and that is the list where the child is removed from.
*
* @param child The child to remove.
*/
public function removeChildFromSandboxRoot(layer:String, child:DisplayObject):void
{
if (systemManager.getSandboxRoot() == systemManager)
{
systemManager[layer].removeChild(child);
}
else
{
childManager.removingChild(child);
var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
me.name = layer + ".removeChild";
me.value = child;
systemManager.getSandboxRoot().dispatchEvent(me);
childManager.childRemoved(child);
}
}
/**
* Perform the requested action from a trusted dispatcher.
*/
private function systemManagerHandler(event:Event):void
{
if (event["name"] == "sameSandbox")
{
event["value"] = currentSandboxEvent == event["value"];
return;
}
else if (event["name"] == "hasSWFBridges")
{
event["value"] = hasSWFBridges();
return;
}
// if we are broadcasting messages, ignore the messages
// we send to ourselves.
if (event is InterManagerRequest)
return;
// initialize the registered manager implementation
var name:String = event["name"];
switch (name)
{
case "popUpChildren.addChild":
systemManager.popUpChildren.addChild(event["value"]);
break;
case "popUpChildren.removeChild":
systemManager.popUpChildren.removeChild(event["value"]);
break;
case "cursorChildren.addChild":
systemManager.cursorChildren.addChild(event["value"]);
break;
case "cursorChildren.removeChild":
systemManager.cursorChildren.removeChild(event["value"]);
break;
case "toolTipChildren.addChild":
systemManager.toolTipChildren.addChild(event["value"]);
break;
case "toolTipChildren.removeChild":
systemManager.toolTipChildren.removeChild(event["value"]);
break;
case "screen":
event["value"] = systemManager.screen;
break;
case "application":
event["value"] = systemManager.document;
break;
case "isTopLevelRoot":
event["value"] = systemManager.isTopLevelRoot();
break;
case "getVisibleApplicationRect":
event["value"] = getVisibleApplicationRect();
break;
case "bringToFront":
if (event["value"].topMost)
systemManager.popUpChildren.setChildIndex(DisplayObject(event["value"].popUp),
systemManager.popUpChildren.numChildren - 1);
else
systemManager.setChildIndex(DisplayObject(event["value"].popUp), systemManager.numChildren - 1);
break;
}
}
/**
* Get the size of our sandbox's screen property.
*
* Only the screen property should need to call this function.
*
* The function assumes the caller does not have access to the stage.
*
*/
private function getSandboxScreen():Rectangle
{
// If we don't have access to the stage, use the size of
// our sandbox root.
var sandboxRoot:DisplayObject = systemManager.getSandboxRoot();
var sandboxScreen:Rectangle;
if (sandboxRoot == systemManager)
// we don't have access the stage so use the width and
// height of the application.
sandboxScreen = new Rectangle(0, 0, IFlexDisplayObject(systemManager).width, IFlexDisplayObject(systemManager).height);
else if (sandboxRoot == systemManager.topLevelSystemManager)
{
var sm:DisplayObject = DisplayObject(systemManager.topLevelSystemManager);
sandboxScreen = new Rectangle(0, 0, sm.width, sm.height);
}
else
{
var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST, false, false,
"screen");
sandboxRoot.dispatchEvent(me);
// me.value now contains the screen property of the sandbox root.
sandboxScreen = Rectangle(me.value);
}
return sandboxScreen;
}
/**
* The system manager proxy has only one child that is a focus manager container.
* Iterate thru the children until we find it.
*/
mx_internal function findFocusManagerContainer(smp:SystemManagerProxy):IFocusManagerContainer
{
var children:IChildList = smp.rawChildren;
var numChildren:int = children.numChildren;
for (var i:int = 0; i < numChildren; i++)
{
var child:DisplayObject = children.getChildAt(i);
if (child is IFocusManagerContainer)
{
return IFocusManagerContainer(child);
}
}
return null;
}
/**
* @private
*
* Listen to messages this System Manager needs to service from its children.
*/
mx_internal function addChildBridgeListeners(bridge:IEventDispatcher):void
{
if (!systemManager.isTopLevel() && systemManager.topLevelSystemManager)
{
var mp:MarshallingSupport =
MarshallingSupport(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
mp.addChildBridgeListeners(bridge);
return;
}
bridge.addEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
bridge.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
bridge.addEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
bridge.addEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
bridge.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
bridge.addEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
bridge.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
bridge.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
bridge.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler, false, 0, true);
bridge.addEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
bridge.addEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
bridge.addEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
bridge.addEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
bridge.addEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
bridge.addEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
bridge.addEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
/**
* @private
*
* Remove all child listeners.
*/
mx_internal function removeChildBridgeListeners(bridge:IEventDispatcher):void
{
if (!systemManager.isTopLevel() && systemManager.topLevelSystemManager)
{
var mp:MarshallingSupport =
MarshallingSupport(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
mp.removeChildBridgeListeners(bridge);
return;
}
bridge.removeEventListener(SWFBridgeRequest.ADD_POP_UP_REQUEST, addPopupRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_REQUEST, removePopupRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.ADD_POP_UP_PLACE_HOLDER_REQUEST, addPlaceholderPopupRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.REMOVE_POP_UP_PLACE_HOLDER_REQUEST, removePlaceholderPopupRequestHandler);
bridge.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE, activateFormSandboxEventHandler);
bridge.removeEventListener(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE, deactivateFormSandboxEventHandler);
bridge.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE, activateApplicationSandboxEventHandler);
bridge.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
bridge.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST, modalWindowRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST, getVisibleRectRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.HIDE_MOUSE_CURSOR_REQUEST, hideMouseCursorRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.SHOW_MOUSE_CURSOR_REQUEST, showMouseCursorRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.RESET_MOUSE_CURSOR_REQUEST, resetMouseCursorRequestHandler);
}
/**
* @private
*
* Add listeners for events and requests we might receive from our parent if our
* parent is using a sandbox bridge to communicate with us.
*/
mx_internal function addParentBridgeListeners():void
{
if (!systemManager.isTopLevel() && systemManager.topLevelSystemManager)
{
var mp:MarshallingSupport =
MarshallingSupport(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
mp.addParentBridgeListeners();
return;
}
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
bridge.addEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
bridge.addEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
// need to listener to parent system manager to get broadcast messages.
bridge.addEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST,
activateRequestHandler);
bridge.addEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST,
deactivateRequestHandler);
bridge.addEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
bridge.addEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
bridge.addEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
bridge.addEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
bridge.addEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
/**
* @private
*
* remove listeners for events and requests we might receive from our parent if
* our parent is using a sandbox bridge to communicate with us.
*/
mx_internal function removeParentBridgeListeners():void
{
if (!systemManager.isTopLevel() && systemManager.topLevelSystemManager)
{
var mp:MarshallingSupport =
MarshallingSupport(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
mp.removeParentBridgeListeners();
return;
}
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
bridge.removeEventListener(SWFBridgeRequest.SET_ACTUAL_SIZE_REQUEST, setActualSizeRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.GET_SIZE_REQUEST, getSizeRequestHandler);
// need to listener to parent system manager to get broadcast messages.
bridge.removeEventListener(SWFBridgeRequest.ACTIVATE_POP_UP_REQUEST,
activateRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.DEACTIVATE_POP_UP_REQUEST,
deactivateRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.IS_BRIDGE_CHILD_REQUEST, isBridgeChildHandler);
bridge.removeEventListener(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
bridge.removeEventListener(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, eventListenerRequestHandler);
bridge.removeEventListener(SWFBridgeRequest.CAN_ACTIVATE_POP_UP_REQUEST, canActivateHandler);
bridge.removeEventListener(SWFBridgeEvent.BRIDGE_APPLICATION_UNLOADING, beforeUnloadHandler);
}
/**
* Add a bridge to talk to the child owned by <code>owner</code>.
*
* @param bridge The bridge used to talk to the parent.
* @param owner The display object that owns the bridge.
*/
public function addChildBridge(bridge:IEventDispatcher, owner:DisplayObject):void
{
// Is the owner in a pop up? If so let the focus manager manage the
// bridge instead of the system manager.
var fm:IFocusManager = null;
var o:DisplayObject = owner;
while (o)
{
if (o is IFocusManagerContainer)
{
fm = IFocusManagerContainer(o).focusManager;
break;
}
o = o.parent;
}
if (!fm)
return;
if (!swfBridgeGroup)
swfBridgeGroup = new SWFBridgeGroup(systemManager);
var event:DynamicEvent = new DynamicEvent("addChildBridge");
event.bridge = bridge;
event.owner = owner;
fm.dispatchEvent(event);
swfBridgeGroup.addChildBridge(bridge, ISWFBridgeProvider(owner));
if (!bridgeToFocusManager)
bridgeToFocusManager = new Dictionary();
bridgeToFocusManager[bridge] = fm;
addChildBridgeListeners(bridge);
// dispatch message that we are adding a bridge.
systemManager.dispatchEvent(new FlexChangeEvent(FlexChangeEvent.ADD_CHILD_BRIDGE, false, false, bridge));
}
/**
* Remove a child bridge.
*
* @param bridge The target bridge to remove.
*/
public function removeChildBridge(bridge:IEventDispatcher):void
{
// dispatch message that we are removing a bridge.
systemManager.dispatchEvent(new FlexChangeEvent(FlexChangeEvent.REMOVE_CHILD_BRIDGE, false, false, bridge));
var fm:IFocusManager = IFocusManager(bridgeToFocusManager[bridge]);
var event:DynamicEvent = new DynamicEvent("removeChildBridge");
event.bridge = bridge;
fm.dispatchEvent(event);
swfBridgeGroup.removeChildBridge(bridge);
delete bridgeToFocusManager[bridge];
removeChildBridgeListeners(bridge);
}
/**
* @inheritDoc
*/
public function useSWFBridge():Boolean
{
if (systemManager.isTopLevelRoot())
return false;
if (!systemManager.isTopLevel() && systemManager.topLevelSystemManager)
{
var mp:IMarshalSystemManager =
IMarshalSystemManager(systemManager.topLevelSystemManager.getImplementation("mx.managers::IMarshalSystemManager"));
return mp.useSWFBridge();
}
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
// if we're toplevel and we aren't the sandbox root, we need a bridge
if (systemManager.isTopLevel() && sbRoot != systemManager)
return true;
// we also need a bridge even if we're the sandbox root
// but not a stage root, but our parent loader is a bootstrap
// that is not the stage root
if (sbRoot == systemManager)
{
try
{
if (parentAllowsChild && childAllowsParent)
{
try
{
if (!DisplayObject(systemManager).parent.dispatchEvent(new Event("mx.managers.SystemManager.isStageRoot", false, true)))
return true;
}
catch (e:Error)
{
}
}
else
return true;
}
catch (e1:Error)
{
// we seem to get here when a SWF is being unloaded, has been unparented, but still
// has a stage and root property, but loaderInfo is invalid.
return false;
}
}
return false;
}
public function getVisibleApplicationRectHandler(event:Request):void
{
var skipToSandboxRoot:Boolean = event.value.skipToSandboxRoot;
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
var screen:Rectangle;
if (skipToSandboxRoot && systemManager != sbRoot)
{
var request:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST,
false, false,
"getVisibleApplicationRect");
if (!sbRoot.dispatchEvent(request))
{
event.value = Rectangle(request.value);
event.preventDefault();
}
}
else
{
event.value = getVisibleApplicationRect(event.value.bounds as Rectangle);
event.preventDefault();
}
}
/**
* @inheritDoc
*/
public function getVisibleApplicationRect(bounds:Rectangle = null):Rectangle
{
if (!bounds)
{
bounds = DisplayObject(systemManager).getBounds(DisplayObject(systemManager));
var s:Rectangle = systemManager.screen;
var pt:Point = new Point(Math.max(0, bounds.x), Math.max(0, bounds.y));
pt = DisplayObject(systemManager).localToGlobal(pt);
bounds.x = pt.x;
bounds.y = pt.y;
bounds.width = s.width;
bounds.height = s.height;
}
// send a message to parent for their visible rect.
if (useSWFBridge())
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
var bridgeRequest:SWFBridgeRequest = new SWFBridgeRequest(SWFBridgeRequest.GET_VISIBLE_RECT_REQUEST,
false, false,
bridge,
bounds);
bridge.dispatchEvent(bridgeRequest);
bounds = Rectangle(bridgeRequest.data);
}
else if (!systemManager.isTopLevel())
{
var obj:DisplayObjectContainer = DisplayObject(systemManager).parent.parent;
if ("getVisibleApplicationRect" in obj)
{
var visibleRect:Rectangle = obj["getVisibleApplicationRect"](true);
bounds = bounds.intersection(visibleRect);
}
}
return bounds;
}
/**
* @inheritDoc
*/
public function deployMouseShieldsHandler(event:DynamicEvent):void
{
var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.DRAG_MANAGER_REQUEST, false, false,
"mouseShield", event.deploy);
systemManager.getSandboxRoot().dispatchEvent(me);
}
/**
* @private
*
* Notify parent that a new window has been activated.
*
* @param window window that was activated.
*/
public function dispatchActivatedWindowEvent(window:DisplayObject):void
{
var bridge:IEventDispatcher = swfBridgeGroup ? swfBridgeGroup.parentBridge : null;
if (bridge)
{
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
var sendToSbRoot:Boolean = sbRoot != systemManager;
var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_ACTIVATE,
false, false,
{ notifier: bridge,
window: sendToSbRoot ? window :
NameUtil.displayObjectToString(window)
});
if (sendToSbRoot)
sbRoot.dispatchEvent(bridgeEvent);
else
bridge.dispatchEvent(bridgeEvent);
}
}
/**
* @private
*
* Notify parent that a window has been deactivated.
*
* @param id window display object or id string that was activated. Ids are used if
* the message is going outside the security domain.
*/
private function dispatchDeactivatedWindowEvent(window:DisplayObject):void
{
var bridge:IEventDispatcher = swfBridgeGroup ? swfBridgeGroup.parentBridge : null;
if (bridge)
{
var sbRoot:DisplayObject = systemManager.getSandboxRoot();
var sendToSbRoot:Boolean = sbRoot != systemManager;
var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_WINDOW_DEACTIVATE,
false,
false,
{ notifier: bridge,
window: sendToSbRoot ? window :
NameUtil.displayObjectToString(window)
});
if (sendToSbRoot)
sbRoot.dispatchEvent(bridgeEvent);
else
bridge.dispatchEvent(bridgeEvent);
}
}
/**
* @private
*
* Notify parent that an application has been activated.
*/
private function dispatchActivatedApplicationEvent():void
{
// click on this system manager or one of its sub system managers
// If in a sandbox tell the top-level system manager we are active.
var bridge:IEventDispatcher = swfBridgeGroup ? swfBridgeGroup.parentBridge : null;
if (bridge)
{
var bridgeEvent:SWFBridgeEvent = new SWFBridgeEvent(SWFBridgeEvent.BRIDGE_APPLICATION_ACTIVATE,
false, false);
bridge.dispatchEvent(bridgeEvent);
}
}
/**
* Adjust the forms array so it is sorted by last active.
* The last active form will be at the end of the forms array.
*
* This method assumes the form variable has been set before calling
* this function.
*/
private function updateLastActiveForm():void
{
var awm:ActiveWindowManager =
ActiveWindowManager(systemManager.getImplementation("mx.managers::IActiveWindowManager"));
// find "form" in the forms array and move that entry to
// the end of the array.
var n:int = awm.forms.length;
if (n < 2)
return; // zero or one forms, no need to update
var index:int = -1;
for (var i:int = 0; i < n; i++)
{
if (areFormsEqual(awm.form, awm.forms[i]))
{
index = i;
break;
}
}
if (index >= 0)
{
awm.forms.splice(index, 1);
awm.forms.push(awm.form);
}
}
/**
* @private
*
* Add placeholder information to this instance's list of placeholder data.
*/
private function addPlaceholderId(id:String, previousId:String, bridge:IEventDispatcher,
placeholder:Object):void
{
if (!bridge)
throw new Error(); // bridge is required.
if (!idToPlaceholder)
idToPlaceholder = [];
idToPlaceholder[id] = new PlaceholderData(previousId, bridge, placeholder);
}
private function removePlaceholderId(id:String):void
{
delete idToPlaceholder[id];
}
private var currentSandboxEvent:Event;
private function dispatchEventToOtherSystemManagers(event:Event):void
{
SystemManagerGlobals.dispatchingEventToOtherSystemManagers = true;
var arr:Array = SystemManagerGlobals.topLevelSystemManagers;
var n:int = arr.length;
for (var i:int = 0; i < n; i++)
{
if (arr[i] != systemManager)
{
arr[i].dispatchEvent(event);
}
}
SystemManagerGlobals.dispatchingEventToOtherSystemManagers = false;
}
/**
* @inheritDoc
*/
public function dispatchEventFromSWFBridges(event:Event, skip:IEventDispatcher = null,
trackClones:Boolean = false, toOtherSystemManagers:Boolean = false):void
{
if (toOtherSystemManagers)
{
dispatchEventToOtherSystemManagers(event);
}
if (!swfBridgeGroup)
return;
var clone:Event;
// trace(">>dispatchEventFromSWFBridges", this, event.type);
clone = event.clone();
if (trackClones)
currentSandboxEvent = clone;
var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
if (parentBridge && parentBridge != skip)
{
// Ensure the requestor property has the correct bridge.
if (clone is SWFBridgeRequest)
SWFBridgeRequest(clone).requestor = parentBridge;
parentBridge.dispatchEvent(clone);
}
var children:Array = swfBridgeGroup.getChildBridges();
for (var i:int = 0; i < children.length; i++)
{
if (children[i] != skip)
{
// trace("send to child", i, event.type);
clone = event.clone();
if (trackClones)
currentSandboxEvent = clone;
// Ensure the requestor property has the correct bridge.
if (clone is SWFBridgeRequest)
SWFBridgeRequest(clone).requestor = IEventDispatcher(children[i]);
IEventDispatcher(children[i]).dispatchEvent(clone);
}
}
currentSandboxEvent = null;
// trace("<<dispatchEventFromSWFBridges", this, event.type);
}
/**
* request the parent to add an event listener.
*/
private function addEventListenerToSandboxes(type:String, listener:Function, useCapture:Boolean = false,
priority:int=0, useWeakReference:Boolean=false, skip:IEventDispatcher = null):void
{
if (!swfBridgeGroup)
return;
// trace(">>addEventListenerToSandboxes", this, type);
var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.ADD_EVENT_LISTENER_REQUEST, false, false,
type, null,
useCapture,
priority,
useWeakReference);
var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
if (parentBridge && parentBridge != skip)
parentBridge.addEventListener(type, listener, false, priority, useWeakReference);
var children:Array = swfBridgeGroup.getChildBridges();
for (var i:int; i < children.length; i++)
{
var childBridge:IEventDispatcher = IEventDispatcher(children[i]);
if (childBridge != skip)
childBridge.addEventListener(type, listener, false, priority, useWeakReference);
}
dispatchEventFromSWFBridges(request, skip);
// trace("<<addEventListenerToSandboxes", this, type);
}
/**
* request the parent to remove an event listener.
*/
private function removeEventListenerFromSandboxes(type:String, listener:Function,
useCapture:Boolean = false,
skip:IEventDispatcher = null):void
{
if (!swfBridgeGroup)
return;
// trace(">>removeEventListenerToSandboxes", this, type);
var request:EventListenerRequest = new EventListenerRequest(EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST, false, false,
type, null,
useCapture);
var parentBridge:IEventDispatcher = swfBridgeGroup.parentBridge;
if (parentBridge && parentBridge != skip)
parentBridge.removeEventListener(type, listener, useCapture);
var children:Array = swfBridgeGroup.getChildBridges();
for (var i:int; i < children.length; i++)
{
if (children[i] != skip)
IEventDispatcher(children[i]).removeEventListener(type, listener, useCapture);
}
dispatchEventFromSWFBridges(request, skip);
// trace("<<removeEventListenerToSandboxes", this, type);
}
/**
* request the parent to add an event listener.
*/
private function addEventListenerToOtherSystemManagers(type:String, listener:Function, useCapture:Boolean = false,
priority:int=0, useWeakReference:Boolean=false):void
{
var arr:Array = SystemManagerGlobals.topLevelSystemManagers;
if (arr.length < 2)
return;
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var n:int = arr.length;
for (var i:int = 0; i < n; i++)
{
if (arr[i] != systemManager)
{
arr[i].addEventListener(type, listener, useCapture, priority, useWeakReference);
}
}
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
/**
* request the parent to remove an event listener.
*/
private function removeEventListenerFromOtherSystemManagers(type:String, listener:Function,
useCapture:Boolean = false):void
{
var arr:Array = SystemManagerGlobals.topLevelSystemManagers;
if (arr.length < 2)
return;
SystemManagerGlobals.changingListenersInOtherSystemManagers = true;
var n:int = arr.length;
for (var i:int = 0; i < n; i++)
{
if (arr[i] != systemManager)
{
arr[i].removeEventListener(type, listener, useCapture);
}
}
SystemManagerGlobals.changingListenersInOtherSystemManagers = false;
}
/**
* @private
*
* @return true if the message should be processed, false if
* no other action is required.
*/
private function preProcessModalWindowRequest(request:SWFBridgeRequest,
sbRoot:DisplayObject):Boolean
{
// should we process this message?
if (request.data.skip)
{
// skipping this sandbox,
// but don't skip the next one.
request.data.skip = false;
if (useSWFBridge())
{
var bridge:IEventDispatcher = swfBridgeGroup.parentBridge;
request.requestor = bridge;
bridge.dispatchEvent(request);
}
return false;
}
// if we are not the sandbox root, dispatch the message to the sandbox root.
if (systemManager != sbRoot)
{
// convert exclude component into a rectangle and forward to parent bridge.
if (request.type == SWFBridgeRequest.CREATE_MODAL_WINDOW_REQUEST ||
request.type == SWFBridgeRequest.SHOW_MODAL_WINDOW_REQUEST)
{
var exclude:ISWFLoader = swfBridgeGroup.getChildBridgeProvider(request.requestor)
as ISWFLoader;
// find the rectangle of the area to exclude
if (exclude)
{
var excludeRect:Rectangle = ISWFLoader(exclude).getVisibleApplicationRect();
request.data.excludeRect = excludeRect;
// If the area to exclude is not contain by our document then it is in a
// pop up. From this point for set the useExclude flag to false to
// tell our parent not to exclude use from their modal window, only
// the excludeRect we have just calculated.
if (!DisplayObjectContainer(systemManager.document).contains(DisplayObject(exclude)))
request.data.useExclude = false; // keep the existing excludeRect
}
}
bridge = swfBridgeGroup.parentBridge;
request.requestor = bridge;
// The HIDE request does not need to be processed by each
// application, so dispatch it directly to the sandbox root.
if (request.type == SWFBridgeRequest.HIDE_MODAL_WINDOW_REQUEST)
sbRoot.dispatchEvent(request);
else
bridge.dispatchEvent(request);
return false;
}
// skip aftering sending the message over a bridge.
request.data.skip = false;
return true;
}
private function otherSystemManagerMouseListener(event:SandboxMouseEvent):void
{
if (SystemManagerGlobals.dispatchingEventToOtherSystemManagers)
return;
dispatchEventFromSWFBridges(event);
// ask the sandbox root if it was the original dispatcher of this event
// if it was then don't dispatch to ourselves because we could have
// got this event by listening to sandboxRoot ourselves.
var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
me.name = "sameSandbox";
me.value = event;
systemManager.getSandboxRoot().dispatchEvent(me);
if (!me.value)
systemManager.dispatchEvent(event);
}
private function sandboxMouseListener(event:Event):void
{
// trace("sandboxMouseListener", this);
if (event is SandboxMouseEvent)
return;
var marshaledEvent:Event = SandboxMouseEvent.marshal(event);
dispatchEventFromSWFBridges(marshaledEvent, event.target as IEventDispatcher);
// ask the sandbox root if it was the original dispatcher of this event
// if it was then don't dispatch to ourselves because we could have
// got this event by listening to sandboxRoot ourselves.
var me:InterManagerRequest = new InterManagerRequest(InterManagerRequest.SYSTEM_MANAGER_REQUEST);
me.name = "sameSandbox";
me.value = event;
systemManager.getSandboxRoot().dispatchEvent(me);
if (!me.value)
systemManager.dispatchEvent(marshaledEvent);
}
private function eventListenerRequestHandler(event:Event):void
{
if (event is EventListenerRequest)
return;
var actualType:String;
var request:EventListenerRequest = EventListenerRequest.marshal(event);
if (event.type == EventListenerRequest.ADD_EVENT_LISTENER_REQUEST)
{
if (!eventProxy)
{
eventProxy = new EventProxy(systemManager);
}
actualType = EventUtil.sandboxMouseEventMap[request.eventType];
if (actualType)
{
if (systemManager.isTopLevelRoot())
{
systemManager.stage.addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
}
else
{
Object(systemManager).$addEventListener(MouseEvent.MOUSE_MOVE, resetMouseCursorTracking, true, EventPriority.CURSOR_MANAGEMENT + 1, true);
}
// add listeners in other sandboxes in capture mode so we don't miss anything
addEventListenerToSandboxes(request.eventType, sandboxMouseListener,
true, request.priority, request.useWeakReference, event.target as IEventDispatcher);
addEventListenerToOtherSystemManagers(request.eventType, otherSystemManagerMouseListener,
true, request.priority, request.useWeakReference);
if (systemManager.getSandboxRoot() == systemManager)
{
if (systemManager.isTopLevelRoot() &&
(actualType == MouseEvent.MOUSE_UP || actualType == MouseEvent.MOUSE_MOVE))
{
if (systemManager.stage)
systemManager.stage.addEventListener(actualType, eventProxy.marshalListener,
false, request.priority, request.useWeakReference);
}
Object(systemManager).$addEventListener(actualType, eventProxy.marshalListener,
true, request.priority, request.useWeakReference);
}
}
}
else if (event.type == EventListenerRequest.REMOVE_EVENT_LISTENER_REQUEST)
{
actualType = EventUtil.sandboxMouseEventMap[request.eventType];
if (actualType)
{
removeEventListenerFromOtherSystemManagers(request.eventType, otherSystemManagerMouseListener, true);
removeEventListenerFromSandboxes(request.eventType, sandboxMouseListener,
true, event.target as IEventDispatcher);
if (systemManager.getSandboxRoot() == systemManager)
{
if (systemManager.isTopLevelRoot() &&
(actualType == MouseEvent.MOUSE_UP || actualType == MouseEvent.MOUSE_MOVE))
{
if (systemManager.stage)
systemManager.stage.removeEventListener(actualType, eventProxy.marshalListener);
}
// Remove both listeners in case the system manager was added
// or removed from the stage after the listener was added.
Object(systemManager).$removeEventListener(actualType, eventProxy.marshalListener, true);
}
}
}
}
private function Stage_resizeHandler(event:Event = null):void
{
var sandboxScreen:Rectangle = getSandboxScreen();
if (!Object(systemManager)._screen)
Object(systemManager)._screen = new Rectangle();
Object(systemManager)._screen.width = sandboxScreen.width;
Object(systemManager)._screen.height = sandboxScreen.height;
}
/**
* Override this function if you want to perform any logic
* when the application has finished initializing itself.
*/
private function invalidateParentSizeAndDisplayListHandler(event:Event):void
{
if (systemManager.isTopLevel() && useSWFBridge())
dispatchInvalidateRequest();
}
/**
* @private
*
* Handle request to unload
* Forward event, and do some cleanup
*/
private function unloadHandler(event:Event):void
{
systemManager.dispatchEvent(event);
}
private function addEventListenerHandler(request:DynamicEvent):void
{
if (!addEventListener(request.eventType, request.listener, request.useCapture,
request.priority, request.useWeakReference))
request.preventDefault();
}
private function removeEventListenerHandler(request:DynamicEvent):void
{
if (!removeEventListener(request.eventType, request.listener, request.useCapture))
request.preventDefault();
}
}
}
| 33.542014
| 158
| 0.66018
|
820caa7d202b93d055df9016c3ab0c243ea5ef2f
| 2,391
|
as
|
ActionScript
|
MapEdit_1.0.0/src/com/basic/MaterialLoader.as
|
mingfanwang/MyClient2
|
d5e3c52a9f9dcb1e5d70b85af375d9f0882f172c
|
[
"BSD-3-Clause"
] | 1
|
2021-06-22T22:50:34.000Z
|
2021-06-22T22:50:34.000Z
|
MapEdit_1.0.0/src/com/basic/MaterialLoader.as
|
mingfanwang/MyClient2
|
d5e3c52a9f9dcb1e5d70b85af375d9f0882f172c
|
[
"BSD-3-Clause"
] | null | null | null |
MapEdit_1.0.0/src/com/basic/MaterialLoader.as
|
mingfanwang/MyClient2
|
d5e3c52a9f9dcb1e5d70b85af375d9f0882f172c
|
[
"BSD-3-Clause"
] | null | null | null |
/**
* MyClient2地图编辑器 - Copyright (c) 2010 王明凡
*/
package com.basic
{
import flash.display.*;
import flash.events.*;
import com.vo.material.MaterialVO;
/**
* 加载材质类
* @author 王明凡
*/
public class MaterialLoader extends ExtendLoader
{
//材质文件swf的Loader对象集合
private var LoaderArr:Array;
//材质XML
private var xml:XML;
//材质对象
private var materialVO:MaterialVO;
//材质字节数组集合对象
private var byteVOArr:Array;
//加载总数
private var sumLoad:int;
//循环加载材质错误
protected var loopError:Boolean;
//材质加载数量
protected var loadCount:int=0;
public function MaterialLoader()
{
LoaderArr=new Array();
byteVOArr=new Array();
materialVO=new MaterialVO();
}
/**
* 开始加载
* @param oj
*/
public function onLoader(x:XML):void
{
this.xml=x;
this.sumLoad=xml.child("media").length();
if (this.sumLoad == 0)
{
this.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
return;
}
loopLoad();
}
/**
* 循环加载
* @param xml
*/
private function loopLoad():void
{
super.extendOnLoaderURL(xml.media[this.loadCount].@src,ExtendLoader.MEL_LOADERINFO);
}
/**
* 重写父类加载完成
* @param e
*/
override protected function onLoadByteComplete(e:Event):void
{
if(this.loopError)
return;
LoaderArr.push(this.getLoader());
byteVOArr.push(this.getByte());
this.loadCount++;
try
{
if (this.sumLoad==this.loadCount)
{
materialVO.xml=xml;
materialVO.LoaderArr=LoaderArr;
materialVO.byteVOArr=byteVOArr;
this.dispatchEvent(e);
}
else
{
loopLoad();
}
}catch(er:Error)
{
this.loopError=true;
super.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR));
}
}
/**
* 重写父类加载错误
* @param e
*/
override protected function onIoError(e:IOErrorEvent):void
{
if(!this.loopError)
this.dispatchEvent(e);
this.loopError=true;
}
/**
* 清理垃圾
*/
override public function clear():void
{
LoaderArr=null;
byteVOArr=null;
xml=null;
materialVO=null;
sumLoad=0;
loopError=false;
loadCount=0;
super.clear();
}
/**
* 返回材质对象
* @return
*/
public function getMaterialVO():MaterialVO
{
return materialVO;
}
}
}
| 18.97619
| 88
| 0.590966
|
beaa8905e542fb0af5c4427034c8c65539e4bd2b
| 33,342
|
as
|
ActionScript
|
as/apache-flex-sdk-4.12.0-bin/frameworks/projects/framework/src/mx/resources/IResourceManager.as
|
openilabs/crypto
|
4c053a7c932f4afb5ec09b468496e861b5fc5ef1
|
[
"MIT"
] | 1
|
2021-03-10T16:24:06.000Z
|
2021-03-10T16:24:06.000Z
|
as/apache-flex-sdk-4.12.0-bin/frameworks/projects/framework/src/mx/resources/IResourceManager.as
|
openilabs/crypto
|
4c053a7c932f4afb5ec09b468496e861b5fc5ef1
|
[
"MIT"
] | null | null | null |
as/apache-flex-sdk-4.12.0-bin/frameworks/projects/framework/src/mx/resources/IResourceManager.as
|
openilabs/crypto
|
4c053a7c932f4afb5ec09b468496e861b5fc5ef1
|
[
"MIT"
] | null | null | null |
////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package mx.resources
{
import flash.events.IEventDispatcher;
import flash.system.ApplicationDomain;
import flash.system.SecurityDomain;
/**
* The APIs of the IResourceManager interface
* provide localization support for Flex applications.
*
* <p>There are three main concepts involved in localization:
* locales, resources, and resource bundles.</p>
*
* <p>A locale specifies a language and a country
* for which your application has been localized.
* For example, the locale <code>"en_US"</code>
* specifies English as spoken in the United States.
* (See the mx.resources.Locale class for more information.)</p>
*
* <p>A resource is a named value that is locale-dependent.
* For example, your application might have a resource
* whose name is <code>"OPEN"</code>
* and whose value for an English locale is <code>"Open"</code>
* but whose value for a French locale is <code>"Ouvrir"</code>.</p>
*
* <p>A resource bundle is a named group of resources
* whose values have been localized for a particular locale.
* A resource bundle is identified by the combination of its
* <code>bundleName</code> and its <code>locale</code>,
* and has a <code>content</code> object that contains
* the name-value pairs for the bundle's resources.
* See the documentation for mx.resources.IResourceBundle
* for information about how you typically create resource
* bundles from properties files.</p>
*
* <p>A single ResourceManager object implementing the IResourceManager
* interface manages multiple resource bundles, possibly for multiple
* locales, and provides access to the resources that they contain.
* For example, you can retrieve a specific resource as a String by calling
* <code>resourceManager.getString(bundleName, resourceName)</code>.</p>
*
* <p>All classes that extend UIComponent, Formatter, or Validator
* have a <code>resourceManager</code> property
* that provides a reference to the object implementing this interface.
* Other classes can call <code>ResourceManager.getInstance()</code>
* to obtain this object.</p>
*
* <p>Resource retrieval methods such as <code>getString()</code>
* search for resources in the locales specified
* by the <code>localeChain</code> property.
* By changing this property, you can make your application
* suddenly use, for example, Japanese rather than English resources.</p>
*
* <p>When your application starts, the ResourceManager is automatically
* populated with whatever resource bundles were compiled
* into the application.
* If you create a code module, by default the resources that its classes
* need are compiled into the module.
* When the module is loaded into an application, any bundles that the
* application does not already have are added to the ResourceManager.</p>
*
* <p>You can compile "resource modules" which have only resources in them,
* and load them with the <code>loadResourceModule()</code> method
* of IResourceManager.
* With resource modules, you can support multiple locales by loading
* the resources you need at run time rather than compiling them into
* your application.</p>
*
* <p>Although the ResourceManager is normally populated with resource bundles
* that were compiled into your application or loaded from modules,
* you can also programmatically create resource bundles and add them
* to the ResourceManager yourself with the <code>addResourceBundle()</code>
* method.</p>
*
* @see mx.resources.ResourceManager
* @see mx.resources.IResourceBundle
* @see mx.resources.ResourceBundle
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public interface IResourceManager extends IEventDispatcher
{
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// localeChain
//----------------------------------
/**
* An Array of locale Strings, such as <code>[ "en_US" ]</code>,
* which specifies one or more locales to be searched for resources.
*
* <p>When you call the ResourceManager methods <code>getObject()</code>,
* <code>getString()</code>, <code>getStringArray()</code>,
* <code>getNumber()</code>, <code>getInt()</code>,
* <code>getUint()</code>, <code>getBoolean()</code>, or
* <code>getClass()</code> to get the value of a resource,
* you specify a bundle name and a resource name,
* but not a locale.
* The ResourceManager starts with the first locale in the
* <code>localeChain</code> and looks for a ResourceBundle
* with the specified bundle name for that locale.
* If such a ResourceBundle exists, and the specified resource
* exists in it, then the value of that resource is returned.
* Otherwise, the ResourceManager proceeds on to the other
* locales in the <code>localeChain</code>.</p>
*
* <p>This scheme makes it possible to have locales that do not
* necessarily contain a complete set of localized resources.
* For example, if you are localizing your application for
* Indian English rather than U.S. English, you need only
* supply resources for the <code>en_IN</code> locale in which the
* Indian spelling or usage differs from that in the U.S.,
* and then set the <code>localeChain</code> property
* to <code>[ "en_IN", "en_US" ]</code>.</p>
*
* <p>Many framework classes assume that they can always
* obtain, from some locale, the resources that they expect,
* and they will throw errors if they cannot do so.
* Therefore, you must ensure that the <code>localeChain</code>
* always contains a complete set of resources.
* Unless you have done a complete localization of all the
* framework's resources as well as your own application's
* resources, you can keep the <code>"en_US"</code> locale
* at the end of your <code>localeChain</code> to ensure this.</p>
*
* <p>Setting this property causes the ResourceManager to dispatch
* a <code>"change"</code> Event.</p>
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function get localeChain():Array /* of String */;
/**
* @private
*/
function set localeChain(value:Array /* of String */):void;
//--------------------------------------------------------------------------
//
// Methods
//
//--------------------------------------------------------------------------
/**
* Begins loading a resource module containing resource bundles.
*
* <p>Each call to this method returns a new event-dispatching object
* that you can use to learn how the loading is progressing
* and whether it completes successfully or results in an error.
* This object dispatches <code>ResourceEvent.PROGRESS</code>,
* <code>ResourceEvent.COMPLETE</code>, and
* <code>ResourceEvent.ERROR</code> events.</p>
*
* <p>When the module has been loaded, the resource bundles
* are added to the ResourceManager, but the <code>localeChain</code>
* is left unchanged.
* If the <code>update</code> parameter is <code>true</code>,
* the <code>update()</code> method will be called.</p>
*
* @param url The URL from which to load the resource module.
*
* @param update Whether to call
* the <code>update()</code> method when the module finishes loading.
*
* @param applicationDomain The ApplicationDomain passed to the
* <code>load()</code> method of the IModuleInfo class
* that loads the resource module.
* This parameter is optional and defaults to <code>null</code>.
*
* @param securityDomain The SecurityDomain passed to the
* <code>load()</code> method of the IModuleInfo class
* that loads the resource module.
* This parameter is optional and defaults to <code>null</code>.
*
* @return An object that is associated with this particular load operation
* that dispatches <code>ResourceEvent.PROGRESS</code>,
* <code>ResourceEvent.COMPLETE</code>, and
* <code>ResourceEvent.ERROR</code> events.
*
* @see mx.events.ResourceEvent
* @see mx.resources.IResourceManager#update()
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function loadResourceModule(url:String, update:Boolean = true,
applicationDomain:ApplicationDomain = null,
securityDomain:SecurityDomain = null):
IEventDispatcher;
/**
* Begins unloading a loaded resource module.
*
* <p>When the module is unloaded, its resource bundles
* are removed from the ResourceManager, but the <code>localeChain</code>
* is left unchanged.
* If the <code>update</code> parameter is <code>true</code>,
* the <code>update()</code> method will be called.</p>
*
* @param url The URL that was used to load the resource module.
*
* @param update Whether to call
* the <code>update()</code> method when the module finishes unloading.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function unloadResourceModule(url:String, update:Boolean = true):void;
/**
* Adds the specified ResourceBundle to the ResourceManager
* so that its resources can be accessed by ResourceManager
* methods such as <code>getString()</code>.
*
* @param resourceBundle The resource bundle to be added.
* @param useWeakReference Determines if the ResourceManager
* keeps a weak reference to the resource bundle.
* If <code>useWeakReference</code> is <code>true</code> then the ResourceManager
* provides a weak reference to the resource bundle. When the
* caller chooses to use a weak reference it becomes the
* caller's responsibility to keep a hard reference the resource bundle
* so it is not garbaged collected prematurely. If <code>useWeakReference</code> is
* <code>false</code>, the ResourceManager keeps a hard reference to the resource
* bundle so it will not be garbage collected.
*
* <p>When a Flex sub-application or module automatically adds its compiled
* resource bundles to the ResourceManager, it calls the <code>addResourceBundle()</code>
* with <code>useWeakReference</code> set to <code>true</code>, to avoid becoming pinned in memory.
* If you create resource bundles at runtime in a sub-application or
* module, you should do the same. You then need to hold on to these
* resource bundles with a hard reference to prevent them from being
* garbage collected.</p>
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function addResourceBundle(resourceBundle:IResourceBundle,
useWeakReference:Boolean = false):void;
/**
* Removes the specified ResourceBundle from the ResourceManager
* so that its resources can no longer be accessed by ResourceManager
* methods such as <code>getString()</code>.
*
* @param locale A locale string such as <code>"en_US"</code>.
*
* @param bundleName A bundle name such as <code>"MyResources"</code>.
*
* @see mx.resources.IResourceBundle
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function removeResourceBundle(locale:String, bundleName:String):void;
/**
* Removes all ResourceBundles for the specified locale
* from the ResourceManager so that their resources
* can no longer be accessed by ResourceManager methods
* such as <code>getString()</code>.
*
* @param locale A locale string such as <code>"en_US"</code>.
*
* @see mx.resources.IResourceBundle
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function removeResourceBundlesForLocale(locale:String):void;
/**
* Dispatches a <code>change</code> event from the
* ResourceManager.
*
* <p>This causes binding expressions to re-evaluate
* if they involve the ResourceManager methods
* <code>getObject()</code>, <code>getString()</code>,
* <code>getStringArray()</code>, <code>getNumber()</code>,
* <code>getInt()</code>, <code>getUint()</code>,
* <code>getBoolean()</code>, or <code>getClass()</code>.</p>
*
* <p>This also causes the <code>resourcesChanged()</code> method
* of a UIComponent, Formatter, or Validator to execute.
* Many components implement this method to update
* their state based on the latest resources.</p>
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function update():void;
/**
* Returns an Array of Strings specifying all locales for which
* ResourceBundle objects exist in the ResourceManager.
*
* <p>The order of locales in this array is not specified.</p>
*
* @return An Array of locale Strings.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getLocales():Array /* of String */;
/**
* Returns an Array of Strings specifying all locales for which
* ResourceBundle objects exist in the ResourceManager,
* ordered using user preferences as reported by
* <code>Capabilities.language</code> or
* <code>Capabilities.languages</code>.
*
* @return An Array of locale Strings.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getPreferredLocaleChain():Array /* of String */;
/**
* Returns an Array of Strings specifying the bundle names
* for all ResourceBundle objects that exist in the ResourceManager
* and that belong to the specified locale.
*
* <p>The order of bundle names in this Array is not specified.</p>
*
* @param locale A locale string such as <code>"en_US"</code>.
*
* @return An Array of bundle names.
*
* @see mx.resources.IResourceBundle
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getBundleNamesForLocale(locale:String):Array /* of String */;
/**
* Returns a ResourceBundle with the specified <code>locale</code>
* and <code>bundleName</code> that has been previously added
* to the ResourceManager with <code>addResourceBundle()</code>.
* If no such ResourceBundle exists, this method returns <code>null</code>.
*
* @param locale A locale string such as <code>"en_US"</code>.
*
* @param bundleName A bundle name such as <code>"MyResources"</code>.
*
* @return The ResourceBundle with the specified <code>locale</code>
* and <code>bundleName</code> if one exists; otherwise <code>null</code>.
*
* @see mx.resources.IResourceBundle
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getResourceBundle(locale:String,
bundleName:String):IResourceBundle;
/**
* Searches the locales in the <code>localeChain</code>
* for the specified resource and returns
* the first resource bundle in which it is found.
* If the resource isn't found, this method returns <code>null</code>.
*
* @param bundleName A bundle name such as <code>"MyResources"</code>.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @return The first ResourceBundle in the <code>localeChain</code>
* that contains the specified resource, or <code>null</code>.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function findResourceBundleWithResource(
bundleName:String,
resourceName:String):IResourceBundle;
[Bindable("change")]
/**
* Gets the value of a specified resource as an Object.
*
* <p>The value is returned exactly as it is stored
* in the <code>content</code> Object of the ResourceBundle,
* with no conversion.
* If the resource was compiled from a properties files,
* the resource value in the <code>content</code> Object
* is always a String unless you used the <code>Embed()</code>
* or <code>ClassReference()</code> directive, in which case
* it is a Class.
* Use the <code>getString()</code>, <code>getStringArray()</code>,
* <code>getNumber()</code>, <code>getInt()</code>
* <code>getUint()</code>, <code>getBoolean()</code>, and
* <code>getClass()</code> methods to convert the value
* to more specific types.</p>
*
* <p>If the specified resource is not found,
* this method returns <code>undefined</code>.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, exactly as it is stored
* in the <code>content</code> Object,
* or <code>undefined</code> if the resource is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getObject(bundleName:String, resourceName:String,
locale:String = null):*;
[Bindable("change")]
/**
* Gets the value of a specified resource as a String,
* after substituting specified values for placeholders.
*
* <p>This method calls <code>getObject()</code>
* and then casts the result to a String.</p>
*
* <p>If a <code>parameters</code> Array is passed to this method,
* the parameters in it are converted to Strings
* and then substituted, in order, for the placeholders
* <code>"{0}"</code>, <code>"{1}"</code>, and so on, in the String
* before it is returned.</p>
*
* <p>If the specified resource is not found,
* this method returns <code>null</code>.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param parameters An Array of parameters that are
* substituted for the placeholders.
* Each parameter is converted to a String with the <code>toString()</code> method
* before being substituted.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as a String,
* or <code>null</code> if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getString(bundleName:String, resourceName:String,
parameters:Array = null,
locale:String = null):String;
[Bindable("change")]
/**
* Gets the value of a specified resource as an Array of Strings.
*
* <p>This method assumes that the resource value is a String
* containing a comma-separated list of items.
* It calls the <code>getString()</code> method, splits the String
* into items at the commas, and trims white space
* before and after each item.
* It is useful if you have written a line such as:</p>
*
* <pre>
* COUNTRIES=India, China, Japan
* </pre>
*
* <p>in a properties file and you want to obtain the value
* <code>[ "India", "China", "Japan" ]</code>
* rather than the value <code>"India, China, Japan"</code>.</p>
*
* <p>If the specified resource is not found,
* this method returns <code>null</code>.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as an Array of Strings,
* or <code>null</code> if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getStringArray(bundleName:String,
resourceName:String,
locale:String = null):Array /* of String */;
[Bindable("change")]
/**
* Gets the value of a specified resource as a Number.
*
* <p>This method calls <code>getObject()</code>
* and casts the result to a Number.
* It is useful if you have written a line such as:</p>
*
* <pre>
* LONGITUDE=170.3
* </pre>
*
* <p>in a properties file and want to obtain the value
* 170.3 rather than <code>"170.3"</code>.</p>
*
* <p>If the specified resource is not found,
* this method returns <code>NaN</code>.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as a Number,
* or <code>NaN</code> if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getNumber(bundleName:String, resourceName:String,
locale:String = null):Number;
[Bindable("change")]
/**
* Gets the value of a specified resource as an int.
*
* <p>This method calls <code>getObject()</code>
* and casts the result to an int.
* It is useful if you have written a line such as:</p>
*
* <pre>
* MINIMUM=5
* </pre>
*
* <p>in a properties file and want to obtain the value
* 5 rather than <code>"5"</code>.</p>
*
* <p>If the specified resource is not found,
* this method returns 0.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as an int,
* or 0 if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getInt(bundleName:String, resourceName:String,
locale:String = null):int;
[Bindable("change")]
/**
* Gets the value of a specified resource as a uint.
*
* <p>This method calls the <code>getObject()</code> method
* and casts the result to a uint.
* It is useful if you have written a line such as:</p>
*
* <pre>
* MINIMUM=5
* </pre>
*
* <p>in a properties file and want to obtain the value
* 5 rather than <code>"5"</code>.</p>
*
* <p>If the specified resource is not found,
* this method returns 0.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as a uint,
* or 0 if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getUint(bundleName:String, resourceName:String,
locale:String = null):uint;
[Bindable("change")]
/**
* Gets the value of a specified resource as a Boolean.
*
* <p>This method first calls <code>getString()</code>
* and converts the result to lowercase.
* It then returns <code>true</code>
* if the result was <code>"true"</code>.
* and <code>false</code> otherwise.</p>
*
* <p>If the specified resource is not found,
* this method returns <code>false</code>.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as a Boolean,
* or <code>false</code> if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getBoolean(bundleName:String, resourceName:String,
locale:String = null):Boolean;
[Bindable("change")]
/**
* Gets the value of a specified resource as a Class.
*
* <p>This method calls <code>getObject()</code>
* and coerces it to type Class using the <code>as</code> operator.
* The result will be <code>null</code> if the resource value
* was not a class reference.
* It is useful if you have written a lines such as</p>
*
* <pre>
* IMAGE=Embed("image.jpg")
* BUTTON_SKIN=ClassReference("skins.ButtonSkin_en_US")
* </pre>
*
* <p>in a properties file and want to obtain
* the Class that the <code>Embed()</code>
* or <code>ClassReference()</code> directive produced.</p>
*
* <p>If the specified resource is not found,
* this method returns <code>null</code>.</p>
*
* @param bundleName The name of a resource bundle.
*
* @param resourceName The name of a resource in the resource bundle.
*
* @param locale A specific locale to be used for the lookup,
* or <code>null</code> to search all locales
* in the <code>localeChain</code>.
* This parameter is optional and defaults to <code>null</code>;
* you should seldom need to specify it.
*
* @return The resource value, as a <code>Class</code>,
* or <code>null</code> if it is not found.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function getClass(bundleName:String, resourceName:String,
locale:String = null):Class;
/**
* Creates instances of all ResourceBundle subclasses that were compiled into the SWF
* and adds them to the ResourceManager.
*
* <p>For example, if the <code>locales</code> parameter is [ "en_US", "ja_JP" ]
* and the <code>bundleNames</code> parameter is [ "core", "controls" ],
* then four resource bundles will be installed.</p>
*
* <p>This method is used only by classes that implement the IFlexModuleFactory interface.</p>
*
* @param applicationDomain The ApplicationDomain that is used to look up the resource bundle
* classes by name.
*
* @param locales An Array of Strings that specify the locales for which the SWF was compiled.
*
* @param bundleNames An Array of Strings that specify the names of the resource bundles
* that were compiled into the SWF.
*
* @param useWeakReference A flag that specifyies whether the resource bundles should be
* intalled into the ResourceManager using a weak reference.
*
* @return An Array of the ResourceBundle instances that were created
* and added to the ResourceManager.
*
* @see mx.core.IFlexModuleFactory
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function installCompiledResourceBundles(
applicationDomain:ApplicationDomain,
locales:Array /* of String */,
bundleNames:Array /* of String */,
useWeakReference:Boolean = false):Array;
/**
* Initializes the <code>localeChain</code> property of the ResourceManager
* using an algorithm that compares the operating system's list of user-preferred
* locales with the list of locales available in the SWF.
*
* <p>For example, if the user has indicated in the operating system that she
* prefers French, and the SWF was compiled for the locales en_US, fr_FR, and de_DE,
* then the <code>localeChain</code> will be set so that the first locale in it
* is fr_FR.</p>
*
* <p>This method is used only by classes that implement the IFlexModuleFactory interface.</p>
*
* @param compiledLocales An Array of Strings specifying the locales
* for which the SWF was compiled.
*
* @see mx.core.IFlexModuleFactory
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
function initializeLocaleChain(compiledLocales:Array):void;
}
}
| 40.316808
| 105
| 0.607552
|
bb7e2de45f2f997cfbb7c443ab6e1c77171b7b9c
| 2,720
|
as
|
ActionScript
|
src/net/wooga/selectors/usagepatterns/implementations/SelectorPoolImpl.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
src/net/wooga/selectors/usagepatterns/implementations/SelectorPoolImpl.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
src/net/wooga/selectors/usagepatterns/implementations/SelectorPoolImpl.as
|
arne-schroppe/display-list-selector
|
c7ee032f0bb8ec62e8c9ae1db46492e395b92a3e
|
[
"MIT"
] | null | null | null |
package net.wooga.selectors.usagepatterns.implementations {
import net.wooga.selectors.adaptermap.SelectorAdapterSource;
import net.wooga.selectors.matching.MatcherTool;
import net.wooga.selectors.namespace.selector_internal;
import net.wooga.selectors.parser.Parser;
import net.wooga.selectors.selectoradapter.SelectorAdapter;
import net.wooga.selectors.selectorstorage.SelectorTree;
import net.wooga.selectors.tools.SpecificityComparator;
import net.wooga.selectors.usagepatterns.*;
public class SelectorPoolImpl implements SelectorPool {
use namespace selector_internal;
private var _matcher:MatcherTool;
private var _adapterSource:SelectorAdapterSource;
private var _parser:Parser;
private var _knownSelectors:SelectorTree = new SelectorTree();
public function SelectorPoolImpl(parser:Parser, matcher:MatcherTool, adapterSource:SelectorAdapterSource) {
_parser = parser;
_matcher = matcher;
_adapterSource = adapterSource;
}
public function addSelector(selectorString:String):void {
var parsed:Vector.<SelectorImpl> = _parser.parse(selectorString);
for each(var selector:SelectorImpl in parsed) {
_knownSelectors.add(selector);
}
}
public function getSelectorsMatchingObject(object:Object):Vector.<SelectorDescription> {
return getPseudoElementSelectorsMatchingObject(object, null);
}
public function getPseudoElementSelectorsMatchingObject(object:Object, pseudoElement:String):Vector.<SelectorDescription> {
var adapter:SelectorAdapter = getAdapterOrThrowException(object);
var matches:Vector.<SelectorDescription> = new <SelectorDescription>[];
var possibleMatches:Array = _knownSelectors.getPossibleMatchesFor(adapter, pseudoElement);
var len:int = possibleMatches.length;
for(var i:int = 0; i < len; ++i) {
var selector:SelectorImpl = possibleMatches[i] as SelectorImpl;
if (_matcher.isObjectMatching(adapter, selector.matchers)) {
//TODO (arneschroppe 3/18/12) use an object pool here, so we don't have the overhead of creating objects all the time. They're flyweight's anyway
matches.push(selector);
}
}
//TODO (arneschroppe 3/18/12) because of the comma-separator in strings, it might be possible that selectors get added several times. we should make the vector unique
matches = matches.sort(SpecificityComparator.staticCompare);
return matches as Vector.<SelectorDescription>;
}
private function getAdapterOrThrowException(object:Object):SelectorAdapter {
var adapter:SelectorAdapter = _adapterSource.getSelectorAdapterForObject(object);
if (!adapter) {
throw new ArgumentError("No style adapter registered for object " + object);
}
return adapter;
}
}
}
| 35.324675
| 169
| 0.780147
|
a6d5199c27947e91ce1e043b591a97752ea8f452
| 2,426
|
as
|
ActionScript
|
src/jp/nyatla/nyartoolkit/as3/core/utils/NyARMath.as
|
xantorohara/gifts
|
2022bb2e30f909d3bba27db50975b034fa30cb84
|
[
"MIT"
] | 1
|
2020-09-16T06:34:00.000Z
|
2020-09-16T06:34:00.000Z
|
src/jp/nyatla/nyartoolkit/as3/core/utils/NyARMath.as
|
xantorohara/gifts
|
2022bb2e30f909d3bba27db50975b034fa30cb84
|
[
"MIT"
] | null | null | null |
src/jp/nyatla/nyartoolkit/as3/core/utils/NyARMath.as
|
xantorohara/gifts
|
2022bb2e30f909d3bba27db50975b034fa30cb84
|
[
"MIT"
] | null | null | null |
/*
* PROJECT: NyARToolkitAS3
* --------------------------------------------------------------------------------
* This work is based on the original ARToolKit developed by
* Hirokazu Kato
* Mark Billinghurst
* HITLab, University of Washington, Seattle
* http://www.hitl.washington.edu/artoolkit/
*
* The NyARToolkitAS3 is AS3 edition ARToolKit class library.
* Copyright (C)2010 Ryo Iizuka
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For further information please contact.
* http://nyatla.jp/nyatoolkit/
* <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
*
*/
package jp.nyatla.nyartoolkit.as3.core.utils
{
import jp.nyatla.nyartoolkit.as3.core.types.*;
public class NyARMath
{
/**
* p2-p1ベクトルのsquare normを計算する。
* @param i_p1
* @param i_p2
* @return
*/
public static function sqNorm_NyARDoublePoint2d(i_p1:NyARDoublePoint2d,i_p2:NyARDoublePoint2d ):Number
{
var x:Number,y:Number;
x=i_p2.x-i_p1.x;
y=i_p2.y-i_p1.y;
return x*x+y*y;
}
public static function sqNorm_Number(i_p1x:Number,i_p1y:Number,i_p2x:Number,i_p2y:Number):Number
{
var x:Number,y:Number;
x=i_p2x-i_p1x;
y=i_p2y-i_p1y;
return x*x+y*y;
}
/**
* p2-p1ベクトルのsquare normを計算する。
* @param i_p1
* @param i_p2
* @return
*/
public static function sqNorm_NyARDoublePoint3d(i_p1:NyARDoublePoint3d,i_p2:NyARDoublePoint3d):Number
{
var x:Number, y:Number, z:Number;
x=i_p2.x-i_p1.x;
y=i_p2.y-i_p1.y;
z=i_p2.z-i_p1.z;
return x*x+y*y+z*z;
}
/**
* 3乗根を求められないシステムで、3乗根を求めます。
* http://aoki2.si.gunma-u.ac.jp/JavaScript/src/3jisiki.html
* @param i_in
* @return
*/
public static function cubeRoot(i_in:Number):Number
{
var res:Number = Math.pow(Math.abs(i_in), 1.0 / 3.0);
return (i_in >= 0) ? res : -res;
}
}
}
| 28.541176
| 104
| 0.669002
|
96de4f69a16f6a19825aaae1891d7f92db679371
| 696
|
as
|
ActionScript
|
lib/aswing/src/GUI/fox/aswing/plaf/basic/icon/RadioButtonMenuItemCheckIcon.as
|
SecretFox/CCC
|
957cc83ea27f2f52e45c11f024954f83a0c3b728
|
[
"MIT"
] | 2
|
2019-07-14T15:26:42.000Z
|
2020-10-06T05:10:26.000Z
|
lib/aswing/src/GUI/fox/aswing/plaf/basic/icon/RadioButtonMenuItemCheckIcon.as
|
SecretFox/CCC
|
957cc83ea27f2f52e45c11f024954f83a0c3b728
|
[
"MIT"
] | 6
|
2018-12-12T05:07:17.000Z
|
2021-06-17T05:30:09.000Z
|
lib/aswing/src/GUI/fox/aswing/plaf/basic/icon/RadioButtonMenuItemCheckIcon.as
|
SecretFox/CCC
|
957cc83ea27f2f52e45c11f024954f83a0c3b728
|
[
"MIT"
] | null | null | null |
/*
Copyright aswing.org, see the LICENCE.txt.
*/
import GUI.fox.aswing.ASColor;
import GUI.fox.aswing.Component;
import GUI.fox.aswing.graphics.Graphics;
import GUI.fox.aswing.graphics.SolidBrush;
import GUI.fox.aswing.JMenuItem;
import GUI.fox.aswing.plaf.basic.icon.MenuCheckIcon;
/**
* @author iiley
*/
class GUI.fox.aswing.plaf.basic.icon.RadioButtonMenuItemCheckIcon extends MenuCheckIcon {
public function RadioButtonMenuItemCheckIcon() {
super();
}
public function paintIcon(com : Component, g : Graphics, x : Number, y : Number) : Void {
var menu:JMenuItem = JMenuItem(com);
if(menu.isSelected()){
g.fillCircle(new SolidBrush(ASColor.BLACK), x+4, y+5, 3, 3);
}
}
}
| 25.777778
| 90
| 0.734195
|
5086da390a49083a0a3011283dfb6b5d1081b56e
| 4,988
|
as
|
ActionScript
|
SJGame/src/SJ/Game/data/CJDataOfInlayPosition.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | 1
|
2021-06-09T23:39:11.000Z
|
2021-06-09T23:39:11.000Z
|
SJGame/src/SJ/Game/data/CJDataOfInlayPosition.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | null | null | null |
SJGame/src/SJ/Game/data/CJDataOfInlayPosition.as
|
liu-jack/SJGame
|
2ade3f9d4ec3cf6a6589301d77dd980cfa2500d5
|
[
"MIT"
] | null | null | null |
package SJ.Game.data
{
import SJ.Common.Constants.ConstBag;
import SJ.Common.Constants.ConstJewel;
import engine_starling.data.SDataBase;
import flash.net.dns.AAAARecord;
/**
* 单一装备位上宝石镶嵌数据
* 数据格式{position, jewelId}
* @author sangxu
*
*/
public class CJDataOfInlayPosition extends SDataBase
{
public function CJDataOfInlayPosition()
{
super("CJDataOfInlayPosition");
}
/**
* 获取指定索引孔中道具id
* @param index 索引
* @return
*
*/
public function getHoleItemId(index:String):String
{
return this.getData("holeitemid" + index);
}
/**
* 设置孔中宝石id
* @param index 孔索引
* @param jewelId 宝石id
*
*/
private function _setHoleItemId(index:String, jewelId:String):void
{
this.setData("holeitemid" + index, jewelId);
}
/**
* 孔索引最小值
* @return
*
*/
public function get holeIndexMin():int
{
return 0;
}
/**
* 孔索引最大值
* @return
*
*/
public function get holeIndexMax():int
{
return 5;
}
/**
* 获取第一个为空的孔的索引
* @return 存在则返回索引,没有空孔返回-1
*
*/
public function getFirstEmptyHoleIndex():int
{
var holeValue:String = "";
for (var i:int = 0; i < 6; i++)
{
holeValue = this.getHoleItemId(String(i));
if (holeValue == ConstBag.INLAY_HOLE_STATE_EMPTY)
{
return i;
}
}
return -1;
}
/**
* 获取当前装备位所有宝石道具id(未解锁与空孔不返回)
* @return
*
*/
public function getAllJewels():Array
{
var array:Array = new Array();
var holeValue:String = "";
for (var i:int = 0; i < 6; i++)
{
holeValue = this.getHoleItemId(String(i));
if (holeValue != ConstBag.INLAY_HOLE_STATE_EMPTY && holeValue != ConstBag.INLAY_HOLE_STATE_LOCK)
{
array.push(holeValue);
}
}
return array;
}
/**
* 获取当前开孔索引
* @return
*
*/
public function getOpenIndex():int
{
var holeValue:String = "";
var lockCount:int = 0;
for (var i:int = 0; i < 6; i++)
{
holeValue = this.getHoleItemId(String(i));
if (holeValue == ConstBag.INLAY_HOLE_STATE_LOCK)
{
lockCount += 1;
}
}
return 6 - lockCount;
}
public static function getNewCJDataOfInlayPosition(heroid:String, userid:String, positiontype:int):CJDataOfInlayPosition
{
var positionData:CJDataOfInlayPosition = new CJDataOfInlayPosition();
positionData.heroid = heroid;
positionData.positiontype = positiontype;
positionData.userid = userid;
positionData.holeitemid0 = ConstJewel.JEWEL_HOLE_STATUS_EMPTY;
positionData.holeitemid1 = ConstJewel.JEWEL_HOLE_STATUS_LOCK;
positionData.holeitemid2 = ConstJewel.JEWEL_HOLE_STATUS_LOCK;
positionData.holeitemid3 = ConstJewel.JEWEL_HOLE_STATUS_LOCK;
positionData.holeitemid4 = ConstJewel.JEWEL_HOLE_STATUS_LOCK;
positionData.holeitemid5 = ConstJewel.JEWEL_HOLE_STATUS_LOCK;
return positionData;
}
/**
* 设置孔开启
* @param index
*
*/
public function setHoleOpen(index:int):void
{
if (index < this.holeIndexMin || index > this.holeIndexMax)
{
return;
}
var strIndex:String = String(index);
if (getHoleItemId(strIndex) == ConstJewel.JEWEL_HOLE_STATUS_LOCK)
{
_setHoleItemId(strIndex, ConstJewel.JEWEL_HOLE_STATUS_EMPTY);
}
}
/** getter */
public function get heroid() : String
{
return this.getData("heroid");
}
public function get positiontype() : int
{
return this.getData("positiontype");
}
public function get userid() : String
{
return this.getData("userid");
}
public function get holeitemid0() : String
{
return this.getData("holeitemid0");
}
public function get holeitemid1() : String
{
return this.getData("holeitemid1");
}
public function get holeitemid2() : String
{
return this.getData("holeitemid2");
}
public function get holeitemid3() : String
{
return this.getData("holeitemid3");
}
public function get holeitemid4() : String
{
return this.getData("holeitemid4");
}
public function get holeitemid5() : String
{
return this.getData("holeitemid5");
}
/** setter */
public function set heroid(value:String):void
{
this.setData("heroid", value);
}
public function set positiontype(value:int):void
{
this.setData("positiontype", value);
}
public function set userid(value:String):void
{
this.setData("userid", value);
}
public function set holeitemid0(value:String):void
{
this.setData("holeitemid0", value);
}
public function set holeitemid1(value:String):void
{
this.setData("holeitemid1", value);
}
public function set holeitemid2(value:String):void
{
this.setData("holeitemid2", value);
}
public function set holeitemid3(value:String):void
{
this.setData("holeitemid3", value);
}
public function set holeitemid4(value:String):void
{
this.setData("holeitemid4", value);
}
public function set holeitemid5(value:String):void
{
this.setData("holeitemid5", value);
}
}
}
| 21.225532
| 122
| 0.65417
|
f336ee6abe727c0a5c45be336d9e20095085ba66
| 10,150
|
as
|
ActionScript
|
agaloptimiser/src/com/adobe/AGALOptimiser/agal/Instruction.as
|
adobe/glsl2agal
|
85dff4ef9171613ce4f39630246edd64659a1786
|
[
"MIT"
] | 50
|
2015-01-05T12:55:42.000Z
|
2021-11-10T07:12:58.000Z
|
agaloptimiser/src/com/adobe/AGALOptimiser/agal/Instruction.as
|
gonchar/glsl2agal
|
85dff4ef9171613ce4f39630246edd64659a1786
|
[
"MIT"
] | 3
|
2015-02-05T17:43:15.000Z
|
2019-10-02T21:05:06.000Z
|
agaloptimiser/src/com/adobe/AGALOptimiser/agal/Instruction.as
|
adobe/glsl2agal
|
85dff4ef9171613ce4f39630246edd64659a1786
|
[
"MIT"
] | 23
|
2015-04-23T12:54:11.000Z
|
2021-12-06T12:52:29.000Z
|
/*
Copyright (c) 2012 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.adobe.AGALOptimiser.agal {
import com.adobe.AGALOptimiser.error.Enforcer;
import com.adobe.AGALOptimiser.error.ErrorMessages;
import com.adobe.AGALOptimiser.nsinternal;
import com.adobe.AGALOptimiser.utils.SerializationFlags;
import com.adobe.AGALOptimiser.utils.SerializationUtils;
import flash.utils.ByteArray;
use namespace nsinternal;
[ExcludeClass]
public class Instruction extends Operation
{
private var operands_ : Vector.<SourceRegister> = new Vector.<SourceRegister>(2, true);
public function Instruction(opcodeValue : Opcode,
destination : DestinationRegister = null,
operand0 : SourceRegister = null,
operand1 : SourceRegister = null)
{
super(opcodeValue, destination);
Enforcer.checkNull(opcodeValue);
operands_[0] = operand0;
operands_[1] = operand1;
Enforcer.check(isValid(), ErrorMessages.AGAL_INSTRUCTION_MALFORMED);
}
override internal function clone(context : CloningContext) : Operation
{
return new Instruction(opcode.clone(),
(destination != null) ? destination.clone(context) : null,
(operands_[0] != null) ? operands_[0].clone(context) : null,
(operands_[1] != null) ? operands_[1].clone(context) : null);
}
static nsinternal function expectedSourceCount(opcode : Opcode) : int
{
switch (opcode.code)
{
case Opcode.MOVE:
case Opcode.RCP:
case Opcode.SQRT:
case Opcode.FRACT:
case Opcode.RCPSQRT:
case Opcode.LOG2:
case Opcode.EXP2:
case Opcode.NORMALIZE:
case Opcode.SIN:
case Opcode.COS:
case Opcode.ABS:
case Opcode.NEG:
case Opcode.SATURATE:
case Opcode.KILL:
return 1;
default:
return 2;
}
}
override nsinternal function generateBinaryBlob(sink : ByteArray) : void
{
opcode.generateBinaryBlob(sink);
if (destination != null)
destination.generateBinaryBlob(sink);
else
sink.writeUnsignedInt(0x00000000);
if (operands_[0] != null)
operands_[0].generateBinaryBlob(sink);
else
{
sink.writeUnsignedInt(0x00000000);
sink.writeUnsignedInt(0x00000000);
}
if (operands_[1] != null)
operands_[1].generateBinaryBlob(sink);
else
{
sink.writeUnsignedInt(0x00000000);
sink.writeUnsignedInt(0x00000000);
}
}
static nsinternal function isDestinationRequired(opcode : Opcode) : Boolean
{
return (opcode.code != Opcode.KILL);
}
nsinternal function isValid() : Boolean
{
switch (opcode.code)
{
// different kinds of destinations, e.g. can't set to constant register?
case Opcode.MOVE:
case Opcode.RCP:
case Opcode.FRACT:
case Opcode.SQRT:
case Opcode.RCPSQRT:
case Opcode.LOG2:
case Opcode.EXP2:
case Opcode.NORMALIZE:
case Opcode.SIN:
case Opcode.COS:
case Opcode.ABS:
case Opcode.NEG:
case Opcode.SATURATE:
return ((destination != null) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[1] == null));
case Opcode.ADD:
case Opcode.SUB:
case Opcode.MUL:
case Opcode.DIV:
case Opcode.MIN:
case Opcode.MAX:
case Opcode.POW:
return ((destination != null) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[1] != null) && (operands_[1].isVector()));
case Opcode.CROSS:
return ((destination != null) && (destination.channelCount() == 3) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[1] != null) && (operands_[1].isVector()));
case Opcode.DOT3:
case Opcode.DOT4:
return ((destination != null) && (destination.channelCount() == 1) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[1] != null) && (operands_[1].isVector()));
case Opcode.MULV3M3:
return ((destination != null) && (destination.channelCount() <= 3) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[0] != null) && (operands_[1].isMatrix33()));
case Opcode.MULV4M4:
return ((destination != null) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[1] != null) && (operands_[1].isMatrix44()));
case Opcode.MULV3M4:
return ((destination != null) && (destination.channelCount() <= 3) && (operands_[0] != null) && (operands_[0].isVector()) && (operands_[1] != null) && (operands_[1].isMatrix44()));
case Opcode.KILL:
return ((destination == null) && (operands_[0] != null) && (operands_[0].isScalar()) && (operands_[1] == null));
case Opcode.LESS_THAN:
case Opcode.GREATER_THAN_OR_EQUAL:
case Opcode.EQUALS:
case Opcode.NOT_EQUALS:
return ((destination != null) && (operands_[0] != null) && (operands_[1] != null));
default:
// sample is not an acceptable opcodes for Instruction
return false;
}
}
nsinternal function get operand0() : SourceRegister
{
return operands_[0];
}
nsinternal function set operand0(value : SourceRegister) : void
{
operands_[0] = value;
}
nsinternal function get operand1() : SourceRegister
{
return operands_[1];
}
nsinternal function set operand1(value : SourceRegister) : void
{
operands_[1] = value;
}
nsinternal function get operands() : Vector.<SourceRegister>
{
return operands_;
}
override nsinternal function serialize(indentLevel : int = 0,
flags : int = 0) : String
{
var instString : String = "";
if (SerializationFlags.isSet(flags, SerializationFlags.DISPLAY_AGAL_BLOCK_NUMBERS))
{
instString += "B";
instString += (block != null) ? block.blockNumber : "?";
instString += "-";
instString += (block != null) ? block.outlets.length : "?";
}
instString += SerializationUtils.indentString(indentLevel);
if (SerializationFlags.isSet(flags, SerializationFlags.DISPLAY_AGAL_OPERATION_SERIAL_NUMBERS))
{
instString += id;
instString += ": ";
}
instString += opcode.serialize();
instString += " ";
var needComma : Boolean = false;
if (destination != null)
{
instString += destination.serialize(0, flags);
needComma = true;
}
if (operands_[0] != null)
{
if (needComma)
instString += ", ";
instString += operands_[0].serialize(0, flags);
needComma = true;
}
if (operands_[1] != null)
{
if (needComma)
instString += ", ";
instString += operands_[1].serialize(0, flags);
}
return instString;
}
override nsinternal function setLiveRangeForSourceRegisters(liveRange : LiveRange,
register : Register) : void
{
if ((operands_[0] != null) && (operands_[0].register == register))
operands_[0].liveRange = liveRange;
if ((operands_[1] != null) && (operands_[1].register == register))
operands_[1].liveRange = liveRange;
if ((operands_[0] != null) && !(operands_[0].isDirect))
{
if (operands_[0].indirectRegister == register)
operands_[0].liveRange = liveRange;
}
if ((operands_[1] != null) && !(operands_[1].isDirect))
{
if (operands_[1].indirectRegister == register)
operands_[1].liveRange = liveRange;
}
}
override nsinternal function simpleOperands(excludeSources : Boolean = false) : Vector.<SourceRegister>
{
var toReturn : Vector.<SourceRegister> = new Vector.<SourceRegister>();
if ((operands_[0] != null) && ((!excludeSources) || (!operands_[0].register.category.isSource())))
toReturn.push(operands_[0]);
if ((operands_[1] != null) && ((!excludeSources) || (!operands_[1].register.category.isSource())))
toReturn.push(operands_[1]);
return toReturn;
}
} // Instruction
} // com.adobe.AGALOptimiser.agal
| 33.946488
| 193
| 0.572217
|
54d0aeca84caf0243ed05af1247b92c4abe512d8
| 6,239
|
as
|
ActionScript
|
frameworks/projects/automation/src/mx/automation/events/AutomationCustomReplayEvent.as
|
blackjyn/flex-sdk
|
61aa3601c8c57f2855e18e11fa16f4180de42e05
|
[
"ECL-2.0",
"Apache-2.0"
] | 173
|
2015-01-01T18:57:05.000Z
|
2022-03-06T14:36:12.000Z
|
frameworks/projects/automation/src/mx/automation/events/AutomationCustomReplayEvent.as
|
blackjyn/flex-sdk
|
61aa3601c8c57f2855e18e11fa16f4180de42e05
|
[
"ECL-2.0",
"Apache-2.0"
] | 12
|
2015-05-31T15:51:24.000Z
|
2021-01-27T11:30:42.000Z
|
frameworks/projects/automation/src/mx/automation/events/AutomationCustomReplayEvent.as
|
blackjyn/flex-sdk
|
61aa3601c8c57f2855e18e11fa16f4180de42e05
|
[
"ECL-2.0",
"Apache-2.0"
] | 122
|
2015-01-01T13:46:06.000Z
|
2022-02-13T20:09:21.000Z
|
////////////////////////////////////////////////////////////////////////////////
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package mx.automation.events
{
import flash.events.Event;
import mx.automation.IAutomationObject;
/**
* The AutomationReplayEvent class represents event objects that are dispatched
* by the AutomationManager, and used by the custom component owners to replay their custom events
* However this event will be dispatched for every replay recieved from the tool and if this was not
* prevented by the custom component it will be handled by the tool.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public class AutomationCustomReplayEvent extends Event
{
include "../../core/Version.as";
//--------------------------------------------------------------------------
//
// Class constants
//
//--------------------------------------------------------------------------
/**
* The <code>AutomationReplayEvent.REPLAY</code> constant defines the value of the
* <code>type</code> property of the event object for a <code>replay</code> event.
*
* <p>The properties of the event object have the following values:</p>
* <table class="innertable">
* <tr><th>Property</th><th>Value</th></tr>
* <tr><td><code>automationObject</code></td><td>Delegate of the UIComponent
* that dispatched the interaction earlier.</td></tr>
* <tr><td><code>bubbles</code></td><td>false</td></tr>
* <tr><td><code>cancelable</code></td><td>false</td></tr>
* <tr><td><code>currentTarget</code></td><td>The Object that defines the
* event listener that handles the event. For example, if you use
* <code>myButton.addEventListener()</code> to register an event listener,
* myButton is the value of the <code>currentTarget</code>. </td></tr>
* <tr><td><code>replayableEvent</code></td><td>Event that needs to be replayed.</td></tr>
* <tr><td><code>target</code></td><td>The Object that dispatched the event;
* it is not always the Object listening for the event.
* Use the <code>currentTarget</code> property to always access the
* Object listening for the event.</td></tr>
* </table>
*
* @eventType replay
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public static const CUSTOM_REPLAY:String = "customReplay";
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* @param type The event type; indicates the action that caused the event.
*
* @param bubbles Whether the event can bubble up the display list hierarchy.
*
* @param cancelable Whether the behavior associated with the event can be prevented.
*
* @param automationObject Delegate of the UIComponent that dispatched the interaction earlier.
*
* @param replayableEvent Event that needs to be replayed.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public function AutomationCustomReplayEvent(type:String = AutomationCustomReplayEvent.CUSTOM_REPLAY,
bubbles:Boolean = false,
cancelable:Boolean = false,
automationObject:IAutomationObject = null,
name:String=null,
args:Array=null)
{
super(type, bubbles, cancelable);
this.automationObject = automationObject;
this.name = name;
this.args = args;
}
//--------------------------------------------------------------------------
//
// Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// automationObject
//----------------------------------
/**
* Delegate of the UIComponent object on which this event will be replayed
* since the target on an event that was not really dispatched
* is not available.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public var automationObject:IAutomationObject;
//----------------------------------
// Name
//----------------------------------
/**
* Name Event to the replayed.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public var name:String;
//----------------------------------
// Args
//----------------------------------
/**
* Arguments corresponding to the Event to the replayed.
*
* @langversion 3.0
* @playerversion Flash 9
* @playerversion AIR 1.1
* @productversion Flex 3
*/
public var args:Array;
//--------------------------------------------------------------------------
//
// Overridden methods: Event
//
//--------------------------------------------------------------------------
/**
* @private
*/
override public function clone():Event
{
return new AutomationCustomReplayEvent(type, bubbles, cancelable,
automationObject,
name,args);
}
}
}
| 33.543011
| 103
| 0.549447
|
70a03998191d058e81f210d896977dc25d4d683d
| 1,360
|
as
|
ActionScript
|
SMT/src/main.as
|
aleksusklim/SpyroMemoryTest
|
34fbab012b619d03e45baca0c2e6eab425ec54fc
|
[
"Unlicense"
] | 1
|
2020-06-01T18:03:51.000Z
|
2020-06-01T18:03:51.000Z
|
SMT/src/main.as
|
aleksusklim/SpyroMemoryTest
|
34fbab012b619d03e45baca0c2e6eab425ec54fc
|
[
"Unlicense"
] | null | null | null |
SMT/src/main.as
|
aleksusklim/SpyroMemoryTest
|
34fbab012b619d03e45baca0c2e6eab425ec54fc
|
[
"Unlicense"
] | null | null | null |
package
{
import flash.display.*;
import flash.events.*;
import org.flixel.*;
import org.flixel.system.*;
[SWF(width="610",height="500",backgroundColor="#7f7f7f7f")]
[Frame(factoryClass="Preloader")]
public class main extends FlxGame
{
public static var s_9:Class;
public static var color:Object = {r: 0xFFFF0000, g: 0xFF00FF00, b: 0xFF0000FF, w: 0xFFFFFFFF, c: 0xFF00FFFF, m: 0xFFFF00FF, y: 0xFFFFFF00, k: 0xFF000000};
public static var cell:Number = 20;
static public var me:main;
static public var tog:uint;
public function toggle():void
{
switch (tog++)
{
case 0:
FlxG.stage.removeEventListener(Event.DEACTIVATE, onFocusLost);
useSoundHotKeys = false;
FlxBasic.game = Game;
FlxBasic.screen = Screen;
FlxG.camera.antialiasing = true;
FlxG.useBufferLocking = true;
FlxG.state.add(new FlxTilemapBuffer);
FlxG.saves = [new FlxSave];
FlxG.save = 0;
default:
tog = 2;
case 1:
FlxG.stage.align = StageAlign.TOP;
FlxG.stage.scaleMode = StageScaleMode.SHOW_ALL;
break;
case 2:
FlxG.stage.scaleMode = StageScaleMode.NO_SCALE;
FlxG.stage.align = StageAlign.TOP_LEFT;
break;
}
}
public function main()
{
super(610, 500, Game, 1, 40, 20, true);
me = this;
forceDebugger = false;
FlxG.debug = false;
}
}
}
| 24.285714
| 156
| 0.654412
|
b329afe8e2c1916e019cace8198607684cda12f0
| 2,455
|
as
|
ActionScript
|
resources/DaggerXL/XL_UI_Editor.as
|
Pickle/XLEngine
|
c1aa5cf4584cb1940373505e4350336662fecf43
|
[
"MIT"
] | 179
|
2018-04-04T12:35:07.000Z
|
2021-11-28T03:53:30.000Z
|
resources/DaggerXL/XL_UI_Editor.as
|
Pickle/XLEngine
|
c1aa5cf4584cb1940373505e4350336662fecf43
|
[
"MIT"
] | 34
|
2018-04-04T17:15:40.000Z
|
2021-11-28T03:01:22.000Z
|
resources/DaggerXL/XL_UI_Editor.as
|
Pickle/XLEngine
|
c1aa5cf4584cb1940373505e4350336662fecf43
|
[
"MIT"
] | 25
|
2018-04-04T23:49:46.000Z
|
2022-02-05T01:02:58.000Z
|
////////////////////////
//// UI Editor Base ////
////////////////////////
int Editor_scrW, Editor_scrH;
int Editor_Cursor;
bool Editor_Initialized = false;
void XL_UI_Editor_OnEnter()
{
//Enable mouse locking for mouse look.
Input_EnableMouseLocking(0);
//Set the virtual screen size.
UI_GetScreenSize(Editor_scrW, Editor_scrH);
UI_SetVirtualScreenSize(Editor_scrW, Editor_scrH);
//load the mouse cursor.
Editor_Cursor = UI_AddImage("Cursor.png", 0, 0);
if ( Editor_Initialized == false )
{
//Create buttons
UI_PushWindow("XE_Editor", "XL Engine UI Editor [CoreUI_StartMenu]", 0, 16, 16, 600, 400, UIWinFlag_None);
UI_CreateWindow("XE_Load", "Load", 1, 28, 68, 64, 28, UIWinFlag_None);
UI_CreateWindow("XE_Save", "Save", 1, 104, 68, 64, 28, UIWinFlag_None);
UI_CreateWindow("XE_SaveAs", "Save As", 1, 180, 68, 88, 28, UIWinFlag_None);
UI_CreateWindow("XE_CreateButton", "Create Button", 1, 28, 108, 140, 28, UIWinFlag_None);
UI_CreateWindow("XE_EditButton", "Edit Button", 1, 180, 108, 120, 28, UIWinFlag_None);
UI_CreateWindow("XE_EditorClose", "X", 1, 560, 8, 36, 28, UIWinFlag_None);
UI_PopWindow();
//Button editor
UI_PushWindow("XE_BEdit", "Button Editor", 0, 16, 432, 300, 300, UIWinFlag_None);
UI_CreateWindow("XE_BEditClose", "X", 1, 260, 8, 36, 28, UIWinFlag_None);
UI_PopWindow();
//default button editor to off.
UI_EnableWindow("XE_BEdit", 0);
Editor_Initialized = true;
}
}
void XL_UI_Editor_OnExit()
{
UI_FreeImage( Editor_Cursor );
}
void RenderMouseCursor()
{
//Get the current mouse position.
int mouse_x, mouse_y;
UI_GetMousePos(mouse_x, mouse_y);
UI_SetImageUV_RangeI(Editor_Cursor, 0, 0, 10, 10);
UI_RenderImageRect(Editor_Cursor, mouse_x, mouse_y, 20, 20, 1.0f, UI_Align_Left, UI_Align_Bottom);
}
void XL_UI_Editor_OnRender(int state)
{
//No custom rendering.
}
void XL_UI_Editor_OnPostRender(int state)
{
UI_EnableImageFilter(0);
RenderMouseCursor();
UI_EnableImageFilter(1);
}
void XL_UI_Editor_OnUpdate()
{
}
void XL_UI_Editor_OnKey(int key)
{
}
//Buttons
void XE_Load_OnRelease()
{
}
void XE_Save_OnRelease()
{
}
void XE_SaveAs_OnRelease()
{
}
void XE_CreateButton_OnRelease()
{
UI_EnableWindow("XE_BEdit", 1);
}
void XE_EditButton_OnRelease()
{
UI_EnableWindow("XE_BEdit", 1);
}
void XE_EditorClose_OnRelease()
{
UI_PopScreen();
}
//Button Editor
void XE_BEditClose_OnRelease()
{
UI_EnableWindow("XE_BEdit", 0);
}
| 21.725664
| 108
| 0.703055
|
a16fd4e193c5fef7eb1fe53f2caa736aad7b1f72
| 2,721
|
as
|
ActionScript
|
src/pl/brun/lib/tools/CompilationDate.as
|
tudal/BrunLib
|
0dea9f1f27491317d546ee9cc0e225a9bce277c6
|
[
"Apache-2.0"
] | null | null | null |
src/pl/brun/lib/tools/CompilationDate.as
|
tudal/BrunLib
|
0dea9f1f27491317d546ee9cc0e225a9bce277c6
|
[
"Apache-2.0"
] | null | null | null |
src/pl/brun/lib/tools/CompilationDate.as
|
tudal/BrunLib
|
0dea9f1f27491317d546ee9cc0e225a9bce277c6
|
[
"Apache-2.0"
] | null | null | null |
package pl.brun.lib.tools {
import pl.brun.lib.util.func.timeAgo;
import pl.brun.lib.Base;
import flash.display.LoaderInfo;
import flash.utils.ByteArray;
import flash.utils.Endian;
/**
* Direct reading of SWF file
* Distributed under the new BSD License
* @author Paul Sivtsov - ad@ad.by
*/
public class CompilationDate extends Base {
public static function ago(docClassLoaderInfo:LoaderInfo):String {
try {
var date:Date = read(docClassLoaderInfo)
var dateNow:Date = new Date()
return 'created ' + timeAgo(dateNow.getTime() - date.getTime())
}catch(error:Error){
return "(no metadata)"
}
return "(no metadata)"
}
public static function read(docClassLoaderInfo:LoaderInfo, serialNumber:ByteArray = null):Date {
const compilationDate:Date = new Date;
const DATETIME_OFFSET:uint = 18;
if (serialNumber == null) {
serialNumber = readSerialNumber(docClassLoaderInfo);
}
if (serialNumber == null) {
return null;
}
serialNumber.position = DATETIME_OFFSET;
serialNumber.endian = Endian.LITTLE_ENDIAN;
compilationDate.time = serialNumber.readUnsignedInt() + serialNumber.readUnsignedInt() * (uint.MAX_VALUE + 1);
return compilationDate;
}
public static function readSerialNumber(loaderInfo:LoaderInfo):ByteArray {
const TAG_SERIAL_NUMBER:uint = 0x29;
return findAndReadTagBody(TAG_SERIAL_NUMBER, loaderInfo);
}
public static function findAndReadTagBody(theTagCode:uint,loaderInfo:LoaderInfo):ByteArray {
var li:LoaderInfo = loaderInfo;
const src:ByteArray = li.bytes;
src.position = 8;
const RECT_UB_LENGTH:uint = 5;
const RECT_SB_LENGTH:uint = src.readUnsignedByte() >> (8 - RECT_UB_LENGTH);
const RECT_LENGTH:uint = Math.ceil((RECT_UB_LENGTH + RECT_SB_LENGTH * 4) / 8);
src.position += (RECT_LENGTH - 1);
// skip FrameRate & FrameCount
src.position += 4;
while (src.bytesAvailable > 0) {
with (readTag(src, theTagCode)) {
if (tagCode == theTagCode) {
return tagBody;
}
}
}
return null;
}
private static function readTag(src:ByteArray, theTagCode:uint):Object {
src.endian = Endian.LITTLE_ENDIAN;
const tagCodeAndLength:uint = src.readUnsignedShort();
const tagCode:uint = tagCodeAndLength >> 6;
const tagLength:uint = function(): uint {
const MAX_SHORT_TAG_LENGTH:uint = 0x3F;
const shortLength:uint = tagCodeAndLength & MAX_SHORT_TAG_LENGTH;
return (shortLength == MAX_SHORT_TAG_LENGTH) ? src.readUnsignedInt() : shortLength;
}();
const tagBody:ByteArray = new ByteArray;
if (tagLength > 0) {
src.readBytes(tagBody, 0, tagLength);
}
return {tagCode: tagCode, tagBody: tagBody};
}
}
}
| 29.258065
| 113
| 0.701213
|
5d977310ae220ab92dd0da3d22c57f6c29933636
| 3,907
|
as
|
ActionScript
|
src/maryfisher/view/ui/mediator/button/SpriteButtonMediator.as
|
maryfisher/LazyAppz-UIComponents
|
f71f03f4e3333bfbae1431cabacadafe8c61d0f1
|
[
"Apache-2.0"
] | null | null | null |
src/maryfisher/view/ui/mediator/button/SpriteButtonMediator.as
|
maryfisher/LazyAppz-UIComponents
|
f71f03f4e3333bfbae1431cabacadafe8c61d0f1
|
[
"Apache-2.0"
] | null | null | null |
src/maryfisher/view/ui/mediator/button/SpriteButtonMediator.as
|
maryfisher/LazyAppz-UIComponents
|
f71f03f4e3333bfbae1431cabacadafe8c61d0f1
|
[
"Apache-2.0"
] | null | null | null |
package maryfisher.view.ui.mediator.button {
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.TouchEvent;
import flash.ui.Mouse;
import maryfisher.framework.view.IDisplayObject;
import maryfisher.view.ui.interfaces.IButtonContainer;
import maryfisher.view.ui.interfaces.IDisplayObjectContainer;
import maryfisher.view.ui.mediator.button.BaseButtonMediator;
/**
* ...
* @author mary_fisher
*/
public class SpriteButtonMediator extends BaseButtonMediator {
private var _spriteC:DisplayObjectContainer;
public function SpriteButtonMediator(container:IButtonContainer, id:String) {
_spriteC = container as DisplayObjectContainer;
super(container, id);
}
override protected function addListeners():void {
CONFIG::mouse {
addMouseListeners();
}
CONFIG::touch{
addTouchListeners();
}
}
override protected function addRightClick():void {
CONFIG::mouse{
_spriteC.addEventListener(MouseEvent.RIGHT_CLICK, onRightClick);
}
CONFIG::touch {
/** TODO
*
*/
}
}
CONFIG::touch
private function addTouchListeners():void {
//if (_hitTest) {
//_hitTest.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin, false);
//_hitTest.addEventListener(TouchEvent.TOUCH_END, onTouchEnd, false);
//return;
//}
_spriteC.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
_spriteC.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
}
CONFIG::touch
protected function onTouchEnd(e:TouchEvent):void {
onUp();
}
CONFIG::touch
protected function onTouchBegin(e:TouchEvent):void {
onDown();
}
CONFIG::mouse
private function addMouseListeners():void {
//if (_hitTest) {
//_hitTest.addEventListener(MouseEvent.ROLL_OVER, onMouseOver, false);
//_hitTest.addEventListener(MouseEvent.CLICK, onMouseUp, false);
//_hitTest.addEventListener(MouseEvent.ROLL_OUT, onMouseOut, false);
//return;
//}
_spriteC.addEventListener(MouseEvent.ROLL_OVER, onMouseOver, false);
_spriteC.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false);
_spriteC.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false);
_spriteC.addEventListener(MouseEvent.ROLL_OUT, onMouseOut, false);
}
CONFIG::mouse
private function onRightClick(e:MouseEvent):void {
onRight();
}
override protected function removeListeners():void {
CONFIG::touch {
removeTouchListeners();
}
CONFIG::mouse{
removeMouseListeners();
}
}
CONFIG::touch
private function removeTouchListeners():void {
if (!_hitTest) {
_spriteC.removeEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
_spriteC.removeEventListener(TouchEvent.TOUCH_END, onTouchEnd);
}
}
CONFIG::mouse
private function removeMouseListeners():void {
if(!_hitTest){
_spriteC.removeEventListener(MouseEvent.ROLL_OVER, onMouseOver, false);
_spriteC.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false);
_spriteC.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp, false);
_spriteC.removeEventListener(MouseEvent.ROLL_OUT, onMouseOut, false);
return;
}
}
CONFIG::mouse
protected function onMouseDown(e:MouseEvent):void {
onDown();
}
CONFIG::mouse
protected function onMouseOver(e:MouseEvent):void {
onOver();
}
CONFIG::mouse
protected function onMouseOut(e:MouseEvent):void {
onOut();
}
CONFIG::mouse
protected function onMouseUp(e:MouseEvent):void {
onUp();
}
override public function set enabled(value:Boolean):void {
super.enabled = value;
CONFIG::mouse {
(_container as Sprite).buttonMode = _enabled;
}
}
override public function set hitTest(value:IDisplayObject):void {
super.hitTest = value
_spriteC.mouseChildren = true;
_spriteC.mouseEnabled = false;;
}
}
}
| 26.760274
| 79
| 0.723573
|
48a54cbe3e18f1ace24748a48330456ff1cf7595
| 125,104
|
as
|
ActionScript
|
data/DofusInvoker/scripts/Ankama_Grimoire/ui/optionalFeatures/ForgettableSpellsUi.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 10
|
2019-11-10T21:24:38.000Z
|
2021-05-24T23:56:36.000Z
|
data/DofusInvoker/scripts/Ankama_Grimoire/ui/optionalFeatures/ForgettableSpellsUi.as
|
LucBerge/Datafus
|
6ff545662c99f5f727c5a8522da853fbbd99782a
|
[
"MIT"
] | 15
|
2021-01-27T21:41:58.000Z
|
2021-03-03T16:47:19.000Z
|
data/DofusInvoker/scripts/Ankama_Grimoire/ui/optionalFeatures/ForgettableSpellsUi.as
|
bot4dofus/Datafus
|
126838a84b0e41d5486d735aa38d78deeb8d6681
|
[
"MIT"
] | 3
|
2021-11-08T22:58:20.000Z
|
2022-02-09T22:22:33.000Z
|
package Ankama_Grimoire.ui.optionalFeatures
{
import Ankama_Cartography.Cartography;
import Ankama_ContextMenu.ContextMenu;
import Ankama_Grimoire.Grimoire;
import Ankama_Grimoire.enum.EnumTab;
import Ankama_Grimoire.ui.*;
import com.ankamagames.berilia.api.UiApi;
import com.ankamagames.berilia.components.ComboBox;
import com.ankamagames.berilia.components.Grid;
import com.ankamagames.berilia.components.Input;
import com.ankamagames.berilia.components.Label;
import com.ankamagames.berilia.components.Slot;
import com.ankamagames.berilia.components.Texture;
import com.ankamagames.berilia.components.gridRenderer.SlotGridRenderer;
import com.ankamagames.berilia.enums.StatesEnum;
import com.ankamagames.berilia.enums.UIEnum;
import com.ankamagames.berilia.types.LocationEnum;
import com.ankamagames.berilia.types.data.ContextMenuData;
import com.ankamagames.berilia.types.graphic.ButtonContainer;
import com.ankamagames.berilia.types.graphic.GraphicContainer;
import com.ankamagames.berilia.types.graphic.GraphicElement;
import com.ankamagames.berilia.types.graphic.UiRootContainer;
import com.ankamagames.berilia.utils.BeriliaHookList;
import com.ankamagames.berilia.utils.ComponentHookList;
import com.ankamagames.dofus.datacenter.optionalFeatures.CustomModeBreedSpell;
import com.ankamagames.dofus.datacenter.optionalFeatures.ForgettableSpell;
import com.ankamagames.dofus.datacenter.spells.Spell;
import com.ankamagames.dofus.datacenter.world.SubArea;
import com.ankamagames.dofus.internalDatacenter.DataEnum;
import com.ankamagames.dofus.internalDatacenter.items.BuildWrapper;
import com.ankamagames.dofus.internalDatacenter.items.ItemWrapper;
import com.ankamagames.dofus.internalDatacenter.items.ShortcutWrapper;
import com.ankamagames.dofus.internalDatacenter.spells.SpellWrapper;
import com.ankamagames.dofus.kernel.sound.enum.SoundEnum;
import com.ankamagames.dofus.kernel.sound.enum.SoundTypeEnum;
import com.ankamagames.dofus.logic.game.common.actions.CloseInventoryAction;
import com.ankamagames.dofus.logic.game.common.actions.ForgettableSpellClientAction;
import com.ankamagames.dofus.logic.game.common.actions.OpenInventoryAction;
import com.ankamagames.dofus.logic.game.common.actions.chat.ChatTextOutputAction;
import com.ankamagames.dofus.logic.game.fight.actions.GameFightSpellCastAction;
import com.ankamagames.dofus.logic.game.roleplay.actions.ShortcutBarAddRequestAction;
import com.ankamagames.dofus.logic.game.roleplay.actions.ShortcutBarRemoveRequestAction;
import com.ankamagames.dofus.logic.game.roleplay.actions.ShortcutBarSwapRequestAction;
import com.ankamagames.dofus.misc.lists.ChatHookList;
import com.ankamagames.dofus.misc.lists.CustomUiHookList;
import com.ankamagames.dofus.misc.lists.HookList;
import com.ankamagames.dofus.misc.lists.InventoryHookList;
import com.ankamagames.dofus.misc.lists.ShortcutHookListEnum;
import com.ankamagames.dofus.network.ProtocolConstantsEnum;
import com.ankamagames.dofus.network.enums.ChatActivableChannelsEnum;
import com.ankamagames.dofus.network.enums.ForgettableSpellClientActionEnum;
import com.ankamagames.dofus.network.enums.ShortcutBarEnum;
import com.ankamagames.dofus.network.types.game.data.items.ForgettableSpellItem;
import com.ankamagames.dofus.network.types.game.presets.SpellForPreset;
import com.ankamagames.dofus.uiApi.ConfigApi;
import com.ankamagames.dofus.uiApi.ContextMenuApi;
import com.ankamagames.dofus.uiApi.DataApi;
import com.ankamagames.dofus.uiApi.FightApi;
import com.ankamagames.dofus.uiApi.InventoryApi;
import com.ankamagames.dofus.uiApi.PlayedCharacterApi;
import com.ankamagames.dofus.uiApi.SoundApi;
import com.ankamagames.dofus.uiApi.StorageApi;
import com.ankamagames.dofus.uiApi.SystemApi;
import com.ankamagames.dofus.uiApi.TimeApi;
import com.ankamagames.dofus.uiApi.TooltipApi;
import com.ankamagames.dofus.uiApi.UiTutoApi;
import com.ankamagames.dofus.uiApi.UtilApi;
import flash.display.DisplayObject;
import flash.events.Event;
import flash.ui.Keyboard;
import flash.utils.Dictionary;
import mapTools.Point;
public class ForgettableSpellsUi
{
public static const MAX_ACTIVE_SPELLS_PAGES:uint = 5;
public static const ACTIVE_SPELLS_BY_PAGE_NUMBER:uint = 20;
public static const TOOLTIP_UI_NAME:String = "ForgettableSpellsUITooltip";
public static const SPELL_TOOLTIP_UI_NAME:String = "spellBanner";
private static const OBTAINING_ICONS_MAP:Object = {
"spellIsDroppable":"icon_monster",
"spellIsCraftable":"icon_hammer",
"spellIsInQuest":"icon_exclamation",
"spellIsUnknown":"icon_interrogation"
};
private static const BTN_HELP_OFFSET:int = -30;
private static const STORAGE_STATE_MOD:String = "forgettableSpellsUi";
private static const STORAGE_MIN_SPELL_LEVEL_FILTER:String = "forgettableSpellsUiMinSpellLevelFilter";
private static const STORAGE_MAX_SPELL_LEVEL_FILTER:String = "forgettableSpellsUiMaxSpellLevelFilter";
private static const STORAGE_LEARNED_SPELLS_LEVEL_FILTER:String = "forgettableSpellsUiLearnedSpellsLevelFilter";
private static const STORAGE_IS_SPELL_NAME_SORT_ASCENDING_TYPE:String = "forgettableSpellsUiIsSpellNameSortAscendingType";
private static const STORAGE_IS_SPELL_LEVEL_SORT_ASCENDING_TYPE:String = "forgettableSpellsUiIsSpellLevelSortAscendingType";
private static const STORAGE_SPELL_SORT:String = "forgettableSpellsUiSpellSort";
private static const STORAGE_IS_FIRST_TIME:String = "forgettableSpellsUiIsFirstTime";
private static const STORAGE_HAS_COMMON_SPELLS_TAB_BEEN_OPENED_ONCE:String = "forgettableSpellsUiHasCommonSpellsTabBeenOpenedOnce";
private static const FORGETTABLE_SPELLS_TAB_NAME:String = "btn_forgettableSpells";
private static const COMMON_SPELLS_TAB_NAME:String = "btn_commonSpells";
private static const FINISH_MOVES_TAB_NAME:String = "btn_finishMoves";
private static const FINISH_MOVES_UI_NAME:String = "ForgettableSpellsUIFinishMoves";
private static const OBTAINING_ICONS_NUMBER:uint = 4;
private static const STORAGE_CONSUMABLES_VIEW:String = "storageConsumables";
private static const DISABLED_SHARE_FORGETTABLE_SPELLS_CONTAINER_ALPHA:Number = 0.2;
private static const MAX_OBTAINING_LEVELS:int = 6;
private static const SCROLL_MAGIC_WORKSHOP_POSITION:Point = new Point(-4,-24);
private static const DEFAULT_MIN_SPELL_LEVEL_FILTER:uint = 0;
private static const DEFAULT_MAX_SPELL_LEVEL_FILTER:uint = 200;
private static const DEFAULT_SPELL_NAME_SORT_TYPE:Boolean = true;
private static const DEFAULT_SPELL_LEVEL_SORT_TYPE:Boolean = true;
private static const SPELL_NAME_SORT_TYPE:String = "sortSpellsByName";
private static const SPELL_LEVEL_SORT_TYPE:String = "sortSpellsByLevel";
private static const DEFAULT_SPELL_SORT:String = SPELL_LEVEL_SORT_TYPE;
private static const LEARNED_SPELLS_FILTER_ALL:uint = 0;
private static const LEARNED_SPELLS_FILTER_LEARNED:uint = 1;
private static const LEARNED_SPELLS_FILTER_UNLEARNED:uint = 2;
private static const DEFAULT_LEARNED_SPELLS_FILTER:uint = LEARNED_SPELLS_FILTER_ALL;
private static const SPELL_FAMILY_FORGETTABLE:String = "forgettableSpell";
private static const SPELL_FAMILY_COMMON:String = "commonSpell";
private static const PASSIVE_SPELL_PRIORITY:int = 0;
private static const ACTIVE_SPELL_PRIORITY:int = 1;
private static const WEAPON_SPELL_PRIORITY:int = 2;
private static const SPECIAL_SPELL_PRIORITY:int = 3;
private static const FROM_ACTIVE_SPELLS:uint = 0;
private static const FROM_FORGETTABLE_SPELLS:uint = 1;
private static const FROM_COMMON_SPELLS:uint = 2;
private static const UNKNOWN_OBTAINING:uint = 1000;
private static const OBTAINING_SPELL_IS_DROPPABLE:String = "spellIsDroppable";
private static const OBTAINING_SPELL_IS_CRAFTABLE:String = "spellIsCraftable";
private static const OBTAINING_SPELL_IS_IN_QUEST:String = "spellIsInQuest";
private static const OBTAINING_SPELL_IS_UNKNOWN:String = "spellIsUnknown";
[Api(name="DataApi")]
public var dataApi:DataApi;
[Api(name="InventoryApi")]
public var inventoryApi:InventoryApi;
[Api(name="UiTutoApi")]
public var hintsApi:UiTutoApi;
[Api(name="ContextMenuApi")]
public var menuApi:ContextMenuApi;
[Api(name="FightApi")]
public var fightApi:FightApi;
[Api(name="PlayedCharacterApi")]
public var playedCharacterApi:PlayedCharacterApi;
[Api(name="SoundApi")]
public var soundApi:SoundApi;
[Api(name="StorageApi")]
public var storageApi:StorageApi;
[Api(name="SystemApi")]
public var systemApi:SystemApi;
[Api(name="ConfigApi")]
public var configApi:ConfigApi;
[Api(name="TimeApi")]
public var timeApi:TimeApi;
[Api(name="TooltipApi")]
public var tooltipApi:TooltipApi;
[Api(name="UiApi")]
public var uiApi:UiApi;
[Api(name="UtilApi")]
public var utilApi:UtilApi;
[Module(name="Ankama_Cartography")]
public var ankamaCartography:Cartography;
[Module(name="Ankama_ContextMenu")]
public var ankamaContextMenu:ContextMenu;
private var _currentTabName:String = null;
private var _currentActiveSpellsIndex:Number = 0;
private var _finishMovesUi:UiRootContainer = null;
private var _cartographyPopup:String;
private var _isFirstTime:Boolean = true;
private var _hasCommonSpellsTabBeenOpenedOnce:Boolean = false;
private var _playerLevel:int;
private var _activeSpellIds:Array;
private var _activeSpells:Array = null;
private var _forgettableSpells:Array;
private var _filteredForgettableSpells:Array = null;
private var _equippedForgettableSpells:Array = null;
private var _commonSpells:Array;
private var _filteredCommonSpells:Array = null;
private var _commonSpellPriorities:Object = null;
private var _obtainingFiltersDescr:Object;
private var _currentSearchText:String = "";
private var _currentSpellLevelFilterMinLevel:uint = 0;
private var _currentSpellLevelFilterMaxLevel:uint = 200;
private var _isSpellLevelFilterReady:Boolean = true;
private var _searchSpellText:String = null;
private var _isSearchInputFilled:Boolean = false;
private var _isSearchInputReady:Boolean = false;
private var _isSearchPlaceholderReset:Boolean = false;
private var _isSpellNameSortAscendingType:Boolean = true;
private var _isSpellLevelSortAscendingType:Boolean = true;
private var _currentLearnedSpellsFilter:uint = 0;
private var _currentSort:String = "sortSpellsByLevel";
private var _areActiveSpellsAlterable:Boolean = true;
private var _isAltDown:Boolean = false;
private var _hasProcessedDrop:Boolean = false;
private var _componentsDictionary:Dictionary;
private var _weaponSpellType:String = null;
private var _specialSpellType:String = null;
private var _passiveSpellType:String = null;
private var _activeSpellType:String = null;
private var _learnedForgettableSpellsCount:uint = 0;
private var _forgettableSpellsCount:uint = 0;
public var btn_help:ButtonContainer;
public var btn_forgettableSpells:ButtonContainer;
public var btn_commonSpells:ButtonContainer;
public var btn_shareForgettableSpells:ButtonContainer;
public var btn_finishMoves:ButtonContainer;
public var btn_previousActiveSpells:ButtonContainer;
public var btn_nextActiveSpells:ButtonContainer;
public var btn_clearSearchText:ButtonContainer;
public var btn_spellIsDroppable:ButtonContainer;
public var btn_spellIsCraftable:ButtonContainer;
public var btn_spellIsUnknown:ButtonContainer;
public var btn_sortForgettableSpellsByName:ButtonContainer;
public var btn_sortCommonSpellsByName:ButtonContainer;
public var btn_sortForgettableSpellsByLevel:ButtonContainer;
public var btn_saveAsASpellSet:ButtonContainer;
public var btn_seeMySpellSets:ButtonContainer;
public var cbx_learningSpellsFilter:ComboBox;
public var mainCtr:GraphicContainer;
public var ctr_activeSpellsButtons:GraphicContainer;
public var ctr_forgettableSpells:GraphicContainer;
public var ctr_commonSpells:GraphicContainer;
public var ctr_finishMoves:GraphicContainer;
public var ctr_obtainingFilters:GraphicContainer;
public var ctr_topFilters:GraphicContainer;
public var ctr_shareForgettableSpells:GraphicContainer;
public var inp_spellLevelSearch:Input;
public var inp_minSpellLevel:Input;
public var inp_maxSpellLevel:Input;
public var gd_activeSpells:Grid;
public var gd_forgettableSpells:Grid;
public var gd_commonSpells:Grid;
public var lbl_currentActiveSpellsIndex:Label;
public var lbl_forgettableSpellsNameHeader:Label;
public var lbl_commonSpellsNameHeader:Label;
public var lbl_forgettableSpellsLevelHeader:Label;
public var lbl_commonSpellsLevelHeader:Label;
public var lbl_shareForgettableSpells:Label;
public var lbl_spellLevelFilterFrom:Label;
public var lbl_spellLevelFilterTo:Label;
public var lbl_forgettableIsSpellEquippedHeader:Label;
public var lbl_learnedSpells:Label;
public var tx_spellIsDroppable:Texture;
public var tx_spellIsCraftable:Texture;
public var tx_spellIsUnknown:Texture;
public var tx_sortForgettableSpellsByNameAscending:Texture;
public var tx_sortForgettableSpellsByNameDescending:Texture;
public var tx_sortCommonSpellsByNameDescending:Texture;
public var tx_sortCommonSpellsByNameAscending:Texture;
public var tx_sortForgettableSpellsByLevelAscending:Texture;
public var tx_sortForgettableSpellsByLevelDescending:Texture;
public var tx_commonSpellsWarning:Texture;
public var tx_shareForgettableSpells:Texture;
public function ForgettableSpellsUi()
{
this._activeSpellIds = [];
this._obtainingFiltersDescr = {};
this._componentsDictionary = new Dictionary(true);
super();
}
private static function fitCenteredSortableLabelHeader(label:Label) : void
{
var currentWidth:Number = label.width;
label.fullWidth();
label.x += (currentWidth - label.width) / 2;
}
public function set currentTabName(currentTabName:String) : void
{
this._currentTabName = currentTabName;
this.updateCurrentTab();
}
public function get currentTabName() : String
{
return this._currentTabName;
}
public function set currentActiveSpellsIndex(currentActiveSpellsIndex:Number) : void
{
this._currentActiveSpellsIndex = currentActiveSpellsIndex % MAX_ACTIVE_SPELLS_PAGES;
if(this._currentActiveSpellsIndex < 0)
{
this._currentActiveSpellsIndex += MAX_ACTIVE_SPELLS_PAGES;
}
this.updateCurrentActiveSpells();
}
private function canForgettableSpellsBeAdded() : Boolean
{
var maxForgettableSpellsNumber:int = this.playedCharacterApi.getPlayerMaxForgettableSpellsNumber();
return maxForgettableSpellsNumber < 0 || this._equippedForgettableSpells.length < maxForgettableSpellsNumber;
}
private function set currentFilteredSpells(filteredSpells:Array) : void
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this._filteredForgettableSpells = filteredSpells;
}
else if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
this._filteredCommonSpells = filteredSpells;
}
}
private function get currentFilteredSpells() : Array
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
if(this._filteredForgettableSpells === null)
{
this._filteredForgettableSpells = this._forgettableSpells.concat();
}
return this._filteredForgettableSpells;
}
if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
if(this._filteredCommonSpells === null)
{
this._filteredCommonSpells = this._commonSpells.concat();
}
return this._filteredCommonSpells;
}
return null;
}
private function set currentSpells(currentSpells:Array) : void
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this._forgettableSpells = currentSpells;
}
else if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
this._commonSpells = currentSpells;
}
}
private function get currentSpells() : Array
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
return this._forgettableSpells;
}
if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
return this._commonSpells;
}
return null;
}
private function get currentSpellGrid() : Grid
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
return this.gd_forgettableSpells;
}
if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
return this.gd_commonSpells;
}
return null;
}
private function get defaultMinSpellLevelFilter() : uint
{
var toReturn:Number = Number(this.systemApi.getData(STORAGE_MIN_SPELL_LEVEL_FILTER));
if(isNaN(toReturn) || toReturn < uint.MIN_VALUE || toReturn > uint.MAX_VALUE)
{
return DEFAULT_MIN_SPELL_LEVEL_FILTER;
}
return toReturn;
}
private function get defaultMaxSpellLevelFilter() : uint
{
var toReturn:Number = Number(this.systemApi.getData(STORAGE_MAX_SPELL_LEVEL_FILTER));
if(isNaN(toReturn) || toReturn < uint.MIN_VALUE || toReturn > uint.MAX_VALUE)
{
return DEFAULT_MAX_SPELL_LEVEL_FILTER;
}
return toReturn;
}
private function get defaultIsSpellNameSortAscendingType() : Boolean
{
var rawValue:* = this.systemApi.getData(STORAGE_IS_SPELL_NAME_SORT_ASCENDING_TYPE);
if(rawValue === null || !(rawValue is Boolean))
{
return DEFAULT_SPELL_NAME_SORT_TYPE;
}
return Boolean(rawValue);
}
private function get defaultIsSpellLevelSortAscendingType() : Boolean
{
var rawValue:* = this.systemApi.getData(STORAGE_IS_SPELL_LEVEL_SORT_ASCENDING_TYPE);
if(rawValue === null || !(rawValue is Boolean))
{
return DEFAULT_SPELL_LEVEL_SORT_TYPE;
}
return Boolean(rawValue);
}
private function get defaultSpellSort() : String
{
var spellSort:String = this.systemApi.getData(STORAGE_SPELL_SORT);
if(spellSort === null)
{
return DEFAULT_SPELL_SORT;
}
return spellSort;
}
private function get defaultLearnedSpellFilter() : uint
{
var toReturn:Number = Number(this.systemApi.getData(STORAGE_LEARNED_SPELLS_LEVEL_FILTER));
if(isNaN(toReturn) || toReturn !== LEARNED_SPELLS_FILTER_ALL && toReturn !== LEARNED_SPELLS_FILTER_LEARNED && toReturn !== LEARNED_SPELLS_FILTER_UNLEARNED)
{
return DEFAULT_LEARNED_SPELLS_FILTER;
}
return toReturn;
}
public function main(paramsObject:Object = null) : void
{
this.systemApi.addHook(BeriliaHookList.DropEnd,this.onActiveSpellDropEnd);
this.systemApi.addHook(BeriliaHookList.DropStart,this.onActiveSpellDropStart);
this.systemApi.addHook(CustomUiHookList.SpellMovementAllowed,this.onAreActiveSpellsAlterable);
this.systemApi.addHook(BeriliaHookList.KeyDown,this.onKeyDown);
this.systemApi.addHook(BeriliaHookList.KeyUp,this.onKeyUp);
this.systemApi.addHook(InventoryHookList.ShortcutBarViewContent,this.onShortcutBarViewContent);
this.systemApi.addHook(HookList.ForgettableSpellListUpdate,this.onForgettableSpells);
this.systemApi.addHook(HookList.ForgettableSpellDelete,this.onForgettableSpells);
this.systemApi.addHook(HookList.ForgettableSpellEquipmentSlots,this.onForgettableSpells);
this.systemApi.addHook(HookList.ForgettableSpellPresetSaved,this.onForgettableSpellPresetSaved);
this.systemApi.addHook(BeriliaHookList.UiLoaded,this.onUiLoaded);
this.systemApi.addHook(InventoryHookList.PresetsUpdate,this.onPresetsUpdate);
this.systemApi.addHook(InventoryHookList.PresetError,this.onPresetError);
this.uiApi.addComponentHook(this.mainCtr,ComponentHookList.ON_RELEASE);
this.uiApi.addComponentHook(this.gd_activeSpells,ComponentHookList.ON_ITEM_ROLL_OVER);
this.uiApi.addComponentHook(this.gd_activeSpells,ComponentHookList.ON_ITEM_ROLL_OUT);
this.uiApi.addComponentHook(this.gd_activeSpells,ComponentHookList.ON_WHEEL);
this.uiApi.addComponentHook(this.gd_activeSpells,ComponentHookList.ON_PRESS);
this.uiApi.addComponentHook(this.ctr_activeSpellsButtons,ComponentHookList.ON_WHEEL);
this.uiApi.addComponentHook(this.gd_forgettableSpells,ComponentHookList.ON_SELECT_ITEM);
this.uiApi.addComponentHook(this.inp_spellLevelSearch,ComponentHookList.ON_RELEASE);
this.uiApi.addComponentHook(this.inp_spellLevelSearch,ComponentHookList.ON_CHANGE);
this.uiApi.addComponentHook(this.btn_clearSearchText,ComponentHookList.ON_RELEASE);
this.uiApi.addComponentHook(this.btn_spellIsDroppable,ComponentHookList.ON_RELEASE);
this.uiApi.addComponentHook(this.btn_spellIsCraftable,ComponentHookList.ON_RELEASE);
this.uiApi.addComponentHook(this.btn_spellIsDroppable,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(this.btn_spellIsDroppable,ComponentHookList.ON_ROLL_OUT);
this.uiApi.addComponentHook(this.btn_spellIsCraftable,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(this.btn_spellIsCraftable,ComponentHookList.ON_ROLL_OUT);
this.uiApi.addComponentHook(this.btn_spellIsUnknown,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(this.btn_spellIsUnknown,ComponentHookList.ON_ROLL_OUT);
this.uiApi.addComponentHook(this.cbx_learningSpellsFilter,ComponentHookList.ON_SELECT_ITEM);
this.uiApi.addComponentHook(this.inp_minSpellLevel,ComponentHookList.ON_CHANGE);
this.uiApi.addComponentHook(this.inp_maxSpellLevel,ComponentHookList.ON_CHANGE);
this.uiApi.addShortcutHook(ShortcutHookListEnum.CLOSE_UI,this.onShortcut);
this.uiApi.addComponentHook(this.btn_help,ComponentHookList.ON_RELEASE);
this.btn_forgettableSpells.soundId = SoundEnum.TAB;
this.btn_commonSpells.soundId = SoundEnum.TAB;
this.btn_finishMoves.soundId = SoundEnum.TAB;
this.soundApi.playSound(SoundTypeEnum.GRIMOIRE_OPEN);
this._playerLevel = this.playedCharacterApi.getPlayedCharacterInfo().level;
this._weaponSpellType = this.uiApi.getText("ui.temporis.weaponSpell");
this._specialSpellType = this.uiApi.getText("ui.temporis.specialSpell");
this._passiveSpellType = this.uiApi.getText("ui.temporis.passiveSpell");
this._activeSpellType = this.uiApi.getText("ui.temporis.activeSpell");
this._commonSpellPriorities = {};
this._commonSpellPriorities[this._weaponSpellType] = WEAPON_SPELL_PRIORITY;
this._commonSpellPriorities[this._specialSpellType] = SPECIAL_SPELL_PRIORITY;
this._commonSpellPriorities[this._passiveSpellType] = PASSIVE_SPELL_PRIORITY;
this._commonSpellPriorities[this._activeSpellType] = ACTIVE_SPELL_PRIORITY;
this.lbl_shareForgettableSpells.fullWidth();
this.lbl_spellLevelFilterFrom.fullWidth();
this.lbl_spellLevelFilterTo.fullWidth();
this.fitSortableLabelHeaders();
this._searchSpellText = this.uiApi.getText("ui.temporis.searchSpell");
this.inp_spellLevelSearch.text = this._searchSpellText;
this.gd_activeSpells.autoSelectMode = 0;
(this.gd_activeSpells.renderer as SlotGridRenderer).processDropFunction = this.processActiveSpellDrop;
(this.gd_activeSpells.renderer as SlotGridRenderer).dropValidatorFunction = this.activeSpellDropValidator;
(this.gd_activeSpells.renderer as SlotGridRenderer).allowDrop = this._areActiveSpellsAlterable;
this.cbx_learningSpellsFilter.dataProvider = [this.uiApi.getText("ui.temporis.displayAllSpells"),this.uiApi.getText("ui.temporis.displayLearnedSpells"),this.uiApi.getText("ui.temporis.displayUnlearnedSpells")];
this._currentLearnedSpellsFilter = this.defaultLearnedSpellFilter;
this.cbx_learningSpellsFilter.selectedIndex = this._currentLearnedSpellsFilter;
(this.gd_activeSpells.renderer as SlotGridRenderer).removeDropSourceFunction = function(target:Object):void
{
};
this._currentSpellLevelFilterMinLevel = this.defaultMinSpellLevelFilter;
this._currentSpellLevelFilterMaxLevel = this.defaultMaxSpellLevelFilter;
this._isSpellNameSortAscendingType = this.defaultIsSpellNameSortAscendingType;
this._isSpellLevelSortAscendingType = this.defaultIsSpellLevelSortAscendingType;
this._currentSort = this.defaultSpellSort;
this.currentActiveSpellsIndex = 0;
this.loadActiveSpells();
this.resetFilters();
this.currentTabName = FORGETTABLE_SPELLS_TAB_NAME;
this.gd_forgettableSpells.mouseClickEnabled = false;
this.gd_commonSpells.mouseClickEnabled = false;
this.systemApi.sendAction(new OpenInventoryAction([STORAGE_STATE_MOD,UIEnum.INVENTORY_UI]));
var isFirstTimeTmp:* = this.systemApi.getData(STORAGE_IS_FIRST_TIME);
if(isFirstTimeTmp !== null && isFirstTimeTmp is Boolean)
{
this._isFirstTime = Boolean(isFirstTimeTmp);
}
else
{
this.systemApi.setData(STORAGE_IS_FIRST_TIME,this._isFirstTime);
}
if(this._isFirstTime)
{
this.uiApi.loadUi(UIEnum.FORGETTABLE_SPELLS_INTRO_POP_UP,UIEnum.FORGETTABLE_SPELLS_INTRO_POP_UP,[this.validateFirstTime]);
}
var hasCommonSpellsTabBeenOpenedOnceTmp:* = this.systemApi.getData(STORAGE_HAS_COMMON_SPELLS_TAB_BEEN_OPENED_ONCE);
if(hasCommonSpellsTabBeenOpenedOnceTmp !== null && hasCommonSpellsTabBeenOpenedOnceTmp is Boolean)
{
this._hasCommonSpellsTabBeenOpenedOnce = Boolean(hasCommonSpellsTabBeenOpenedOnceTmp);
}
else
{
this.systemApi.setData(STORAGE_HAS_COMMON_SPELLS_TAB_BEEN_OPENED_ONCE,this._hasCommonSpellsTabBeenOpenedOnce);
}
this.tx_commonSpellsWarning.visible = !this._hasCommonSpellsTabBeenOpenedOnce;
var btn_helpGraphicElement:GraphicElement = this.uiApi.me().getElementById(this.btn_help.name);
if(btn_helpGraphicElement !== null && btn_helpGraphicElement.location !== null)
{
btn_helpGraphicElement.location.setOffsetX(BTN_HELP_OFFSET);
}
if(paramsObject !== null && paramsObject.hasOwnProperty("isSpellSetsUi"))
{
this.getSpellSets();
}
this.setSaveSpellSetButton();
}
public function unload() : void
{
this.uiApi.hideTooltip(TOOLTIP_UI_NAME);
this.uiApi.hideTooltip(SPELL_TOOLTIP_UI_NAME);
this.uiApi.unloadUi(FINISH_MOVES_UI_NAME);
this.uiApi.unloadUi(UIEnum.FORGETTABLE_SPELLS_INTRO_POP_UP);
this.uiApi.unloadUi(this._cartographyPopup);
this.uiApi.unloadUi(UIEnum.FORGETTABLE_SPELL_SETS_UI);
this.uiApi.unloadUi(UIEnum.FORGETTABLE_SPELL_SET_POP_UP);
this.systemApi.sendAction(new CloseInventoryAction([UIEnum.INVENTORY_UI]));
this.soundApi.playSound(SoundTypeEnum.CLOSE_WINDOW);
}
public function updateForgettableSpellLine(spellDescr:Object, components:*, isSelected:Boolean) : void
{
var currentObtainingIconName:String = null;
var currentObtainingTexture:Texture = null;
var currentObtainingIconDescr:Object = null;
var obtainingKey:* = null;
this.uiApi.removeComponentHook(components.btn_forgettableSpellLine,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_forgettableSpellLine,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_forgettableSpellLine,ComponentHookList.ON_DOUBLE_CLICK);
this.uiApi.removeComponentHook(components.tx_obtaining_0,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.tx_obtaining_0,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.tx_obtaining_1,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.tx_obtaining_1,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.tx_obtaining_2,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.tx_obtaining_2,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.tx_obtaining_3,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.tx_obtaining_3,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.tx_findForgettableSpellScroll,ComponentHookList.ON_RELEASE);
this.uiApi.removeComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_RELEASE);
this.uiApi.removeComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.slot_forgettableSpell,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.slot_forgettableSpell,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.slot_forgettableSpell,ComponentHookList.ON_DOUBLE_CLICK);
if(spellDescr === null)
{
components.slot_forgettableSpell.visible = false;
components.tx_isSelectedForgettableSpell.visible = false;
components.ctr_obtaining.visible = false;
components.lbl_forgettableSpellName.visible = false;
components.lbl_forgettableSpellLevel.visible = false;
components.tx_findForgettableSpellScroll.visible = false;
components.btn_getForgettableSpellScroll.visible = false;
components.slot_forgettableSpell.allowDrag = false;
components.tx_findForgettableSpellScroll.visible = false;
components.btn_forgettableSpellLine.state = StatesEnum.STATE_NORMAL;
components.btn_forgettableSpellLine.handCursor = false;
return;
}
this.uiApi.addComponentHook(components.btn_forgettableSpellLine,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(components.btn_forgettableSpellLine,ComponentHookList.ON_ROLL_OUT);
this._componentsDictionary[components.slot_forgettableSpell.name] = spellDescr.isSpellActive;
this._componentsDictionary[components.btn_forgettableSpellLine.name] = spellDescr;
components.btn_forgettableSpellLine.state = StatesEnum.STATE_NORMAL;
components.tx_isSelectedForgettableSpell.visible = spellDescr.isSpellActive;
components.slot_forgettableSpell.visible = true;
components.slot_forgettableSpell.allowDrag = spellDescr.isKnown;
components.slot_forgettableSpell.data = spellDescr.spellWrapper;
components.slot_forgettableSpell.greyedOut = !spellDescr.isKnown;
this._componentsDictionary[components.slot_forgettableSpell.name] = spellDescr;
this.uiApi.addComponentHook(components.slot_forgettableSpell,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(components.slot_forgettableSpell,ComponentHookList.ON_ROLL_OUT);
var obtainingDescr:Object = spellDescr.obtainingDescr;
var index:uint = 0;
components.ctr_obtaining.visible = true;
for(obtainingKey in obtainingDescr)
{
if(obtainingDescr.hasOwnProperty(obtainingKey))
{
currentObtainingIconDescr = obtainingDescr[obtainingKey];
currentObtainingIconName = "tx_obtaining_" + index;
currentObtainingTexture = null;
if(components.hasOwnProperty(currentObtainingIconName) && components[currentObtainingIconName] is Texture)
{
currentObtainingTexture = components[currentObtainingIconName] as Texture;
}
if(!(currentObtainingTexture === null || !currentObtainingIconDescr.hasOwnProperty("iconGreyPath")))
{
currentObtainingTexture.uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + currentObtainingIconDescr.iconGreyPath);
currentObtainingTexture.visible = true;
if(obtainingKey === OBTAINING_SPELL_IS_DROPPABLE || obtainingKey === OBTAINING_SPELL_IS_CRAFTABLE)
{
this.uiApi.addComponentHook(currentObtainingTexture,ComponentHookList.ON_RELEASE);
currentObtainingTexture.handCursor = true;
}
else
{
currentObtainingTexture.handCursor = false;
}
this._componentsDictionary[components[currentObtainingIconName].name] = currentObtainingIconDescr;
this.uiApi.addComponentHook(currentObtainingTexture,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(currentObtainingTexture,ComponentHookList.ON_ROLL_OUT);
index++;
}
}
}
if(index > 0)
{
while(index < OBTAINING_ICONS_NUMBER)
{
currentObtainingIconName = "tx_obtaining_" + index;
currentObtainingTexture = null;
if(components.hasOwnProperty(currentObtainingIconName) && components[currentObtainingIconName] is Texture)
{
currentObtainingTexture = components[currentObtainingIconName] as Texture;
}
if(currentObtainingTexture !== null)
{
currentObtainingTexture.visible = false;
index++;
}
}
}
else
{
components.ctr_obtaining.visible = false;
}
components.lbl_forgettableSpellName.visible = true;
components.lbl_forgettableSpellName.text = spellDescr.spellName;
components.lbl_forgettableSpellLevel.visible = true;
components.lbl_forgettableSpellLevel.text = spellDescr.spellLevel;
if(spellDescr.isKnown)
{
components.btn_getForgettableSpellScroll.visible = true;
components.tx_findForgettableSpellScroll.visible = false;
this.uiApi.addComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_RELEASE);
this.uiApi.addComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_ROLL_OUT);
this.uiApi.addComponentHook(components.btn_getForgettableSpellScroll,ComponentHookList.ON_RELEASE);
this._componentsDictionary[components.btn_getForgettableSpellScroll.name] = spellDescr;
this.uiApi.addComponentHook(components.slot_forgettableSpell,ComponentHookList.ON_DOUBLE_CLICK);
this._componentsDictionary[components.slot_forgettableSpell.name] = spellDescr;
this.uiApi.addComponentHook(components.btn_forgettableSpellLine,ComponentHookList.ON_DOUBLE_CLICK);
}
else
{
components.btn_getForgettableSpellScroll.visible = false;
if(this.isSpellScrollAvailable(spellDescr.scrollId))
{
components.tx_findForgettableSpellScroll.visible = true;
this.uiApi.addComponentHook(components.tx_findForgettableSpellScroll,ComponentHookList.ON_RELEASE);
this._componentsDictionary[components.tx_findForgettableSpellScroll.name] = spellDescr;
}
else
{
components.tx_findForgettableSpellScroll.visible = false;
}
}
}
public function updateCommonSpellLine(spellDescr:Object, components:*, isSelected:Boolean) : void
{
var currentObtainingLevelDescr:Object = null;
var index:uint = 0;
var currentObtainingButtonIndex:uint = 0;
var minX:uint = 0;
var currentObtainingButton:ButtonContainer = null;
var currentObtainingLabel:Label = null;
var currentObtainingTexture:Texture = null;
var maxX:uint = 0;
var containerWidth:int = 0;
var tooltipTarget:Texture = null;
this.uiApi.removeComponentHook(components.btn_commonSpellLine,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_commonSpellLine,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_commonSpellLine,ComponentHookList.ON_DOUBLE_CLICK);
this.uiApi.removeComponentHook(components.slot_commonSpell,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.slot_commonSpell,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.slot_commonSpell,ComponentHookList.ON_DOUBLE_CLICK);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_1,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_1,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_2,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_2,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_3,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_3,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_4,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_4,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_5,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_5,ComponentHookList.ON_ROLL_OUT);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_6,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(components.btn_obtainingLevel_6,ComponentHookList.ON_ROLL_OUT);
if(spellDescr === null)
{
components.slot_commonSpell.visible = false;
components.tx_isSelectedCommonSpell.visible = false;
components.lbl_commonSpellName.visible = false;
components.slot_commonSpell.allowDrag = false;
components.tx_commonSpellNotKnown.visible = false;
components.lbl_commonSpellType.visible = false;
components.btn_commonSpellLine.state = StatesEnum.STATE_NORMAL;
components.ctr_obtainingLevels.visible = false;
components.tx_passiveCommonSpellBackground.visible = false;
components.btn_commonSpellLine.handCursor = false;
return;
}
this.uiApi.addComponentHook(components.btn_commonSpellLine,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(components.btn_commonSpellLine,ComponentHookList.ON_ROLL_OUT);
this._componentsDictionary[components.btn_commonSpellLine.name] = spellDescr.isSpellActive;
components.tx_commonSpellNotKnown.visible = !spellDescr.isKnown;
if(spellDescr.isKnown)
{
this.uiApi.addComponentHook(components.btn_commonSpellLine,ComponentHookList.ON_DOUBLE_CLICK);
this._componentsDictionary[components.btn_commonSpellLine.name] = spellDescr;
this.uiApi.addComponentHook(components.slot_commonSpell,ComponentHookList.ON_DOUBLE_CLICK);
this._componentsDictionary[components.slot_commonSpell.name] = spellDescr;
}
if(spellDescr.obtainingLevels !== null && spellDescr.obtainingLevels.length > 0)
{
currentObtainingLevelDescr = null;
currentObtainingButtonIndex = 0;
minX = components.tx_obtainingLevel_0.x;
currentObtainingButton = null;
currentObtainingLabel = null;
currentObtainingTexture = null;
for(index = 0; index < spellDescr.obtainingLevels.length; index++)
{
currentObtainingLevelDescr = spellDescr.obtainingLevels[index];
if(currentObtainingLevelDescr !== null)
{
if(currentObtainingLevelDescr !== null)
{
currentObtainingButton = components["btn_obtainingLevel_" + currentObtainingButtonIndex];
currentObtainingLabel = components["lbl_obtainingLevel_" + currentObtainingButtonIndex];
currentObtainingTexture = components["tx_obtainingLevel_" + currentObtainingButtonIndex];
if(currentObtainingButton !== null && currentObtainingLabel !== null && currentObtainingTexture !== null)
{
this.uiApi.addComponentHook(currentObtainingButton,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(currentObtainingButton,ComponentHookList.ON_ROLL_OUT);
this._componentsDictionary[currentObtainingButton.name] = {"data":currentObtainingLevelDescr};
currentObtainingButton.visible = true;
if(currentObtainingLevelDescr.spellLevel > 0)
{
currentObtainingLabel.text = currentObtainingLevelDescr.spellLevel;
}
else
{
currentObtainingLabel.text = "-";
}
if(currentObtainingLevelDescr.isKnown)
{
currentObtainingLabel.cssClass = "orangecenterbold";
}
else
{
currentObtainingLabel.cssClass = "center";
}
currentObtainingButtonIndex++;
}
}
}
}
maxX = currentObtainingTexture.x + currentObtainingTexture.width;
containerWidth = maxX - minX;
components.ctr_obtainingLevels.x = this.lbl_commonSpellsLevelHeader.x + this.lbl_commonSpellsLevelHeader.width / 2 - containerWidth / 2;
tooltipTarget = currentObtainingTexture;
for(index = 0; index < MAX_OBTAINING_LEVELS; index++)
{
currentObtainingButton = components["btn_obtainingLevel_" + index];
if(currentObtainingButton !== null)
{
if(index < currentObtainingButtonIndex)
{
this._componentsDictionary[currentObtainingButton.name].target = tooltipTarget;
}
else
{
currentObtainingButton.visible = false;
}
}
}
}
else
{
components.ctr_obtainingLevels.visible = false;
}
var isCommonSpellPassive:* = spellDescr.spellType === this._passiveSpellType;
components.btn_commonSpellLine.state = StatesEnum.STATE_NORMAL;
components.btn_commonSpellLine.handCursor = !isCommonSpellPassive;
components.slot_commonSpell.handCursor = !isCommonSpellPassive;
components.tx_isSelectedCommonSpell.visible = spellDescr.isSpellActive;
components.slot_commonSpell.visible = true;
components.slot_commonSpell.allowDrag = spellDescr.isKnown && !isCommonSpellPassive;
components.slot_commonSpell.data = spellDescr.spellWrapper;
components.slot_commonSpell.greyedOut = !spellDescr.isKnown;
components.tx_passiveCommonSpellBackground.visible = isCommonSpellPassive;
this._componentsDictionary[components.slot_commonSpell.name] = spellDescr;
this.uiApi.addComponentHook(components.slot_commonSpell,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(components.slot_commonSpell,ComponentHookList.ON_ROLL_OUT);
components.lbl_commonSpellName.visible = true;
components.lbl_commonSpellName.text = spellDescr.spellName;
components.lbl_commonSpellType.visible = true;
components.lbl_commonSpellType.text = spellDescr.spellType;
}
private function setSaveSpellSetButton() : void
{
this.btn_saveAsASpellSet.disabled = this.inventoryApi.getBuildNumber(2) >= ProtocolConstantsEnum.MAX_PRESET_COUNT;
}
private function getSpellSetsWithSpell(spellId:int) : Array
{
var item:Object = null;
var index:uint = 0;
var builds:Array = this.inventoryApi.getBuilds(2);
var currentBuildWrapper:BuildWrapper = null;
var currentSpellsForPreset:Vector.<SpellForPreset> = null;
var spellSets:Array = [];
for each(item in builds)
{
if(item is BuildWrapper)
{
currentBuildWrapper = item as BuildWrapper;
currentSpellsForPreset = currentBuildWrapper.forgettableSpellsPreset.forgettableSpells;
if(currentSpellsForPreset !== null)
{
for(index = 0; index < currentSpellsForPreset.length; index++)
{
if(currentSpellsForPreset[index].spellId === spellId)
{
spellSets.push({
"label":currentBuildWrapper.buildName,
"icon":currentBuildWrapper.iconUri,
"id":currentBuildWrapper.id
});
break;
}
}
}
}
}
return spellSets;
}
private function removeSpellFromActiveSpells(index:int) : void
{
if(index < 0 || index > this._activeSpells.length)
{
return;
}
var item:Object = this._activeSpells[index];
var shortcutWrapper:ShortcutWrapper = null;
var spellWrapper:SpellWrapper = null;
if(item is ShortcutWrapper)
{
shortcutWrapper = item as ShortcutWrapper;
if(shortcutWrapper.realItem is SpellWrapper)
{
spellWrapper = shortcutWrapper.realItem as SpellWrapper;
}
}
else if(item is SpellWrapper)
{
spellWrapper = item as SpellWrapper;
}
if(spellWrapper === null)
{
return;
}
var spellId:int = spellWrapper.id;
var currentIndex:int = 0;
var currentIndexStr:* = null;
var currentSpell:Object = null;
var areDuplicates:Boolean = false;
var isForgettableSpell:Boolean = this.playedCharacterApi.isForgettableSpell(spellId);
if(isForgettableSpell)
{
for(currentIndexStr in this._activeSpells)
{
currentSpell = this._activeSpells[currentIndexStr];
currentIndex = Number(currentIndexStr);
if(currentSpell !== null && currentIndex !== index && currentSpell.id === spellId)
{
areDuplicates = true;
break;
}
}
}
if(!isForgettableSpell || areDuplicates)
{
this.systemApi.sendAction(new ShortcutBarRemoveRequestAction([ShortcutBarEnum.SPELL_SHORTCUT_BAR,index]));
}
else
{
this.unequipForgettableSpell(spellId);
}
}
private function validateFirstTime() : void
{
this._isFirstTime = false;
this.systemApi.setData(STORAGE_IS_FIRST_TIME,this._isFirstTime);
}
private function isSpellActive(spellId:uint) : Boolean
{
return this._activeSpellIds.indexOf(spellId) !== -1;
}
private function saveActiveSpell(spellId:uint) : void
{
if(!this.isSpellActive(spellId))
{
this._activeSpellIds.push(spellId);
}
}
private function removeActiveSpell(spellId:uint) : void
{
for(var index:uint = 0; index < this._activeSpellIds.length; index++)
{
if(spellId === this._activeSpellIds[index])
{
this._activeSpellIds.removeAt(index);
break;
}
}
}
private function isForgettableSpellEquipped(spellId:uint) : Boolean
{
return this._equippedForgettableSpells.indexOf(spellId) !== -1;
}
private function equipForgettableSpell(spellId:uint, isSendAction:Boolean = true) : void
{
if(!this.isForgettableSpellEquipped(spellId))
{
if(isSendAction)
{
this.systemApi.sendAction(new ForgettableSpellClientAction([spellId,ForgettableSpellClientActionEnum.FORGETTABLE_SPELL_EQUIP]));
}
else
{
this._equippedForgettableSpells.push(spellId);
}
}
}
private function unequipForgettableSpell(spellId:uint) : void
{
for(var index:uint = 0; index < this._equippedForgettableSpells.length; index++)
{
if(spellId === this._equippedForgettableSpells[index])
{
this.systemApi.sendAction(new ForgettableSpellClientAction([spellId,ForgettableSpellClientActionEnum.FORGETTABLE_SPELL_UNEQUIP]));
return;
}
}
}
private function shareCurrentForgettableSpells() : void
{
var sortedActiveForgettableSpells:Array = this._equippedForgettableSpells.sort(Array.NUMERIC);
this.systemApi.goToUrl(this.uiApi.getText("ui.link.shareTemporisSpells") + sortedActiveForgettableSpells.toString());
}
private function handleSearchInput() : void
{
if(!this._isSearchInputReady || this._isSearchPlaceholderReset)
{
this._isSearchPlaceholderReset = false;
return;
}
var searchText:String = this.inp_spellLevelSearch.lastTextOnInput;
if(this._isSearchInputFilled)
{
this.updateSearchFilter(searchText);
}
else if(searchText)
{
this._isSearchInputFilled = true;
this.updateSearchFilter(searchText);
}
}
private function fitSortableLabelHeaders() : void
{
this.lbl_forgettableSpellsNameHeader.fullWidth();
this.lbl_commonSpellsNameHeader.fullWidth();
fitCenteredSortableLabelHeader(this.lbl_forgettableSpellsLevelHeader);
fitCenteredSortableLabelHeader(this.lbl_commonSpellsLevelHeader);
}
private function resetFilters() : void
{
this._filteredForgettableSpells = this._filteredCommonSpells = null;
this.resetSearchBar(false);
this._currentSpellLevelFilterMinLevel = this.defaultMinSpellLevelFilter;
this._currentSpellLevelFilterMaxLevel = this.defaultMaxSpellLevelFilter;
this.updateSpellLevelInputs();
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this.resetObtainingFilters();
}
}
private function sortBySpellName(firstSpell:Object, secondSpell:Object) : Number
{
var firstSpellPriority:int = 0;
var secondSpellPriority:int = 0;
if(firstSpell.spellFamily === SPELL_FAMILY_FORGETTABLE && firstSpell.isKnown !== secondSpell.isKnown)
{
if(firstSpell.isKnown)
{
return -1;
}
return 1;
}
if(firstSpell.spellFamily === SPELL_FAMILY_COMMON && this._commonSpellPriorities !== null && firstSpell.spellType !== secondSpell.spellType && firstSpell.spellType in this._commonSpellPriorities && secondSpell.spellType in this._commonSpellPriorities)
{
firstSpellPriority = this._commonSpellPriorities[firstSpell.spellType];
secondSpellPriority = this._commonSpellPriorities[secondSpell.spellType];
if(firstSpellPriority < secondSpellPriority)
{
return -1;
}
return 1;
}
if(firstSpell.spellName > secondSpell.spellName)
{
return !!this._isSpellNameSortAscendingType ? Number(1) : Number(-1);
}
if(firstSpell.spellName < secondSpell.spellName)
{
return !!this._isSpellNameSortAscendingType ? Number(-1) : Number(1);
}
return 0;
}
private function sortBySpellLevel(firstSpell:Object, secondSpell:Object) : Number
{
var firstSpellPriority:int = 0;
var secondSpellPriority:int = 0;
var firstLevel:uint = firstSpell.spellLevel;
var secondLevel:uint = secondSpell.spellLevel;
if(firstSpell.spellFamily === SPELL_FAMILY_FORGETTABLE && firstSpell.isKnown !== secondSpell.isKnown)
{
if(firstSpell.isKnown)
{
return -1;
}
return 1;
}
if(firstSpell.spellFamily === SPELL_FAMILY_COMMON && this._commonSpellPriorities !== null && firstSpell.spellType !== secondSpell.spellType && firstSpell.spellType in this._commonSpellPriorities && secondSpell.spellType in this._commonSpellPriorities)
{
firstSpellPriority = this._commonSpellPriorities[firstSpell.spellType];
secondSpellPriority = this._commonSpellPriorities[secondSpell.spellType];
if(firstSpellPriority < secondSpellPriority)
{
return -1;
}
return 1;
}
if(firstLevel > secondLevel)
{
return !!this._isSpellLevelSortAscendingType ? Number(1) : Number(-1);
}
if(firstLevel < secondLevel)
{
return !!this._isSpellLevelSortAscendingType ? Number(-1) : Number(1);
}
if(firstSpell.spellName > secondSpell.spellName)
{
return 1;
}
if(firstSpell.spellName < secondSpell.spellName)
{
return -1;
}
return 0;
}
private function resetObtainingFilters() : void
{
this._obtainingFiltersDescr = {
"spellIsDroppable":true,
"spellIsCraftable":true,
"spellIsInQuest":true,
"spellIsUnknown":true
};
this.tx_spellIsDroppable.uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_DROPPABLE] + "_over.png");
this.tx_spellIsCraftable.uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_CRAFTABLE] + "_over.png");
this.tx_spellIsUnknown.uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_UNKNOWN] + "_over.png");
}
private function resetSortButtons() : void
{
this.tx_sortForgettableSpellsByNameDescending.visible = false;
this.tx_sortForgettableSpellsByNameAscending.visible = false;
this.tx_sortCommonSpellsByNameDescending.visible = false;
this.tx_sortCommonSpellsByNameAscending.visible = false;
this.tx_sortForgettableSpellsByLevelDescending.visible = false;
this.tx_sortForgettableSpellsByLevelAscending.visible = false;
}
private function applySpellNameSort() : void
{
this.resetSortButtons();
var spellsToProvide:Array = null;
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
if(this._isSpellNameSortAscendingType)
{
this.tx_sortForgettableSpellsByNameAscending.visible = true;
}
else
{
this.tx_sortForgettableSpellsByNameDescending.visible = true;
}
if(this._filteredForgettableSpells !== null)
{
this._filteredForgettableSpells.sort(this.sortBySpellName);
spellsToProvide = this._filteredForgettableSpells;
}
else
{
spellsToProvide = this._forgettableSpells;
}
}
else
{
if(this._isSpellNameSortAscendingType)
{
this.tx_sortCommonSpellsByNameAscending.visible = true;
}
else
{
this.tx_sortCommonSpellsByNameDescending.visible = true;
}
if(this._filteredCommonSpells !== null)
{
this._filteredCommonSpells.sort(this.sortBySpellName);
spellsToProvide = this._filteredCommonSpells;
}
else
{
spellsToProvide = this._commonSpells;
}
}
this.currentSpells.sort(this.sortBySpellName);
this.currentSpellGrid.dataProvider = spellsToProvide;
}
private function applySpellLevelSort() : void
{
if(this._currentTabName !== FORGETTABLE_SPELLS_TAB_NAME)
{
return;
}
this.resetSortButtons();
var spellsToProvide:Array = null;
if(this._isSpellLevelSortAscendingType)
{
this.tx_sortForgettableSpellsByLevelAscending.visible = true;
}
else
{
this.tx_sortForgettableSpellsByLevelDescending.visible = true;
}
if(this._filteredForgettableSpells !== null)
{
this._filteredForgettableSpells.sort(this.sortBySpellLevel);
spellsToProvide = this._filteredForgettableSpells;
}
else
{
spellsToProvide = this._forgettableSpells;
}
this.currentSpells.sort(this.sortBySpellLevel);
this.currentSpellGrid.dataProvider = spellsToProvide;
}
private function applySort() : void
{
if(this._currentTabName === COMMON_SPELLS_TAB_NAME || this._currentSort === SPELL_NAME_SORT_TYPE)
{
this.applySpellNameSort();
}
else if(this._currentSort === SPELL_LEVEL_SORT_TYPE)
{
this.applySpellLevelSort();
}
}
private function applyFilterPipeline() : void
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this._filteredForgettableSpells = this._forgettableSpells.concat();
}
else
{
if(this._currentTabName !== COMMON_SPELLS_TAB_NAME)
{
return;
}
this._filteredCommonSpells = this._commonSpells.concat();
}
this.applySearchFilter(false);
this.applyLearnedSpellsFilter();
this.applySpellLevelFilter();
this.applyObtainingFilter();
this.currentSpellGrid.dataProvider = this.currentFilteredSpells;
}
private function applyLearnedSpellsFilter(isUpdateDataProvider:Boolean = false) : void
{
if(this._currentTabName !== FORGETTABLE_SPELLS_TAB_NAME && this._currentTabName !== COMMON_SPELLS_TAB_NAME || this._currentLearnedSpellsFilter === LEARNED_SPELLS_FILTER_ALL)
{
return;
}
var filterCondition:* = this._currentLearnedSpellsFilter === LEARNED_SPELLS_FILTER_LEARNED;
var filteredSpells:Array = this.currentFilteredSpells;
if(filteredSpells === null)
{
return;
}
var index:uint = 0;
while(index < filteredSpells.length)
{
if(filteredSpells[index].isKnown !== filterCondition)
{
filteredSpells.removeAt(index);
}
else
{
index++;
}
}
this.currentFilteredSpells = filteredSpells;
if(isUpdateDataProvider)
{
this.currentSpellGrid.dataProvider = this.currentFilteredSpells;
}
}
private function applySpellLevelFilter(isUpdateDataProvider:Boolean = false) : void
{
var currentSpellLevel:uint = 0;
var filteredSpells:Array = this.currentFilteredSpells;
if(filteredSpells === null)
{
return;
}
var index:uint = 0;
while(index < filteredSpells.length)
{
currentSpellLevel = filteredSpells[index].spellLevel;
if(currentSpellLevel < this._currentSpellLevelFilterMinLevel || currentSpellLevel > this._currentSpellLevelFilterMaxLevel)
{
filteredSpells.removeAt(index);
}
else
{
index++;
}
}
if(isUpdateDataProvider)
{
this.currentSpellGrid.dataProvider = filteredSpells;
}
}
private function applyObtainingFilter(isUpdateDataProvider:Boolean = false) : void
{
var index:uint = 0;
var obtainingKey:* = null;
if(this._currentTabName !== FORGETTABLE_SPELLS_TAB_NAME)
{
return;
}
var filteredSpells:Array = this.currentFilteredSpells;
if(filteredSpells === null)
{
return;
}
for(obtainingKey in this._obtainingFiltersDescr)
{
if(!(!this._obtainingFiltersDescr.hasOwnProperty(obtainingKey) || this._obtainingFiltersDescr[obtainingKey]))
{
index = 0;
while(index < filteredSpells.length)
{
if(filteredSpells[index].obtainingDescr.hasOwnProperty(obtainingKey))
{
filteredSpells.removeAt(index);
}
else
{
index++;
}
}
}
}
if(isUpdateDataProvider)
{
this.currentSpellGrid.dataProvider = filteredSpells;
}
}
private function applySearchFilter(isUpdateDataProvider:Boolean = false) : void
{
var filteredSpells:Array = this.currentFilteredSpells;
if(filteredSpells === null || !this._currentSearchText)
{
return;
}
if(filteredSpells === null)
{
filteredSpells = this._forgettableSpells.concat();
}
filteredSpells = this.utilApi.filter(filteredSpells,this._currentSearchText,"spellName");
this.currentFilteredSpells = filteredSpells;
if(isUpdateDataProvider)
{
this.currentSpellGrid.dataProvider = this.currentFilteredSpells;
}
}
private function updateSpellNameSort() : void
{
this._currentSort = SPELL_NAME_SORT_TYPE;
this.systemApi.setData(STORAGE_SPELL_SORT,this._currentSort);
this._isSpellNameSortAscendingType = !this._isSpellNameSortAscendingType;
this.systemApi.setData(STORAGE_IS_SPELL_NAME_SORT_ASCENDING_TYPE,this._isSpellNameSortAscendingType);
this.applySort();
}
private function updateSpellLevelSort() : void
{
this._isSpellLevelSortAscendingType = !this._isSpellLevelSortAscendingType;
this.systemApi.setData(STORAGE_IS_SPELL_LEVEL_SORT_ASCENDING_TYPE,this._isSpellLevelSortAscendingType);
this._currentSort = SPELL_LEVEL_SORT_TYPE;
this.systemApi.setData(STORAGE_SPELL_SORT,this._currentSort);
this.applySort();
}
private function updateLearnedSpellsFilter(learnedSpellsValue:uint) : void
{
var oldValue:uint = this._currentLearnedSpellsFilter;
this._currentLearnedSpellsFilter = learnedSpellsValue;
if(oldValue === this._currentLearnedSpellsFilter)
{
return;
}
this.systemApi.setData(STORAGE_LEARNED_SPELLS_LEVEL_FILTER,this._currentLearnedSpellsFilter);
if(oldValue === LEARNED_SPELLS_FILTER_ALL && this._currentLearnedSpellsFilter !== LEARNED_SPELLS_FILTER_ALL)
{
this.applyLearnedSpellsFilter(true);
}
else
{
this.applyFilterPipeline();
}
}
private function updateSpellLevelFilter() : void
{
var newMinLevel:Number = Number(this.inp_minSpellLevel.lastTextOnInput);
var newMaxLevel:Number = Number(this.inp_maxSpellLevel.lastTextOnInput);
if(!this._isSpellLevelFilterReady || this._currentSpellLevelFilterMinLevel === newMinLevel && this._currentSpellLevelFilterMaxLevel === newMaxLevel)
{
return;
}
var oldMinLevel:uint = this._currentSpellLevelFilterMinLevel;
var oldMaxLevel:uint = this._currentSpellLevelFilterMaxLevel;
if(isNaN(newMinLevel) || newMinLevel < uint.MIN_VALUE || newMinLevel > uint.MAX_VALUE)
{
newMinLevel = this.defaultMinSpellLevelFilter;
}
if(isNaN(newMaxLevel) || newMaxLevel < uint.MIN_VALUE || newMaxLevel > uint.MAX_VALUE)
{
newMaxLevel = this.defaultMaxSpellLevelFilter;
}
if(newMinLevel > newMaxLevel)
{
newMinLevel = this.defaultMinSpellLevelFilter;
}
this._currentSpellLevelFilterMinLevel = newMinLevel;
this._currentSpellLevelFilterMaxLevel = newMaxLevel;
this.systemApi.setData(STORAGE_MIN_SPELL_LEVEL_FILTER,this._currentSpellLevelFilterMinLevel);
this.systemApi.setData(STORAGE_MAX_SPELL_LEVEL_FILTER,this._currentSpellLevelFilterMaxLevel);
if(this._currentSpellLevelFilterMinLevel < oldMinLevel || this._currentSpellLevelFilterMaxLevel > oldMaxLevel)
{
this.applyFilterPipeline();
}
else
{
this.applySpellLevelFilter(true);
}
}
private function updateObtainingFilter(clickedButton:ButtonContainer) : void
{
var obtainingKey:String = clickedButton.name.substr(4);
if(!this._obtainingFiltersDescr.hasOwnProperty(obtainingKey))
{
return;
}
var isFilterActive:Boolean = this._obtainingFiltersDescr[obtainingKey] = !this._obtainingFiltersDescr[obtainingKey];
var iconPrefix:String = OBTAINING_ICONS_MAP[obtainingKey];
if(isFilterActive)
{
this["tx_" + obtainingKey].uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + iconPrefix + "_over.png");
this.applyFilterPipeline();
}
else
{
this["tx_" + obtainingKey].uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + iconPrefix + "_grey.png");
this.applyObtainingFilter(true);
}
}
private function updateSearchFilter(searchText:String) : void
{
var oldSearchText:String = this._currentSearchText === null ? "" : this._currentSearchText;
this._currentSearchText = searchText;
if(oldSearchText === this._currentSearchText)
{
return;
}
if(this._currentSearchText.indexOf(oldSearchText) >= 0)
{
this.applySearchFilter(true);
}
else
{
this.applyFilterPipeline();
}
}
private function updateSpellLevelInputs() : void
{
this._isSpellLevelFilterReady = false;
this.inp_minSpellLevel.text = this._currentSpellLevelFilterMinLevel.toString();
this.inp_maxSpellLevel.text = this._currentSpellLevelFilterMaxLevel.toString();
this._isSpellLevelFilterReady = true;
}
private function updateSearchBar() : void
{
this._isSearchInputReady = true;
if(!this.inp_spellLevelSearch.text)
{
this._isSearchInputFilled = false;
}
if(this._isSearchInputFilled || this.inp_spellLevelSearch.text === this._searchSpellText)
{
return;
}
this.updateSearchPlaceholder();
}
private function updateSearchPlaceholder(isPlaceholder:Boolean = true) : void
{
this._isSearchPlaceholderReset = true;
if(isPlaceholder)
{
this._currentSearchText = null;
this.inp_spellLevelSearch.text = this._searchSpellText;
}
else
{
this.inp_spellLevelSearch.text = "";
}
}
private function handleSearchClick() : void
{
if(!this._isSearchInputFilled)
{
this.updateSearchPlaceholder(false);
}
}
private function resetSearchBar(isReapplyFilterPipeline:Boolean = true) : void
{
this._isSearchInputReady = false;
this._isSearchInputFilled = false;
this.updateSearchPlaceholder();
if(isReapplyFilterPipeline)
{
this.applyFilterPipeline();
}
}
private function loadActiveSpells() : void
{
this._activeSpellIds = [];
this._activeSpells = this.storageApi.getShortcutBarContent(ShortcutBarEnum.SPELL_SHORTCUT_BAR);
this.updateCurrentActiveSpells();
}
private function createSpellSet() : void
{
if(!this.uiApi.getUi(UIEnum.FORGETTABLE_SPELL_SET_POP_UP))
{
this.uiApi.loadUi(UIEnum.FORGETTABLE_SPELL_SET_POP_UP,UIEnum.FORGETTABLE_SPELL_SET_POP_UP,[ForgettableSpellSetPopUp.ACTION_CREATE_SPELL_SET]);
}
}
public function getSpellSets(presetId:int = -1) : void
{
var forgettableSpellSetUi:UiRootContainer = this.uiApi.getUi(UIEnum.FORGETTABLE_SPELL_SETS_UI);
if(forgettableSpellSetUi === null)
{
this.uiApi.loadUi(UIEnum.FORGETTABLE_SPELL_SETS_UI,UIEnum.FORGETTABLE_SPELL_SETS_UI,[presetId]);
}
else
{
forgettableSpellSetUi.setOnTop();
}
}
private function handleActiveSpellsSelect(target:Object, selectMethod:uint, isNewSelection:Boolean) : void
{
var currentSpellWrapper:SpellWrapper = null;
var spellCastResult:String = null;
var currentSpellShortcut:ShortcutWrapper = target.selectedItem;
if(currentSpellShortcut !== null)
{
if(this.systemApi.isFightContext() && this._isAltDown && currentSpellShortcut.realItem is SpellWrapper)
{
currentSpellWrapper = currentSpellShortcut.realItem as SpellWrapper;
spellCastResult = this.playedCharacterApi.canCastThisSpellWithResult(currentSpellWrapper.spellId,currentSpellWrapper.spellLevel);
this.systemApi.sendAction(new ChatTextOutputAction([spellCastResult,ChatActivableChannelsEnum.CHANNEL_TEAM,null,null]));
}
else if(target.selectedItem.active)
{
this.systemApi.sendAction(new GameFightSpellCastAction([currentSpellShortcut.id,this.gd_activeSpells.selectedIndex + 1]));
}
}
}
private function updateCurrentActiveSpells() : void
{
var spell:Object = null;
var index:uint = 0;
this.lbl_currentActiveSpellsIndex.text = String(this._currentActiveSpellsIndex + 1);
var activeSpellsDataProvider:Array = [];
for each(spell in this._activeSpells)
{
if(spell !== null)
{
activeSpellsDataProvider[spell.slot - this._currentActiveSpellsIndex * ACTIVE_SPELLS_BY_PAGE_NUMBER] = spell;
this.saveActiveSpell(spell.id);
}
}
for(index = 0; index < MAX_ACTIVE_SPELLS_PAGES * ACTIVE_SPELLS_BY_PAGE_NUMBER; index++)
{
if(!activeSpellsDataProvider[index])
{
activeSpellsDataProvider[index] = null;
}
}
this.gd_activeSpells.dataProvider = activeSpellsDataProvider;
}
private function updateCurrentTab() : void
{
this.btn_forgettableSpells.selected = false;
this.btn_commonSpells.selected = false;
this.btn_finishMoves.selected = false;
this.ctr_forgettableSpells.visible = false;
this.ctr_commonSpells.visible = false;
this.ctr_finishMoves.visible = false;
this.ctr_obtainingFilters.visible = false;
this.ctr_topFilters.visible = false;
if(this._currentTabName === FINISH_MOVES_TAB_NAME)
{
this.openFinishMovesTab();
return;
}
this.resetFilters();
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this.openForgettableSpellsTab();
}
else if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
this.openCommonSpellsTab();
}
this.applySort();
}
private function openForgettableSpellsTab() : void
{
this.btn_forgettableSpells.selected = true;
this.ctr_forgettableSpells.visible = true;
this.ctr_obtainingFilters.visible = true;
this.ctr_topFilters.visible = true;
this.refreshForgettableSpellsList();
}
private function openCommonSpellsTab() : void
{
this.btn_commonSpells.selected = true;
this.ctr_commonSpells.visible = true;
if(!this._hasCommonSpellsTabBeenOpenedOnce)
{
this._hasCommonSpellsTabBeenOpenedOnce = true;
this.systemApi.setData(STORAGE_HAS_COMMON_SPELLS_TAB_BEEN_OPENED_ONCE,this._hasCommonSpellsTabBeenOpenedOnce);
this.tx_commonSpellsWarning.visible = false;
}
this.refreshCommonSpellsList();
}
private function openFinishMovesTab() : void
{
this.btn_finishMoves.selected = true;
this.ctr_finishMoves.visible = true;
if(this.uiApi.getUi(FINISH_MOVES_UI_NAME) === null)
{
this._finishMovesUi = this.uiApi.loadUiInside(UIEnum.FINISH_MOVES_UI,this.ctr_finishMoves,FINISH_MOVES_UI_NAME,null) as UiRootContainer;
if(this._finishMovesUi === null)
{
return;
}
this._finishMovesUi.addEventListener("UIRenderComplete",this.onFinishMovesLoaded);
}
}
private function refreshForgettableSpellsList() : void
{
var forgettableSpell:ForgettableSpell = null;
var forgettableSpellItem:ForgettableSpellItem = null;
var spellId:int = 0;
var index:uint = 0;
var forgettableSpellDictionary:Dictionary = this.playedCharacterApi.getPlayerForgettableSpells() as Dictionary;
if(forgettableSpellDictionary === null)
{
forgettableSpellDictionary = new Dictionary();
}
var learnableSpellList:Array = this.playedCharacterApi.getForgettableSpells();
this._forgettableSpells = [];
this._filteredForgettableSpells = null;
this._equippedForgettableSpells = [];
var processedForgettableSpells:Array = [];
this._learnedForgettableSpellsCount = 0;
this._forgettableSpellsCount = 0;
for each(forgettableSpell in learnableSpellList)
{
if(forgettableSpell !== null)
{
this.addForgettableSpell(forgettableSpell.id,forgettableSpell.itemId,forgettableSpellDictionary);
processedForgettableSpells.push(forgettableSpell.id);
}
}
for each(forgettableSpellItem in forgettableSpellDictionary)
{
if(processedForgettableSpells.indexOf(forgettableSpellItem.spellId) === -1)
{
forgettableSpell = this.playedCharacterApi.getForgettableSpellById(forgettableSpellItem.spellId);
if(forgettableSpell !== null)
{
this.addForgettableSpell(forgettableSpellItem.spellId,forgettableSpell.itemId,forgettableSpellDictionary);
}
}
}
spellId = -1;
for(index = 0; index < this._forgettableSpells.length; index++)
{
spellId = this._forgettableSpells[index].spellId;
if(this.isSpellActive(spellId))
{
this.equipForgettableSpell(spellId,false);
}
}
var maxForgettableSpellsCount:int = this.playedCharacterApi.getPlayerMaxForgettableSpellsNumber();
var isMaxForgettableSpellsCountHeaderVisible:* = maxForgettableSpellsCount >= 0;
if(isMaxForgettableSpellsCountHeaderVisible)
{
this.lbl_forgettableIsSpellEquippedHeader.text = this._equippedForgettableSpells.length + "/" + maxForgettableSpellsCount;
}
this.lbl_forgettableIsSpellEquippedHeader.visible = isMaxForgettableSpellsCountHeaderVisible;
this.lbl_learnedSpells.text = this.uiApi.getText("ui.temporis.learnedSpellsRatio",this._learnedForgettableSpellsCount,this._forgettableSpellsCount);
var toMoveIndex:Number = this.gd_forgettableSpells.scrollBarV !== null ? Number(this.gd_forgettableSpells.scrollBarV.value) : Number(-1);
this.gd_forgettableSpells.dataProvider = this._forgettableSpells;
this.applyFilterPipeline();
this.applySort();
this.updateShareSpellsButton();
if(toMoveIndex > 0)
{
this.gd_forgettableSpells.moveTo(toMoveIndex,true);
}
}
private function addForgettableSpell(spellId:uint, itemId:uint, forgettableSpellDictionary:Dictionary) : void
{
var spell:Spell = this.dataApi.getSpell(spellId);
var spellWrapper:SpellWrapper = this.dataApi.getSpellWrapper(spellId);
var itemWrapper:ItemWrapper = this.dataApi.getItemWrapper(itemId);
if(spell === null || spellWrapper === null || itemWrapper === null)
{
return;
}
var obtainingDescr:Object = {};
var isObtainingAMystery:Boolean = true;
if(itemWrapper.dropMonsterIds.length > 0 || this.configApi.isFeatureWithKeywordEnabled("temporis.drops") && itemWrapper.dropTemporisMonsterIds && itemWrapper.dropTemporisMonsterIds.length > 0)
{
obtainingDescr[OBTAINING_SPELL_IS_DROPPABLE] = {
"iconGreyPath":OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_DROPPABLE] + "_grey.png",
"iconOverPath":OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_DROPPABLE] + "_over.png",
"id":2,
"item":itemWrapper
};
isObtainingAMystery = false;
}
if(itemWrapper.recipeSlots != 0 && !itemWrapper.secretRecipe)
{
obtainingDescr[OBTAINING_SPELL_IS_CRAFTABLE] = {
"iconGreyPath":OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_CRAFTABLE] + "_grey.png",
"iconOverPath":OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_CRAFTABLE] + "_over.png",
"id":1,
"item":itemWrapper
};
isObtainingAMystery = false;
}
if(isObtainingAMystery)
{
obtainingDescr[OBTAINING_SPELL_IS_UNKNOWN] = {
"iconGreyPath":OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_UNKNOWN] + "_grey.png",
"iconOverPath":OBTAINING_ICONS_MAP[OBTAINING_SPELL_IS_UNKNOWN] + "_over.png",
"id":UNKNOWN_OBTAINING,
"item":itemWrapper
};
}
var data:* = spellWrapper;
var spellName:String = data.name !== null ? data.name : spell.name;
var isSpellKnown:* = spellId in forgettableSpellDictionary;
var forgettableSpellItem:ForgettableSpellItem = null;
if(isSpellKnown)
{
++this._learnedForgettableSpellsCount;
forgettableSpellItem = forgettableSpellDictionary[spellId];
if(forgettableSpellItem !== null && forgettableSpellItem.available)
{
this.equipForgettableSpell(forgettableSpellItem.spellId,false);
}
}
if(this.systemApi.getPlayerManager().hasRights)
{
spellName += " (" + data.id + ")";
}
this._forgettableSpells.push({
"spellId":spellId,
"scrollId":itemId,
"isKnown":isSpellKnown,
"spellName":spellName,
"spellLevel":spell.spellLevelsInfo[spellWrapper.spellLevel - 1].minPlayerLevel,
"obtainingDescr":obtainingDescr,
"spellWrapper":spellWrapper,
"spellFamily":SPELL_FAMILY_FORGETTABLE,
"isSpellActive":this.isSpellActive(spellId)
});
++this._forgettableSpellsCount;
}
private function refreshCommonSpellsList() : void
{
var obtainingLevels:Array = null;
var spellLevels:Array = null;
var jndex:uint = 0;
var kndex:uint = 0;
this._commonSpells = [];
this._filteredCommonSpells = null;
var spellList:Array = Grimoire.getInstance().currentSpecialSpells.concat(Grimoire.getInstance().currentBreedSpells);
var spellListSize:uint = spellList.length;
var currentSpellWrapper:SpellWrapper = null;
var currentSpellLevelWrapper:SpellWrapper = null;
var currentSpell:Spell = null;
var currentSpellName:String = null;
var currentSpellType:String = null;
var currentCustomModeBreedSpell:CustomModeBreedSpell = null;
var data:* = null;
for(var index:uint = 0; index < spellListSize; index++)
{
if(spellList[index] !== null)
{
for(jndex = 0; jndex < spellList[index].length; jndex++)
{
currentSpellWrapper = spellList[index][jndex];
currentSpell = currentSpellWrapper.spell;
currentCustomModeBreedSpell = this.playedCharacterApi.getCustomModeBreedSpellById(currentSpell.id);
if(!(currentCustomModeBreedSpell !== null && currentCustomModeBreedSpell.isHidden))
{
if(currentSpell.id === 0)
{
currentSpellType = this._weaponSpellType;
}
else if(currentCustomModeBreedSpell === null)
{
currentSpellType = this._specialSpellType;
}
else if(currentCustomModeBreedSpell.isInitialSpell)
{
currentSpellType = this._passiveSpellType;
}
else
{
currentSpellType = this._activeSpellType;
}
data = currentSpellWrapper;
currentSpellName = data.name !== null ? data.name : currentSpell.name;
if(this.systemApi.getPlayerManager().hasRights)
{
currentSpellName += " (" + currentSpellWrapper.id + ")";
}
spellLevels = currentSpell.spellLevelsInfo;
obtainingLevels = [];
for(kndex = 0; kndex < spellLevels.length; kndex++)
{
currentSpellLevelWrapper = this.dataApi.getSpellWrapper(currentSpell.id,spellLevels[kndex].grade);
if(currentSpellLevelWrapper !== null)
{
obtainingLevels.push({
"spellLevel":spellLevels[kndex].minPlayerLevel,
"isFirstLevel":this._playerLevel < spellLevels[kndex].minPlayerLevel && kndex === 0,
"grade":spellLevels[kndex].grade,
"spellWrapper":currentSpellLevelWrapper,
"isKnown":currentSpellWrapper.variantActivated && currentSpellWrapper.spellLevel === currentSpellLevelWrapper.spellLevel
});
}
}
this._commonSpells.push({
"spellId":currentSpell.id,
"spellName":currentSpellName,
"spellLevel":spellLevels[currentSpellWrapper.spellLevel - 1].minPlayerLevel,
"obtainingLevels":obtainingLevels,
"isKnown":currentSpellWrapper.variantActivated,
"spellWrapper":currentSpellWrapper,
"spellType":currentSpellType,
"spellFamily":SPELL_FAMILY_COMMON,
"isSpellActive":this.isSpellActive(currentSpell.id)
});
}
}
}
}
var toMoveIndex:Number = this.gd_commonSpells.scrollBarV !== null ? Number(this.gd_commonSpells.scrollBarV.value) : Number(-1);
this.gd_commonSpells.dataProvider = this._commonSpells;
this.applySort();
if(toMoveIndex !== -1)
{
this.gd_commonSpells.moveTo(toMoveIndex,true);
}
}
private function updateShareSpellsButton() : void
{
if(this._equippedForgettableSpells.length > 0)
{
this.uiApi.addComponentHook(this.btn_shareForgettableSpells,ComponentHookList.ON_RELEASE);
this.ctr_shareForgettableSpells.alpha = 1;
this.btn_shareForgettableSpells.handCursor = true;
this.uiApi.removeComponentHook(this.ctr_shareForgettableSpells,ComponentHookList.ON_ROLL_OVER);
this.uiApi.removeComponentHook(this.ctr_shareForgettableSpells,ComponentHookList.ON_ROLL_OUT);
this.btn_shareForgettableSpells.x = this.lbl_shareForgettableSpells.x;
this.btn_shareForgettableSpells.width = this.tx_shareForgettableSpells.x - this.lbl_shareForgettableSpells.x + this.lbl_shareForgettableSpells.width + this.tx_shareForgettableSpells.width;
}
else
{
this.uiApi.removeComponentHook(this.btn_shareForgettableSpells,ComponentHookList.ON_RELEASE);
this.ctr_shareForgettableSpells.alpha = DISABLED_SHARE_FORGETTABLE_SPELLS_CONTAINER_ALPHA;
this.btn_shareForgettableSpells.handCursor = false;
this.uiApi.addComponentHook(this.ctr_shareForgettableSpells,ComponentHookList.ON_ROLL_OVER);
this.uiApi.addComponentHook(this.ctr_shareForgettableSpells,ComponentHookList.ON_ROLL_OUT);
}
}
private function showSpellTooltip(data:Object, target:Object, fromUI:uint) : void
{
var point:uint = 0;
var relativePoint:uint = 0;
var offset:uint = 0;
if(data === null || target === null)
{
return;
}
var spellWrapper:SpellWrapper = null;
if(fromUI === FROM_ACTIVE_SPELLS)
{
if(!(data.realItem is SpellWrapper))
{
return;
}
point = LocationEnum.POINT_TOP;
relativePoint = LocationEnum.POINT_BOTTOM;
offset = 3;
spellWrapper = this.dataApi.getSpellWrapper(data.id,data.realItem.spellLevel,true);
}
else
{
if(!(fromUI === FROM_FORGETTABLE_SPELLS || fromUI === FROM_COMMON_SPELLS))
{
return;
}
point = LocationEnum.POINT_LEFT;
relativePoint = LocationEnum.POINT_RIGHT;
offset = 3;
spellWrapper = data.spellWrapper;
}
if(spellWrapper === null)
{
return;
}
this.uiApi.showTooltip(spellWrapper,target,false,TOOLTIP_UI_NAME,point,relativePoint,offset,null,null,{"isTheoretical":this.systemApi.getOption("useTheoreticalValuesInSpellTooltips","dofus")},null,false);
}
private function showRemoveSpellMenu(data:Object) : void
{
this.uiApi.hideTooltip(SPELL_TOOLTIP_UI_NAME);
this.uiApi.hideTooltip(TOOLTIP_UI_NAME);
if(data === null)
{
return;
}
var spellContextMenu:ContextMenuData = this.menuApi.create(data.realItem,"spell",[]);
spellContextMenu.content.push(this.ankamaContextMenu.createContextMenuSeparatorObject(),this.ankamaContextMenu.createContextMenuItemObject(this.uiApi.getText("ui.common.remove"),this.removeSpellFromActiveSpells,[data.slot],false));
this.ankamaContextMenu.createContextMenu(spellContextMenu);
}
private function addSpellToActiveSpells(spellId:int, index:int) : void
{
var isForgettableSpell:Boolean = this.playedCharacterApi.isForgettableSpell(spellId);
if(isForgettableSpell)
{
if(!this.canForgettableSpellsBeAdded() && !this.isForgettableSpellEquipped(spellId))
{
this.systemApi.dispatchHook(ChatHookList.TextInformation,this.uiApi.getText("ui.temporis.warningTemporisSpellsLimit",this.playedCharacterApi.getPlayerMaxForgettableSpellsNumber()),ChatActivableChannelsEnum.PSEUDO_CHANNEL_INFO,this.timeApi.getTimestamp());
return;
}
if(!this.isForgettableSpellEquipped(spellId))
{
this.equipForgettableSpell(spellId);
}
}
if(this._activeSpellIds.indexOf(spellId) == -1)
{
this.systemApi.sendAction(new ShortcutBarAddRequestAction([DataEnum.SHORTCUT_TYPE_SPELL,spellId,index + this._currentActiveSpellsIndex * ACTIVE_SPELLS_BY_PAGE_NUMBER]));
}
}
private function getFirstActiveSpellIndexAvailable() : int
{
var shortcutWrapper:ShortcutWrapper = null;
var firstEntryAvailableIndex:int = -1;
var currentIndex:uint = 0;
for each(shortcutWrapper in this.gd_activeSpells.dataProvider)
{
if(shortcutWrapper === null)
{
firstEntryAvailableIndex = currentIndex;
break;
}
currentIndex++;
}
return firstEntryAvailableIndex;
}
private function showAddSpellMenu(slot:Slot) : void
{
var firstEntryAvailableIndex:int = 0;
this.uiApi.hideTooltip(SPELL_TOOLTIP_UI_NAME);
this.uiApi.hideTooltip(TOOLTIP_UI_NAME);
if(slot === null || !(slot.data is SpellWrapper))
{
return;
}
var spellContextMenu:ContextMenuData = this.menuApi.create(slot.data,"spell",[]);
var playerForgettableSpellsDictionary:Dictionary = this.playedCharacterApi.getPlayerForgettableSpells() as Dictionary;
var isSpellKnown:Boolean = !slot.greyedOut && (slot.data.variantActivated || slot.data.id in playerForgettableSpellsDictionary);
if(isSpellKnown)
{
firstEntryAvailableIndex = this.getFirstActiveSpellIndexAvailable();
if(firstEntryAvailableIndex >= 0)
{
spellContextMenu.content.push(this.ankamaContextMenu.createContextMenuSeparatorObject(),this.ankamaContextMenu.createContextMenuItemObject(this.uiApi.getText("ui.common.add"),function():void
{
addSpellToActiveSpells(slot.data.id,firstEntryAvailableIndex);
},[slot]));
}
}
this.ankamaContextMenu.createContextMenu(spellContextMenu);
}
private function handleObtainingClick(data:Object) : void
{
var itemData:Object = null;
var subAreaWithMaxItem:uint = 0;
var subAreaMaxItemCount:uint = 0;
var text:String = null;
var itemSubAreas:Vector.<uint> = null;
var subArea:SubArea = null;
var subAreaId:Object = null;
if(data === null || data.id === UNKNOWN_OBTAINING)
{
return;
}
if(data.id === EncyclopediaList.ITEM_COMPONENT_CAT_ID || data.id === EncyclopediaList.ITEM_CRAFTABLE_CAT_ID)
{
this.systemApi.dispatchHook(HookList.OpenRecipe,data.item);
}
else if(data.id === EncyclopediaList.ITEM_DROPABLE_CAT_ID)
{
itemData = {};
itemData.monsterId = 0;
itemData.monsterSearch = data.item.name;
if(data.item.dropTemporisMonsterIds)
{
itemData.monsterIdsList = data.item.dropMonsterIds.concat(data.item.dropTemporisMonsterIds);
}
else
{
itemData.monsterIdsList = data.item.dropMonsterIds;
}
itemData.forceOpen = true;
this.systemApi.dispatchHook(HookList.OpenEncyclopedia,EnumTab.BESTIARY_TAB,itemData);
}
else if(data.id == EncyclopediaList.ITEM_HARVESTABLE_CAT_ID)
{
subAreaWithMaxItem = 0;
subAreaMaxItemCount = 0;
text = this.uiApi.processText(this.uiApi.getText("ui.monster.presentInAreas",data.item.resourcesBySubarea.length),"m",data.item.resourcesBySubarea.length == 1,data.item.resourcesBySubarea.length == 0);
itemSubAreas = new Vector.<uint>(0);
for each(subAreaId in data.item.resourcesBySubarea)
{
subArea = this.dataApi.getSubArea(subAreaId[0]);
if(subArea.hasCustomWorldMap || subArea.area.superArea.hasWorldMap)
{
itemSubAreas.push(subAreaId[0]);
if(subAreaId[1] > subAreaMaxItemCount)
{
subAreaWithMaxItem = subAreaId[0];
}
}
}
this._cartographyPopup = this.ankamaCartography.openCartographyPopup(data.item.name,subAreaWithMaxItem,itemSubAreas,text);
}
}
private function getScrollFromForgettableSpell(spellDescr:Object, isForce:Boolean = false) : void
{
var spellSetsUsed:Array = null;
var isSpellUsed:* = false;
if(!isForce)
{
spellSetsUsed = this.getSpellSetsWithSpell(spellDescr.spellId);
isSpellUsed = spellSetsUsed.length > 0;
}
if(isSpellUsed && !isForce)
{
if(!this.uiApi.getUi(UIEnum.FORGETTABLE_SPELL_GET_SCROLL_WARNING_POP_UP))
{
this.uiApi.loadUi(UIEnum.FORGETTABLE_SPELL_GET_SCROLL_WARNING_POP_UP,UIEnum.FORGETTABLE_SPELL_GET_SCROLL_WARNING_POP_UP,[spellDescr,spellSetsUsed,this.getScrollFromForgettableSpell]);
}
}
else
{
this.systemApi.sendAction(new ForgettableSpellClientAction([spellDescr.spellId,ForgettableSpellClientActionEnum.FORGETTABLE_SPELL_FORGET]));
}
}
private function isSpellScrollAvailable(scrollId:int) : Boolean
{
var inventoryContent:Vector.<ItemWrapper> = this.dataApi.getInventoryViewContent(STORAGE_CONSUMABLES_VIEW) as Vector.<ItemWrapper>;
if(inventoryContent === null)
{
return false;
}
for(var index:uint = 0; index < inventoryContent.length; index++)
{
if(inventoryContent[index].id === scrollId)
{
return true;
}
}
return false;
}
private function searchScrollFromForgettableSpell(spellDescr:Object) : void
{
var forgettableSpell:ForgettableSpell = this.playedCharacterApi.getForgettableSpellById(spellDescr.spellId);
if(forgettableSpell === null)
{
return;
}
var scrollWrapped:ItemWrapper = this.dataApi.getItemWrapper(forgettableSpell.itemId);
if(scrollWrapped === null)
{
return;
}
if(this.isSpellScrollAvailable(scrollWrapped.id))
{
this.systemApi.dispatchHook(HookList.SearchForgettableSpellScroll,scrollWrapped.name);
}
}
private function activeSpellDropValidator(target:Object, data:Object, source:Object) : Boolean
{
var isValid:Boolean = false;
var shortcutWrapper:ShortcutWrapper = null;
if(data === null || !(source is Slot) || !(target is Slot))
{
return false;
}
var sourceSlot:Slot = source as Slot;
var targetSlot:Slot = target as Slot;
var sourceGrid:Grid = sourceSlot.getParent() as Grid;
if(sourceGrid !== null && sourceGrid === targetSlot.getParent() as Grid && data is ShortcutWrapper)
{
isValid = false;
for each(shortcutWrapper in this.gd_activeSpells.dataProvider)
{
if(shortcutWrapper !== null && shortcutWrapper.id === data.id)
{
isValid = true;
break;
}
}
if(!isValid)
{
return false;
}
}
return data is SpellWrapper || data is ShortcutWrapper && data.realItem is SpellWrapper;
}
private function processActiveSpellDrop(target:Object, data:Object, source:Object) : void
{
var isForgettableSpellRemoved:Boolean = false;
var currentSpell:SpellWrapper = null;
if(data is ShortcutWrapper)
{
if(!(data.realItem is SpellWrapper))
{
return;
}
this.systemApi.sendAction(new ShortcutBarSwapRequestAction([ShortcutBarEnum.SPELL_SHORTCUT_BAR,data.slot,this.gd_activeSpells.getItemIndex(target) + this._currentActiveSpellsIndex * ACTIVE_SPELLS_BY_PAGE_NUMBER]));
this._hasProcessedDrop = true;
}
else
{
isForgettableSpellRemoved = false;
if(target.data !== null && target.data is ShortcutWrapper && target.data.realItem is SpellWrapper)
{
currentSpell = target.data.realItem as SpellWrapper;
if(currentSpell.id === data.id)
{
return;
}
if(this.playedCharacterApi.isForgettableSpell(currentSpell.id))
{
this.unequipForgettableSpell(currentSpell.id);
isForgettableSpellRemoved = true;
}
}
if(this.playedCharacterApi.isForgettableSpell(data.id) && !this.isForgettableSpellEquipped(data.id))
{
if(!this.canForgettableSpellsBeAdded() && !isForgettableSpellRemoved)
{
this.systemApi.dispatchHook(ChatHookList.TextInformation,this.uiApi.getText("ui.temporis.warningTemporisSpellsLimit",this.playedCharacterApi.getPlayerMaxForgettableSpellsNumber()),ChatActivableChannelsEnum.PSEUDO_CHANNEL_INFO,this.timeApi.getTimestamp());
return;
}
this.equipForgettableSpell(data.id);
}
this.systemApi.sendAction(new ShortcutBarAddRequestAction([DataEnum.SHORTCUT_TYPE_SPELL,data.id,this.gd_activeSpells.getItemIndex(target) + this._currentActiveSpellsIndex * ACTIVE_SPELLS_BY_PAGE_NUMBER]));
this._hasProcessedDrop = true;
}
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this.refreshForgettableSpellsList();
}
else if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
this.refreshCommonSpellsList();
}
}
public function onSelectItem(target:GraphicContainer, selectMethod:uint, isNewSelection:Boolean) : void
{
switch(target)
{
case this.gd_activeSpells:
this.handleActiveSpellsSelect(target,selectMethod,isNewSelection);
break;
case this.cbx_learningSpellsFilter:
this.updateLearnedSpellsFilter(this.cbx_learningSpellsFilter.selectedIndex);
}
}
public function onRelease(target:GraphicContainer) : void
{
var forgettableSpellSetUi:UiRootContainer = null;
this.updateSearchBar();
this.updateSpellLevelInputs();
switch(target)
{
case this.mainCtr:
forgettableSpellSetUi = this.uiApi.getUi(UIEnum.FORGETTABLE_SPELL_SETS_UI);
if(forgettableSpellSetUi !== null)
{
forgettableSpellSetUi.setOnTop();
}
return;
case this.btn_help:
this.hintsApi.showSubHints(this._currentTabName);
break;
case this.btn_previousActiveSpells:
this.currentActiveSpellsIndex = this._currentActiveSpellsIndex - 1;
break;
case this.btn_nextActiveSpells:
this.currentActiveSpellsIndex = this._currentActiveSpellsIndex + 1;
break;
case this.btn_saveAsASpellSet:
this.createSpellSet();
break;
case this.btn_seeMySpellSets:
this.getSpellSets();
break;
case this.btn_forgettableSpells:
this.currentTabName = FORGETTABLE_SPELLS_TAB_NAME;
this.hintsApi.uiTutoTabLaunch();
break;
case this.btn_commonSpells:
this.currentTabName = COMMON_SPELLS_TAB_NAME;
this.hintsApi.uiTutoTabLaunch();
break;
case this.btn_finishMoves:
this.currentTabName = FINISH_MOVES_TAB_NAME;
this.hintsApi.uiTutoTabLaunch();
break;
case this.inp_spellLevelSearch:
this.handleSearchClick();
break;
case this.btn_clearSearchText:
this.resetSearchBar();
break;
case this.btn_spellIsCraftable:
case this.btn_spellIsDroppable:
case this.btn_spellIsUnknown:
this.updateObtainingFilter(target as ButtonContainer);
break;
case this.btn_sortForgettableSpellsByName:
case this.btn_sortCommonSpellsByName:
this.updateSpellNameSort();
break;
case this.btn_sortForgettableSpellsByLevel:
this.updateSpellLevelSort();
break;
case this.btn_shareForgettableSpells:
this.shareCurrentForgettableSpells();
break;
default:
switch(true)
{
case target.name.indexOf("tx_findForgettableSpellScroll") !== -1:
this.searchScrollFromForgettableSpell(this._componentsDictionary[target.name]);
break;
case target.name.indexOf("btn_getForgettableSpellScroll") !== -1:
this.getScrollFromForgettableSpell(this._componentsDictionary[target.name]);
break;
case target.name.indexOf("tx_obtaining_") !== -1:
this.handleObtainingClick(this._componentsDictionary[target.name]);
}
}
}
public function onDoubleClick(target:GraphicContainer) : void
{
var spellId:uint = 0;
var shortcutWrapper:ShortcutWrapper = null;
var wrapper:Object = null;
var i:uint = 0;
var firstEntryAvailableIndex:int = 0;
if(target === this.gd_activeSpells)
{
this.removeSpellFromActiveSpells(this.gd_activeSpells.selectedIndex + this._currentActiveSpellsIndex * ACTIVE_SPELLS_BY_PAGE_NUMBER);
}
else if(target.name in this._componentsDictionary && target.name.indexOf("btn_forgettableSpellLine") !== -1 || target.name.indexOf("btn_commonSpellLine") !== -1 || target.name.indexOf("slot_forgettableSpell") !== -1 || target.name.indexOf("slot_commonSpell") !== -1)
{
spellId = this._componentsDictionary[target.name].spellId;
if(this._activeSpellIds.indexOf(spellId) != -1)
{
if(this.playedCharacterApi.isForgettableSpell(spellId))
{
this.unequipForgettableSpell(spellId);
}
else
{
for(i = 0; i < this._activeSpells.length; i++)
{
wrapper = this._activeSpells[i];
if(wrapper is ShortcutWrapper)
{
shortcutWrapper = wrapper as ShortcutWrapper;
if(shortcutWrapper.realItem is SpellWrapper && (shortcutWrapper.realItem as SpellWrapper).spellId == spellId)
{
this.systemApi.sendAction(new ShortcutBarRemoveRequestAction([ShortcutBarEnum.SPELL_SHORTCUT_BAR,i]));
break;
}
}
else if(wrapper is SpellWrapper)
{
this.systemApi.sendAction(new ShortcutBarRemoveRequestAction([ShortcutBarEnum.SPELL_SHORTCUT_BAR,i]));
break;
}
}
}
}
else
{
firstEntryAvailableIndex = this.getFirstActiveSpellIndexAvailable();
if(firstEntryAvailableIndex >= 0)
{
this.addSpellToActiveSpells(spellId,firstEntryAvailableIndex);
}
}
}
}
public function onRollOver(target:GraphicContainer) : void
{
var tooltipText:String = null;
var scrollMagicWorkshopPosition:Point = null;
var data:Object = null;
if(target.name.indexOf("tx_obtaining_") !== -1 && this._componentsDictionary.hasOwnProperty(target.name))
{
data = this._componentsDictionary[target.name];
if(data === null)
{
return;
}
tooltipText = null;
switch(data.id)
{
case EncyclopediaList.ITEM_COMPONENT_CAT_ID:
(target as Texture).uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + data.iconOverPath);
tooltipText = this.uiApi.getText("ui.encyclopedia.filterComponent");
break;
case EncyclopediaList.ITEM_CRAFTABLE_CAT_ID:
(target as Texture).uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + data.iconOverPath);
scrollMagicWorkshopPosition = null;
if(SCROLL_MAGIC_WORKSHOP_POSITION !== null)
{
scrollMagicWorkshopPosition = SCROLL_MAGIC_WORKSHOP_POSITION;
}
else
{
scrollMagicWorkshopPosition = new Point(0,0);
}
tooltipText = this.uiApi.getText("ui.temporis.craftableAt","[" + scrollMagicWorkshopPosition.x + "," + scrollMagicWorkshopPosition.y + "]");
break;
case EncyclopediaList.ITEM_DROPABLE_CAT_ID:
(target as Texture).uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + data.iconOverPath);
tooltipText = this.uiApi.getText("ui.encyclopedia.filterDropable");
break;
case EncyclopediaList.ITEM_HARVESTABLE_CAT_ID:
(target as Texture).uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + data.iconOverPath);
tooltipText = this.uiApi.getText("ui.encyclopedia.filterHarvestable");
break;
case UNKNOWN_OBTAINING:
tooltipText = this.uiApi.getText("ui.temporis.unknownObtaining");
}
if(tooltipText === null)
{
return;
}
this.uiApi.showTooltip(this.uiApi.textTooltipInfo(tooltipText),target,false,TOOLTIP_UI_NAME,LocationEnum.POINT_BOTTOM,LocationEnum.POINT_TOP,3,null,null,null,"TextInfo");
}
else if(target === this.ctr_shareForgettableSpells)
{
this.uiApi.showTooltip(this.uiApi.textTooltipInfo(this.uiApi.getText("ui.temporis.disabledShareTemporisSpellsButtonHelp")),target,false,TOOLTIP_UI_NAME,LocationEnum.POINT_BOTTOM,LocationEnum.POINT_TOP,3,null,null,null,"TextInfo");
}
else if(target.name.indexOf("slot") !== -1)
{
if(!(target.name in this._componentsDictionary))
{
return;
}
data = this._componentsDictionary[target.name];
if(target.name.indexOf("slot_commonSpell_m_gd_commonSpells") !== -1)
{
this.showSpellTooltip(data,target,FROM_COMMON_SPELLS);
}
else if(target.name.indexOf("slot_forgettableSpell_m_gd_forgettableSpells") !== -1)
{
this.showSpellTooltip(data,target,FROM_FORGETTABLE_SPELLS);
}
}
else if(target === this.btn_spellIsCraftable)
{
this.uiApi.showTooltip(this.uiApi.textTooltipInfo(this.uiApi.getText("ui.encyclopedia.filterCraftable")),target,false,TOOLTIP_UI_NAME,LocationEnum.POINT_BOTTOM,LocationEnum.POINT_TOP,3,null,null,null,"TextInfo");
}
else if(target === this.btn_spellIsDroppable)
{
this.uiApi.showTooltip(this.uiApi.textTooltipInfo(this.uiApi.getText("ui.encyclopedia.filterDropable")),target,false,TOOLTIP_UI_NAME,LocationEnum.POINT_BOTTOM,LocationEnum.POINT_TOP,3,null,null,null,"TextInfo");
}
else if(target === this.btn_spellIsUnknown)
{
this.uiApi.showTooltip(this.uiApi.textTooltipInfo(this.uiApi.getText("ui.temporis.unknownObtaining")),target,false,TOOLTIP_UI_NAME,LocationEnum.POINT_BOTTOM,LocationEnum.POINT_TOP,3,null,null,null,"TextInfo");
}
else if(target.name.indexOf("btn_") !== -1 && target.name.indexOf("SpellLine") !== -1)
{
(target as ButtonContainer).state = StatesEnum.STATE_SELECTED_OVER;
}
else
{
switch(data)
{
case -1:
if(target.name.indexOf("btn_getForgettableSpellScroll") !== -1)
{
this.uiApi.showTooltip(this.uiApi.textTooltipInfo(this.uiApi.getText("ui.temporis.getScrollFromTemporisSpell")),target,false,TOOLTIP_UI_NAME,LocationEnum.POINT_BOTTOM,LocationEnum.POINT_TOP,3,null,null,null,"TextInfo");
break;
}
break;
default:
this.showSpellTooltip(data.data,data.target,FROM_COMMON_SPELLS);
case null:
}
}
}
public function onRollOut(target:GraphicContainer) : void
{
var data:Object = null;
this.uiApi.hideTooltip(SPELL_TOOLTIP_UI_NAME);
this.uiApi.hideTooltip(TOOLTIP_UI_NAME);
if(target.name.indexOf("tx_obtaining_") !== -1)
{
data = this._componentsDictionary[target.name];
if(data === null)
{
return;
}
(target as Texture).uri = this.uiApi.createUri(this.uiApi.me().getConstant("texture") + data.iconGreyPath);
}
else if(target.name.indexOf("btn_") !== -1 && target.name.indexOf("SpellLine") !== -1)
{
(target as ButtonContainer).state = StatesEnum.STATE_NORMAL;
}
}
public function onItemRollOver(target:GraphicContainer, item:Object) : void
{
if(target === this.gd_activeSpells)
{
this.showSpellTooltip(item.data,item.container,FROM_ACTIVE_SPELLS);
}
}
public function onItemRollOut(target:GraphicContainer, item:Object) : void
{
this.uiApi.hideTooltip(SPELL_TOOLTIP_UI_NAME);
this.uiApi.hideTooltip(TOOLTIP_UI_NAME);
}
public function onItemRightClick(target:GraphicContainer, item:Object) : void
{
this.showRemoveSpellMenu(item.data);
}
public function onShortcut(shortcutLabel:String) : Boolean
{
var me:UiRootContainer = null;
if(shortcutLabel === ShortcutHookListEnum.CLOSE_UI)
{
me = this.uiApi.me();
if(me === null)
{
this.systemApi.log(16,"ForgettableSpellsUi: the current UI is null!");
return false;
}
this.uiApi.unloadUi(me.name);
return true;
}
return false;
}
private function onActiveSpellDropStart(source:Object) : void
{
if(source.getUi() === this.uiApi.me())
{
this.systemApi.disableWorldInteraction();
}
}
private function onActiveSpellDropEnd(source:Object, target:Object) : void
{
var targetSlot:Slot = null;
var parentUi:UiRootContainer = null;
var currentIndex:uint = 0;
var currentSpellSlot:Slot = null;
if(this._hasProcessedDrop)
{
this._hasProcessedDrop = false;
return;
}
if(source.getUi() === this.uiApi.me())
{
this.systemApi.enableWorldInteraction();
}
if(source.parent !== this.gd_activeSpells || (source.data === null || source.data.objectGID === null) || (source === null || source.data === null || !(source.data is ShortcutWrapper)))
{
return;
}
if(target === source)
{
return;
}
if(target is Slot)
{
targetSlot = target as Slot;
parentUi = targetSlot.getUi();
if(parentUi !== null && parentUi.name !== null && (parentUi.name === "bannerActionBar" || parentUi.name.indexOf("externalActionBar") !== -1) && target.parent !== null && target.parent.name === "gd_spellitemotes")
{
return;
}
}
var spellSlot:Slot = source as Slot;
var activeSpellsGrid:Grid = spellSlot.parent as Grid;
if(activeSpellsGrid !== null)
{
currentIndex = 0;
for each(currentSpellSlot in activeSpellsGrid.slots)
{
if(currentSpellSlot === spellSlot)
{
this.removeSpellFromActiveSpells(currentIndex + this._currentActiveSpellsIndex * ACTIVE_SPELLS_BY_PAGE_NUMBER);
break;
}
currentIndex++;
}
}
}
public function onChange(target:GraphicContainer) : void
{
switch(target)
{
case this.inp_spellLevelSearch:
this.handleSearchInput();
break;
case this.inp_minSpellLevel:
case this.inp_maxSpellLevel:
this.updateSpellLevelFilter();
}
}
private function onKeyDown(target:DisplayObject, keyCode:uint) : void
{
if(keyCode == Keyboard.ALTERNATE)
{
this._isAltDown = true;
}
}
private function onKeyUp(target:DisplayObject, keyCode:uint) : void
{
if(keyCode == Keyboard.ALTERNATE)
{
this._isAltDown = false;
}
}
private function onAreActiveSpellsAlterable(areActiveSpellsAlterable:Boolean) : void
{
this._areActiveSpellsAlterable = areActiveSpellsAlterable;
if(!areActiveSpellsAlterable)
{
this._isAltDown = false;
}
(this.gd_activeSpells.renderer as SlotGridRenderer).allowDrop = this._areActiveSpellsAlterable || this._isAltDown;
}
public function onWheel(target:GraphicContainer, delta:int) : void
{
if(target === this.gd_activeSpells || target === this.ctr_activeSpellsButtons)
{
if(delta > 0)
{
this.currentActiveSpellsIndex = this._currentActiveSpellsIndex - 1;
}
else
{
this.currentActiveSpellsIndex = this._currentActiveSpellsIndex + 1;
}
}
}
public function onPress(target:GraphicContainer) : void
{
this.uiApi.hideTooltip(SPELL_TOOLTIP_UI_NAME);
this.uiApi.hideTooltip(TOOLTIP_UI_NAME);
}
private function onShortcutBarViewContent(barType:int) : void
{
if(barType === ShortcutBarEnum.SPELL_SHORTCUT_BAR)
{
this.loadActiveSpells();
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this.refreshForgettableSpellsList();
}
else if(this._currentTabName === COMMON_SPELLS_TAB_NAME)
{
this.refreshCommonSpellsList();
}
}
}
private function onFinishMovesLoaded(event:Event) : void
{
if(this._finishMovesUi === null)
{
return;
}
this._finishMovesUi.removeEventListener("UIRenderComplete",this.onFinishMovesLoaded);
this._finishMovesUi.uiClass.ctr_finishMoveList.x = 50;
this._finishMovesUi.uiClass.ctr_finishMoveList.y = 160;
this._finishMovesUi.uiClass.ctr_illu.height = 360;
this._finishMovesUi.uiClass.tx_illu.height = 330;
}
public function onRightClick(target:GraphicContainer) : void
{
if(target is Slot)
{
this.showAddSpellMenu(target as Slot);
}
}
private function onForgettableSpells() : void
{
if(this._currentTabName === FORGETTABLE_SPELLS_TAB_NAME)
{
this.refreshForgettableSpellsList();
}
}
private function onForgettableSpellPresetSaved(presetId:int) : void
{
this.getSpellSets(presetId);
}
public function onUiLoaded(name:String) : void
{
var forgettableSpellSetUi:UiRootContainer = null;
if(name === UIEnum.STORAGE_UI)
{
forgettableSpellSetUi = this.uiApi.getUi(UIEnum.FORGETTABLE_SPELL_SETS_UI);
if(forgettableSpellSetUi !== null)
{
forgettableSpellSetUi.setOnTop();
}
}
}
public function onPresetsUpdate(buildId:int = -1) : void
{
this.setSaveSpellSetButton();
}
public function onPresetError(reasonText:String) : void
{
this.setSaveSpellSetButton();
}
}
}
| 43.575061
| 276
| 0.617814
|
64891106f8776c9f011b193425ddd81b2abe5b40
| 2,129
|
as
|
ActionScript
|
cadet/src/cadet/util/Reference.as
|
CadetEditor/CadetEngine-as
|
44e390b1913166e7a0d81e04dedbd21f21789261
|
[
"BSD-2-Clause-FreeBSD"
] | 13
|
2015-03-09T13:20:45.000Z
|
2021-08-19T02:29:56.000Z
|
cadet/src/cadet/util/Reference.as
|
CadetEditor/CadetEngine-as
|
44e390b1913166e7a0d81e04dedbd21f21789261
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2015-12-01T14:04:55.000Z
|
2015-12-02T11:35:16.000Z
|
cadet/src/cadet/util/Reference.as
|
CadetEditor/CadetEngine-as
|
44e390b1913166e7a0d81e04dedbd21f21789261
|
[
"BSD-2-Clause-FreeBSD"
] | 7
|
2015-03-09T13:21:21.000Z
|
2021-08-19T02:29:57.000Z
|
package cadet.util
{
import cadet.core.IComponent;
import cadet.core.IComponentContainer;
import cadet.events.ComponentContainerEvent;
public class Reference
{
public var type:Class;
public var host:IComponent;
public var property:String;
public var target:IComponentContainer;
private var _excludedComponents:Vector.<IComponent>;
private var _excludedTypes:Vector.<Class>;
public function Reference( target:IComponentContainer, type:Class, host:IComponent, property:String, excludedTypes:Vector.<Class> = null )
{
init( target, type, host, property, excludedTypes );
}
public function init( target:IComponentContainer, type:Class, host:IComponent, property:String, excludedTypes:Vector.<Class> = null ):void
{
this.target = target;
this.type = type;
this.host = host;
this.property = property;
target.addEventListener(ComponentContainerEvent.CHILD_ADDED, childAddedHandler);
target.addEventListener(ComponentContainerEvent.CHILD_REMOVED, childRemovedHandler);
_excludedComponents = new Vector.<IComponent>();
_excludedComponents.push(host);
_excludedTypes = excludedTypes;
host[property] = ComponentUtil.getChildOfType(target, type, false, _excludedComponents, _excludedTypes);
}
public function dispose():void
{
target.removeEventListener(ComponentContainerEvent.CHILD_ADDED, childAddedHandler);
target.removeEventListener(ComponentContainerEvent.CHILD_REMOVED, childRemovedHandler);
host[property] = null;
target = null;
host = null;
type = null;
property = null;
}
private function childAddedHandler( event:ComponentContainerEvent ):void
{
if ( event.child is type && !ComponentUtil.isExcluded(event.child, _excludedComponents, _excludedTypes) )
{
host[property] = event.child;
}
}
private function childRemovedHandler( event:ComponentContainerEvent ):void
{
// Presumes there will only be one sibling of a type
if ( event.child is type && !ComponentUtil.isExcluded(event.child, _excludedComponents, _excludedTypes) )
{
host[property] = null;
}
}
}
}
| 30.414286
| 140
| 0.740723
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.