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

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

BILLIARDS MASTER PRO.swf

This is the info page for
Flash #119794

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


Text
00%

LOADING…

LADEN…

CHARGEMENT EN COURS…

WIRD GELADEN...

CARGANDO...

CARREGANDO...

A CARREGAR...

CARICAMENTO...

LADDAR ...

ŁADOWANIE...

ЗАГРУЗКА...

MEMUATKAN…

LOADING…

载入中…

CARGANDO…

Powered by:

11

12

PLAYER 1 vs. COMPUTER

SPELER 1 vs. COMPUTER

JOUEUR 1 contre ORDINATEUR

SPIELER 1 gegen COMPUTER

JUGADOR 1 vs. CPU

JOGADOR 1 vs. COMPUTADOR

JOGADOR 1 vs. COMPUT.

GIOCATORE 1 VS COM

SPELARE 1 mot DATORN

GRACZ 1 vs KOMPUTER

ИГРА С КОМПЬЮТЕРОМ

PEMAIN 1 vs. KOMPUTER

プレイヤー1VSコンピューター

玩家1 vs. 电脑

JUGADOR 1 vs. COMPUTADORA

JUGADOR 1 contra COMPUTADORA

13

14

15

8

7

5

RESET

REMETTRE À ZÉRO

RESTABLECER

ZERAR

REINICIAR

AZZERA

NOLLSTÄLL

СБРОС

MENGATUR RESET

リセット

重置

RESTABLECER

— 8-BALL MODE —

— 8-BALL —

— MODE 8-BALL —

— 8-BALL-MODUS —

— BOLA 8 —

— BOLA 8 —

— PALLA 8 —

— TRYB ÓSEMKI —

— ВОСЬМЕРКА —

— MODE 8-BOLA —

— エイトボール —

— 美式8球 —

— 8 BOLAS —

— MODO BOLA 8 —

BACK

TERUG

RETOUR

ZURÜCK

ATRÁS

VOLTAR

INDIETRO

TILLBAKA

POWRÓT

НАЗАД

KEMBALI

戻る

返回

2

00

GAMES WON:

GEWONNEN:

JEUX GAGNÉS :

GEWONNENE SPIELE:

GANADAS:

VITÓRIAS:

PARTITE VINTE:

SPEL VUNNA:

ZWYCIĘSTWA:

ПОБЕД:

GAME MENANG:

勝ったゲーム:

胜利局数:

PARTIDOS GANADOS:

JUEGOS GANADOS:

GAMES LOST:

VERLOREN:

JEUX PERDUS :

VERLORENE SPIELE:

PERDIDAS:

DERROTAS:

PARTITE PERSE:

SPEL FÖRLORADE:

PORAŻKI:

ПОРАЖЕНИЙ:

GAME KALAH:

負けたゲーム:

失败局数:

PARTIDOS PERDIDOS:

JUEGOS PERDIDOS:

00%

PERCENTAGE:

POURCENTAGE :

PROZENTUAL:

PORCENTAJE:

PORCENTAGEM:

PERCENTAGEM:

PERCENTUALE:

PROCENT:

ДОЛЯ ПОБЕД:

PERSENTASE:

勝率:

胜率:

00

00

00%

PLAYER 1

SPELER 1

JOUEUR 1

SPIELER 1

JUGADOR 1

JOGADOR 1

GIOCATORE 1

SPELARE 1

GRACZ 1

ИГРОК 1

PEMAIN 1

プレイヤー1

玩家1

PLAYER 2

SPELER 2

JOUEUR 2

SPIELER 2

JUGADOR 2

JOGADOR 2

GIOCATORE 2

SPELARE 2

GRACZ 2

ИГРОК 2

PEMAIN 2

プレイヤー2

玩家2

1

PLAY AGAIN

OPNIEUW SPELEN

REJOUER

NOCHMAL SPIELEN

JUGAR OTRA VEZ

JOGAR DE NOVO

JOGAR OUTRA VEZ

GIOCA ANCORA

SPELA IGEN

ZAGRAJ PONOWNIE

ЕЩЕ РАЗ

MAIN LAGI

もう1度プレイする

再玩一次

JUGAR DE NUEVO

3

RESTART

OPNIEUW BEGINNEN

RECOMMENCER

NEUSTART

REINICIAR

RECOMEÇAR

RICOMINCIA

OMSTART

СНАЧАЛА

MULAI DARI AWAL

リスタート

重新开始

VOLVER A EMPEZAR

6

4

YOU LOST…

YOU LOSE

JE HEBT VERLOREN!

TU AS PERDU…

DU HAST VERLOREN!

HAS PERDIDO...

PERDEU!

PERDESTE…

HAI PERSO...

DU FÖRLORADE...

PRZEGRAŁEŚ...

НЕ ПОВЕЗЛО...

KAMU KALAH

残念…

你输了…

PERDISTE…

PERDISTE...

10

9

— STRAIGHT POOL —

— STRAIGHT MODE —

— LE 14/1 CONTINU —

— 14 UND 1 ENDLOS-MODUS —

— 14.1 CONTINUO —

— '14:1 —

— POOL CONTINUO —

— 14 PLUS 1 —

— СТРЕЙТ —

— MODE BIASA —

— ストレートプール —

— 自由落袋 —

PLAYER 1

SPELER 1

JOUEUR 1

SPIELER 1

JUGADOR 1

JOGADOR 1

JOGADOR 1

GIOCATORE 1

SPELARE 1

GRACZ 1

ОДИН ИГРОК

PEMAIN 1

プレイヤー1

玩家1

PLAYER 1 vs. PLAYER 2

SPELER 1 vs. SPELER 2

JOUEUR 1 contre JOUEUR 2

SPIELER 1 gegen SPIELER 2

JUG. 1 vs. JUG. 2

JOGADOR 1 vs. JOGADOR 2

JOG. 1 vs. JOG. 2

DUE GIOCATORI

SPELARE 1 mot SPELARE 2

GRACZ 1 vs GRACZ 2

ДВА ИГРОКА

PEMAIN 1 vs. PEMAIN 2

プレイヤー1VSプレイヤー2

玩家1 vs. 玩家2

JUGADOR 1 vs. JUGADOR 2

JUGADOR 1 contra JUGADOR 2

© SPIL GAMES B.V

PortuguêsBR

Nederlands

Deutsch

Español

Français

English

Italiano

Bahasa melayu

Philipines

Polski

Português

Русский

Svenska

Türkçe

English (UK)

English (US)

Bahasa

BR

NL

CN

DE

ES

FR

IN

IT

JP

MY

PH

PL

PT

RU

SE

TR

UK

US

ID

AR

MX

ARG

YOU WON!

YOU WIN!

JE HEBT GEWONNEN!

TU AS GAGNÉ !

DU HAST GEWONNEN!

¡HAS GANADO!

VENCEU!

GANHASTE!

HAI VINTO!

DU VANN!

WYGRAŁEŚ!

ПОБЕДА!

KAMU MENANG!

あなたの勝ちです!

你赢了!

¡GANASTE!

PLAYER 1 WINS!

SPELER 1 HEEFT GEWONNEN!

JOUEUR 1 A GAGNÉ !

SPIELER 1 HAT GEWONNEN!

¡GANA JUGADOR 1!

O JOGADOR 1 VENCEU!

O JOGADOR 1 GANHOU!

VINCE IL GIOCATORE 1!

SPELARE 1 VANN!

GRACZ 1 WYGRYWA!

ИГРОК 1 ВЫИГРАЛ!

PEMAIN 1 MENANG!

プレイヤー1の勝ちです!

玩家1赢了!

GANÓ EL JUGADOR 1

¡EL JUGADOR 1 GANA!

PLAYER 2 WINS!

SPELER 2 HEEFT GEWONNEN!

JOUEUR 2 A GAGNÉ !

SPIELER 2 HAT GEWONNEN!

¡GANA JUGADOR 2!

O JOGADOR 2 VENCEU!

O JOGADOR 2 GANHOU!

VINCE IL GIOCATORE 2!

SPELARE 2 VANN!

GRACZ 2 WYGRYWA!

ИГРОК 2 ВЫИГРАЛ!

PEMAIN 2 MENANG!

プレイヤー2の勝ちです!

玩家2赢了!

GANÓ EL JUGADOR 2

¡EL JUGADOR 2 GANA!

COMPUTER

ORDINATEUR

CPU

COMPUTADOR

DATORN

KOMPUTER

КОМПЬЮТЕР

コンピューター

电脑

COMPUTADORA

PLAYER 1

SPELER 1

JOUEUR 1

SPIELER 1

JUGADOR 1

JOGADOR 1

JOGADOR 1

GIOCATORE 1

SPELARE 1

GRACZ 1

ИГРОК 1

PEMAIN 1

プレイヤー1

玩家1

There are 16 balls in total: 7 solids (numbered 1-7), 7
stripes (numbered 9-15), the black eight-ball, and the white
cue ball.
To play:
Player 1 breaks. If Player 1 pockets a ball, suits (solids or
stripes) are assigned to both players—Player 1's suit being
the same as the pocketed ball. If no balls are pocketed, it's
Player 2's turn.
To win:
The goal in 8-ball is to sink all the balls in your suit, and
then pocket the eight-ball, before your opponent does.
You can also win if your opponent sinks the eight-ball
before pocketing all balls in the assigned suit, or if your
opponent sinks the eight-ball and the cue ball
simultaneously.
Additionally, you win if you pocket the eight-ball when you
break—without sinking any other balls!
Scratching:
If you fail to sink any balls, it's your opponent's turn.
If you sink any of your opponent's balls, it's your
opponent's turn.
If you pocket the cue ball, it's your opponent's turn. The
cue ball is put back in a random spot behind the white line.
When you scratch, any of your own balls sunk during the
same shot are put back on the table in a random spot.

There are 16 balls in total: 7 spots (numbered 1-7), 7
stripes (numbered 9-15), the black 8-ball and the white
cue ball.
To play:
Player 1 breaks. If the breaking shot pots a ball, groups
(spots or stripes) are assigned to both players—Player
1's suit being the same as the potted ball. If no balls are
potted, it's Player 2's turn.
To win:
The goal in 8-ball billiards is to pot all the balls in your
group (spots or stripes) and then pot the 8-ball before
your opponent.

You can also win if your opponent pots the 8-ball before
they’ve potted all the balls in their assigned group, or
pots the 8-ball and the cue ball at the same time.
Additionally, you win if you pot the 8-ball on the breaking
shot—without potting any other balls.
Scratching:
If you fail to pot any balls, it's your opponent's turn.
If you pot any of your opponent's balls, it's your
opponent's turn.
If you pocket the cue ball, it's your opponent's turn. The
cue ball is put back in a random spot behind the white
line.
When you scratch, any of your own balls potted during
the shot are put back on the table in a random spot.

Er zijn 16 ballen in totaal: de hele ballen (1 t/m 7), de
halve ballen (9 t/m 15), de zwarte 8-ball en de witte
speelbal.
Spelen:
Speler 1 begint. Als tijdens de break een hele of halve
bal is gepot, wordt bepaald wie met welke ballen
speelt. Speler 1 speelt in dit geval met de bal die is
gepot. Als er geen bal is gepot, is speler 2 aan de
beurt.
Winnen:
De bedoeling van het spel is dat de ene speler de hele
ballen wegspeelt en de andere speler de halve ballen.
De 8-ball wordt als laatste weggespeeld. Degene die
daar als eerste in slaagt, heeft gewonnen.
Als je de 8-ball pot voordat je andere ballen zijn
weggespeeld, verlies je. Je verliest ook als je de 8-ball
en de witte bal tegelijkertijd pot.
Als je tijdens de break de 8-ball pot, heb je gewonnen.
Missen:
Als je tijdens je beurt geen ballen pot, is je
tegenstander aan de beurt.

Il y a 16 billes au total : 7 billes pleines (numéros 1-7), 7 billes
barrées (numéros 9-15), la bille 8 noire et la bille de choc blanche.
Comment jouer :
Joueur 1 casse. Si le Joueur 1 empoche une bille, les groupes
(pleines ou barrées) sont attribués aux deux joueurs — le Joueur
1 obtient le groupe de billes correspondant à celle qu'il a
empochée. Si aucune bille n'est empochée, c'est au tour du
Joueur 2.
Comment gagner :
Le but du 8-ball est d'empocher toutes les billes de son groupe,
puis la bille 8 avant son adversaire.
On peut également gagner si l'adversaire empoche la bille 8 avant
d'avoir empoché les autres billes de son groupe ou bien si
l'adversaire empoche simultanément la bille 8 et la bille de choc.
En outre, on peut gagner si on empoche la bille 8 lorsque l'on
casse le paquet — sans empocher aucune autre bille !
Changement de tour :
Si on n'arrive pas à empocher de bille, c'est au tour de
l'adversaire.
Si on empoche une bille de l'adversaire, c'est à son tour.
Si on empoche la bille de choc, c'est au tour de l'adversaire. La
bille de choc est placée à un endroit au hasard derrière la ligne
blanche.
Lorsqu'on perd son tour, une de ses propres billes empochées
précédemment dans le jeu est replacée sur la table à un endroit
au hasard.

Insgesamt gibt es 16 Bälle: 7 Volle (nummeriert mit 1-7), 7 Halbe
(nummeriert mit 9-15), die schwarze Acht und den weißen Spielball.
Spielen:
Spieler 1 stößt als Erster (Break). Falls beim Break ein Ball
versenkt wird, werden die beiden Farbgruppen (Volle und Halbe)
den Spielern zugewiesen – Spieler 1 spielt die Gruppe, von der er
eine Kugel versenkt hat. Falls kein Ball versenkt wurde, ist Spieler
2 an der Reihe.
Gewinnen:
Das Ziel bei 8-Ball besteht darin, vor deinem Gegner alle Bälle
deiner Farbgruppe (Volle oder Halbe) und dann die Acht zu
versenken.

Du gewinnst auch, wenn dein Gegner die Acht versenkt , bevor er
alle Bälle seiner Farbgruppe versenkt hat, oder wenn er die Acht
und den Spielball mit demselben Stoß versenkt .
Zusätzlich gewinnst du, wenn es dir gelingt, die Acht beim
Breakstoß zu versenken – ohne dabei eine der anderen Kugeln zu
versenken.
Fouls:
Wenn es dir nicht gelingt, einen Ball zu versenken, ist dein Gegner
dran.
Wenn du einen Ball deines Gegners versenkst, ist dein Gegner
dran.
Wenn du den Spielball versenkst, ist dein Gegner dran. Der
Spielball wird dafür an eine zufällige Stelle hinter der weißen Linie
zurückgelegt.
Wenn du ein Foul begehst, werden alle deine durch diese Stoß
versenkten Kugeln an zufällige Stellen auf den Tisch zurückgelegt.

Hay 16 bolas en total: siete lisas (numeradas del 1 al 7), 7
rayadas (numeradas del 9 al 15), la negra, que es la bola
ocho, y la bola blanca.
Jugar:
El jugador 1 rompe. Si mete una bola, se le asignan las lisas
o las rayadas, dependiendo de cuál haya introducido en la
tronera. Si no mete ninguna bola, el turno pasa al jugador 2.
Ganar:
El objetivo de Bola 8 es meter todas las bolas que te
corresponden (lisas o rayadas), y luego meter la bola ocho
antes que tu adversario.
También puedes ganar si tu adversario mete la bola ocho
antes que el resto de sus bolas, o si introduce la bola ocho
y la blanca a la vez.
Además, puedes ganar si metes solamente la bola ocho al
romper.
Se produce un cambio de turno si:
No consigues meter ninguna bola.
Metes una bola del contrario.
Metes la bola blanca. Después del cambio de turno, se
coloca de nuevo en un lugar al azar detrás de la línea
blanca.
Al cometer cualquiera de estas faltas, las bolas introducidas
en esa tirada se vuelven a poner sobre la mesa en un lugar
al azar.

Tem 16 bolas no total: 7 de cor, chamadas de lisas, (com os
números 1 a 7), 7 com listas, chamadas de listradas, (com os
números de 9 a 15), a bola preta e a bola branca.
Jogar:
Sai o jogador 1. Se o jogador 1 encaçapar uma bola, passa a
atacar o grupo da bola encaçapada (lisas ou listradas). Se
nenhuma bola entrar na caçapa, passa para o turno do jogador
2 jogar.
Vencer:
O objetivo do Bola 8 é encaçapar todas as bolas de seu grupo
e, ao final, matar a bola 8, antes que o adversário.
Você também vencerá se o seu adversário matar a bola 8 antes
de encaçapar todas as bolas de seu grupo, ou se ele matar a
bola branca e a bola 8 no mesmo tempo.
Se você encaçapar a bola 8 na tacada de saída, sem encaçapar
outra bola qualquer, você também vencerá.
Faltas:
Se você não encaçapar nenhuma bola de seu grupo, passa para
o turno de seu adversário.
Se você encaçapar uma das bolas de seu adversário, passa
para o turno de seu adversário.
Se você encaçapar a bola branca, passa para o turno de seu
adversário. A bola branca será colocada em um lugar aleatório,
atrás da linha superior.
Quando você comete falta, todas as bolas do seu grupo que
você matou nessa tacada, retornam para a mesa, para um lugar
aleatório.

Há 16 bolas ao todo: 7 de cor, as chamadas pequenas, (com
os números 1 a 7), 7 às riscas, as chamadas grandes, (com
os números de 9 a 15), a bola preta e a bola branca.
Jogar:
O jogador 1 abre. Se o jogador 1 mete uma bola, passa a
jogar ao grupo da bola que meteu (pequenas ou grandes).
Se nenhuma bola entrar, é a vez do jogador 2 jogar.
Ganhar:
O objectivo do bola 8 é meter todas as bolas do teu grupo e,
por fim, meter a bola 8, antes do adversário.
Também podes ganhar se o adversário meter a bola 8 antes
de ter metido todas as bolas do seu grupo, ou se ele meter a
bola branca e a bola 8 na mesma tacada.
Também ganhas a partida se meteres a bola 8 na abertura,
sem meteres qualquer outra bola.
Faltas:
Se não meteres nenhuma das tuas bolas, passa ao turno do
adversário.
Se meteres uma das bolas do adversário, passa ao turno do
adversário.
Se meteres a bola branca, passa ao turno do adversário. A
bola branca é colocada num lugar aleatório, atrás da linha
branca.
Quando cometes uma falta, qualquer uma das tuas bolas
que entraram durante a tacada, voltam para a mesa, para
um lugar aleatório.

Ci sono 16 bilie in totale: 7 piene (numerate da 1 a 7), 7 a
strisce (numerate da 9 a 15), la bilia 8 nera e la bilia
battente bianca.
Come giocare
Il giocatore 1 spacca. Se manda in buca una bilia, i gruppi
(piene e a strisce) vengono assegnati ai giocatori: il
giocatore 1 prende il gruppo della bilia che ha imbucato.
Se non manda in buca bilie, tocca al giocatore 2.
Obiettivo
L'obiettivo consiste nel mandare in buca tutte le bilie del
tuo gruppo e poi la 8, prima dell'avversario.
Vinci anche se l'avversario manda la numero 8 in buca
prima delle altre bilie del suo gruppo o se imbuca la 8 e la
bilia battente al contempo.
Inoltre, puoi vincere se mandi in buca la 8 con il tiro di
apertura, senza imbucare altre bilie!
Falli e turni
Se non mandi in buca alcuna bilia, tocca all’avversario.
Se mandi in buca una bilia dell’avversario, cambia il turno.
Se mandi in buca la bilia bianca, tocca all’avversario. La
bilia bianca viene rimessa in gioco in una posizione
qualsiasi dietro la linea bianca.
Se commetti un fallo, tutte le tue bilie mandate in buca
nello stesso tiro vengono rimesse in gioco in una
posizione casuale.

Totalt finns det 16 bollar: 7 helfärgade (numren 1-7), 7
halvfärgade (numren 9-15), den svarta boll 8, och den vita
köbollen.
Så spelar man:
Spelare 1 spränger. Om Spelare 1 sänker en boll får spelarna
antingen hel- eller halvfärgade bollar. Spelare 1 får den sänkta
bollens typ. Om ingen boll sänks är det Spelare 2:s tur.
Så vinner man:
Målet i 8-ball är att sänka alla bollar i din färg, och sedan sänka
boll 8, innan din motståndare gör det.
Du kan även vinna om din motståndare sänker boll 8 innan alla
bollar i dennes färg är sänkta, eller om din motståndare sänker
boll 8 och köbollen samtidigt.
Dessutom vinner du om du sänker boll 8 när du spränger -
utan att sänka någon annan boll!
Om du missar:
Om du inte lyckas sänka några bollar går turen över till din
motspelare.
Om du sänker någon av din motspelares bollar går turen över
till din motspelare.
Om du sänker köbollen går turen över till din motspelare.
Köbollen placeras på en slumpvald plats bakom den vita
linjen.
Om du sänker köbollen och någon av dina egna bollar, så tas
dessa upp och placeras på slumpvald plats på bordet.

Wszystkich bil jest 16: 7 pełnych (ponumerowanych 1-7), 7 bil z
paskiem (ponumerowanych 9-15), czarna bila z ósemką i biała
bila rozgrywająca.
Rozpoczęcie gry:
Bile rozbija gracz 1. Jeśli gracz 1 wbije bilę, do obu graczy
zostają przypisane rodzaje bil (pełne lub z paskiem) – gracz 1
będzie grał takim rodzajem bil, który odpowiada wbitej bili. Jeśli
nie zostały wbite żadne bile, kolejka przechodzi na gracza 2.
Aby wygrać:
Celem gry w Ósemce jest wbicie wszystkich bil jednego rodzaju
do łuz, i na końcu wbicie czarnej bili z ósemką, szybciej, niż
zrobi to nasz przeciwnik.
Możesz wygrać także wtedy, kiedy twój przeciwnik wbije czarną
bilę przed wbiciem wszystkich bil danego rodzaju, albo jeśli
wbije do łuz bilę czarną i białą jednocześnie..
Wygrywasz także wtedy, kiedy uda ci się wbić czarną bilę
podczas rozbicia – nie musisz wbijać wtedy żadnych innych bil!
Wbicie białej bili:
Jeśli nie uda ci się wbić żadnej bili, ruch przechodzi na twojego
przeciwnika.
Jeśli wbijesz którąkolwiek z bil należących do twojego
przeciwnika, tracisz kolejkę.
Jeśli wbijesz białą bilę rozgrywającą, tracisz kolejkę. Biała bila
wraca na stół na losowo wybrane miejsce za białą linią.
Przy wbiciu białej bili wszystkie twoje bile, które także zostały
wbite w tym ruchu, wracają na stół na losowo wybrane miejsca.

Всего в игре 16 шаров: 7 цельных (с номерами 1-7), 7
полосатых (с номерами 9-15), черный шар-восьмерка и
белый биток.
Как играть:
Игрок 1 разбивает пирамиду. Если игрок 1 забивает шар в
лузу, группы шаров (цельные и полосатые) распределяются
между игроками; при этом игроку 1 достается группа того же
типа, что и забитый шар. Если ни один из шаров не попал в
лузу, ход переходит к игроку 2.
Как одержать победу:
Цель игры – забить в лузу все шары своей серии, а затем
забить восьмерку, опередив соперника.
Ты также выиграешь, если соперник забьет восьмерку, не
забив перед этим все шары своей серии, или одним ударом
забьет и восьмерку, и биток.
Кроме того, ты выиграешь, если забьешь в лузу восьмерку,
разбивая пирамиду, но при этом все остальные шары
останутся на столе!
Переход хода:
Если ты не забьешь ни одного шара, ход перейдет к
сопернику.
Если ты забьешь хоть один из шаров соперника, ход
перейдет к сопернику.
Если ты забьешь биток, ход перейдет к сопернику. При этом
биток снова ставится на стол в произвольном месте за белой
чертой.
В случае перехода хода все твои шары, забитые последним
ударом, снова помещаются на стол в произвольных местах.

Total ada 16 bola : 7 bintik-bintik (bernomor 1-7), 7
bergaris (bernomor 9-15), bola-8 hitam dan bola putih
penyodok.
Untuk bermain:
Pemain 1 menembak. Jika tembakan penyodok
memasukkan sebuah bola, grup (bintik-bintik atau
bergaris) diberikan ke masing-masing pemain—Pemain 1
mendapatkan jenis sama dengan bola yang masuk. Jika
tidak ada bola yang masuk, giliran Pemain 2.
Untuk menang:
Tujuan dalam biliar 8-bola adalah untuk memasukkan
semua bola dalam grupmu (bintik-bintik atau bergaris) dan
kemudian memasukkan bola-8 sebelum lawanmu.
Kamu juga bisa menang jika lawanmu memasukkan bola-8
sebelum memasukkan semua bola dalam grupnya, atau
memasukkan bola-8 dan bola putih penyodok bersamaan.
Mengulang:
Jika kamu gagal memasukkan bola manapun, giliran
lawanmu.
Jika kamu memasukkan bola lawanmu yang manapun,
giliran lawanmu.
Jika kamu memasukkan bola putih penyodok, giliran
lawanmu. Bola putih penyodok diletakkan di belakang di
sebuah titik acak di belakang garis putih

全部で16個のボールを使用します。1番から7番を
ソリッドボール (一色のボール)、9番から15番を
ストライプボール (白のストライプが入ったボール)
と言います。8番の黒いボールはエイトボール、
白いボールは手玉です。
遊び方:
まずプレイヤー1が手玉をショットします。そのときに
ポケットにソリッドボールが落ちると、ソリッドボールが
プレイヤー1の的球になります
(プレイヤー2の的玉はストライプボール)。
ストライプボールが落ちたときは、その逆になります。
ポケットにボールが落ちなかったときは、プレイヤー2に
順番が回ります。
勝敗:
相手よりも先に、自分の的玉をすべてポケットに落とし、
最後にエイトボールを落としたほうが勝ちです。
的玉をまだ全部ポケットに落としていないのに、エイトボールを
落としてしまったら、その人は負けになります。エイトボールと
手玉を同時に落としてしまった場合も負けとなります。
最初のショットでエイトボールをポケットに落とした場合、
その人の勝ちとなります。ただし… 他のボールを落としては
いけません!
ファール:
ボールをひとつも落とせなかった場合、相手の順番となります。
相手の的玉を落としてしまった場合も、相手の順番となります。
手玉を落としてしまった場合も、相手の順番となります。
手玉は白いラインの後ろのランダムな位置に戻されます。
ファールをした場合、そのときに落ちた自分の的玉は、
テーブルのランダムな位置に戻されます。

球台上共16颗球:其中7颗为全色球(1-7号球),7颗为花色球(9-
15号球);此外还有一颗8号黑球以及一颗白色主球。
玩法:
首先由玩家1开球。若玩家1将一子球击入袋中,则双方将确定各自的
目标球花色(全色球或花色球)——玩家1的目标球花色与自己击入袋
中子球的花色相同。如果玩家1没有将子球击入袋中,则由玩家2击
球。
赢局条件:
8球比赛的目标是在对手之前将本方所有的目标球击入袋中,并随后将
8号球也击入袋中。
如果你的对手未将本方目标球全部击入袋中而先将8号球击入袋;或者
对手让主球与8号球同时落袋,则你也赢得该球局。
此外,如果你开球时将同一花色的所有子球和8号球击入袋中,而其他
的球都仍在球台上,那么你也赢得此局。
失误:
如果你没有将任何球击入袋中,那么将由你的对手击球。
如果你将对手的目标球击入袋中,那么将由你的对手击球。
如果你将母球击入袋中,那么将由你的对手击球。此时对手可将母球放
于白线后的任意位置。
如果你击球失误,那么你在同一杆中所进的球将被取出,并放回球台上
的任意一处。

Hay 16 bolas en total: Siete lisas (numeradas del 1 al 7), 7 rayadas
(numeradas del 9 al 15), la bola ocho negra y la bola blanca.
Para jugar:
El jugador 1 rompe. Si el jugador 1 mete una bola, se asigna el
tipo de bola (lisas o rayadas) a los dos jugadores. El tipo de bola
del jugador 1 es el mismo que la bola que metió. Si no se mete
ninguna bola, es el turno del jugador 2.
Para ganar:
El objetivo del pool a 8 bolas es meter todas las bolas de tu tipo y
luego meter la bola ocho, antes que tu adversario.
También podés ganar si el oponente mete la bola ocho antes de
meter todas las bolas del tipo asignado, o si tu rival mete la bola
ocho y la bola blanca simultáneamente.
Además, ganás si metés la bola ocho cuando rompés, sin meter
ninguna otra bola.
Fallos:
Si no metés ninguna bola, es el turno de tu oponente.
Si metés alguna bola de tu oponente, es su turno.
Si metés la bola blanca, es el turno de tu oponente. La bola blanca
se coloca de nuevo en un lugar a elección detrás de la línea
blanca.
Cuando fallás, ninguna de tus propias bolas metidas durante el
mismo tiro se vuelven a poner sobre la mesa en un lugar al azar.

Existen 16 bolas en total: 7 lisas (numeradas del 1 al 7), 7 rayadas
(numeradas del 9 al 15), la bola 8 que es negra y la bola blanca que
es la que se golpea.
Para jugar:
El jugador 1 da el primer tiro. Si el jugador 1 introduce una bola, las
bolas (lisas o rayadas) se asignan a ambos jugadores. El jugador 1
debe golpear el mismo tipo de bola que introdujo. Si no se introduce
ninguna bola, es el turno del jugador 2.
Para ganar:
El objetivo de la bola 8 es introducir todas las bolas del mismo tipo
(lisas o rayadas) y al final la bola ocho antes de que lo haga tu
oponente.
También puedes ganar si tu oponente introduce la bola ocho antes
de introducir todas sus bolas asignadas, o si tu oponente introduce
la bola 8 y la bola blanca al mismo tiempo.
¡Adicionalmente, ganas si introduces la bola ocho en el primer tiro
sin introducir ninguna otra bola!
Faltas:
Si no consigues introducir ninguna bola, es el turno de tu oponente.
Si introduces una bola de tu oponente, es el turno de tu oponente.
Si introduces la bola blanca, es el turno de tu oponente. La bola
blanca se pone de regreso en la mesa en un lugar aleatorio atrás de
la línea blanca.
Si introduces la bola blanca, todas las bolas introducidas en ese
disparo se regresan a la mesa en un punto aleatorio.

There are 16 balls in total: 7 solids (numbered 1-7),
7 stripes (numbered 9-15), the black eight-ball, and
the white cue ball.
To win:
The first player to pocket 8 balls, regardless of suit
(solids or stripes), wins the game.
Scratching:
If you fail to sink any balls, it's your opponent's
turn.
If you sink the cue ball, it's your opponent's turn.
The cue ball is put back in a random spot behind
the white line.
In this case, any other balls sunk during the same
shot are put back on the table in a random spot.

There are 16 balls in total: 7 spots (numbered 1-7),
7 stripes (numbered 9-15), the black 8-ball and the
white cue ball.
To win:
The first player to pot 8 balls, regardless of suit
(spots or stripes), wins the game.
Scratching:
If you fail to pot any balls, it's your opponent's turn.
If you pocket the cue ball, it's your opponent's turn.
The cue ball is put back in a random spot behind
the white line.
In this case, any other balls sunk at the same time
are put back on the table in a random spot.

Er zijn 16 ballen in totaal: de hele ballen (1 t/m 7),
de halve ballen (9 t/m 15), de zwarte 8-ball en de
witte speelbal.
Winnen:
De eerste speler die 8 ballen (hele en halve)
wegspeelt, heeft gewonnen.
Missen:
Als je tijdens je beurt geen ballen pot, is je
tegenstander aan de beurt.
Als je de witte bal pot, is je tegenstander aan de
beurt. De witte bal wordt op een willekeurige plek
achter de witte lijn gelegd.
In dit geval, worden de ballen die tegelijkertijd in de
pocket zijn beland, op een willekeurige plek op de
tafel gelegd.

Il y a 16 billes au total : 7 billes pleines (numéros 1-
7), 7 billes barrées (numéros 9-15), la bille 8 noire et
la bille de choc blanche.
Comment gagner :
Gagne le jeu le premier à empocher 8 billes dans
n'importe quel groupe (pleines ou barrées).
Changement de tour :
Si on n'arrive pas à empocher de bille, c'est au tour
de l'adversaire.
Si on empoche la bille de choc, c'est au tour de
l'adversaire. La bille de choc est placée à un
endroit au hasard derrière la ligne blanche.
Dans ce cas, les billes empochées dans le même
tour sont replacées sur la table à un endroit au
hasard.

Insgesamt gibt es 16 Kugeln: 7 Volle (nummeriert
mit 1-7), 7 Halbe (nummeriert mit 9-15), die
schwarze Acht und den weißen Spielball.
Gewinnen:
Der erste Spieler, der 8 Bälle versenkt, gewinnt das
Spiel. Die Farbgruppe spielt dabei keine Rolle, es
dürfen Volle und Halbe durcheinander gespielt
werden.
Fouls:
Wenn es dir nicht gelingt, einen Ball zu versenken,
ist dein Gegner dran.
Wenn du den Spielball versenkst, ist dein Gegner
dran. Der Spielball wird dafür an eine zufällige
Stelle hinter der weißen Linie zurückgelegt.
In diesem Fall, werden alle anderen durch diese
Stoß versenkten Kugeln an zufällige Stellen auf den
Tisch zurückgelegt.

Hay 16 bolas en total: siete lisas (numeradas del 1
al 7), 7 rayadas (numeradas del 9 al 15), la negra,
que es la bola ocho, y la bola blanca.
Ganar:
El primer jugador en meter las ocho bolas, ya sean
lisas o rayadas, gana el juego.
Se produce un cambio de turno si:
No consigues meter ninguna bola.
Metes la bola blanca. Después del cambio de turno,
se coloca de nuevo en un lugar al azar detrás de la
línea blanca.
En este caso, las bolas introducidas en esa tirada
se vuelven a poner sobre la mesa en un lugar al
azar.

Tem 16 bolas no total: 7 de cor, chamadas de lisas,
(com os números 1 a 7), 7 com listas, chamadas de
listradas, (com os números de 9 a 15), a bola preta
e a bola branca.
Vencer:
O primeiro jogador a matar 8 bolas,
independentemente do grupo (lisas ou listradas),
vence a partida.
Faltas:
Se você não encaçapar nenhuma bola, passa para
o turno de seu adversário.
Se você encaçapar a bola branca, passa para o
turno de seu adversário. A bola branca será
colocada em um lugar aleatório, atrás da linha
superior.
Nesto caso, todas as bolas que você matou nessa
tacada, retornam para a mesa, para um lugar
aleatório.

Há 16 bolas ao todo: 7 de cor, as chamadas
pequenas, (com os números 1 a 7), 7 às riscas, as
chamadas grandes, (com os números de 9 a 15), a
bola preta e a bola branca.
Ganhar:
O primeiro jogador a meter 8 bolas,
independentemente do grupo (grandes ou
pequenas), ganha o jogo.
Faltas:
Se não meteres nenhuma bola, passa ao turno do
adversário.
Se meteres a bola branca, passa ao turno do
adversário. A bola branca é colocada num lugar
aleatório, atrás da linha branca.
Nesto caso, quaisquer bolas que entraram durante
a tacada, voltam para a mesa, para um lugar
aleatório.

Ci sono 16 bilie in totale: 7 piene (numerate da 1 a
7), 7 a strisce (numerate da 9 a 15), la bilia 8 nera e
la bilia battente bianca.
Obiettivo
Vince il primo giocatore che manda in buca 8 bilie,
a prescindere dal gruppo (piene o a strisce).
Falli e turni
Se non mandi in buca alcuna bilia, tocca
all’avversario.
Se mandi in buca la bilia bianca, tocca
all’avversario. La bilia bianca viene rimessa in
gioco in una posizione qualsiasi dietro la linea
bianca.
In questo caso, tutte le bilie mandate in buca nello
stesso tiro vengono rimesse in gioco in una
posizione casuale.

Totalt finns det 16 bollar: 7 helfärgade (numren 1-
7), 7 halvfärgade (numren 9-15), den svarta boll 8,
och den vita köbollen.
Så vinner man:
Den spelare som först sänker åtta bollar, oavsett
färg (hel- eller halvfärgade), vinner spelet.
Om du missar:
Om du inte lyckas sänka några bollar går turen
över till din motspelare.
Om du sänker köbollen går turen över till din
motspelare. Köbollen placeras på en slumpvald
plats bakom den vita linjen.
Om du sänker köbollen och någon av dina egna
bollar, så tas dessa upp och placeras på slumpvald
plats på bordet.

Wszystkich bil jest 16: 7 pełnych
(ponumerowanych 1-7), 7 z paskiem
(ponumerowanych 9-15), czarna bila z numerem 8
oraz biała bila rozgrywająca.
Aby wygrać:
Wygrywa pierwszy gracz, który wbije do łuz 8 bil,
niezależnie od ich rodzaju (pełne lub z paskiem).
Wbicie białej bili:
Jeśli nie uda ci się wbić żadnej z bil, kolejka
przechodzi na twojego przeciwnika.
Jeśli wbijesz białą bilę, kolejka przechodzi na
twojego przeciwnika. Biała bila wraca na stół, na
losowo wybrane miejsce za białą linią.
Przy wbiciu białej bili wszystkie inne bile, które
także zostały wbite podczas tego strzału, wracają
na stół na losowo wybrane miejsca.

Всего в игре 16 шаров: 7 цельных (с номерами
1-7), 7 полосатых (с номерами 9-15), черный
шар-восьмерка и белый биток.
Как одержать победу:
Выигрывает игрок, который первым забьет 8
любых шаров (неважно, цельных или
полосатых).
Переход хода:
Если ты не забьешь ни одного шара, ход
перейдет к сопернику.
Если ты забьешь биток, ход перейдет к
сопернику. При этом биток снова ставится на
стол в произвольном месте за белой чертой.
В случае перехода хода все шары, забитые
последним ударом, снова помещаются на стол в
произвольных местах.

Total ada 16 bola : 7 bintik-bintik (bernomor 1-7), 7
bergaris (bernomor 9-15), bola-8 hitam dan bola
putih penyodok.
Untuk menang:
Pemain pertama yang memasukkan 8 bola, tanpa
memperdulikan jenis (bintik-bintik atau bergaris),
memenangkan game.
Mengulang:
Jika kamu gagal memasukkan bola apapun, giliran
lawanmu.
Jika kamu memasukkan bola putih penyodok,
giliran lawanmu. Bola penyodok diletakkan di
belakang di sebuah titik di belakang garis putih.
Ketika kamu mengulang, bola-bola lainnya yang
dimasukkan pada waktu yang sama diletakkan
kembali di meja di titik yang acak.

全部で16個のボールを使用します。1番から7番
をソリッドボール (一色のボール)、9番から15番を
ストライプボール (白のストライプが入ったボール)
と言います。8番の黒いボールはエイトボール、
白いボールは手玉です。
勝敗:
相手よりも先にボールを8つポケットに落とし
たほうが勝ちです。ソリッド、
ストライプは関係ありません。
ファール:
ボールをひとつも落とせなかった場合、相手の
順番となります。
手玉を落としてしまった場合も、相手の順番と
なります。手玉は白いラインの後ろのランダムな
位置に戻されます。
ファールをした場合、そのときに落ちた玉は、
テーブルのランダムな位置に戻されます。

球台上共16颗球:其中7颗为全色球(1-7号球),7颗
为花色球(9-15号球);此外还有一颗8号黑球以及一
颗白色主球。
赢局条件:
首先打入任意8颗子球(无论花色)的玩家将获得胜
利。
失误:
如果你没有将任何球击入袋中,那么将由你的对手击
球。
如果你将母球击入袋中,那么将由你的对手击球。此时
对手可将母球放于白线后的任意位置。
如果你击球失误,那么你在同一杆中所进的球将被取
出,并放回球台上的任意一处。

Hay 16 bolas en total: 7 lisas (numeradas del 1 al
7), 7 rayadas (numeradas del 9 al 15), la bola ocho
negra y la bola blanca.
Para ganar:
El primer jugador que mete 8 bolas, sin importar si
son lisas o rayadas, gana el juego.
Fallos:
Si no metés ninguna bola, es el turno de tu
oponente.
Si metés la bola blanca, es el turno de tu oponente.
La bola blanca se coloca de nuevo en un lugar a
elección detrás de la línea blanca.
Cuando fallás, ninguna otra bola metida durante el
mismo tiro se vuelve a poner sobre la mesa en un
lugar al azar.

Existen 16 bolas en total: 7 lisas (numeradas del 1
al 7), 7 rayadas (numeradas del 9 al 15), la bola 8
que es negra y la bola blanca que es la que se
golpea.
Para ganar:
El primer jugador en introducir las 8 bolas, sin
importar si son lisas o rayadas, gana el juego.
Faltas:
Si no introduces ninguna bola, es el turno de tu
oponente.
Si introduces la bola blanca, es el turno de tu
oponente. La bola blanca se regresa en un punto
aleatorio atrás de la línea blanca.
Si introduces la bola blanca, todas las bolas
introducidas en ese disparo se regresan a la mesa
en un punto aleatorio.

MAIN MENU

HOOFDMENU

MENU PRINCIPAL

HAUPTMENÜ

MENÚ PRINCIPAL

MENU PRINCIPALE

HUVUDMENY

MENU GŁÓWNE

МЕНЮ

MENU UTAMA

メインメニュー

主菜单

localization

Straight Pool is played with 15 balls and a
cue ball.There are no set of balls,and each
player can shoot at any ball on the
table,The goal is to be first to pocket 8
balls. A player’s turn is over when they fail
to pocket a  ball or if thay scratch.
Breaking
The break is made by Player. If a ball is
pocketed on the break the player continues
to shoot.
Shooting
A player is allowed to shoot at any ball on
the table. A point is awarded for each ball
legally pocketed. When one player reaches
8 points the game is over and that player is
the winner.

ActionScript [AS3]

Section 1
//CampaignInfo (com.google.analytics.campaign.CampaignInfo) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignInfo { private var _new:Boolean; private var _empty:Boolean; public function CampaignInfo(empty:Boolean=true, newCampaign:Boolean=false){ super(); _empty = empty; _new = newCampaign; } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } public function isNew():Boolean{ return (_new); } public function get utmcn():String{ return ("1"); } public function isEmpty():Boolean{ return (_empty); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; if (((!(isEmpty())) && (isNew()))){ variables.utmcn = utmcn; }; if (((!(isEmpty())) && (!(isNew())))){ variables.utmcr = utmcr; }; return (variables); } public function get utmcr():String{ return ("1"); } } }//package com.google.analytics.campaign
Section 2
//CampaignKey (com.google.analytics.campaign.CampaignKey) package com.google.analytics.campaign { public class CampaignKey { public var UCMD:String;// = "utm_medium" public var UCID:String;// = "utm_id" public var UCTR:String;// = "utm_term" public var UCSR:String;// = "utm_source" public var UCNO:String;// = "utm_nooverride" public var UCCN:String;// = "utm_campaign" public var UGCLID:String;// = "gclid" public var UCCT:String;// = "utm_content" public function CampaignKey(){ super(); } } }//package com.google.analytics.campaign
Section 3
//CampaignManager (com.google.analytics.campaign.CampaignManager) package com.google.analytics.campaign { import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; public class CampaignManager { private var _config:Configuration; private var _domainHash:Number; private var _debug:DebugConfiguration; private var _timeStamp:Number; private var _referrer:String; private var _buffer:Buffer; public static const trackingDelimiter:String = "|"; public function CampaignManager(config:Configuration, debug:DebugConfiguration, buffer:Buffer, domainHash:Number, referrer:String, timeStamp:Number){ super(); _config = config; _debug = debug; _buffer = buffer; _domainHash = domainHash; _referrer = referrer; _timeStamp = timeStamp; } public function getCampaignInformation(search:String, noSessionInformation:Boolean):CampaignInfo{ var campaignTracker:CampaignTracker; var oldTracker:CampaignTracker; var sessionCount:int; var campInfo:CampaignInfo = new CampaignInfo(); var duplicateCampaign:Boolean; var campNoOverride:Boolean; var responseCount:int; if (((_config.allowLinker) && (_buffer.isGenuine()))){ if (!_buffer.hasUTMZ()){ return (campInfo); }; }; campaignTracker = getTrackerFromSearchString(search); if (isValid(campaignTracker)){ campNoOverride = hasNoOverride(search); if (((campNoOverride) && (!(_buffer.hasUTMZ())))){ return (campInfo); }; }; if (!isValid(campaignTracker)){ campaignTracker = getOrganicCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredKeyword(campaignTracker)))){ return (campInfo); }; }; if (((!(isValid(campaignTracker))) && (noSessionInformation))){ campaignTracker = getReferrerCampaign(); if (((!(_buffer.hasUTMZ())) && (isIgnoredReferral(campaignTracker)))){ return (campInfo); }; }; if (!isValid(campaignTracker)){ if (((!(_buffer.hasUTMZ())) && (noSessionInformation))){ campaignTracker = getDirectCampaign(); }; }; if (!isValid(campaignTracker)){ return (campInfo); }; if (((_buffer.hasUTMZ()) && (!(_buffer.utmz.isEmpty())))){ oldTracker = new CampaignTracker(); oldTracker.fromTrackerString(_buffer.utmz.campaignTracking); duplicateCampaign = (oldTracker.toTrackerString() == campaignTracker.toTrackerString()); responseCount = _buffer.utmz.responseCount; }; if (((!(duplicateCampaign)) || (noSessionInformation))){ sessionCount = _buffer.utma.sessionCount; responseCount++; if (sessionCount == 0){ sessionCount = 1; }; _buffer.utmz.domainHash = _domainHash; _buffer.utmz.campaignCreation = _timeStamp; _buffer.utmz.campaignSessions = sessionCount; _buffer.utmz.responseCount = responseCount; _buffer.utmz.campaignTracking = campaignTracker.toTrackerString(); _debug.info(_buffer.utmz.toString(), VisualDebugMode.geek); campInfo = new CampaignInfo(false, true); } else { campInfo = new CampaignInfo(false, false); }; return (campInfo); } public function hasNoOverride(search:String):Boolean{ var key:CampaignKey = _config.campaignKey; if (search == ""){ return (false); }; var variables:Variables = new Variables(search); var value:String = ""; if (variables.hasOwnProperty(key.UCNO)){ value = variables[key.UCNO]; switch (value){ case "1": return (true); case "": case "0": default: return (false); }; }; return (false); } public function getTrackerFromSearchString(search:String):CampaignTracker{ var organicCampaign:CampaignTracker = getOrganicCampaign(); var camp:CampaignTracker = new CampaignTracker(); var key:CampaignKey = _config.campaignKey; if (search == ""){ return (camp); }; var variables:Variables = new Variables(search); if (variables.hasOwnProperty(key.UCID)){ camp.id = variables[key.UCID]; }; if (variables.hasOwnProperty(key.UCSR)){ camp.source = variables[key.UCSR]; }; if (variables.hasOwnProperty(key.UGCLID)){ camp.clickId = variables[key.UGCLID]; }; if (variables.hasOwnProperty(key.UCCN)){ camp.name = variables[key.UCCN]; } else { camp.name = "(not set)"; }; if (variables.hasOwnProperty(key.UCMD)){ camp.medium = variables[key.UCMD]; } else { camp.medium = "(not set)"; }; if (variables.hasOwnProperty(key.UCTR)){ camp.term = variables[key.UCTR]; } else { if (((organicCampaign) && (!((organicCampaign.term == ""))))){ camp.term = organicCampaign.term; }; }; if (variables.hasOwnProperty(key.UCCT)){ camp.content = variables[key.UCCT]; }; return (camp); } public function getOrganicCampaign():CampaignTracker{ var camp:CampaignTracker; var tmp:Array; var currentOrganicSource:OrganicReferrer; var keyword:String; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (camp); }; var ref:URL = new URL(_referrer); var name:String = ""; if (ref.hostName != ""){ if (ref.hostName.indexOf(".") > -1){ tmp = ref.hostName.split("."); switch (tmp.length){ case 2: name = tmp[0]; break; case 3: name = tmp[1]; break; }; }; }; if (_config.organic.match(name)){ currentOrganicSource = _config.organic.getReferrerByName(name); keyword = _config.organic.getKeywordValue(currentOrganicSource, ref.search); camp = new CampaignTracker(); camp.source = currentOrganicSource.engine; camp.name = "(organic)"; camp.medium = "organic"; camp.term = keyword; }; return (camp); } public function getDirectCampaign():CampaignTracker{ var camp:CampaignTracker = new CampaignTracker(); camp.source = "(direct)"; camp.name = "(direct)"; camp.medium = "(none)"; return (camp); } public function isIgnoredKeyword(tracker:CampaignTracker):Boolean{ if (((tracker) && ((tracker.medium == "organic")))){ return (_config.organic.isIgnoredKeyword(tracker.term)); }; return (false); } public function isIgnoredReferral(tracker:CampaignTracker):Boolean{ if (((tracker) && ((tracker.medium == "referral")))){ return (_config.organic.isIgnoredReferral(tracker.source)); }; return (false); } public function isValid(tracker:CampaignTracker):Boolean{ if (((tracker) && (tracker.isValid()))){ return (true); }; return (false); } public function getReferrerCampaign():CampaignTracker{ var camp:CampaignTracker; if (((isInvalidReferrer(_referrer)) || (isFromGoogleCSE(_referrer, _config)))){ return (camp); }; var ref:URL = new URL(_referrer); var hostname:String = ref.hostName; var content:String = ref.path; if (hostname.indexOf("www.") == 0){ hostname = hostname.substr(4); }; camp = new CampaignTracker(); camp.source = hostname; camp.name = "(referral)"; camp.medium = "referral"; camp.content = content; return (camp); } public static function isInvalidReferrer(referrer:String):Boolean{ var url:URL; if ((((((referrer == "")) || ((referrer == "-")))) || ((referrer == "0")))){ return (true); }; if (referrer.indexOf("://") > -1){ url = new URL(referrer); if ((((url.protocol == Protocols.file)) || ((url.protocol == Protocols.none)))){ return (true); }; }; return (false); } public static function isFromGoogleCSE(referrer:String, config:Configuration):Boolean{ var url:URL = new URL(referrer); if (url.hostName.indexOf(config.google) > -1){ if (url.search.indexOf((config.googleSearchParam + "=")) > -1){ if (url.path == ("/" + config.googleCsePath)){ return (true); }; }; }; return (false); } } }//package com.google.analytics.campaign
Section 4
//CampaignTracker (com.google.analytics.campaign.CampaignTracker) package com.google.analytics.campaign { import com.google.analytics.utils.*; public class CampaignTracker { public var content:String; public var source:String; public var clickId:String; public var name:String; public var term:String; public var medium:String; public var id:String; public function CampaignTracker(id:String="", source:String="", clickId:String="", name:String="", medium:String="", term:String="", content:String=""){ super(); this.id = id; this.source = source; this.clickId = clickId; this.name = name; this.medium = medium; this.term = term; this.content = content; } public function isValid():Boolean{ if (((((!((id == ""))) || (!((source == ""))))) || (!((clickId == ""))))){ return (true); }; return (false); } public function toTrackerString():String{ var data:Array = []; _addIfNotEmpty(data, "utmcsr=", source); _addIfNotEmpty(data, "utmccn=", name); _addIfNotEmpty(data, "utmcmd=", medium); _addIfNotEmpty(data, "utmctr=", term); _addIfNotEmpty(data, "utmcct=", content); _addIfNotEmpty(data, "utmcid=", id); _addIfNotEmpty(data, "utmgclid=", clickId); return (data.join(CampaignManager.trackingDelimiter)); } private function _addIfNotEmpty(arr:Array, field:String, value:String):void{ if (value != ""){ value = value.split("+").join("%20"); value = value.split(" ").join("%20"); arr.push((field + value)); }; } public function fromTrackerString(tracker:String):void{ var data:String = tracker.split(CampaignManager.trackingDelimiter).join("&"); var vars:Variables = new Variables(data); if (vars.hasOwnProperty("utmcid")){ this.id = vars["utmcid"]; }; if (vars.hasOwnProperty("utmcsr")){ this.source = vars["utmcsr"]; }; if (vars.hasOwnProperty("utmccn")){ this.name = vars["utmccn"]; }; if (vars.hasOwnProperty("utmcmd")){ this.medium = vars["utmcmd"]; }; if (vars.hasOwnProperty("utmctr")){ this.term = vars["utmctr"]; }; if (vars.hasOwnProperty("utmcct")){ this.content = vars["utmcct"]; }; if (vars.hasOwnProperty("utmgclid")){ this.clickId = vars["utmgclid"]; }; } } }//package com.google.analytics.campaign
Section 5
//BrowserInfo (com.google.analytics.core.BrowserInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.utils.*; public class BrowserInfo { private var _config:Configuration; private var _info:Environment; public function BrowserInfo(config:Configuration, info:Environment){ super(); _config = config; _info = info; } public function get utmul():String{ return (_info.language.toLowerCase()); } public function get utmje():String{ return ("0"); } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } public function get utmsr():String{ return (((_info.screenWidth + "x") + _info.screenHeight)); } public function get utmfl():String{ var v:Version; if (_config.detectFlash){ v = _info.flashVersion; return (((((v.major + ".") + v.minor) + " r") + v.build)); }; return ("-"); } public function get utmcs():String{ return (_info.languageEncoding); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; variables.utmcs = utmcs; variables.utmsr = utmsr; variables.utmsc = utmsc; variables.utmul = utmul; variables.utmje = utmje; variables.utmfl = utmfl; return (variables); } public function get utmsc():String{ return ((_info.screenColorDepth + "-bit")); } } }//package com.google.analytics.core
Section 6
//Buffer (com.google.analytics.core.Buffer) package com.google.analytics.core { import flash.events.*; import flash.net.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.data.*; public dynamic class Buffer { private var _SO:SharedObject; private var _OBJ:Object; private var _utma:UTMA; private var _utmb:UTMB; private var _utmc:UTMC; private var _debug:DebugConfiguration; private var _utmk:UTMK; private var _config:Configuration; private var _utmv:UTMV; private var _utmz:UTMZ; private var _volatile:Boolean; public function Buffer(config:Configuration, debug:DebugConfiguration, volatile:Boolean=false, data:Object=null){ var saveSO:Boolean; var prop:String; super(); _config = config; _debug = debug; UTMB.defaultTimespan = _config.sessionTimeout; UTMZ.defaultTimespan = _config.conversionTimeout; if (!volatile){ _SO = SharedObject.getLocal(_config.cookieName, _config.cookiePath); saveSO = false; if (_SO.data.utma){ if (!hasUTMA()){ _createUMTA(); }; _utma.fromSharedObject(_SO.data.utma); if (_debug.verbose){ _debug.info(("found: " + _utma.toString(true)), VisualDebugMode.geek); }; if (_utma.isExpired()){ if (_debug.verbose){ _debug.warning("UTMA has expired", VisualDebugMode.advanced); }; _clearUTMA(); saveSO = true; }; }; if (_SO.data.utmb){ if (!hasUTMB()){ _createUMTB(); }; _utmb.fromSharedObject(_SO.data.utmb); if (_debug.verbose){ _debug.info(("found: " + _utmb.toString(true)), VisualDebugMode.geek); }; if (_utmb.isExpired()){ if (_debug.verbose){ _debug.warning("UTMB has expired", VisualDebugMode.advanced); }; _clearUTMB(); saveSO = true; }; }; if (_SO.data.utmc){ delete _SO.data.utmc; saveSO = true; }; if (_SO.data.utmk){ if (!hasUTMK()){ _createUMTK(); }; _utmk.fromSharedObject(_SO.data.utmk); if (_debug.verbose){ _debug.info(("found: " + _utmk.toString()), VisualDebugMode.geek); }; }; if (_SO.data.utmv){ if (!hasUTMV()){ _createUMTV(); }; _utmv.fromSharedObject(_SO.data.utmv); if (_debug.verbose){ _debug.info(("found: " + _utmv.toString(true)), VisualDebugMode.geek); }; if (_utmv.isExpired()){ if (_debug.verbose){ _debug.warning("UTMV has expired", VisualDebugMode.advanced); }; _clearUTMV(); saveSO = true; }; }; if (_SO.data.utmz){ if (!hasUTMZ()){ _createUMTZ(); }; _utmz.fromSharedObject(_SO.data.utmz); if (_debug.verbose){ _debug.info(("found: " + _utmz.toString(true)), VisualDebugMode.geek); }; if (_utmz.isExpired()){ if (_debug.verbose){ _debug.warning("UTMZ has expired", VisualDebugMode.advanced); }; _clearUTMZ(); saveSO = true; }; }; if (saveSO){ save(); }; } else { _OBJ = new Object(); if (data){ for (prop in data) { _OBJ[prop] = data[prop]; }; }; }; _volatile = volatile; } public function clearCookies():void{ utma.reset(); utmb.reset(); utmc.reset(); utmz.reset(); utmv.reset(); utmk.reset(); } public function save():void{ var flushStatus:String; if (!isVolatile()){ flushStatus = null; flushStatus = _SO.flush(); //unresolved jump var _slot1 = e; _debug.warning("Error...Could not write SharedObject to disk"); switch (flushStatus){ case SharedObjectFlushStatus.PENDING: _debug.info("Requesting permission to save object..."); _SO.addEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); break; case SharedObjectFlushStatus.FLUSHED: _debug.info("Value flushed to disk."); break; }; }; } public function get utmv():UTMV{ if (!hasUTMV()){ _createUMTV(); }; return (_utmv); } public function get utmz():UTMZ{ if (!hasUTMZ()){ _createUMTZ(); }; return (_utmz); } public function hasUTMA():Boolean{ if (_utma){ return (true); }; return (false); } public function hasUTMB():Boolean{ if (_utmb){ return (true); }; return (false); } public function hasUTMC():Boolean{ if (_utmc){ return (true); }; return (false); } public function isGenuine():Boolean{ if (!hasUTMK()){ return (true); }; return ((utmk.hash == generateCookiesHash())); } public function resetCurrentSession():void{ _clearUTMB(); _clearUTMC(); save(); } public function hasUTMK():Boolean{ if (_utmk){ return (true); }; return (false); } public function generateCookiesHash():Number{ var value:String = ""; value = (value + utma.valueOf()); value = (value + utmb.valueOf()); value = (value + utmc.valueOf()); value = (value + utmz.valueOf()); value = (value + utmv.valueOf()); return (Utils.generateHash(value)); } private function _createUMTB():void{ _utmb = new UTMB(); _utmb.proxy = this; } private function _createUMTC():void{ _utmc = new UTMC(); } private function _createUMTA():void{ _utma = new UTMA(); _utma.proxy = this; } public function hasUTMV():Boolean{ if (_utmv){ return (true); }; return (false); } private function _createUMTK():void{ _utmk = new UTMK(); _utmk.proxy = this; } public function hasUTMZ():Boolean{ if (_utmz){ return (true); }; return (false); } private function _createUMTV():void{ _utmv = new UTMV(); _utmv.proxy = this; } private function _onFlushStatus(event:NetStatusEvent):void{ _debug.info("User closed permission dialog..."); switch (event.info.code){ case "SharedObject.Flush.Success": _debug.info("User granted permission -- value saved."); break; case "SharedObject.Flush.Failed": _debug.info("User denied permission -- value not saved."); break; }; _SO.removeEventListener(NetStatusEvent.NET_STATUS, _onFlushStatus); } private function _createUMTZ():void{ _utmz = new UTMZ(); _utmz.proxy = this; } public function updateUTMA(timestamp:Number):void{ if (_debug.verbose){ _debug.info((("updateUTMA( " + timestamp) + " )"), VisualDebugMode.advanced); }; if (!utma.isEmpty()){ if (isNaN(utma.sessionCount)){ utma.sessionCount = 1; } else { utma.sessionCount = (utma.sessionCount + 1); }; utma.lastTime = utma.currentTime; utma.currentTime = timestamp; }; } private function _clearUTMA():void{ _utma = null; if (!isVolatile()){ _SO.data.utma = null; delete _SO.data.utma; }; } private function _clearUTMC():void{ _utmc = null; } private function _clearUTMB():void{ _utmb = null; if (!isVolatile()){ _SO.data.utmb = null; delete _SO.data.utmb; }; } public function update(name:String, value):void{ if (isVolatile()){ _OBJ[name] = value; } else { _SO.data[name] = value; }; } private function _clearUTMZ():void{ _utmz = null; if (!isVolatile()){ _SO.data.utmz = null; delete _SO.data.utmz; }; } private function _clearUTMV():void{ _utmv = null; if (!isVolatile()){ _SO.data.utmv = null; delete _SO.data.utmv; }; } public function isVolatile():Boolean{ return (_volatile); } public function get utma():UTMA{ if (!hasUTMA()){ _createUMTA(); }; return (_utma); } public function get utmb():UTMB{ if (!hasUTMB()){ _createUMTB(); }; return (_utmb); } public function get utmc():UTMC{ if (!hasUTMC()){ _createUMTC(); }; return (_utmc); } public function get utmk():UTMK{ if (!hasUTMK()){ _createUMTK(); }; return (_utmk); } } }//package com.google.analytics.core
Section 7
//DocumentInfo (com.google.analytics.core.DocumentInfo) package com.google.analytics.core { import com.google.analytics.v4.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; public class DocumentInfo { private var _pageURL:String; private var _utmr:String; private var _config:Configuration; private var _adSense:AdSenseGlobals; private var _info:Environment; public function DocumentInfo(config:Configuration, info:Environment, formatedReferrer:String, pageURL:String=null, adSense:AdSenseGlobals=null){ super(); _config = config; _info = info; _utmr = formatedReferrer; _pageURL = pageURL; _adSense = adSense; } public function get utmr():String{ if (!_utmr){ return ("-"); }; return (_utmr); } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } private function _renderPageURL(pageURL:String=""):String{ var pathname:String = _info.locationPath; var search:String = _info.locationSearch; if (((!(pageURL)) || ((pageURL == "")))){ pageURL = (pathname + unescape(search)); }; return (pageURL); } public function get utmp():String{ return (_renderPageURL(_pageURL)); } public function get utmhid():String{ return (String(_generateHitId())); } private function _generateHitId():Number{ var hid:Number; if (((_adSense.hid) && (!((_adSense.hid == ""))))){ hid = Number(_adSense.hid); } else { hid = Math.round((Math.random() * 2147483647)); _adSense.hid = String(hid); }; return (hid); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; if (((_config.detectTitle) && (!((utmdt == ""))))){ variables.utmdt = utmdt; }; variables.utmhid = utmhid; variables.utmr = utmr; variables.utmp = utmp; return (variables); } public function get utmdt():String{ return (_info.documentTitle); } } }//package com.google.analytics.core
Section 8
//Domain (com.google.analytics.core.Domain) package com.google.analytics.core { import com.google.analytics.debug.*; public class Domain { private var _mode:DomainNameMode; private var _debug:DebugConfiguration; private var _name:String; public function Domain(mode:DomainNameMode=null, name:String="", debug:DebugConfiguration=null){ super(); _debug = debug; if (mode == null){ mode = DomainNameMode.auto; }; _mode = mode; if (mode == DomainNameMode.custom){ this.name = name; } else { _name = name; }; } public function get mode():DomainNameMode{ return (_mode); } public function set mode(value:DomainNameMode):void{ _mode = value; if (_mode == DomainNameMode.none){ _name = ""; }; } public function get name():String{ return (_name); } public function set name(value:String):void{ if (((!((value.charAt(0) == "."))) && (_debug))){ _debug.warning(("missing leading period \".\", cookie will only be accessible on " + value), VisualDebugMode.geek); }; _name = value; } } }//package com.google.analytics.core
Section 9
//DomainNameMode (com.google.analytics.core.DomainNameMode) package com.google.analytics.core { public class DomainNameMode { private var _value:int; private var _name:String; public static const custom:DomainNameMode = new DomainNameMode(2, "custom"); ; public static const none:DomainNameMode = new DomainNameMode(0, "none"); ; public static const auto:DomainNameMode = new DomainNameMode(1, "auto"); ; public function DomainNameMode(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 10
//EventInfo (com.google.analytics.core.EventInfo) package com.google.analytics.core { import com.google.analytics.utils.*; import com.google.analytics.data.*; public class EventInfo { private var _ext10:X10; private var _isEventHit:Boolean; private var _x10:X10; public function EventInfo(isEventHit:Boolean, xObject:X10, extObject:X10=null){ super(); _isEventHit = isEventHit; _x10 = xObject; _ext10 = extObject; } public function toURLString():String{ var v:Variables = toVariables(); return (v.toString()); } public function get utmt():String{ return ("event"); } public function get utme():String{ return (_x10.renderMergedUrlString(_ext10)); } public function toVariables():Variables{ var variables:Variables = new Variables(); variables.URIencode = true; if (_isEventHit){ variables.utmt = utmt; }; variables.utme = utme; return (variables); } } }//package com.google.analytics.core
Section 11
//EventTracker (com.google.analytics.core.EventTracker) package com.google.analytics.core { import com.google.analytics.v4.*; public class EventTracker { private var _parent:GoogleAnalyticsAPI; public var name:String; public function EventTracker(name:String, parent:GoogleAnalyticsAPI){ super(); this.name = name; _parent = parent; } public function trackEvent(action:String, label:String=null, value:Number=NaN):Boolean{ return (_parent.trackEvent(name, action, label, value)); } } }//package com.google.analytics.core
Section 12
//ga_internal (com.google.analytics.core.ga_internal) package com.google.analytics.core { public namespace ga_internal; }//package com.google.analytics.core
Section 13
//GIFRequest (com.google.analytics.core.GIFRequest) package com.google.analytics.core { import flash.display.*; import flash.events.*; import flash.net.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import flash.system.*; public class GIFRequest { private var _info:Environment; private var _count:int; private var _utmac:String; private var _alertcount:int; private var _debug:DebugConfiguration; private var _lastRequest:URLRequest; private var _buffer:Buffer; private var _config:Configuration; private var _requests:Array; public function GIFRequest(config:Configuration, debug:DebugConfiguration, buffer:Buffer, info:Environment){ super(); _config = config; _debug = debug; _buffer = buffer; _info = info; _count = 0; _alertcount = 0; _requests = []; } public function get utmn():String{ return ((Utils.generate32bitRandom() as String)); } public function onIOError(event:IOErrorEvent):void{ var url:String = _lastRequest.url; var id:String = String((_requests.length - 1)); var msg = (("Gif Request #" + id) + " failed"); if (_debug.GIFRequests){ if (!_debug.verbose){ if (url.indexOf("?") > -1){ url = url.split("?")[0]; }; url = _shortenURL(url); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ msg = (msg + ((" \"" + url) + "\" does not exists or is unreachable")); }; _debug.failure(msg); } else { _debug.warning(msg); }; _removeListeners(event.target); } public function send(account:String, variables:Variables=null, force:Boolean=false, rateLimit:Boolean=false):void{ var localPath:String; var localImage:URLRequest; var remoteImage:URLRequest; _utmac = account; if (!variables){ variables = new Variables(); }; variables.URIencode = false; variables.pre = ["utmwv", "utmn", "utmhn", "utmt", "utme", "utmcs", "utmsr", "utmsc", "utmul", "utmje", "utmfl", "utmdt", "utmhid", "utmr", "utmp"]; variables.post = ["utmcc"]; if (_debug.verbose){ _debug.info(((("tracking: " + _buffer.utmb.trackCount) + "/") + _config.trackingLimitPerSession), VisualDebugMode.geek); }; if ((((_buffer.utmb.trackCount < _config.trackingLimitPerSession)) || (force))){ if (rateLimit){ updateToken(); }; if (((((force) || (!(rateLimit)))) || ((_buffer.utmb.token >= 1)))){ if (((!(force)) && (rateLimit))){ _buffer.utmb.token = (_buffer.utmb.token - 1); }; _buffer.utmb.trackCount = (_buffer.utmb.trackCount + 1); if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; variables.utmwv = utmwv; variables.utmn = Utils.generate32bitRandom(); if (_info.domainName != ""){ variables.utmhn = _info.domainName; }; if (_config.sampleRate < 1){ variables.utmsp = (_config.sampleRate * 100); }; if ((((_config.serverMode == ServerOperationMode.local)) || ((_config.serverMode == ServerOperationMode.both)))){ localPath = _info.locationSWFPath; if (localPath.lastIndexOf("/") > 0){ localPath = localPath.substring(0, localPath.lastIndexOf("/")); }; localImage = new URLRequest(); if (_config.localGIFpath.indexOf("http") == 0){ localImage.url = _config.localGIFpath; } else { localImage.url = (localPath + _config.localGIFpath); }; localImage.url = (localImage.url + ("?" + variables.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(localImage); } else { sendRequest(localImage); }; }; if ((((_config.serverMode == ServerOperationMode.remote)) || ((_config.serverMode == ServerOperationMode.both)))){ remoteImage = new URLRequest(); if (_info.protocol == Protocols.HTTPS){ remoteImage.url = _config.secureRemoteGIFpath; } else { if (_info.protocol == Protocols.HTTP){ remoteImage.url = _config.remoteGIFpath; } else { remoteImage.url = _config.remoteGIFpath; }; }; variables.utmac = utmac; variables.utmcc = encodeURIComponent(utmcc); remoteImage.url = (remoteImage.url + ("?" + variables.toString())); if (((_debug.active) && (_debug.GIFRequests))){ _debugSend(remoteImage); } else { sendRequest(remoteImage); }; }; }; }; } public function onSecurityError(event:SecurityErrorEvent):void{ if (_debug.GIFRequests){ _debug.failure(event.text); }; } public function get utmsp():String{ return (((_config.sampleRate * 100) as String)); } public function get utmcc():String{ var cookies:Array = []; if (_buffer.hasUTMA()){ cookies.push((_buffer.utma.toURLString() + ";")); }; if (_buffer.hasUTMZ()){ cookies.push((_buffer.utmz.toURLString() + ";")); }; if (_buffer.hasUTMV()){ cookies.push((_buffer.utmv.toURLString() + ";")); }; return (cookies.join("+")); } public function get utmac():String{ return (_utmac); } public function get utmwv():String{ return (_config.version); } public function sendRequest(request:URLRequest):void{ var request = request; var loader:Loader = new Loader(); loader.name = String(_count++); var context:LoaderContext = new LoaderContext(false); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); _lastRequest = request; _requests[loader.name] = new RequestObject(request); loader.load(request, context); //unresolved jump var _slot1 = e; _debug.failure("\"Loader.load()\" could not instanciate Gif Request"); } private function _removeListeners(target:Object):void{ target.removeEventListener(IOErrorEvent.IO_ERROR, onIOError); target.removeEventListener(Event.COMPLETE, onComplete); } public function updateToken():void{ var tokenDelta:Number; var timestamp:Number = new Date().getTime(); tokenDelta = ((timestamp - _buffer.utmb.lastTime) * (_config.tokenRate / 1000)); if (_debug.verbose){ _debug.info(("tokenDelta: " + tokenDelta), VisualDebugMode.geek); }; if (tokenDelta >= 1){ _buffer.utmb.token = Math.min(Math.floor((_buffer.utmb.token + tokenDelta)), _config.bucketCapacity); _buffer.utmb.lastTime = timestamp; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); }; }; } public function get utmhn():String{ return (_info.domainName); } private function _shortenURL(url:String):String{ var paths:Array; if (url.length > 60){ paths = url.split("/"); while (url.length > 60) { paths.shift(); url = ("../" + paths.join("/")); }; }; return (url); } private function _debugSend(request:URLRequest):void{ var _local3:String; var data:String = ""; switch (_debug.mode){ case VisualDebugMode.geek: data = ((("Gif Request #" + _alertcount) + ":\n") + request.url); break; case VisualDebugMode.advanced: _local3 = request.url; if (_local3.indexOf("?") > -1){ _local3 = _local3.split("?")[0]; }; _local3 = _shortenURL(_local3); data = (((("Send Gif Request #" + _alertcount) + ":\n") + _local3) + " ?"); break; case VisualDebugMode.basic: default: data = (((("Send " + _config.serverMode.toString()) + " Gif Request #") + _alertcount) + " ?"); }; _debug.alertGifRequest(data, request, this); _alertcount++; } public function onComplete(event:Event):void{ var id:String = event.target.loader.name; _requests[id].complete(); var msg = (("Gif Request #" + id) + " sent"); var url:String = _requests[id].request.url; if (_debug.GIFRequests){ if (!_debug.verbose){ if (url.indexOf("?") > -1){ url = url.split("?")[0]; }; url = _shortenURL(url); }; if (int(_debug.mode) > int(VisualDebugMode.basic)){ msg = (msg + ((" to \"" + url) + "\"")); }; _debug.success(msg); } else { _debug.info(msg); }; _removeListeners(event.target); } } }//package com.google.analytics.core
Section 14
//IdleTimer (com.google.analytics.core.IdleTimer) package com.google.analytics.core { import flash.display.*; import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import flash.utils.*; public class IdleTimer { private var _stage:Stage; private var _loop:Timer; private var _lastMove:int; private var _inactivity:Number; private var _debug:DebugConfiguration; private var _session:Timer; private var _buffer:Buffer; public function IdleTimer(config:Configuration, debug:DebugConfiguration, display:DisplayObject, buffer:Buffer){ super(); var delay:Number = config.idleLoop; var inactivity:Number = config.idleTimeout; var sessionTimeout:Number = config.sessionTimeout; _loop = new Timer((delay * 1000)); _session = new Timer((sessionTimeout * 1000), 1); _debug = debug; _stage = display.stage; _buffer = buffer; _lastMove = getTimer(); _inactivity = (inactivity * 1000); _loop.addEventListener(TimerEvent.TIMER, checkForIdle); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); _stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); _debug.info(((((("delay: " + delay) + "sec , inactivity: ") + inactivity) + "sec, sessionTimeout: ") + sessionTimeout), VisualDebugMode.geek); _loop.start(); } private function onMouseMove(event:MouseEvent):void{ _lastMove = getTimer(); if (_session.running){ _debug.info("session timer reset", VisualDebugMode.geek); _session.reset(); }; } public function endSession(event:TimerEvent):void{ _session.removeEventListener(TimerEvent.TIMER_COMPLETE, endSession); _debug.info("session timer end session", VisualDebugMode.geek); _session.reset(); _buffer.resetCurrentSession(); _debug.info(_buffer.utmb.toString(), VisualDebugMode.geek); _debug.info(_buffer.utmc.toString(), VisualDebugMode.geek); _session.addEventListener(TimerEvent.TIMER_COMPLETE, endSession); } public function checkForIdle(event:TimerEvent):void{ var current:int = getTimer(); if ((current - _lastMove) >= _inactivity){ if (!_session.running){ _debug.info("session timer start", VisualDebugMode.geek); _session.start(); }; }; } } }//package com.google.analytics.core
Section 15
//Organic (com.google.analytics.core.Organic) package com.google.analytics.core { import com.google.analytics.utils.*; public class Organic { private var _sourcesCache:Array; private var _sourcesEngine:Array; private var _ignoredKeywords:Array; private var _ignoredReferralsCache:Object; private var _ignoredReferrals:Array; private var _ignoredKeywordsCache:Object; private var _sources:Array; public static var throwErrors:Boolean = false; public function Organic(){ super(); _sources = []; _sourcesCache = []; _sourcesEngine = []; _ignoredReferrals = []; _ignoredReferralsCache = {}; _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function isIgnoredKeyword(keyword:String):Boolean{ if (_ignoredKeywordsCache.hasOwnProperty(keyword)){ return (true); }; return (false); } public function getKeywordValue(or:OrganicReferrer, path:String):String{ var keyword:String = or.keyword; return (getKeywordValueFromPath(keyword, path)); } public function isIgnoredReferral(referrer:String):Boolean{ if (_ignoredReferralsCache.hasOwnProperty(referrer)){ return (true); }; return (false); } public function clear():void{ clearEngines(); clearIgnoredReferrals(); clearIgnoredKeywords(); } public function get count():int{ return (_sources.length); } public function get ignoredKeywordsCount():int{ return (_ignoredKeywords.length); } public function match(name:String):Boolean{ if (name == ""){ return (false); }; name = name.toLowerCase(); if (_sourcesEngine[name] != undefined){ return (true); }; return (false); } public function clearIgnoredKeywords():void{ _ignoredKeywords = []; _ignoredKeywordsCache = {}; } public function addSource(engine:String, keyword:String):void{ var orgref:OrganicReferrer = new OrganicReferrer(engine, keyword); if (_sourcesCache[orgref.toString()] == undefined){ _sources.push(orgref); _sourcesCache[orgref.toString()] = (_sources.length - 1); if (_sourcesEngine[orgref.engine] == undefined){ _sourcesEngine[orgref.engine] = [(_sources.length - 1)]; } else { _sourcesEngine[orgref.engine].push((_sources.length - 1)); }; } else { if (throwErrors){ throw (new Error((orgref.toString() + " already exists, we don't add it."))); }; }; } public function clearEngines():void{ _sources = []; _sourcesCache = []; _sourcesEngine = []; } public function get ignoredReferralsCount():int{ return (_ignoredReferrals.length); } public function addIgnoredReferral(referrer:String):void{ if (_ignoredReferralsCache[referrer] == undefined){ _ignoredReferrals.push(referrer); _ignoredReferralsCache[referrer] = (_ignoredReferrals.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + referrer) + "\" already exists, we don't add it."))); }; }; } public function clearIgnoredReferrals():void{ _ignoredReferrals = []; _ignoredReferralsCache = {}; } public function getReferrerByName(name:String):OrganicReferrer{ var index:int; if (match(name)){ index = _sourcesEngine[name][0]; return (_sources[index]); }; return (null); } public function addIgnoredKeyword(keyword:String):void{ if (_ignoredKeywordsCache[keyword] == undefined){ _ignoredKeywords.push(keyword); _ignoredKeywordsCache[keyword] = (_ignoredKeywords.length - 1); } else { if (throwErrors){ throw (new Error((("\"" + keyword) + "\" already exists, we don't add it."))); }; }; } public function get sources():Array{ return (_sources); } public static function getKeywordValueFromPath(keyword:String, path:String):String{ var value:String; var vars:Variables; if (path.indexOf((keyword + "=")) > -1){ if (path.charAt(0) == "?"){ path = path.substr(1); }; path = path.split("+").join("%20"); vars = new Variables(path); value = vars[keyword]; }; return (value); } } }//package com.google.analytics.core
Section 16
//OrganicReferrer (com.google.analytics.core.OrganicReferrer) package com.google.analytics.core { public class OrganicReferrer { private var _engine:String; private var _keyword:String; public function OrganicReferrer(engine:String, keyword:String){ super(); this.engine = engine; this.keyword = keyword; } public function get keyword():String{ return (_keyword); } public function get engine():String{ return (_engine); } public function set engine(value:String):void{ _engine = value.toLowerCase(); } public function toString():String{ return (((engine + "?") + keyword)); } public function set keyword(value:String):void{ _keyword = value.toLowerCase(); } } }//package com.google.analytics.core
Section 17
//RequestObject (com.google.analytics.core.RequestObject) package com.google.analytics.core { import flash.net.*; import flash.utils.*; public class RequestObject { public var start:int; public var end:int; public var request:URLRequest; public function RequestObject(request:URLRequest){ super(); start = getTimer(); this.request = request; } public function hasCompleted():Boolean{ return ((end > 0)); } public function toString():String{ var data:Array = []; data.push((("duration: " + duration) + "ms")); data.push(("url: " + request.url)); return ((("{ " + data.join(", ")) + " }")); } public function complete():void{ end = getTimer(); } public function get duration():int{ if (!hasCompleted()){ return (0); }; return ((end - start)); } } }//package com.google.analytics.core
Section 18
//ServerOperationMode (com.google.analytics.core.ServerOperationMode) package com.google.analytics.core { public class ServerOperationMode { private var _value:int; private var _name:String; public static const both:ServerOperationMode = new ServerOperationMode(2, "both"); ; public static const remote:ServerOperationMode = new ServerOperationMode(1, "remote"); ; public static const local:ServerOperationMode = new ServerOperationMode(0, "local"); ; public function ServerOperationMode(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.core
Section 19
//TrackerCache (com.google.analytics.core.TrackerCache) package com.google.analytics.core { import com.google.analytics.v4.*; import flash.errors.*; public class TrackerCache implements GoogleAnalyticsAPI { public var tracker:GoogleAnalyticsAPI; private var _ar:Array; public static var CACHE_THROW_ERROR:Boolean; public function TrackerCache(tracker:GoogleAnalyticsAPI=null){ super(); this.tracker = tracker; _ar = []; } public function size():uint{ return (_ar.length); } public function flush():void{ var o:Object; var name:String; var args:Array; var l:int; var i:int; if (tracker == null){ return; }; if (size() > 0){ l = _ar.length; while (i < l) { o = _ar.shift(); name = (o.name as String); args = (o.args as Array); if (((!((name == null))) && ((name in tracker)))){ (tracker[name] as Function).apply(tracker, args); }; i++; }; }; } public function enqueue(name:String, ... _args):Boolean{ if (name == null){ return (false); }; _ar.push({name:name, args:_args}); return (true); } public function link(targetUrl:String, useHash:Boolean=false):void{ enqueue("link", targetUrl, useHash); } public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{ enqueue("addOrganic", newOrganicEngine, newOrganicKeyword); } public function setAllowLinker(enable:Boolean):void{ enqueue("setAllowLinker", enable); } public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{ enqueue("trackEvent", category, action, label, value); return (true); } public function getClientInfo():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getClientInfo' method for the moment.")); }; return (false); } public function trackTrans():void{ enqueue("trackTrans"); } public function trackPageview(pageURL:String=""):void{ enqueue("trackPageview", pageURL); } public function setClientInfo(enable:Boolean):void{ enqueue("setClientInfo", enable); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ enqueue("linkByPost", formObject, useHash); } public function setCookieTimeout(newDefaultTimeout:int):void{ enqueue("setCookieTimeout", newDefaultTimeout); } public function isEmpty():Boolean{ return ((_ar.length == 0)); } public function getDetectTitle():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectTitle' method for the moment.")); }; return (false); } public function resetSession():void{ enqueue("resetSession"); } public function setDetectFlash(enable:Boolean):void{ enqueue("setDetectFlash", enable); } public function clear():void{ _ar = []; } public function setCampNameKey(newCampNameKey:String):void{ enqueue("setCampNameKey", newCampNameKey); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ enqueue("addItem", item, sku, name, category, price, quantity); } public function createEventTracker(objName:String):EventTracker{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'createEventTracker' method for the moment.")); }; return (null); } public function setVar(newVal:String):void{ enqueue("setVar", newVal); } public function clearIgnoredOrganic():void{ enqueue("clearIgnoredOrganic"); } public function setDomainName(newDomainName:String):void{ enqueue("setDomainName", newDomainName); } public function setCampSourceKey(newCampSrcKey:String):void{ enqueue("setCampSourceKey", newCampSrcKey); } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'addTrans' method for the moment.")); }; return (null); } public function setCampContentKey(newCampContentKey:String):void{ enqueue("setCampContentKey", newCampContentKey); } public function setLocalServerMode():void{ enqueue("setLocalServerMode"); } public function getLocalGifPath():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getLocalGifPath' method for the moment.")); }; return (""); } public function setAllowAnchor(enable:Boolean):void{ enqueue("setAllowAnchor", enable); } public function clearIgnoredRef():void{ enqueue("clearIgnoredRef"); } public function setLocalGifPath(newLocalGifPath:String):void{ enqueue("setLocalGifPath", newLocalGifPath); } public function getVersion():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getVersion' method for the moment.")); }; return (""); } public function setCookiePath(newCookiePath:String):void{ enqueue("setCookiePath", newCookiePath); } public function setSampleRate(newRate:Number):void{ enqueue("setSampleRate", newRate); } public function setDetectTitle(enable:Boolean):void{ enqueue("setDetectTitle", enable); } public function setAllowHash(enable:Boolean):void{ enqueue("setAllowHash", enable); } public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{ enqueue("addIgnoredOrganic", newIgnoredOrganicKeyword); } public function setCampNOKey(newCampNOKey:String):void{ enqueue("setCampNOKey", newCampNOKey); } public function getServiceMode():ServerOperationMode{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getServiceMode' method for the moment.")); }; return (null); } public function setLocalRemoteServerMode():void{ enqueue("setLocalRemoteServerMode"); } public function cookiePathCopy(newPath:String):void{ enqueue("cookiePathCopy", newPath); } public function getDetectFlash():Boolean{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getDetectFlash' method for the moment.")); }; return (false); } public function setCampaignTrack(enable:Boolean):void{ enqueue("setCampaignTrack", enable); } public function clearOrganic():void{ enqueue("clearOrganic"); } public function setCampTermKey(newCampTermKey:String):void{ enqueue("setCampTermKey", newCampTermKey); } public function addIgnoredRef(newIgnoredReferrer:String):void{ enqueue("addIgnoredRef", newIgnoredReferrer); } public function setCampMediumKey(newCampMedKey:String):void{ enqueue("setCampMediumKey", newCampMedKey); } public function setSessionTimeout(newTimeout:int):void{ enqueue("setSessionTimeout", newTimeout); } public function setRemoteServerMode():void{ enqueue("setRemoteServerMode"); } public function element(){ return (_ar[0]); } public function getAccount():String{ if (CACHE_THROW_ERROR){ throw (new IllegalOperationError("The tracker is not ready and you can use the 'getAccount' method for the moment.")); }; return (""); } } }//package com.google.analytics.core
Section 20
//TrackerMode (com.google.analytics.core.TrackerMode) package com.google.analytics.core { public class TrackerMode { public static const BRIDGE:String = "Bridge"; public static const AS3:String = "AS3"; public function TrackerMode(){ super(); } } }//package com.google.analytics.core
Section 21
//Utils (com.google.analytics.core.Utils) package com.google.analytics.core { public class Utils { public function Utils(){ super(); } public static function trim(raw:String, everything:Boolean=false):String{ var i:int; var iLeft:int; var iRight:int; if (raw == ""){ return (""); }; var whitespaces:Array = [" ", "\n", "\r", "\t"]; var str:String = raw; if (everything){ i = 0; while ((((i < whitespaces.length)) && ((str.indexOf(whitespaces[i]) > -1)))) { str = str.split(whitespaces[i]).join(""); i++; }; } else { iLeft = 0; while ((((iLeft < str.length)) && ((whitespaces.indexOf(str.charAt(iLeft)) > -1)))) { iLeft++; }; str = str.substr(iLeft); iRight = (str.length - 1); while ((((iRight >= 0)) && ((whitespaces.indexOf(str.charAt(iRight)) > -1)))) { iRight--; }; str = str.substring(0, (iRight + 1)); }; return (str); } public static function generateHash(input:String):int{ var pos:int; var current:int; var hash = 1; var leftMost7:int; if (((!((input == null))) && (!((input == ""))))){ hash = 0; pos = (input.length - 1); while (pos >= 0) { current = input.charCodeAt(pos); hash = ((((hash << 6) & 268435455) + current) + (current << 14)); leftMost7 = (hash & 266338304); if (leftMost7 != 0){ hash = (hash ^ (leftMost7 >> 21)); }; pos--; }; }; return (hash); } public static function generate32bitRandom():int{ return (Math.round((Math.random() * 2147483647))); } public static function validateAccount(account:String):Boolean{ var rel:RegExp = /^UA-[0-9]*-[0-9]*$/; return (rel.test(account)); } } }//package com.google.analytics.core
Section 22
//Cookie (com.google.analytics.data.Cookie) package com.google.analytics.data { public interface Cookie { function fromSharedObject(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/data;Cookie.as:Object):void; function toURLString():String; function get creation():Date; function toSharedObject():Object; function isExpired():Boolean; function set creation(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/data;Cookie.as:Date):void; function set expiration(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/data;Cookie.as:Date):void; function get expiration():Date; } }//package com.google.analytics.data
Section 23
//UTMA (com.google.analytics.data.UTMA) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMA extends UTMCookie { private var _sessionId:Number; private var _domainHash:Number; private var _firstTime:Number; private var _currentTime:Number; private var _lastTime:Number; private var _sessionCount:Number; public function UTMA(domainHash:Number=NaN, sessionId:Number=NaN, firstTime:Number=NaN, lastTime:Number=NaN, currentTime:Number=NaN, sessionCount:Number=NaN){ super("utma", "__utma", ["domainHash", "sessionId", "firstTime", "lastTime", "currentTime", "sessionCount"], (Timespan.twoyears * 1000)); this.domainHash = domainHash; this.sessionId = sessionId; this.firstTime = firstTime; this.lastTime = lastTime; this.currentTime = currentTime; this.sessionCount = sessionCount; } public function get lastTime():Number{ return (_lastTime); } public function set lastTime(value:Number):void{ _lastTime = value; update(); } public function set currentTime(value:Number):void{ _currentTime = value; update(); } public function get sessionId():Number{ return (_sessionId); } public function get sessionCount():Number{ return (_sessionCount); } public function get firstTime():Number{ return (_firstTime); } public function get currentTime():Number{ return (_currentTime); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set sessionId(value:Number):void{ _sessionId = value; update(); } public function set sessionCount(value:Number):void{ _sessionCount = value; update(); } public function get domainHash():Number{ return (_domainHash); } public function set firstTime(value:Number):void{ _firstTime = value; update(); } } }//package com.google.analytics.data
Section 24
//UTMB (com.google.analytics.data.UTMB) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMB extends UTMCookie { private var _trackCount:Number; private var _lastTime:Number; private var _domainHash:Number; private var _token:Number; public static var defaultTimespan:Number = Timespan.thirtyminutes; public function UTMB(domainHash:Number=NaN, trackCount:Number=NaN, token:Number=NaN, lastTime:Number=NaN){ super("utmb", "__utmb", ["domainHash", "trackCount", "token", "lastTime"], (defaultTimespan * 1000)); this.domainHash = domainHash; this.trackCount = trackCount; this.token = token; this.lastTime = lastTime; } public function set token(value:Number):void{ _token = value; update(); } public function set trackCount(value:Number):void{ _trackCount = value; update(); } public function get lastTime():Number{ return (_lastTime); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set lastTime(value:Number):void{ _lastTime = value; update(); } public function get domainHash():Number{ return (_domainHash); } public function get token():Number{ return (_token); } public function get trackCount():Number{ return (_trackCount); } } }//package com.google.analytics.data
Section 25
//UTMC (com.google.analytics.data.UTMC) package com.google.analytics.data { public class UTMC extends UTMCookie { private var _domainHash:Number; public function UTMC(domainHash:Number=NaN){ super("utmc", "__utmc", ["domainHash"]); this.domainHash = domainHash; } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } } }//package com.google.analytics.data
Section 26
//UTMCookie (com.google.analytics.data.UTMCookie) package com.google.analytics.data { import com.google.analytics.core.*; public class UTMCookie implements Cookie { protected var inURL:String; protected var name:String; private var _creation:Date; private var _expiration:Date; public var proxy:Buffer; protected var fields:Array; private var _timespan:Number; public function UTMCookie(name:String, inURL:String, fields:Array, timespan:Number=0){ super(); this.name = name; this.inURL = inURL; this.fields = fields; _timestamp(timespan); } public function isEmpty():Boolean{ var field:String; var empty:int; var i:int; while (i < fields.length) { field = fields[i]; if ((((this[field] is Number)) && (isNaN(this[field])))){ empty++; } else { if ((((this[field] is String)) && ((this[field] == "")))){ empty++; }; }; i++; }; if (empty == fields.length){ return (true); }; return (false); } public function resetTimestamp(timespan:Number=NaN):void{ if (!isNaN(timespan)){ _timespan = timespan; }; _creation = null; _expiration = null; _timestamp(_timespan); } protected function update():void{ resetTimestamp(); if (proxy){ proxy.update(name, toSharedObject()); }; } public function reset():void{ var field:String; var i:int; while (i < fields.length) { field = fields[i]; if ((this[field] is Number)){ this[field] = NaN; } else { if ((this[field] is String)){ this[field] = ""; }; }; i++; }; resetTimestamp(); update(); } public function fromSharedObject(data:Object):void{ var field:String; var len:int = fields.length; var i:int; while (i < len) { field = fields[i]; if (data[field]){ this[field] = data[field]; }; i++; }; if (data.creation){ this.creation = data.creation; }; if (data.expiration){ this.expiration = data.expiration; }; } private function _timestamp(timespan:Number):void{ creation = new Date(); _timespan = timespan; if (timespan > 0){ expiration = new Date((creation.valueOf() + timespan)); }; } public function isExpired():Boolean{ var current:Date = new Date(); var diff:Number = (expiration.valueOf() - current.valueOf()); if (diff <= 0){ return (true); }; return (false); } public function set expiration(value:Date):void{ _expiration = value; } public function get creation():Date{ return (_creation); } public function valueOf():String{ var field:String; var value:*; var data:Array = []; var i:int; while (i < fields.length) { field = fields[i]; value = this[field]; if ((value is String)){ if (value == ""){ value = "-"; data.push(value); } else { data.push(value); }; } else { if ((value is Number)){ if (value == 0){ data.push(value); } else { if (isNaN(value)){ value = "-"; data.push(value); } else { data.push(value); }; }; }; }; i++; }; return (("" + data.join("."))); } public function toURLString():String{ return (((inURL + "=") + valueOf())); } public function get expiration():Date{ if (_expiration){ return (_expiration); }; return (new Date((new Date().valueOf() + 1000))); } public function toSharedObject():Object{ var field:String; var value:*; var data:Object = {}; var i:int; for (;i < fields.length;i++) { field = fields[i]; value = this[field]; if ((value is String)){ data[field] = value; } else { if (value == 0){ data[field] = value; } else { if (isNaN(value)){ continue; } else { data[field] = value; }; }; }; }; data.creation = creation; data.expiration = expiration; return (data); } public function toString(showTimestamp:Boolean=false):String{ var field:String; var value:*; var data:Array = []; var len:int = fields.length; var i:int; for (;i < len;i++) { field = fields[i]; value = this[field]; if ((value is String)){ data.push((((field + ": \"") + value) + "\"")); } else { if (value == 0){ data.push(((field + ": ") + value)); } else { if (isNaN(value)){ continue; } else { data.push(((field + ": ") + value)); }; }; }; }; var str = (((name.toUpperCase() + " {") + data.join(", ")) + "}"); if (showTimestamp){ str = (str + (((" creation:" + creation) + ", expiration:") + expiration)); }; return (str); } public function set creation(value:Date):void{ _creation = value; } } }//package com.google.analytics.data
Section 27
//UTMK (com.google.analytics.data.UTMK) package com.google.analytics.data { public class UTMK extends UTMCookie { private var _hash:Number; public function UTMK(hash:Number=NaN){ super("utmk", "__utmk", ["hash"]); this.hash = hash; } public function set hash(value:Number):void{ _hash = value; update(); } public function get hash():Number{ return (_hash); } } }//package com.google.analytics.data
Section 28
//UTMV (com.google.analytics.data.UTMV) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMV extends UTMCookie { private var _domainHash:Number; private var _value:String; public function UTMV(domainHash:Number=NaN, value:String=""){ super("utmv", "__utmv", ["domainHash", "value"], (Timespan.twoyears * 1000)); this.domainHash = domainHash; this.value = value; } override public function toURLString():String{ return (((inURL + "=") + encodeURI(valueOf()))); } public function get value():String{ return (_value); } public function get domainHash():Number{ return (_domainHash); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set value(value:String):void{ _value = value; update(); } } }//package com.google.analytics.data
Section 29
//UTMZ (com.google.analytics.data.UTMZ) package com.google.analytics.data { import com.google.analytics.utils.*; public class UTMZ extends UTMCookie { private var _campaignTracking:String; private var _campaignCreation:Number; private var _responseCount:Number; private var _domainHash:Number; private var _campaignSessions:Number; public static var defaultTimespan:Number = Timespan.sixmonths; public function UTMZ(domainHash:Number=NaN, campaignCreation:Number=NaN, campaignSessions:Number=NaN, responseCount:Number=NaN, campaignTracking:String=""){ super("utmz", "__utmz", ["domainHash", "campaignCreation", "campaignSessions", "responseCount", "campaignTracking"], (defaultTimespan * 1000)); this.domainHash = domainHash; this.campaignCreation = campaignCreation; this.campaignSessions = campaignSessions; this.responseCount = responseCount; this.campaignTracking = campaignTracking; } public function set responseCount(value:Number):void{ _responseCount = value; update(); } public function set domainHash(value:Number):void{ _domainHash = value; update(); } public function set campaignCreation(value:Number):void{ _campaignCreation = value; update(); } public function get campaignTracking():String{ return (_campaignTracking); } public function get campaignSessions():Number{ return (_campaignSessions); } public function get domainHash():Number{ return (_domainHash); } public function get responseCount():Number{ return (_responseCount); } public function get campaignCreation():Number{ return (_campaignCreation); } public function set campaignSessions(value:Number):void{ _campaignSessions = value; update(); } public function set campaignTracking(value:String):void{ _campaignTracking = value; update(); } } }//package com.google.analytics.data
Section 30
//X10 (com.google.analytics.data.X10) package com.google.analytics.data { public class X10 { private var _delimEnd:String;// = ")" private var _minimum:int; private var _delimSet:String;// = "*" private var _escapeChar:String;// = "'" private var _delimBegin:String;// = "(" private var _delimNumValue:String;// = "!" private var _key:String;// = "k" private var _set:Array; private var _hasData:int; private var _escapeCharMap:Object; private var _projectData:Object; private var _value:String;// = "v" public function X10(){ _set = [_key, _value]; super(); _projectData = {}; _escapeCharMap = {}; _escapeCharMap[_escapeChar] = "'0"; _escapeCharMap[_delimEnd] = "'1"; _escapeCharMap[_delimSet] = "'2"; _escapeCharMap[_delimNumValue] = "'3"; _minimum = 1; } private function _setInternal(projectId:Number, type:String, num:Number, value:String):void{ if (!hasProject(projectId)){ _projectData[projectId] = {}; }; if (_projectData[projectId][type] == undefined){ _projectData[projectId][type] = []; }; _projectData[projectId][type][num] = value; _hasData = (_hasData + 1); } private function _renderProject(project:Object):String{ var i:int; var data:Array; var result:String = ""; var needTypeQualifier:Boolean; var l:int = _set.length; i = 0; while (i < l) { data = project[_set[i]]; if (data){ if (needTypeQualifier){ result = (result + _set[i]); }; result = (result + _renderDataType(data)); needTypeQualifier = false; } else { needTypeQualifier = true; }; i++; }; return (result); } public function hasProject(projectId:Number):Boolean{ return (_projectData[projectId]); } public function clearKey(projectId:Number):void{ _clearInternal(projectId, _key); } private function _renderDataType(data:Array):String{ var str:String; var i:int; var result:Array = []; i = 0; while (i < data.length) { if (data[i] != undefined){ str = ""; if (((!((i == _minimum))) && ((data[(i - 1)] == undefined)))){ str = (str + i.toString()); str = (str + _delimNumValue); }; str = (str + _escapeExtensibleValue(data[i])); result.push(str); }; i++; }; return (((_delimBegin + result.join(_delimSet)) + _delimEnd)); } public function getKey(projectId:Number, num:Number):String{ return ((_getInternal(projectId, _key, num) as String)); } public function hasData():Boolean{ return ((_hasData > 0)); } public function renderMergedUrlString(extObject:X10=null):String{ var projectId:String; if (!extObject){ return (renderUrlString()); }; var result:Array = [extObject.renderUrlString()]; for (projectId in _projectData) { if (((hasProject(Number(projectId))) && (!(extObject.hasProject(Number(projectId)))))){ result.push((projectId + _renderProject(_projectData[projectId]))); }; }; return (result.join("")); } public function setValue(projectId:Number, num:Number, value:Number):Boolean{ if (((((!((Math.round(value) == value))) || (isNaN(value)))) || ((value == Infinity)))){ return (false); }; _setInternal(projectId, _value, num, value.toString()); return (true); } public function renderUrlString():String{ var projectId:String; var result:Array = []; for (projectId in _projectData) { if (hasProject(Number(projectId))){ result.push((projectId + _renderProject(_projectData[projectId]))); }; }; return (result.join("")); } private function _getInternal(projectId:Number, type:String, num:Number):Object{ if (((hasProject(projectId)) && (!((_projectData[projectId][type] == undefined))))){ return (_projectData[projectId][type][num]); }; return (undefined); } public function setKey(projectId:Number, num:Number, value:String):Boolean{ _setInternal(projectId, _key, num, value); return (true); } public function clearValue(projectId:Number):void{ _clearInternal(projectId, _value); } private function _clearInternal(projectId:Number, type:String):void{ var isEmpty:Boolean; var i:int; var l:int; if (((hasProject(projectId)) && (!((_projectData[projectId][type] == undefined))))){ _projectData[projectId][type] = undefined; isEmpty = true; l = _set.length; i = 0; while (i < l) { if (_projectData[projectId][_set[i]] != undefined){ isEmpty = false; break; }; i++; }; if (isEmpty){ _projectData[projectId] = undefined; _hasData = (_hasData - 1); }; }; } public function getValue(projectId:Number, num:Number){ var value:* = _getInternal(projectId, _value, num); if (value == null){ return (null); }; return (Number(value)); } private function _escapeExtensibleValue(value:String):String{ var i:int; var c:String; var escaped:String; var result:String = ""; i = 0; while (i < value.length) { c = value.charAt(i); escaped = _escapeCharMap[c]; if (escaped){ result = (result + escaped); } else { result = (result + c); }; i++; }; return (result); } } }//package com.google.analytics.data
Section 31
//_Style (com.google.analytics.debug._Style) package com.google.analytics.debug { import flash.net.*; import flash.text.*; public class _Style { public var failureColor:uint; public var borderColor:uint; public var backgroundColor:uint; private var _sheet:StyleSheet; public var roundedCorner:uint; public var warningColor:uint; public var infoColor:uint; public var alertColor:uint; public var successColor:uint; private var _loader:URLLoader; private var _defaultSheet:String; public function _Style(){ super(); _sheet = new StyleSheet(); _loader = new URLLoader(); _init(); } private function _parseSheet(data:String):void{ _sheet.parseCSS(data); } public function get sheet():StyleSheet{ return (_sheet); } private function _init():void{ _defaultSheet = ""; _defaultSheet = (_defaultSheet + "a{text-decoration: underline;}\n"); _defaultSheet = (_defaultSheet + ".uiLabel{color: #000000;font-family: Arial;font-size: 12;margin-left: 2;margin-right: 2;}\n"); _defaultSheet = (_defaultSheet + ".uiWarning{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlert{color: #ffffff;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiInfo{color: #000000;font-family: Arial;font-size: 14;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiSuccess{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiFailure{color: #ffffff;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertAction{color: #ffffff;text-align: center;font-family: Arial;font-size: 12;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + ".uiAlertTitle{color: #ffffff;font-family: Arial;font-size: 16;font-weight: bold;margin-left: 6;margin-right: 6;}\n"); _defaultSheet = (_defaultSheet + "\n"); roundedCorner = 6; backgroundColor = 0xCCCCCC; borderColor = 0x555555; infoColor = 16777113; alertColor = 0xFFCC00; warningColor = 0xCC0000; successColor = 0xFF00; failureColor = 0xFF0000; _parseSheet(_defaultSheet); } } }//package com.google.analytics.debug
Section 32
//Alert (com.google.analytics.debug.Alert) package com.google.analytics.debug { import flash.events.*; public class Alert extends Label { public var autoClose:Boolean;// = true public var actionOnNextLine:Boolean;// = true private var _actions:Array; public function Alert(text:String, actions:Array, tag:String="uiAlert", color:uint=0, alignement:Align=null, stickToEdge:Boolean=false, actionOnNextLine:Boolean=true){ if (color == 0){ color = Style.alertColor; }; if (alignement == null){ alignement = Align.center; }; super(text, tag, color, alignement, stickToEdge); this.selectable = true; super.mouseChildren = true; this.buttonMode = true; this.mouseEnabled = true; this.useHandCursor = true; this.actionOnNextLine = actionOnNextLine; _actions = []; var i:int; while (i < actions.length) { actions[i].container = this; _actions.push(actions[i]); i++; }; } private function _defineActions():void{ var action:AlertAction; var str:String = ""; if (actionOnNextLine){ str = (str + "\n"); } else { str = (str + " |"); }; str = (str + " "); var actions:Array = []; var i:int; while (i < _actions.length) { action = _actions[i]; actions.push((((("<a href=\"event:" + action.activator) + "\">") + action.name) + "</a>")); i++; }; str = (str + actions.join(" | ")); appendText(str, "uiAlertAction"); } protected function isValidAction(action:String):Boolean{ var i:int; while (i < _actions.length) { if (action == _actions[i].activator){ return (true); }; i++; }; return (false); } override protected function layout():void{ super.layout(); _defineActions(); } protected function getAction(name:String):AlertAction{ var i:int; while (i < _actions.length) { if (name == _actions[i].activator){ return (_actions[i]); }; i++; }; return (null); } protected function spaces(num:int):String{ var str:String = ""; var spc:String = " "; var i:int; while (i < (num + 1)) { str = (str + spc); i++; }; return (str); } override public function onLink(event:TextEvent):void{ var action:AlertAction; if (isValidAction(event.text)){ action = getAction(event.text); if (action){ action.execute(); }; }; if (autoClose){ close(); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 33
//AlertAction (com.google.analytics.debug.AlertAction) package com.google.analytics.debug { public class AlertAction { public var container:Alert; private var _callback; public var activator:String; public var name:String; public function AlertAction(name:String, activator:String, callback){ super(); this.name = name; this.activator = activator; _callback = callback; } public function execute():void{ if (_callback){ if ((_callback is Function)){ (_callback as Function)(); } else { if ((_callback is String)){ var _local1 = container; _local1[_callback](); }; }; }; } } }//package com.google.analytics.debug
Section 34
//Align (com.google.analytics.debug.Align) package com.google.analytics.debug { public class Align { private var _value:int; private var _name:String; public static const bottomRight:Align = new Align(18, "bottomRight"); ; public static const right:Align = new Align(16, "right"); ; public static const left:Align = new Align(32, "left"); ; public static const topRight:Align = new Align(17, "topRight"); ; public static const bottom:Align = new Align(2, "bottom"); ; public static const bottomLeft:Align = new Align(34, "bottomLeft"); ; public static const topLeft:Align = new Align(33, "topLeft"); ; public static const center:Align = new Align(0x0100, "center"); ; public static const none:Align = new Align(0, "none"); ; public static const top:Align = new Align(1, "top"); ; public function Align(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 35
//Background (com.google.analytics.debug.Background) package com.google.analytics.debug { import flash.display.*; public class Background { public function Background(){ super(); } public static function drawRounded(target, g:Graphics, width:uint=0, height:uint=0):void{ var W:uint; var H:uint; var R:uint = Style.roundedCorner; if ((((width > 0)) && ((height > 0)))){ W = width; H = height; } else { W = target.width; H = target.height; }; if (((target.stickToEdge) && (!((target.alignement == Align.none))))){ switch (target.alignement){ case Align.top: g.drawRoundRectComplex(0, 0, W, H, 0, 0, R, R); break; case Align.topLeft: g.drawRoundRectComplex(0, 0, W, H, 0, 0, 0, R); break; case Align.topRight: g.drawRoundRectComplex(0, 0, W, H, 0, 0, R, 0); break; case Align.bottom: g.drawRoundRectComplex(0, 0, W, H, R, R, 0, 0); break; case Align.bottomLeft: g.drawRoundRectComplex(0, 0, W, H, 0, R, 0, 0); break; case Align.bottomRight: g.drawRoundRectComplex(0, 0, W, H, R, 0, 0, 0); break; case Align.left: g.drawRoundRectComplex(0, 0, W, H, 0, R, 0, R); break; case Align.right: g.drawRoundRectComplex(0, 0, W, H, R, 0, R, 0); break; case Align.center: g.drawRoundRect(0, 0, W, H, R, R); break; }; } else { g.drawRoundRect(0, 0, W, H, R, R); }; } } }//package com.google.analytics.debug
Section 36
//Debug (com.google.analytics.debug.Debug) package com.google.analytics.debug { import flash.events.*; import flash.ui.*; public class Debug extends Label { private var _lines:Array; private var _preferredForcedWidth:uint;// = 540 private var _linediff:int;// = 0 public var maxLines:uint;// = 16 public static var count:uint = 0; public function Debug(color:uint=0, alignement:Align=null, stickToEdge:Boolean=false){ if (alignement == null){ alignement = Align.bottom; }; super("", "uiLabel", color, alignement, stickToEdge); this.name = ("Debug" + count++); _lines = []; selectable = true; addEventListener(KeyboardEvent.KEY_DOWN, onKey); } public function writeBold(message:String):void{ write(message, true); } private function _getLinesToDisplay(direction:int=0):Array{ var lines:Array; var start:uint; var end:uint; if ((_lines.length - 1) > maxLines){ if ((_linediff <= 0)){ _linediff = (_linediff + direction); } else { if ((((_linediff > 0)) && ((direction < 0)))){ _linediff = (_linediff + direction); }; }; start = ((_lines.length - maxLines) + _linediff); end = (start + maxLines); lines = _lines.slice(start, end); } else { lines = _lines; }; return (lines); } private function onKey(event:KeyboardEvent=null):void{ var lines:Array; switch (event.keyCode){ case Keyboard.DOWN: lines = _getLinesToDisplay(1); break; case Keyboard.UP: lines = _getLinesToDisplay(-1); break; default: lines = null; }; if (lines == null){ return; }; text = lines.join("\n"); } override public function get forcedWidth():uint{ if (this.parent){ if (UISprite(this.parent).forcedWidth > _preferredForcedWidth){ return (_preferredForcedWidth); }; return (UISprite(this.parent).forcedWidth); } else { }; return (!NULL!); } public function write(message:String, bold:Boolean=false):void{ var inputLines:Array; if (message.indexOf("") > -1){ inputLines = message.split("\n"); } else { inputLines = [message]; }; var pre:String = ""; var post:String = ""; if (bold){ pre = "<b>"; post = "</b>"; }; var i:int; while (i < inputLines.length) { _lines.push(((pre + inputLines[i]) + post)); i++; }; var lines:Array = _getLinesToDisplay(); text = lines.join("\n"); } public function close():void{ dispose(); } override protected function dispose():void{ removeEventListener(KeyboardEvent.KEY_DOWN, onKey); super.dispose(); } } }//package com.google.analytics.debug
Section 37
//DebugConfiguration (com.google.analytics.debug.DebugConfiguration) package com.google.analytics.debug { import flash.net.*; import com.google.analytics.core.*; import flash.utils.*; import flash.ui.*; public class DebugConfiguration { public var showHideKey:Number; private var _mode:VisualDebugMode; private var _verbose:Boolean;// = false public var destroyKey:Number; public var GIFRequests:Boolean;// = false public var showInfos:Boolean;// = true public var infoTimeout:Number;// = 1000 public var minimizedOnStart:Boolean;// = false private var _active:Boolean;// = false public var traceOutput:Boolean;// = false public var layout:ILayout; public var warningTimeout:Number;// = 1500 public var javascript:Boolean;// = false public var showWarnings:Boolean;// = true private var _visualInitialized:Boolean;// = false public function DebugConfiguration(){ _mode = VisualDebugMode.basic; showHideKey = Keyboard.SPACE; destroyKey = Keyboard.BACKSPACE; super(); } public function get verbose():Boolean{ return (_verbose); } public function set verbose(value:Boolean):void{ _verbose = value; } public function set mode(value):void{ if ((value is String)){ switch (value){ case "geek": value = VisualDebugMode.geek; break; case "advanced": value = VisualDebugMode.advanced; break; case "basic": default: value = VisualDebugMode.basic; }; }; _mode = value; } public function success(message:String):void{ if (layout){ layout.createSuccessAlert(message); }; if (traceOutput){ trace((("[+] " + message) + " !!")); }; } public function get active():Boolean{ return (_active); } private function _initializeVisual():void{ if (layout){ layout.init(); _visualInitialized = true; }; } private function _destroyVisual():void{ if (((layout) && (_visualInitialized))){ layout.destroy(); }; } public function warning(message:String, mode:VisualDebugMode=null):void{ if (_filter(mode)){ return; }; if (((layout) && (showWarnings))){ layout.createWarning(message); }; if (traceOutput){ trace((("## " + message) + " ##")); }; } private function _filter(mode:VisualDebugMode=null):Boolean{ return (((mode) && ((int(mode) >= int(this.mode))))); } public function failure(message:String):void{ if (layout){ layout.createFailureAlert(message); }; if (traceOutput){ trace((("[-] " + message) + " !!")); }; } public function get mode(){ return (_mode); } public function set active(value:Boolean):void{ _active = value; if (_active){ _initializeVisual(); } else { _destroyVisual(); }; } protected function trace(message:String):void{ var msgs:Array; var j:int; var messages:Array = []; var pre0:String = ""; var pre1:String = ""; if (this.mode == VisualDebugMode.geek){ pre0 = (getTimer() + " - "); pre1 = (new Array(pre0.length).join(" ") + " "); }; if (message.indexOf("\n") > -1){ msgs = message.split("\n"); j = 0; while (j < msgs.length) { if (msgs[j] == ""){ } else { if (j == 0){ messages.push((pre0 + msgs[j])); } else { messages.push((pre1 + msgs[j])); }; }; j++; }; } else { messages.push((pre0 + message)); }; var len:int = messages.length; var i:int; while (i < len) { trace(messages[i]); i++; }; } public function alert(message:String):void{ if (layout){ layout.createAlert(message); }; if (traceOutput){ trace((("!! " + message) + " !!")); }; } public function info(message:String, mode:VisualDebugMode=null):void{ if (_filter(mode)){ return; }; if (((layout) && (showInfos))){ layout.createInfo(message); }; if (traceOutput){ trace(message); }; } public function alertGifRequest(message:String, request:URLRequest, ref:GIFRequest):void{ if (layout){ layout.createGIFRequestAlert(message, request, ref); }; if (traceOutput){ trace(((">> " + message) + " <<")); }; } } }//package com.google.analytics.debug
Section 38
//FailureAlert (com.google.analytics.debug.FailureAlert) package com.google.analytics.debug { public class FailureAlert extends Alert { public function FailureAlert(debug:DebugConfiguration, text:String, actions:Array){ var alignement:Align = Align.bottomLeft; var stickToEdge:Boolean; var actionOnNextLine:Boolean; if (debug.verbose){ text = ((("<u><span class=\"uiAlertTitle\">Failure</span>" + spaces(18)) + "</u>\n\n") + text); alignement = Align.center; stickToEdge = false; actionOnNextLine = true; }; super(text, actions, "uiFailure", Style.failureColor, alignement, stickToEdge, actionOnNextLine); } } }//package com.google.analytics.debug
Section 39
//GIFRequestAlert (com.google.analytics.debug.GIFRequestAlert) package com.google.analytics.debug { public class GIFRequestAlert extends Alert { public function GIFRequestAlert(text:String, actions:Array){ super(text, actions); } } }//package com.google.analytics.debug
Section 40
//ILayout (com.google.analytics.debug.ILayout) package com.google.analytics.debug { import flash.display.*; import flash.net.*; import com.google.analytics.core.*; public interface ILayout { function createAlert(:String):void; function addToStage(:DisplayObject):void; function createGIFRequestAlert(_arg1:String, _arg2:URLRequest, _arg3:GIFRequest):void; function createWarning(:String):void; function createPanel(_arg1:String, _arg2:uint, _arg3:uint):void; function createInfo(:String):void; function createFailureAlert(:String):void; function addToPanel(_arg1:String, _arg2:DisplayObject):void; function init():void; function createSuccessAlert(:String):void; function createVisualDebug():void; function destroy():void; function bringToFront(:DisplayObject):void; function isAvailable():Boolean; } }//package com.google.analytics.debug
Section 41
//Info (com.google.analytics.debug.Info) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Info extends Label { private var _timer:Timer; public function Info(text:String="", timeout:uint=3000){ super(text, "uiInfo", Style.infoColor, Align.top, true); if (timeout > 0){ _timer = new Timer(timeout, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } override public function onLink(event:TextEvent):void{ switch (event.text){ case "hide": close(); break; }; } public function onComplete(event:TimerEvent):void{ close(); } } }//package com.google.analytics.debug
Section 42
//Label (com.google.analytics.debug.Label) package com.google.analytics.debug { import flash.display.*; import flash.events.*; import flash.text.*; public class Label extends UISprite { private var _color:uint; private var _background:Shape; private var _textField:TextField; public var stickToEdge:Boolean; private var _text:String; protected var selectable:Boolean; private var _tag:String; public static var count:uint = 0; public function Label(text:String="", tag:String="uiLabel", color:uint=0, alignement:Align=null, stickToEdge:Boolean=false){ super(); this.name = ("Label" + count++); selectable = false; _background = new Shape(); _textField = new TextField(); _text = text; _tag = tag; if (alignement == null){ alignement = Align.none; }; this.alignement = alignement; this.stickToEdge = stickToEdge; if (color == 0){ color = Style.backgroundColor; }; _color = color; _textField.addEventListener(TextEvent.LINK, onLink); } public function get tag():String{ return (_tag); } private function _draw():void{ var g:Graphics = _background.graphics; g.clear(); g.beginFill(_color); var W:uint = _textField.width; var H:uint = _textField.height; if (forcedWidth > 0){ W = forcedWidth; }; Background.drawRounded(this, g, W, H); g.endFill(); } public function get text():String{ return (_textField.text); } public function appendText(value:String, newtag:String=""):void{ if (value == ""){ return; }; if (newtag == ""){ newtag = tag; }; _textField.htmlText = (_textField.htmlText + (((("<span class=\"" + newtag) + "\">") + value) + "</span>")); _text = (_text + value); _draw(); resize(); } public function set text(value:String):void{ if (value == ""){ value = _text; }; _textField.htmlText = (((("<span class=\"" + tag) + "\">") + value) + "</span>"); _text = value; _draw(); resize(); } override protected function layout():void{ _textField.type = TextFieldType.DYNAMIC; _textField.autoSize = TextFieldAutoSize.LEFT; _textField.background = false; _textField.selectable = selectable; _textField.multiline = true; _textField.styleSheet = Style.sheet; this.text = _text; addChild(_background); addChild(_textField); } public function set tag(value:String):void{ _tag = value; text = ""; } public function onLink(event:TextEvent):void{ } override protected function dispose():void{ _textField.removeEventListener(TextEvent.LINK, onLink); super.dispose(); } } }//package com.google.analytics.debug
Section 43
//Layout (com.google.analytics.debug.Layout) package com.google.analytics.debug { import flash.display.*; import flash.events.*; import flash.net.*; import com.google.analytics.core.*; import com.google.analytics.*; public class Layout implements ILayout { private var _display:DisplayObject; private var _infoQueue:Array; private var _maxCharPerLine:int;// = 85 private var _hasInfo:Boolean; private var _warningQueue:Array; private var _hasDebug:Boolean; private var _hasWarning:Boolean; private var _mainPanel:Panel; private var _GRAlertQueue:Array; private var _debug:DebugConfiguration; public var visualDebug:Debug; private var _hasGRAlert:Boolean; public function Layout(debug:DebugConfiguration, display:DisplayObject){ super(); _display = display; _debug = debug; _hasWarning = false; _hasInfo = false; _hasDebug = false; _hasGRAlert = false; _warningQueue = []; _infoQueue = []; _GRAlertQueue = []; } private function onKey(event:KeyboardEvent=null):void{ switch (event.keyCode){ case _debug.showHideKey: _mainPanel.visible = !(_mainPanel.visible); break; case _debug.destroyKey: destroy(); break; }; } public function createWarning(message:String):void{ if (((_hasWarning) || (!(isAvailable())))){ _warningQueue.push(message); return; }; message = _filterMaxChars(message); _hasWarning = true; var w:Warning = new Warning(message, _debug.warningTimeout); addToPanel("analytics", w); w.addEventListener(Event.REMOVED_FROM_STAGE, _clearWarning, false, 0, true); if (_hasDebug){ visualDebug.writeBold(message); }; } public function bringToFront(visual:DisplayObject):void{ _display.stage.setChildIndex(visual, (_display.stage.numChildren - 1)); } public function createFailureAlert(message:String):void{ var actionClose:AlertAction; if (_debug.verbose){ message = _filterMaxChars(message); actionClose = new AlertAction("Close", "close", "close"); } else { actionClose = new AlertAction("X", "close", "close"); }; var fa:Alert = new FailureAlert(_debug, message, [actionClose]); addToPanel("analytics", fa); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.writeBold(message); }; } public function init():void{ var spaces = 10; var W:uint = (_display.stage.stageWidth - (spaces * 2)); var H:uint = (_display.stage.stageHeight - (spaces * 2)); var mp:Panel = new Panel("analytics", W, H); mp.alignement = Align.top; mp.stickToEdge = false; mp.title = ("Google Analytics v" + GATracker.version); _mainPanel = mp; addToStage(mp); bringToFront(mp); if (_debug.minimizedOnStart){ _mainPanel.onToggle(); }; createVisualDebug(); _display.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKey, false, 0, true); } public function addToPanel(name:String, visual:DisplayObject):void{ var panel:Panel; var d:DisplayObject = _display.stage.getChildByName(name); if (d){ panel = (d as Panel); panel.addData(visual); } else { trace((("panel \"" + name) + "\" not found")); }; } private function _clearInfo(event:Event):void{ _hasInfo = false; if (_infoQueue.length > 0){ createInfo(_infoQueue.shift()); }; } private function _filterMaxChars(message:String, maxCharPerLine:int=0):String{ var line:String; var CRLF:String = "\n"; var output:Array = []; var lines:Array = message.split(CRLF); if (maxCharPerLine == 0){ maxCharPerLine = _maxCharPerLine; }; var i:int; while (i < lines.length) { line = lines[i]; while (line.length > maxCharPerLine) { output.push(line.substr(0, maxCharPerLine)); line = line.substring(maxCharPerLine); }; output.push(line); i++; }; return (output.join(CRLF)); } private function _clearGRAlert(event:Event):void{ _hasGRAlert = false; if (_GRAlertQueue.length > 0){ createGIFRequestAlert.apply(this, _GRAlertQueue.shift()); }; } public function createSuccessAlert(message:String):void{ var actionClose:AlertAction; if (_debug.verbose){ message = _filterMaxChars(message); actionClose = new AlertAction("Close", "close", "close"); } else { actionClose = new AlertAction("X", "close", "close"); }; var sa:Alert = new SuccessAlert(_debug, message, [actionClose]); addToPanel("analytics", sa); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.writeBold(message); }; } public function isAvailable():Boolean{ return (!((_display.stage == null))); } public function createAlert(message:String):void{ message = _filterMaxChars(message); var a:Alert = new Alert(message, [new AlertAction("Close", "close", "close")]); addToPanel("analytics", a); if (_hasDebug){ visualDebug.writeBold(message); }; } public function createInfo(message:String):void{ if (((_hasInfo) || (!(isAvailable())))){ _infoQueue.push(message); return; }; message = _filterMaxChars(message); _hasInfo = true; var i:Info = new Info(message, _debug.infoTimeout); addToPanel("analytics", i); i.addEventListener(Event.REMOVED_FROM_STAGE, _clearInfo, false, 0, true); if (_hasDebug){ visualDebug.write(message); }; } public function createGIFRequestAlert(message:String, request:URLRequest, ref:GIFRequest):void{ var message = message; var request = request; var ref = ref; if (_hasGRAlert){ _GRAlertQueue.push([message, request, ref]); return; }; _hasGRAlert = true; var f:Function = function ():void{ ref.sendRequest(request); }; message = _filterMaxChars(message); var gra:GIFRequestAlert = new GIFRequestAlert(message, [new AlertAction("OK", "ok", f), new AlertAction("Cancel", "cancel", "close")]); addToPanel("analytics", gra); gra.addEventListener(Event.REMOVED_FROM_STAGE, _clearGRAlert, false, 0, true); if (_hasDebug){ if (_debug.verbose){ message = message.split("\n").join(""); message = _filterMaxChars(message, 66); }; visualDebug.write(message); }; } public function createVisualDebug():void{ if (!visualDebug){ visualDebug = new Debug(); visualDebug.alignement = Align.bottom; visualDebug.stickToEdge = true; addToPanel("analytics", visualDebug); _hasDebug = true; }; } public function addToStage(visual:DisplayObject):void{ _display.stage.addChild(visual); } private function _clearWarning(event:Event):void{ _hasWarning = false; if (_warningQueue.length > 0){ createWarning(_warningQueue.shift()); }; } public function createPanel(name:String, width:uint, height:uint):void{ var p:Panel = new Panel(name, width, height); p.alignement = Align.center; p.stickToEdge = false; addToStage(p); bringToFront(p); } public function destroy():void{ _mainPanel.close(); _debug.layout = null; } } }//package com.google.analytics.debug
Section 44
//Margin (com.google.analytics.debug.Margin) package com.google.analytics.debug { public class Margin { public var top:int; public var left:int; public var bottom:int; public var right:int; public function Margin(top:int=0, bottom:int=0, left:int=0, right:int=0){ super(); this.top = top; this.bottom = bottom; this.left = left; this.right = right; } } }//package com.google.analytics.debug
Section 45
//Panel (com.google.analytics.debug.Panel) package com.google.analytics.debug { import flash.display.*; import flash.events.*; public class Panel extends UISprite { private var _savedH:uint; private var _data:UISprite; private var _mask:Sprite; private var _background:Shape; private var _savedW:uint; private var _stickToEdge:Boolean; private var _border:Shape; private var _borderColor:uint; protected var baseAlpha:Number; private var _backgroundColor:uint; private var _title:Label; private var _colapsed:Boolean; private var _name:String; public function Panel(name:String, width:uint, height:uint, backgroundColor:uint=0, borderColor:uint=0, baseAlpha:Number=0.3, alignement:Align=null, stickToEdge:Boolean=false){ super(); _name = name; this.name = name; this.mouseEnabled = false; _colapsed = false; forcedWidth = width; forcedHeight = height; this.baseAlpha = baseAlpha; _background = new Shape(); _data = new UISprite(); _data.forcedWidth = width; _data.forcedHeight = height; _data.mouseEnabled = false; _title = new Label(name, "uiLabel", 0xFFFFFF, Align.topLeft, stickToEdge); _title.buttonMode = true; _title.margin.top = 0.6; _title.margin.left = 0.6; _title.addEventListener(MouseEvent.CLICK, onToggle); _title.mouseChildren = false; _border = new Shape(); _mask = new Sprite(); _mask.useHandCursor = false; _mask.mouseEnabled = false; _mask.mouseChildren = false; if (alignement == null){ alignement = Align.none; }; this.alignement = alignement; this.stickToEdge = stickToEdge; if (backgroundColor == 0){ backgroundColor = Style.backgroundColor; }; _backgroundColor = backgroundColor; if (borderColor == 0){ borderColor = Style.borderColor; }; _borderColor = borderColor; } public function get stickToEdge():Boolean{ return (_stickToEdge); } public function onToggle(event:MouseEvent=null):void{ if (_colapsed){ _data.visible = true; } else { _data.visible = false; }; _colapsed = !(_colapsed); _update(); resize(); } public function set stickToEdge(value:Boolean):void{ _stickToEdge = value; _title.stickToEdge = value; } override protected function dispose():void{ _title.removeEventListener(MouseEvent.CLICK, onToggle); super.dispose(); } private function _draw():void{ var W:uint; var H:uint; if (((_savedW) && (_savedH))){ forcedWidth = _savedW; forcedHeight = _savedH; }; if (!_colapsed){ W = forcedWidth; H = forcedHeight; } else { W = _title.width; H = _title.height; _savedW = forcedWidth; _savedH = forcedHeight; forcedWidth = W; forcedHeight = H; }; var g0:Graphics = _background.graphics; g0.clear(); g0.beginFill(_backgroundColor); Background.drawRounded(this, g0, W, H); g0.endFill(); var g01:Graphics = _data.graphics; g01.clear(); g01.beginFill(_backgroundColor, 0); Background.drawRounded(this, g01, W, H); g01.endFill(); var g1:Graphics = _border.graphics; g1.clear(); g1.lineStyle(0.1, _borderColor); Background.drawRounded(this, g1, W, H); g1.endFill(); var g2:Graphics = _mask.graphics; g2.clear(); g2.beginFill(_backgroundColor); Background.drawRounded(this, g2, (W + 1), (H + 1)); g2.endFill(); } public function get title():String{ return (_title.text); } private function _update():void{ _draw(); if (baseAlpha < 1){ _background.alpha = baseAlpha; _border.alpha = baseAlpha; }; } public function addData(child:DisplayObject):void{ _data.addChild(child); } override protected function layout():void{ _update(); addChild(_background); addChild(_data); addChild(_title); addChild(_border); addChild(_mask); mask = _mask; } public function set title(value:String):void{ _title.text = value; } public function close():void{ dispose(); if (parent != null){ parent.removeChild(this); }; } } }//package com.google.analytics.debug
Section 46
//Style (com.google.analytics.debug.Style) package com.google.analytics.debug { public const Style:_Style = new _Style(); }//package com.google.analytics.debug
Section 47
//SuccessAlert (com.google.analytics.debug.SuccessAlert) package com.google.analytics.debug { public class SuccessAlert extends Alert { public function SuccessAlert(debug:DebugConfiguration, text:String, actions:Array){ var alignement:Align = Align.bottomLeft; var stickToEdge:Boolean; var actionOnNextLine:Boolean; if (debug.verbose){ text = ((("<u><span class=\"uiAlertTitle\">Success</span>" + spaces(18)) + "</u>\n\n") + text); alignement = Align.center; stickToEdge = false; actionOnNextLine = true; }; super(text, actions, "uiSuccess", Style.successColor, alignement, stickToEdge, actionOnNextLine); } } }//package com.google.analytics.debug
Section 48
//UISprite (com.google.analytics.debug.UISprite) package com.google.analytics.debug { import flash.display.*; import flash.events.*; public class UISprite extends Sprite { private var _forcedWidth:uint; public var margin:Margin; protected var alignTarget:DisplayObject; protected var listenResize:Boolean; public var alignement:Align; private var _forcedHeight:uint; public function UISprite(alignTarget:DisplayObject=null){ super(); listenResize = false; alignement = Align.none; this.alignTarget = alignTarget; margin = new Margin(); addEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); addEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); } public function get forcedHeight():uint{ if (_forcedHeight){ return (_forcedHeight); }; return (height); } private function _onAddedToStage(event:Event):void{ layout(); resize(); } protected function dispose():void{ var d:DisplayObject; var i:int; while (i < numChildren) { d = getChildAt(i); if (d){ removeChild(d); }; i++; }; } public function set forcedHeight(value:uint):void{ _forcedHeight = value; } public function set forcedWidth(value:uint):void{ _forcedWidth = value; } protected function layout():void{ } public function get forcedWidth():uint{ if (_forcedWidth){ return (_forcedWidth); }; return (width); } public function alignTo(alignement:Align, target:DisplayObject=null):void{ var H:uint; var W:uint; var X:uint; var Y:uint; var t:UISprite; if (target == null){ if ((parent is Stage)){ target = this.stage; } else { target = parent; }; }; if (target == this.stage){ if (this.stage == null){ return; }; H = this.stage.stageHeight; W = this.stage.stageWidth; X = 0; Y = 0; } else { t = (target as UISprite); if (t.forcedHeight){ H = t.forcedHeight; } else { H = t.height; }; if (t.forcedWidth){ W = t.forcedWidth; } else { W = t.width; }; X = 0; Y = 0; }; switch (alignement){ case Align.top: x = ((W / 2) - (forcedWidth / 2)); y = (Y + margin.top); break; case Align.bottom: x = ((W / 2) - (forcedWidth / 2)); y = (((Y + H) - forcedHeight) - margin.bottom); break; case Align.left: x = (X + margin.left); y = ((H / 2) - (forcedHeight / 2)); break; case Align.right: x = (((X + W) - forcedWidth) - margin.right); y = ((H / 2) - (forcedHeight / 2)); break; case Align.center: x = ((W / 2) - (forcedWidth / 2)); y = ((H / 2) - (forcedHeight / 2)); break; case Align.topLeft: x = (X + margin.left); y = (Y + margin.top); break; case Align.topRight: x = (((X + W) - forcedWidth) - margin.right); y = (Y + margin.top); break; case Align.bottomLeft: x = (X + margin.left); y = (((Y + H) - forcedHeight) - margin.bottom); break; case Align.bottomRight: x = (((X + W) - forcedWidth) - margin.right); y = (((Y + H) - forcedHeight) - margin.bottom); break; }; if (((!(listenResize)) && (!((alignement == Align.none))))){ target.addEventListener(Event.RESIZE, onResize, false, 0, true); listenResize = true; }; this.alignement = alignement; this.alignTarget = target; } private function _onRemovedFromStage(event:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage); removeEventListener(Event.REMOVED_FROM_STAGE, _onRemovedFromStage); dispose(); } public function resize():void{ if (alignement != Align.none){ alignTo(alignement, alignTarget); }; } protected function onResize(event:Event):void{ resize(); } } }//package com.google.analytics.debug
Section 49
//Warning (com.google.analytics.debug.Warning) package com.google.analytics.debug { import flash.events.*; import flash.utils.*; public class Warning extends Label { private var _timer:Timer; public function Warning(text:String="", timeout:uint=3000){ super(text, "uiWarning", Style.warningColor, Align.top, false); margin.top = 32; if (timeout > 0){ _timer = new Timer(timeout, 1); _timer.start(); _timer.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete, false, 0, true); }; } public function close():void{ if (parent != null){ parent.removeChild(this); }; } override public function onLink(event:TextEvent):void{ switch (event.text){ case "hide": close(); break; }; } public function onComplete(event:TimerEvent):void{ close(); } } }//package com.google.analytics.debug
Section 50
//VisualDebugMode (com.google.analytics.debug.VisualDebugMode) package com.google.analytics.debug { public class VisualDebugMode { private var _value:int; private var _name:String; public static const advanced:VisualDebugMode = new VisualDebugMode(1, "advanced"); ; public static const geek:VisualDebugMode = new VisualDebugMode(2, "geek"); ; public static const basic:VisualDebugMode = new VisualDebugMode(0, "basic"); ; public function VisualDebugMode(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.debug
Section 51
//AnalyticsEvent (com.google.analytics.events.AnalyticsEvent) package com.google.analytics.events { import flash.events.*; import com.google.analytics.*; public class AnalyticsEvent extends Event { public var tracker:AnalyticsTracker; public static const READY:String = "ready"; public function AnalyticsEvent(type:String, tracker:AnalyticsTracker, bubbles:Boolean=false, cancelable:Boolean=false){ super(type, bubbles, cancelable); this.tracker = tracker; } override public function clone():Event{ return (new AnalyticsEvent(type, tracker, bubbles, cancelable)); } } }//package com.google.analytics.events
Section 52
//AdSenseGlobals (com.google.analytics.external.AdSenseGlobals) package com.google.analytics.external { import com.google.analytics.debug.*; public class AdSenseGlobals extends JavascriptProxy { private var _gaGlobalVerified:Boolean;// = false public static var gaGlobal_js:XML = <script> <![CDATA[ function() { try { gaGlobal } catch(e) { gaGlobal = {} ; } } ]]> </script> ; public function AdSenseGlobals(debug:DebugConfiguration){ super(debug); } public function set vid(value:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.vid", value); } public function get hid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.hid")); } public function set hid(value:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.hid", value); } public function get dh():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.dh")); } public function get sid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.sid")); } public function get vid():String{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal.vid")); } private function _verify():void{ if (!_gaGlobalVerified){ executeBlock(gaGlobal_js); _gaGlobalVerified = true; }; } public function set sid(value:String):void{ if (!isAvailable()){ return; }; _verify(); setProperty("gaGlobal.sid", value); } public function get gaGlobal():Object{ if (!isAvailable()){ return (null); }; _verify(); return (getProperty("gaGlobal")); } } }//package com.google.analytics.external
Section 53
//HTMLDOM (com.google.analytics.external.HTMLDOM) package com.google.analytics.external { import com.google.analytics.debug.*; public class HTMLDOM extends JavascriptProxy { private var _referrer:String; private var _language:String; private var _host:String; private var _pathname:String; private var _location:String; private var _search:String; private var _characterSet:String; private var _title:String; private var _protocol:String; private var _colorDepth:String; public static var cache_properties_js:XML = <script> <![CDATA[ function() { var obj = {}; obj.host = document.location.host; obj.language = navigator.language ? navigator.language : navigator.browserLanguage; obj.characterSet = document.characterSet ? document.characterSet : document.charset; obj.colorDepth = window.screen.colorDepth; obj.location = document.location.toString(); obj.pathname = document.location.pathname; obj.protocol = document.location.protocol; obj.search = document.location.search; obj.referrer = document.referrer; obj.title = document.title; return obj; } ]]> </script> ; public function HTMLDOM(debug:DebugConfiguration){ super(debug); } public function get search():String{ if (_search){ return (_search); }; if (!isAvailable()){ return (null); }; _search = getProperty("document.location.search"); return (_search); } public function get location():String{ if (_location){ return (_location); }; if (!isAvailable()){ return (null); }; _location = getPropertyString("document.location"); return (_location); } public function get pathname():String{ if (_pathname){ return (_pathname); }; if (!isAvailable()){ return (null); }; _pathname = getProperty("document.location.pathname"); return (_pathname); } public function cacheProperties():void{ if (!isAvailable()){ return; }; var obj:Object = call(cache_properties_js); if (obj){ _host = obj.host; _language = obj.language; _characterSet = obj.characterSet; _colorDepth = obj.colorDepth; _location = obj.location; _pathname = obj.pathname; _protocol = obj.protocol; _search = obj.search; _referrer = obj.referrer; _title = obj.title; }; } public function get language():String{ if (_language){ return (_language); }; if (!isAvailable()){ return (null); }; var lang:String = getProperty("navigator.language"); if (lang == null){ lang = getProperty("navigator.browserLanguage"); }; _language = lang; return (_language); } public function get colorDepth():String{ if (_colorDepth){ return (_colorDepth); }; if (!isAvailable()){ return (null); }; _colorDepth = getProperty("window.screen.colorDepth"); return (_colorDepth); } public function get referrer():String{ if (_referrer){ return (_referrer); }; if (!isAvailable()){ return (null); }; _referrer = getProperty("document.referrer"); return (_referrer); } public function get protocol():String{ if (_protocol){ return (_protocol); }; if (!isAvailable()){ return (null); }; _protocol = getProperty("document.location.protocol"); return (_protocol); } public function get host():String{ if (_host){ return (_host); }; if (!isAvailable()){ return (null); }; _host = getProperty("document.location.host"); return (_host); } public function get characterSet():String{ if (_characterSet){ return (_characterSet); }; if (!isAvailable()){ return (null); }; var cs:String = getProperty("document.characterSet"); if (cs == null){ cs = getProperty("document.charset"); }; _characterSet = cs; return (_characterSet); } public function get title():String{ if (_title){ return (_title); }; if (!isAvailable()){ return (null); }; _title = getProperty("document.title"); return (_title); } } }//package com.google.analytics.external
Section 54
//JavascriptProxy (com.google.analytics.external.JavascriptProxy) package com.google.analytics.external { import com.google.analytics.debug.*; import flash.external.*; import flash.system.*; public class JavascriptProxy { private var _notAvailableWarning:Boolean;// = true private var _debug:DebugConfiguration; public static var setProperty_js:XML = <script> <![CDATA[ function( path , value ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } target[ prop ] = value ; } ]]> </script> ; public static var hasProperty_js:XML = <script> <![CDATA[ function( path ) { var paths; if( path.indexOf(".") > 0 ) { paths = path.split("."); } else { paths = [path]; } var target = window ; var len = paths.length ; for( var i = 0 ; i < len ; i++ ) { target = target[ paths[i] ] ; } if( target ) { return true; } else { return false; } } ]]> </script> ; public static var setPropertyRef_js:XML = <script> <![CDATA[ function( path , target ) { var paths; var prop; if( path.indexOf(".") > 0 ) { paths = path.split("."); prop = paths.pop() ; } else { paths = []; prop = path; } alert( "paths:"+paths.length+", prop:"+prop ); var targets; var name; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } alert( "targets:"+targets.length+", name:"+name ); var root = window; var len = paths.length; for( var i = 0 ; i < len ; i++ ) { root = root[ paths[i] ] ; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } root[ prop ] = ref[name] ; } ]]> </script> ; public function JavascriptProxy(debug:DebugConfiguration){ super(); _debug = debug; } public function getProperty(name:String){ return (call((name + ".valueOf"))); } public function hasProperty(path:String):Boolean{ return (call(hasProperty_js, path)); } public function setProperty(path:String, value):void{ call(setProperty_js, path, value); } public function executeBlock(data:String):void{ var data = data; if (isAvailable()){ ExternalInterface.call(data); //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + _slot1.message)); }; }; } public function getPropertyString(name:String):String{ return (call((name + ".toString"))); } public function setPropertyByReference(path:String, target:String):void{ call(setPropertyRef_js, path, target); } public function call(functionName:String, ... _args){ var output:String; var functionName = functionName; var args = _args; if (isAvailable()){ if (((_debug.javascript) && (_debug.verbose))){ output = ""; output = ("Flash->JS: " + functionName); output = (output + "( "); if (args.length > 0){ output = (output + args.join(",")); }; output = (output + " )"); _debug.info(output); }; args.unshift(functionName); return (ExternalInterface.call.apply(ExternalInterface, args)); //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning("ExternalInterface is not allowed.\nEnsure that allowScriptAccess is set to \"always\" in the Flash embed HTML."); }; //unresolved jump var _slot1 = e; if (_debug.javascript){ _debug.warning(("ExternalInterface failed to make the call\nreason: " + _slot1.message)); }; }; return (null); } public function isAvailable():Boolean{ var available:Boolean = ExternalInterface.available; if (((available) && ((Capabilities.playerType == "External")))){ available = false; }; if (((((!(available)) && (_debug.javascript))) && (_notAvailableWarning))){ _debug.warning("ExternalInterface is not available."); _notAvailableWarning = false; }; return (available); } } }//package com.google.analytics.external
Section 55
//Environment (com.google.analytics.utils.Environment) package com.google.analytics.utils { import com.google.analytics.debug.*; import com.google.analytics.external.*; import flash.system.*; public class Environment { private var _dom:HTMLDOM; private var _appName:String; private var _debug:DebugConfiguration; private var _appVersion:Version; private var _url:String; private var _protocol:Protocols; private var _userAgent:UserAgent; public function Environment(url:String="", app:String="", version:String="", debug:DebugConfiguration=null, dom:HTMLDOM=null){ var v:Version; super(); if (app == ""){ if (isAIR()){ app = "AIR"; } else { app = "Flash"; }; }; if (version == ""){ v = flashVersion; } else { v = Version.fromString(version); }; _url = url; _appName = app; _appVersion = v; _debug = debug; _dom = dom; } public function isAIR():Boolean{ return ((((playerType == "Desktop")) && ((Security.sandboxType.toString() == "application")))); } public function get screenWidth():Number{ return (Capabilities.screenResolutionX); } public function get playerType():String{ return (Capabilities.playerType); } public function get locationSearch():String{ var _search:String = _dom.search; if (_search){ return (_search); }; return (""); } public function get protocol():Protocols{ if (!_protocol){ _findProtocol(); }; return (_protocol); } public function get flashVersion():Version{ var v:Version = Version.fromString(Capabilities.version.split(" ")[1], ","); return (v); } public function get userAgent():UserAgent{ if (!_userAgent){ _userAgent = new UserAgent(this, appName, appVersion.toString(4)); }; return (_userAgent); } public function get languageEncoding():String{ var _charset:String; if (System.useCodePage){ _charset = _dom.characterSet; if (_charset){ return (_charset); }; return ("-"); }; return ("UTF-8"); } public function get appName():String{ return (_appName); } public function get screenColorDepth():String{ var color:String; switch (Capabilities.screenColor){ case "bw": color = "1"; break; case "gray": color = "2"; break; case "color": default: color = "24"; }; var _colorDepth:String = _dom.colorDepth; if (_colorDepth){ color = _colorDepth; }; return (color); } private function _findProtocol():void{ var URL:String; var test:String; var p:Protocols = Protocols.none; if (_url != ""){ URL = _url.toLowerCase(); test = URL.substr(0, 5); switch (test){ case "file:": p = Protocols.file; break; case "http:": p = Protocols.HTTP; break; case "https": if (URL.charAt(5) == ":"){ p = Protocols.HTTPS; }; break; default: _protocol = Protocols.none; }; }; var _proto:String = _dom.protocol; var proto:String = (p.toString() + ":").toLowerCase(); if (((((_proto) && (!((_proto == proto))))) && (_debug))){ _debug.warning(((("Protocol mismatch: SWF=" + proto) + ", DOM=") + _proto)); }; _protocol = p; } public function get locationSWFPath():String{ return (_url); } public function get platform():String{ var p:String = Capabilities.manufacturer; return (p.split("Adobe ")[1]); } public function get operatingSystem():String{ return (Capabilities.os); } public function set appName(value:String):void{ _appName = value; userAgent.applicationProduct = value; } function set url(value:String):void{ _url = value; } public function get referrer():String{ var _referrer:String = _dom.referrer; if (_referrer){ return (_referrer); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function isInHTML():Boolean{ return ((Capabilities.playerType == "PlugIn")); } public function get language():String{ var _lang:String = _dom.language; var lang:String = Capabilities.language; if (_lang){ if ((((_lang.length > lang.length)) && ((_lang.substr(0, lang.length) == lang)))){ lang = _lang; }; }; return (lang); } public function get domainName():String{ var URL:String; var str:String; var end:int; if ((((protocol == Protocols.HTTP)) || ((protocol == Protocols.HTTPS)))){ URL = _url.toLowerCase(); if (protocol == Protocols.HTTP){ str = URL.split("http://").join(""); } else { if (protocol == Protocols.HTTPS){ str = URL.split("https://").join(""); }; }; end = str.indexOf("/"); if (end > -1){ str = str.substring(0, end); }; return (str); }; if (protocol == Protocols.file){ return ("localhost"); }; return (""); } public function set userAgent(custom:UserAgent):void{ _userAgent = custom; } public function set appVersion(value:Version):void{ _appVersion = value; userAgent.applicationVersion = value.toString(4); } public function get screenHeight():Number{ return (Capabilities.screenResolutionY); } public function get locationPath():String{ var _pathname:String = _dom.pathname; if (_pathname){ return (_pathname); }; return (""); } public function get documentTitle():String{ var _title:String = _dom.title; if (_title){ return (_title); }; return (""); } public function get appVersion():Version{ return (_appVersion); } } }//package com.google.analytics.utils
Section 56
//Protocols (com.google.analytics.utils.Protocols) package com.google.analytics.utils { public class Protocols { private var _value:int; private var _name:String; public static const none:Protocols = new Protocols(0, "none"); ; public static const HTTPS:Protocols = new Protocols(3, "HTTPS"); ; public static const file:Protocols = new Protocols(1, "file"); ; public static const HTTP:Protocols = new Protocols(2, "HTTP"); ; public function Protocols(value:int=0, name:String=""){ super(); _value = value; _name = name; } public function valueOf():int{ return (_value); } public function toString():String{ return (_name); } } }//package com.google.analytics.utils
Section 57
//Timespan (com.google.analytics.utils.Timespan) package com.google.analytics.utils { public class Timespan { public static var sixmonths:Number = 15768000; public static var twoyears:Number = 63072000; public static var thirtyminutes:Number = 1800; public function Timespan(){ super(); } } }//package com.google.analytics.utils
Section 58
//URL (com.google.analytics.utils.URL) package com.google.analytics.utils { public class URL { private var _url:String; public function URL(url:String=""){ super(); _url = url.toLowerCase(); } public function get domain():String{ var parts:Array; if (((!((hostName == ""))) && ((hostName.indexOf(".") > -1)))){ parts = hostName.split("."); switch (parts.length){ case 2: return (hostName); case 3: if (parts[1] == "co"){ return (hostName); }; parts.shift(); return (parts.join(".")); case 4: parts.shift(); return (parts.join(".")); }; }; return (""); } public function get path():String{ var _path:String = _url; if (_path.indexOf("://") > -1){ _path = _path.split("://")[1]; }; if (_path.indexOf(hostName) == 0){ _path = _path.substr(hostName.length); }; if (_path.indexOf("?") > -1){ _path = _path.split("?")[0]; }; if (_path.charAt(0) != "/"){ _path = ("/" + _path); }; return (_path); } public function get protocol():Protocols{ var proto:String = _url.split("://")[0]; switch (proto){ case "file": return (Protocols.file); case "http": return (Protocols.HTTP); case "https": return (Protocols.HTTPS); default: return (Protocols.none); }; } public function get hostName():String{ var hostname:String = _url; if (hostname.indexOf("://") > -1){ hostname = hostname.split("://")[1]; }; if (hostname.indexOf("/") > -1){ hostname = hostname.split("/")[0]; }; if (hostname.indexOf("?") > -1){ hostname = hostname.split("?")[0]; }; if ((((protocol == Protocols.file)) || ((protocol == Protocols.none)))){ return (""); }; return (hostname); } public function get subDomain():String{ if (((!((domain == ""))) && (!((domain == hostName))))){ return (hostName.split(("." + domain)).join("")); }; return (""); } public function get search():String{ var _search:String = _url; if (_search.indexOf("://") > -1){ _search = _search.split("://")[1]; }; if (_search.indexOf(hostName) == 0){ _search = _search.substr(hostName.length); }; if (_search.indexOf("?") > -1){ _search = _search.split("?")[1]; } else { _search = ""; }; return (_search); } } }//package com.google.analytics.utils
Section 59
//UserAgent (com.google.analytics.utils.UserAgent) package com.google.analytics.utils { import com.google.analytics.core.*; import flash.system.*; public class UserAgent { private var _localInfo:Environment; private var _applicationProduct:String; private var _version:Version; public static var minimal:Boolean = false; public function UserAgent(localInfo:Environment, product:String="", version:String=""){ super(); _localInfo = localInfo; applicationProduct = product; _version = Version.fromString(version); } public function get tamarinProductToken():String{ if (UserAgent.minimal){ return (""); }; if (System.vmVersion){ return (("Tamarin/" + Utils.trim(System.vmVersion, true))); }; return (""); } public function get applicationVersion():String{ return (_version.toString(2)); } public function get vendorProductToken():String{ var vp:String = ""; if (_localInfo.isAIR()){ vp = (vp + "AIR"); } else { vp = (vp + "FlashPlayer"); }; vp = (vp + "/"); vp = (vp + _version.toString(3)); return (vp); } public function toString():String{ var UA:String = ""; UA = (UA + applicationProductToken); if (applicationComment != ""){ UA = (UA + (" " + applicationComment)); }; if (tamarinProductToken != ""){ UA = (UA + (" " + tamarinProductToken)); }; if (vendorProductToken != ""){ UA = (UA + (" " + vendorProductToken)); }; return (UA); } public function get applicationComment():String{ var comment:Array = []; comment.push(_localInfo.platform); comment.push(_localInfo.playerType); if (!UserAgent.minimal){ comment.push(_localInfo.operatingSystem); comment.push(_localInfo.language); }; if (Capabilities.isDebugger){ comment.push("DEBUG"); }; if (comment.length > 0){ return ((("(" + comment.join("; ")) + ")")); }; return (""); } public function set applicationVersion(value:String):void{ _version = Version.fromString(value); } public function get applicationProductToken():String{ var token:String = applicationProduct; if (applicationVersion != ""){ token = (token + ("/" + applicationVersion)); }; return (token); } public function set applicationProduct(value:String):void{ _applicationProduct = value; } public function get applicationProduct():String{ return (_applicationProduct); } } }//package com.google.analytics.utils
Section 60
//Variables (com.google.analytics.utils.Variables) package com.google.analytics.utils { import flash.net.*; public dynamic class Variables { public var post:Array; public var URIencode:Boolean; public var pre:Array; public var sort:Boolean;// = true public function Variables(source:String=null, pre:Array=null, post:Array=null){ pre = []; post = []; super(); if (source){ decode(source); }; if (pre){ this.pre = pre; }; if (post){ this.post = post; }; } private function _join(vars:Variables):void{ var prop:String; if (!vars){ return; }; for (prop in vars) { this[prop] = vars[prop]; }; } public function join(... _args):void{ var l:int = _args.length; var i:int; while (i < l) { if (!(_args[i] is Variables)){ } else { _join(_args[i]); }; i++; }; } public function toString():String{ var value:String; var p:String; var component:String; var i:int; var j:int; var priority:String; var last:String; var data:Array = []; for (p in this) { value = this[p]; if (URIencode){ value = encodeURI(value); }; data.push(((p + "=") + value)); }; if (sort){ data.sort(); }; if (pre.length > 0){ pre.reverse(); i = 0; while (i < pre.length) { priority = pre[i]; j = 0; while (j < data.length) { component = data[j]; if (component.indexOf(priority) == 0){ data.unshift(data.splice(j, 1)[0]); }; j++; }; i++; }; pre.reverse(); }; if (post.length > 0){ i = 0; while (i < post.length) { last = post[i]; j = 0; while (j < data.length) { component = data[j]; if (component.indexOf(last) == 0){ data.push(data.splice(j, 1)[0]); }; j++; }; i++; }; }; return (data.join("&")); } public function decode(source:String):void{ var data:Array; var prop:String; var name:String; var value:String; var tmp:Array; if (source == ""){ return; }; if (source.indexOf("&") > -1){ data = source.split("&"); } else { data = [source]; }; var i:int; while (i < data.length) { prop = data[i]; if (prop.indexOf("=") > -1){ tmp = prop.split("="); name = tmp[0]; value = decodeURI(tmp[1]); this[name] = value; }; i++; }; } public function toURLVariables():URLVariables{ var p:String; var urlvars:URLVariables = new URLVariables(); for (p in this) { urlvars[p] = this[p]; }; return (urlvars); } } }//package com.google.analytics.utils
Section 61
//Version (com.google.analytics.utils.Version) package com.google.analytics.utils { public class Version { private var _revision:uint; private var _maxBuild:uint;// = 0xFF private var _maxMinor:uint;// = 15 private var _maxMajor:uint;// = 15 private var _separator:String;// = "." private var _maxRevision:uint;// = 0xFFFF private var _build:uint; private var _major:uint; private var _minor:uint; public function Version(major:uint=0, minor:uint=0, build:uint=0, revision:uint=0){ var v:Version; super(); if ((((((((major > _maxMajor)) && ((minor == 0)))) && ((build == 0)))) && ((revision == 0)))){ v = Version.fromNumber(major); major = v.major; minor = v.minor; build = v.build; revision = v.revision; }; this.major = major; this.minor = minor; this.build = build; this.revision = revision; } public function toString(fields:int=0):String{ var arr:Array; if ((((fields <= 0)) || ((fields > 4)))){ fields = getFields(); }; switch (fields){ case 1: arr = [major]; break; case 2: arr = [major, minor]; break; case 3: arr = [major, minor, build]; break; case 4: default: arr = [major, minor, build, revision]; }; return (arr.join(_separator)); } public function set revision(value:uint):void{ _revision = Math.min(value, _maxRevision); } public function get revision():uint{ return (_revision); } public function set build(value:uint):void{ _build = Math.min(value, _maxBuild); } public function set minor(value:uint):void{ _minor = Math.min(value, _maxMinor); } public function get build():uint{ return (_build); } public function set major(value:uint):void{ _major = Math.min(value, _maxMajor); } public function get minor():uint{ return (_minor); } private function getFields():int{ var f = 4; if (revision == 0){ f--; }; if ((((f == 3)) && ((build == 0)))){ f--; }; if ((((f == 2)) && ((minor == 0)))){ f--; }; return (f); } public function valueOf():uint{ return (((((major << 28) | (minor << 24)) | (build << 16)) | revision)); } public function get major():uint{ return (_major); } public function equals(o):Boolean{ if (!(o is Version)){ return (false); }; if ((((((((o.major == major)) && ((o.minor == minor)))) && ((o.build == build)))) && ((o.revision == revision)))){ return (true); }; return (false); } public static function fromString(value:String="", separator:String="."):Version{ var values:Array; var v:Version = new (Version); if ((((value == "")) || ((value == null)))){ return (v); }; if (value.indexOf(separator) > -1){ values = value.split(separator); v.major = parseInt(values[0]); v.minor = parseInt(values[1]); v.build = parseInt(values[2]); v.revision = parseInt(values[3]); } else { v.major = parseInt(value); }; return (v); } public static function fromNumber(value:Number=0):Version{ var v:Version = new (Version); if (((((((((((isNaN(value)) || ((value == 0)))) || ((value < 0)))) || ((value == Number.MAX_VALUE)))) || ((value == Number.POSITIVE_INFINITY)))) || ((value == Number.NEGATIVE_INFINITY)))){ return (v); }; v.major = (value >>> 28); v.minor = ((value & 251658240) >>> 24); v.build = ((value & 0xFF0000) >>> 16); v.revision = (value & 0xFFFF); return (v); } } }//package com.google.analytics.utils
Section 62
//Bridge (com.google.analytics.v4.Bridge) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; public class Bridge implements GoogleAnalyticsAPI { private var _debug:DebugConfiguration; private var _proxy:JavascriptProxy; private var _jsContainer:String;// = "_GATracker" private var _hasGATracker:Boolean;// = false private var _account:String; private static var _linkTrackingObject_js:XML = <script> <![CDATA[ function( container , target ) { var targets ; var name ; if( target.indexOf(".") > 0 ) { targets = target.split("."); name = targets.pop(); } else { targets = []; name = target; } var ref = window; var depth = targets.length; for( var j = 0 ; j < depth ; j++ ) { ref = ref[ targets[j] ] ; } window[container][target] = ref[name] ; } ]]> </script> ; private static var _createTrackingObject_js:XML = <script> <![CDATA[ function( acct ) { _GATracker[acct] = _gat._getTracker(acct); } ]]> </script> ; private static var _injectTrackingObject_js:XML = <script> <![CDATA[ function() { try { _GATracker } catch(e) { _GATracker = {}; } } ]]> </script> ; private static var _checkGAJS_js:XML = <script> <![CDATA[ function() { if( _gat && _gat._getTracker ) { return true; } return false; } ]]> </script> ; private static var _checkValidTrackingObject_js:XML = <script> <![CDATA[ function(acct) { if( _GATracker[acct] && (_GATracker[acct]._getAccount) ) { return true ; } else { return false; } } ]]> </script> ; public function Bridge(account:String, debug:DebugConfiguration, jsproxy:JavascriptProxy){ var msg0:String; var msg1:String; var msg2:String; super(); _account = account; _debug = debug; _proxy = jsproxy; if (!_checkGAJS()){ msg0 = ""; msg0 = (msg0 + "ga.js not found, be sure to check if\n"); msg0 = (msg0 + "<script src=\"http://www.google-analytics.com/ga.js\"></script>\n"); msg0 = (msg0 + "is included in the HTML."); _debug.warning(msg0); throw (new Error(msg0)); }; if (!_hasGATracker){ if (((_debug.javascript) && (_debug.verbose))){ msg1 = ""; msg1 = (msg1 + "The Google Analytics tracking code was not found on the container page\n"); msg1 = (msg1 + "we create it"); _debug.info(msg1, VisualDebugMode.advanced); }; _injectTrackingObject(); }; if (Utils.validateAccount(account)){ _createTrackingObject(account); } else { if (_checkTrackingObject(account)){ _linkTrackingObject(account); } else { msg2 = ""; msg2 = (msg2 + (("JS Object \"" + account) + "\" doesn't exist in DOM\n")); msg2 = (msg2 + "Bridge object not created."); _debug.warning(msg2); throw (new Error(msg2)); }; }; } public function link(targetUrl:String, useHash:Boolean=false):void{ _debug.info((((("link( " + targetUrl) + ", ") + useHash) + " )")); _call("_link", targetUrl, useHash); } public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{ _debug.info((("addOrganic( " + [newOrganicEngine, newOrganicKeyword].join(", ")) + " )")); _call("_addOrganic", newOrganicEngine); } public function setAllowLinker(enable:Boolean):void{ _debug.info((("setAllowLinker( " + enable) + " )")); _call("_setAllowLinker", enable); } private function _linkTrackingObject(path:String):void{ _proxy.call(_linkTrackingObject_js, _jsContainer, path); } public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{ var param = 2; if (((label) && (!((label == ""))))){ param = 3; }; if ((((param == 3)) && (!(isNaN(value))))){ param = 4; }; switch (param){ case 4: _debug.info((("trackEvent( " + [category, action, label, value].join(", ")) + " )")); return (_call("_trackEvent", category, action, label, value)); case 3: _debug.info((("trackEvent( " + [category, action, label].join(", ")) + " )")); return (_call("_trackEvent", category, action, label)); case 2: default: _debug.info((("trackEvent( " + [category, action].join(", ")) + " )")); return (_call("_trackEvent", category, action)); }; } public function setClientInfo(enable:Boolean):void{ _debug.info((("setClientInfo( " + enable) + " )")); _call("_setClientInfo", enable); } public function trackTrans():void{ _debug.info("trackTrans()"); _call("_trackTrans"); } public function setCookieTimeout(newDefaultTimeout:int):void{ _debug.info((("setCookieTimeout( " + newDefaultTimeout) + " )")); _call("_setCookieTimeout", newDefaultTimeout); } public function trackPageview(pageURL:String=""):void{ _debug.info((("trackPageview( " + pageURL) + " )")); _call("_trackPageview", pageURL); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_call("_getClientInfo")); } private function _checkValidTrackingObject(account:String):Boolean{ return (_proxy.call(_checkValidTrackingObject_js, account)); } private function _checkGAJS():Boolean{ return (_proxy.call(_checkGAJS_js)); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ _debug.warning((((("linkByPost( " + formObject) + ", ") + useHash) + " ) not implemented")); } private function _call(functionName:String, ... _args){ _args.unshift(((((("window." + _jsContainer) + "[\"") + _account) + "\"].") + functionName)); return (_proxy.call.apply(_proxy, _args)); } public function hasGAJS():Boolean{ return (_checkGAJS()); } private function _checkTrackingObject(account:String):Boolean{ var hasObj:Boolean = _proxy.hasProperty(account); var isTracker:Boolean = _proxy.hasProperty((account + "._getAccount")); return (((hasObj) && (isTracker))); } public function resetSession():void{ _debug.warning("resetSession() not implemented"); } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_call("_getDetectTitle")); } public function setCampNameKey(newCampNameKey:String):void{ _debug.info((("setCampNameKey( " + newCampNameKey) + " )")); _call("_setCampNameKey", newCampNameKey); } public function setDetectFlash(enable:Boolean):void{ _debug.info((("setDetectFlash( " + enable) + " )")); _call("_setDetectFlash", enable); } public function createEventTracker(objName:String):EventTracker{ _debug.info((("createEventTracker( " + objName) + " )")); return (new EventTracker(objName, this)); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ _debug.info((("addItem( " + [item, sku, name, category, price, quantity].join(", ")) + " )")); _call("_addItem", item, sku, name, category, price, quantity); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _call("_clearIgnoreOrganic"); } public function setVar(newVal:String):void{ _debug.info((("setVar( " + newVal) + " )")); _call("_setVar", newVal); } public function setDomainName(newDomainName:String):void{ _debug.info((("setDomainName( " + newDomainName) + " )")); _call("_setDomainName", newDomainName); } public function hasTrackingAccount(account:String):Boolean{ if (Utils.validateAccount(account)){ return (_checkValidTrackingObject(account)); }; return (_checkTrackingObject(account)); } public function setCampSourceKey(newCampSrcKey:String):void{ _debug.info((("setCampSourceKey( " + newCampSrcKey) + " )")); _call("_setCampSourceKey", newCampSrcKey); } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{ _debug.info((("addTrans( " + [orderId, affiliation, total, tax, shipping, city, state, country].join(", ")) + " )")); _call("_addTrans", orderId, affiliation, total, tax, shipping, city, state, country); return (null); } public function setCampContentKey(newCampContentKey:String):void{ _debug.info((("setCampContentKey( " + newCampContentKey) + " )")); _call("_setCampContentKey", newCampContentKey); } public function setLocalServerMode():void{ _debug.info("setLocalServerMode()"); _call("_setLocalServerMode"); } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_call("_getLocalGifPath")); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _call("_clearIgnoreRef"); } public function setAllowAnchor(enable:Boolean):void{ _debug.info((("setAllowAnchor( " + enable) + " )")); _call("_setAllowAnchor", enable); } public function setLocalGifPath(newLocalGifPath:String):void{ _debug.info((("setLocalGifPath( " + newLocalGifPath) + " )")); _call("_setLocalGifPath", newLocalGifPath); } public function getVersion():String{ _debug.info("getVersion()"); return (_call("_getVersion")); } private function _injectTrackingObject():void{ _proxy.executeBlock(_injectTrackingObject_js); _hasGATracker = true; } public function setCookiePath(newCookiePath:String):void{ _debug.info((("setCookiePath( " + newCookiePath) + " )")); _call("_setCookiePath", newCookiePath); } public function setSampleRate(newRate:Number):void{ _debug.info((("setSampleRate( " + newRate) + " )")); _call("_setSampleRate", newRate); } public function setAllowHash(enable:Boolean):void{ _debug.info((("setAllowHash( " + enable) + " )")); _call("_setAllowHash", enable); } public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{ _debug.info((("addIgnoredOrganic( " + newIgnoredOrganicKeyword) + " )")); _call("_addIgnoredOrganic", newIgnoredOrganicKeyword); } public function setCampNOKey(newCampNOKey:String):void{ _debug.info((("setCampNOKey( " + newCampNOKey) + " )")); _call("_setCampNOKey", newCampNOKey); } public function cookiePathCopy(newPath:String):void{ _debug.info((("cookiePathCopy( " + newPath) + " )")); _call("_cookiePathCopy", newPath); } public function setLocalRemoteServerMode():void{ _debug.info("setLocalRemoteServerMode()"); _call("_setLocalRemoteServerMode"); } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_call("_getServiceMode")); } public function setDetectTitle(enable:Boolean):void{ _debug.info((("setDetectTitle( " + enable) + " )")); _call("_setDetectTitle", enable); } private function _createTrackingObject(account:String):void{ _proxy.call(_createTrackingObject_js, account); } public function setCampaignTrack(enable:Boolean):void{ _debug.info((("setCampaignTrack( " + enable) + " )")); _call("_setCampaignTrack", enable); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _call("_clearOrganic"); } public function setCampTermKey(newCampTermKey:String):void{ _debug.info((("setCampTermKey( " + newCampTermKey) + " )")); _call("_setCampTermKey", newCampTermKey); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_call("_getDetectFlash")); } public function setCampMediumKey(newCampMedKey:String):void{ _debug.info((("setCampMediumKey( " + newCampMedKey) + " )")); _call("_setCampMediumKey", newCampMedKey); } public function addIgnoredRef(newIgnoredReferrer:String):void{ _debug.info((("addIgnoredRef( " + newIgnoredReferrer) + " )")); _call("_addIgnoredRef", newIgnoredReferrer); } public function setSessionTimeout(newTimeout:int):void{ _debug.info((("setSessionTimeout( " + newTimeout) + " )")); _call("_setSessionTimeout", newTimeout); } public function setRemoteServerMode():void{ _debug.info("setRemoteServerMode()"); _call("_setRemoteServerMode"); } public function getAccount():String{ _debug.info("getAccount()"); return (_call("_getAccount")); } } }//package com.google.analytics.v4
Section 63
//Configuration (com.google.analytics.v4.Configuration) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.utils.*; import com.google.analytics.campaign.*; public class Configuration { public var serverMode:ServerOperationMode; public var detectFlash:Boolean;// = true public var hasSiteOverlay:Boolean;// = false public var allowLocalTracking:Boolean;// = true public var secureRemoteGIFpath:String;// = "https://ssl.google-analytics.com/__utm.gif" private var _version:String;// = "4.3as" public var allowDomainHash:Boolean;// = true public var detectClientInfo:Boolean;// = true public var idleLoop:Number;// = 30 public var isTrackOutboundSubdomains:Boolean;// = false public var cookiePath:String;// = "/" public var transactionFieldDelim:String;// = "|" private var _organic:Organic; private var _cookieName:String;// = "analytics" public var campaignKey:CampaignKey; public var google:String;// = "google" public var googleCsePath:String;// = "cse" public var bucketCapacity:Number;// = 10 private var _sampleRate:Number;// = 1 public var remoteGIFpath:String;// = "http://www.google-analytics.com/__utm.gif" public var googleSearchParam:String;// = "q" public var allowLinker:Boolean;// = false public var maxOutboundLinkExamined:Number;// = 1000 private var _debug:DebugConfiguration; public var allowAnchor:Boolean;// = false private var _domain:Domain; private var _trackingLimitPerSession:int;// = 500 public var tokenCliff:int;// = 10 public var sessionTimeout:Number; public var idleTimeout:Number;// = 60 public var campaignTracking:Boolean;// = true public var domainName:String;// = "" public var detectTitle:Boolean;// = true public var tokenRate:Number;// = 0.2 public var conversionTimeout:Number; public var localGIFpath:String;// = "/__utm.gif" public function Configuration(debug:DebugConfiguration=null){ _organic = new Organic(); conversionTimeout = Timespan.sixmonths; sessionTimeout = Timespan.thirtyminutes; campaignKey = new CampaignKey(); serverMode = ServerOperationMode.remote; super(); _debug = debug; _domain = new Domain(DomainNameMode.auto, "", _debug); serverMode = ServerOperationMode.remote; _initOrganicSources(); } public function get organic():Organic{ return (_organic); } public function get cookieName():String{ return (_cookieName); } public function get trackingLimitPerSession():int{ return (_trackingLimitPerSession); } private function _initOrganicSources():void{ addOrganicSource(google, googleSearchParam); addOrganicSource("yahoo", "p"); addOrganicSource("msn", "q"); addOrganicSource("aol", "query"); addOrganicSource("aol", "encquery"); addOrganicSource("lycos", "query"); addOrganicSource("ask", "q"); addOrganicSource("altavista", "q"); addOrganicSource("netscape", "query"); addOrganicSource("cnn", "query"); addOrganicSource("looksmart", "qt"); addOrganicSource("about", "terms"); addOrganicSource("mamma", "query"); addOrganicSource("alltheweb", "q"); addOrganicSource("gigablast", "q"); addOrganicSource("voila", "rdata"); addOrganicSource("virgilio", "qs"); addOrganicSource("live", "q"); addOrganicSource("baidu", "wd"); addOrganicSource("alice", "qs"); addOrganicSource("yandex", "text"); addOrganicSource("najdi", "q"); addOrganicSource("aol", "q"); addOrganicSource("club-internet", "q"); addOrganicSource("mama", "query"); addOrganicSource("seznam", "q"); addOrganicSource("search", "q"); addOrganicSource("wp", "szukaj"); addOrganicSource("onet", "qt"); addOrganicSource("netsprint", "q"); addOrganicSource("google.interia", "q"); addOrganicSource("szukacz", "q"); addOrganicSource("yam", "k"); addOrganicSource("pchome", "q"); addOrganicSource("kvasir", "searchExpr"); addOrganicSource("sesam", "q"); addOrganicSource("ozu", "q"); addOrganicSource("terra", "query"); addOrganicSource("nostrum", "query"); addOrganicSource("mynet", "q"); addOrganicSource("ekolay", "q"); addOrganicSource("search.ilse", "search_for"); } public function get sampleRate():Number{ return (_sampleRate); } public function addOrganicSource(engine:String, keyword:String):void{ var engine = engine; var keyword = keyword; _organic.addSource(engine, keyword); //unresolved jump var _slot1 = e; if (((_debug) && (_debug.active))){ _debug.warning(_slot1.message); }; } public function get domain():Domain{ return (_domain); } public function set sampleRate(value:Number):void{ if (value <= 0){ value = 0.1; }; if (value > 1){ value = 1; }; value = Number(value.toFixed(2)); _sampleRate = value; } public function get version():String{ return (_version); } } }//package com.google.analytics.v4
Section 64
//GoogleAnalyticsAPI (com.google.analytics.v4.GoogleAnalyticsAPI) package com.google.analytics.v4 { import com.google.analytics.core.*; public interface GoogleAnalyticsAPI { function setCampSourceKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function getServiceMode():ServerOperationMode; function resetSession():void; function setLocalServerMode():void; function setCampContentKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function addOrganic(_arg1:String, _arg2:String):void; function setDetectFlash(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function addTrans(_arg1:String, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:String, _arg8:String):Object; function trackEvent(_arg1:String, _arg2:String, _arg3:String=null, _arg4:Number=NaN):Boolean; function setCampTermKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function setCampNameKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function addIgnoredOrganic(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function addItem(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:Number, _arg6:int):void; function setAllowLinker(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function getClientInfo():Boolean; function getDetectFlash():Boolean; function setCampaignTrack(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function createEventTracker(void:String):EventTracker; function setCookieTimeout(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:int):void; function setAllowAnchor(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function trackTrans():void; function clearOrganic():void; function trackPageview(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String=""):void; function setLocalGifPath(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function getVersion():String; function getLocalGifPath():String; function setVar(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function clearIgnoredOrganic():void; function setCampMediumKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function addIgnoredRef(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function setClientInfo(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function setCookiePath(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function setSampleRate(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Number):void; function setSessionTimeout(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:int):void; function setRemoteServerMode():void; function clearIgnoredRef():void; function setDomainName(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function setDetectTitle(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function setAllowHash(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:Boolean):void; function getAccount():String; function linkByPost(_arg1:Object, _arg2:Boolean=false):void; function link(_arg1:String, _arg2:Boolean=false):void; function setCampNOKey(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function setLocalRemoteServerMode():void; function cookiePathCopy(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics/v4;GoogleAnalyticsAPI.as:String):void; function getDetectTitle():Boolean; } }//package com.google.analytics.v4
Section 65
//Tracker (com.google.analytics.v4.Tracker) package com.google.analytics.v4 { import com.google.analytics.core.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; import com.google.analytics.data.*; import com.google.analytics.campaign.*; public class Tracker implements GoogleAnalyticsAPI { private const EVENT_TRACKER_LABEL_KEY_NUM:int = 3; private const EVENT_TRACKER_VALUE_VALUE_NUM:int = 1; private const EVENT_TRACKER_PROJECT_ID:int = 5; private const EVENT_TRACKER_OBJECT_NAME_KEY_NUM:int = 1; private const EVENT_TRACKER_TYPE_KEY_NUM:int = 2; private var _adSense:AdSenseGlobals; private var _eventTracker:X10; private var _noSessionInformation:Boolean;// = false private var _browserInfo:BrowserInfo; private var _debug:DebugConfiguration; private var _isNewVisitor:Boolean;// = false private var _buffer:Buffer; private var _config:Configuration; private var _x10Module:X10; private var _campaign:CampaignManager; private var _formatedReferrer:String; private var _timeStamp:Number; private var _info:Environment; private var _domainHash:Number; private var _campaignInfo:CampaignInfo; private var _gifRequest:GIFRequest; private var _hasInitData:Boolean;// = false private var _account:String; public function Tracker(account:String, config:Configuration, debug:DebugConfiguration, info:Environment, buffer:Buffer, gifRequest:GIFRequest, adSense:AdSenseGlobals){ var msg:String; super(); _account = account; _config = config; _debug = debug; _info = info; _buffer = buffer; _gifRequest = gifRequest; _adSense = adSense; if (!Utils.validateAccount(account)){ msg = (("Account \"" + account) + "\" is not valid."); _debug.warning(msg); throw (new Error(msg)); }; _initData(); } private function _doTracking():Boolean{ if (((((!((_info.protocol == Protocols.file))) && (!((_info.protocol == Protocols.none))))) && (_isNotGoogleSearch()))){ return (true); }; if (_config.allowLocalTracking){ return (true); }; return (false); } public function addOrganic(newOrganicEngine:String, newOrganicKeyword:String):void{ _debug.info((("addOrganic( " + [newOrganicEngine, newOrganicKeyword].join(", ")) + " )")); _config.organic.addSource(newOrganicEngine, newOrganicKeyword); } public function setAllowLinker(enable:Boolean):void{ _config.allowLinker = enable; _debug.info((("setAllowLinker( " + _config.allowLinker) + " )")); } public function trackEvent(category:String, action:String, label:String=null, value:Number=NaN):Boolean{ var success:Boolean; var params = 2; if (((!((category == ""))) && (!((action == ""))))){ _eventTracker.clearKey(EVENT_TRACKER_PROJECT_ID); _eventTracker.clearValue(EVENT_TRACKER_PROJECT_ID); success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_OBJECT_NAME_KEY_NUM, category); success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_TYPE_KEY_NUM, action); if (((label) && (!((label == ""))))){ success = _eventTracker.setKey(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_LABEL_KEY_NUM, label); params = 3; if (!isNaN(value)){ success = _eventTracker.setValue(EVENT_TRACKER_PROJECT_ID, EVENT_TRACKER_VALUE_VALUE_NUM, value); params = 4; }; }; if (success){ _debug.info(((("valid event tracking call\ncategory: " + category) + "\naction: ") + action), VisualDebugMode.geek); _sendXEvent(_eventTracker); }; } else { _debug.warning(((("event tracking call is not valid, failed!\ncategory: " + category) + "\naction: ") + action), VisualDebugMode.geek); success = false; }; switch (params){ case 4: _debug.info((("trackEvent( " + [category, action, label, value].join(", ")) + " )")); break; case 3: _debug.info((("trackEvent( " + [category, action, label].join(", ")) + " )")); break; case 2: default: _debug.info((("trackEvent( " + [category, action].join(", ")) + " )")); }; return (success); } public function trackPageview(pageURL:String=""):void{ _debug.info((("trackPageview( " + pageURL) + " )")); if (_doTracking()){ _initData(); _trackMetrics(pageURL); _noSessionInformation = false; } else { _debug.warning((("trackPageview( " + pageURL) + " ) failed")); }; } public function setCookieTimeout(newDefaultTimeout:int):void{ _config.conversionTimeout = newDefaultTimeout; _debug.info((("setCookieTimeout( " + _config.conversionTimeout) + " )")); } public function trackTrans():void{ _debug.warning("trackTrans() not implemented"); } public function setClientInfo(enable:Boolean):void{ _config.detectClientInfo = enable; _debug.info((("setClientInfo( " + _config.detectClientInfo) + " )")); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ _debug.warning((("linkByPost( " + [formObject, useHash].join(", ")) + " ) not implemented")); } private function _initData():void{ var data0:String; var data:String; if (!_hasInitData){ _updateDomainName(); _domainHash = _getDomainHash(); _timeStamp = Math.round((new Date().getTime() / 1000)); if (_debug.verbose){ data0 = ""; data0 = (data0 + "_initData 0"); data0 = (data0 + ("\ndomain name: " + _config.domainName)); data0 = (data0 + ("\ndomain hash: " + _domainHash)); data0 = (data0 + (((("\ntimestamp: " + _timeStamp) + " (") + new Date((_timeStamp * 1000))) + ")")); _debug.info(data0, VisualDebugMode.geek); }; }; if (_doTracking()){ _handleCookie(); }; if (!_hasInitData){ if (_doTracking()){ _formatedReferrer = _formatReferrer(); _browserInfo = new BrowserInfo(_config, _info); _debug.info(("browserInfo: " + _browserInfo.toURLString()), VisualDebugMode.advanced); if (_config.campaignTracking){ _campaign = new CampaignManager(_config, _debug, _buffer, _domainHash, _formatedReferrer, _timeStamp); _campaignInfo = _campaign.getCampaignInformation(_info.locationSearch, _noSessionInformation); _debug.info(("campaignInfo: " + _campaignInfo.toURLString()), VisualDebugMode.advanced); }; }; _x10Module = new X10(); _eventTracker = new X10(); _hasInitData = true; }; if (_config.hasSiteOverlay){ _debug.warning("Site Overlay is not supported"); }; if (_debug.verbose){ data = ""; data = (data + "_initData (misc)"); data = (data + ("\nflash version: " + _info.flashVersion.toString(4))); data = (data + ("\nprotocol: " + _info.protocol)); data = (data + (("\ndefault domain name (auto): \"" + _info.domainName) + "\"")); data = (data + ("\nlanguage: " + _info.language)); data = (data + ("\ndomain hash: " + _getDomainHash())); data = (data + ("\nuser-agent: " + _info.userAgent)); _debug.info(data, VisualDebugMode.geek); }; } public function getDetectTitle():Boolean{ _debug.info("getDetectTitle()"); return (_config.detectTitle); } public function resetSession():void{ _debug.info("resetSession()"); _buffer.resetCurrentSession(); } public function getClientInfo():Boolean{ _debug.info("getClientInfo()"); return (_config.detectClientInfo); } private function _sendXEvent(opt_xObj:X10=null):void{ var searchVariables:Variables; var eventInfo:EventInfo; var eventvars:Variables; var generalvars:Variables; _initData(); if (_takeSample()){ searchVariables = new Variables(); searchVariables.URIencode = true; eventInfo = new EventInfo(true, _x10Module, opt_xObj); eventvars = eventInfo.toVariables(); generalvars = _renderMetricsSearchVariables(); searchVariables.join(eventvars, generalvars); _gifRequest.send(_account, searchVariables, false, true); }; } public function setDetectFlash(enable:Boolean):void{ _config.detectFlash = enable; _debug.info((("setDetectFlash( " + _config.detectFlash) + " )")); } public function setCampNameKey(newCampNameKey:String):void{ _config.campaignKey.UCCN = newCampNameKey; var msg = (("setCampNameKey( " + _config.campaignKey.UCCN) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCCN]")); } else { _debug.info(msg); }; } private function _formatReferrer():String{ var domainName:String; var ref:URL; var dom:URL; var referrer:String = _info.referrer; if ((((referrer == "")) || ((referrer == "localhost")))){ referrer = "-"; } else { domainName = _info.domainName; ref = new URL(referrer); dom = new URL(("http://" + domainName)); if (ref.hostName == domainName){ return ("-"); }; if (dom.domain == ref.domain){ if (dom.subDomain != ref.subDomain){ referrer = "0"; }; }; if ((((referrer.charAt(0) == "[")) && (referrer.charAt((referrer.length - 1))))){ referrer = "-"; }; }; _debug.info(("formated referrer: " + referrer), VisualDebugMode.advanced); return (referrer); } private function _visitCode():Number{ if (_debug.verbose){ _debug.info(("visitCode: " + _buffer.utma.sessionId), VisualDebugMode.geek); }; return (_buffer.utma.sessionId); } public function createEventTracker(objName:String):EventTracker{ _debug.info((("createEventTracker( " + objName) + " )")); return (new EventTracker(objName, this)); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ _debug.warning((("addItem( " + [item, sku, name, category, price, quantity].join(", ")) + " ) not implemented")); } public function clearIgnoredOrganic():void{ _debug.info("clearIgnoredOrganic()"); _config.organic.clearIgnoredKeywords(); } public function setVar(newVal:String):void{ var variables:Variables; if (((!((newVal == ""))) && (_isNotGoogleSearch()))){ _initData(); _buffer.utmv.domainHash = _domainHash; _buffer.utmv.value = newVal; if (_debug.verbose){ _debug.info(_buffer.utmv.toString(), VisualDebugMode.geek); }; _debug.info((("setVar( " + newVal) + " )")); if (_takeSample()){ variables = new Variables(); variables.utmt = "var"; _gifRequest.send(_account, variables); }; } else { _debug.warning((("setVar \"" + newVal) + "\" is ignored")); }; } public function setDomainName(newDomainName:String):void{ if (newDomainName == "auto"){ _config.domain.mode = DomainNameMode.auto; } else { if (newDomainName == "none"){ _config.domain.mode = DomainNameMode.none; } else { _config.domain.mode = DomainNameMode.custom; _config.domain.name = newDomainName; }; }; _updateDomainName(); _debug.info((("setDomainName( " + _config.domainName) + " )")); } private function _updateDomainName():void{ var domainName:String; if (_config.domain.mode == DomainNameMode.auto){ domainName = _info.domainName; if (domainName.substring(0, 4) == "www."){ domainName = domainName.substring(4); }; _config.domain.name = domainName; }; _config.domainName = _config.domain.name.toLowerCase(); _debug.info(("domain name: " + _config.domainName), VisualDebugMode.advanced); } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{ _debug.warning((("addTrans( " + [orderId, affiliation, total, tax, shipping, city, state, country].join(", ")) + " ) not implemented")); return (null); } private function _renderMetricsSearchVariables(pageURL:String=""):Variables{ var campvars:Variables; var variables:Variables = new Variables(); variables.URIencode = true; var docInfo:DocumentInfo = new DocumentInfo(_config, _info, _formatedReferrer, pageURL, _adSense); _debug.info(("docInfo: " + docInfo.toURLString()), VisualDebugMode.geek); if (_config.campaignTracking){ campvars = _campaignInfo.toVariables(); }; var browservars:Variables = _browserInfo.toVariables(); variables.join(docInfo.toVariables(), browservars, campvars); return (variables); } public function setCampContentKey(newCampContentKey:String):void{ _config.campaignKey.UCCT = newCampContentKey; var msg = (("setCampContentKey( " + _config.campaignKey.UCCT) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCCT]")); } else { _debug.info(msg); }; } private function _handleCookie():void{ var data0:String; var data1:String; var vid:Array; var data2:String; if (_config.allowLinker){ }; if (((_buffer.hasUTMA()) && (!(_buffer.utma.isEmpty())))){ if (((!(_buffer.hasUTMB())) || (!(_buffer.hasUTMC())))){ _buffer.updateUTMA(_timeStamp); _noSessionInformation = true; }; if (_debug.verbose){ _debug.info(("from cookie " + _buffer.utma.toString()), VisualDebugMode.geek); }; } else { _debug.info("create a new utma", VisualDebugMode.advanced); _buffer.utma.domainHash = _domainHash; _buffer.utma.sessionId = _getUniqueSessionId(); _buffer.utma.firstTime = _timeStamp; _buffer.utma.lastTime = _timeStamp; _buffer.utma.currentTime = _timeStamp; _buffer.utma.sessionCount = 1; if (_debug.verbose){ _debug.info(_buffer.utma.toString(), VisualDebugMode.geek); }; _noSessionInformation = true; _isNewVisitor = true; }; if (((_adSense.gaGlobal) && ((_adSense.dh == String(_domainHash))))){ if (_adSense.sid){ _buffer.utma.currentTime = Number(_adSense.sid); if (_debug.verbose){ data0 = ""; data0 = (data0 + "AdSense sid found\n"); data0 = (data0 + (((("Override currentTime(" + _buffer.utma.currentTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(data0, VisualDebugMode.geek); }; }; if (_isNewVisitor){ if (_adSense.sid){ _buffer.utma.lastTime = Number(_adSense.sid); if (_debug.verbose){ data1 = ""; data1 = (data1 + "AdSense sid found (new visitor)\n"); data1 = (data1 + (((("Override lastTime(" + _buffer.utma.lastTime) + ") from AdSense sid(") + Number(_adSense.sid)) + ")")); _debug.info(data1, VisualDebugMode.geek); }; }; if (_adSense.vid){ vid = _adSense.vid.split("."); _buffer.utma.sessionId = Number(vid[0]); _buffer.utma.firstTime = Number(vid[1]); if (_debug.verbose){ data2 = ""; data2 = (data2 + "AdSense vid found (new visitor)\n"); data2 = (data2 + (((("Override sessionId(" + _buffer.utma.sessionId) + ") from AdSense vid(") + Number(vid[0])) + ")\n")); data2 = (data2 + (((("Override firstTime(" + _buffer.utma.firstTime) + ") from AdSense vid(") + Number(vid[1])) + ")")); _debug.info(data2, VisualDebugMode.geek); }; }; if (_debug.verbose){ _debug.info(("AdSense modified : " + _buffer.utma.toString()), VisualDebugMode.geek); }; }; }; _buffer.utmb.domainHash = _domainHash; if (isNaN(_buffer.utmb.trackCount)){ _buffer.utmb.trackCount = 0; }; if (isNaN(_buffer.utmb.token)){ _buffer.utmb.token = _config.tokenCliff; }; if (isNaN(_buffer.utmb.lastTime)){ _buffer.utmb.lastTime = _buffer.utma.currentTime; }; _buffer.utmc.domainHash = _domainHash; if (_debug.verbose){ _debug.info(_buffer.utmb.toString(), VisualDebugMode.advanced); _debug.info(_buffer.utmc.toString(), VisualDebugMode.advanced); }; } public function setLocalServerMode():void{ _config.serverMode = ServerOperationMode.local; _debug.info("setLocalServerMode()"); } public function clearIgnoredRef():void{ _debug.info("clearIgnoredRef()"); _config.organic.clearIgnoredReferrals(); } public function setCampSourceKey(newCampSrcKey:String):void{ _config.campaignKey.UCSR = newCampSrcKey; var msg = (("setCampSourceKey( " + _config.campaignKey.UCSR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCSR]")); } else { _debug.info(msg); }; } public function getLocalGifPath():String{ _debug.info("getLocalGifPath()"); return (_config.localGIFpath); } public function setLocalGifPath(newLocalGifPath:String):void{ _config.localGIFpath = newLocalGifPath; _debug.info((("setLocalGifPath( " + _config.localGIFpath) + " )")); } public function getVersion():String{ _debug.info("getVersion()"); return (_config.version); } public function setAllowAnchor(enable:Boolean):void{ _config.allowAnchor = enable; _debug.info((("setAllowAnchor( " + _config.allowAnchor) + " )")); } private function _isNotGoogleSearch():Boolean{ var domainName:String = _config.domainName; var g0 = (domainName.indexOf("www.google.") < 0); var g1 = (domainName.indexOf(".google.") < 0); var g2 = (domainName.indexOf("google.") < 0); var g4 = (domainName.indexOf("google.org") > -1); return (((((((((g0) || (g1))) || (g2))) || (!((_config.cookiePath == "/"))))) || (g4))); } public function setSampleRate(newRate:Number):void{ if (newRate < 0){ _debug.warning("sample rate can not be negative, ignoring value."); } else { _config.sampleRate = newRate; }; _debug.info((("setSampleRate( " + _config.sampleRate) + " )")); } private function _takeSample():Boolean{ if (_debug.verbose){ _debug.info((((("takeSample: (" + (_visitCode() % 10000)) + ") < (") + (_config.sampleRate * 10000)) + ")"), VisualDebugMode.geek); }; return (((_visitCode() % 10000) < (_config.sampleRate * 10000))); } public function setCookiePath(newCookiePath:String):void{ _config.cookiePath = newCookiePath; _debug.info((("setCookiePath( " + _config.cookiePath) + " )")); } public function setAllowHash(enable:Boolean):void{ _config.allowDomainHash = enable; _debug.info((("setAllowHash( " + _config.allowDomainHash) + " )")); } private function _generateUserDataHash():Number{ var hash:String = ""; hash = (hash + _info.appName); hash = (hash + _info.appVersion); hash = (hash + _info.language); hash = (hash + _info.platform); hash = (hash + _info.userAgent.toString()); hash = (hash + (((_info.screenWidth + "x") + _info.screenHeight) + _info.screenColorDepth)); hash = (hash + _info.referrer); return (Utils.generateHash(hash)); } public function setCampNOKey(newCampNOKey:String):void{ _config.campaignKey.UCNO = newCampNOKey; var msg = (("setCampNOKey( " + _config.campaignKey.UCNO) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCNO]")); } else { _debug.info(msg); }; } public function addIgnoredOrganic(newIgnoredOrganicKeyword:String):void{ _debug.info((("addIgnoredOrganic( " + newIgnoredOrganicKeyword) + " )")); _config.organic.addIgnoredKeyword(newIgnoredOrganicKeyword); } public function setLocalRemoteServerMode():void{ _config.serverMode = ServerOperationMode.both; _debug.info("setLocalRemoteServerMode()"); } public function cookiePathCopy(newPath:String):void{ _debug.warning((("cookiePathCopy( " + newPath) + " ) not implemented")); } public function setDetectTitle(enable:Boolean):void{ _config.detectTitle = enable; _debug.info((("setDetectTitle( " + _config.detectTitle) + " )")); } public function setCampTermKey(newCampTermKey:String):void{ _config.campaignKey.UCTR = newCampTermKey; var msg = (("setCampTermKey( " + _config.campaignKey.UCTR) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCTR]")); } else { _debug.info(msg); }; } public function getServiceMode():ServerOperationMode{ _debug.info("getServiceMode()"); return (_config.serverMode); } private function _trackMetrics(pageURL:String=""):void{ var searchVariables:Variables; var x10vars:Variables; var generalvars:Variables; var eventInfo:EventInfo; if (_takeSample()){ searchVariables = new Variables(); searchVariables.URIencode = true; if (((_x10Module) && (_x10Module.hasData()))){ eventInfo = new EventInfo(false, _x10Module); x10vars = eventInfo.toVariables(); }; generalvars = _renderMetricsSearchVariables(pageURL); searchVariables.join(x10vars, generalvars); _gifRequest.send(_account, searchVariables); }; } public function setCampaignTrack(enable:Boolean):void{ _config.campaignTracking = enable; _debug.info((("setCampaignTrack( " + _config.campaignTracking) + " )")); } public function addIgnoredRef(newIgnoredReferrer:String):void{ _debug.info((("addIgnoredRef( " + newIgnoredReferrer) + " )")); _config.organic.addIgnoredReferral(newIgnoredReferrer); } public function clearOrganic():void{ _debug.info("clearOrganic()"); _config.organic.clearEngines(); } public function getDetectFlash():Boolean{ _debug.info("getDetectFlash()"); return (_config.detectFlash); } public function setCampMediumKey(newCampMedKey:String):void{ _config.campaignKey.UCMD = newCampMedKey; var msg = (("setCampMediumKey( " + _config.campaignKey.UCMD) + " )"); if (_debug.mode == VisualDebugMode.geek){ _debug.info((msg + " [UCMD]")); } else { _debug.info(msg); }; } private function _getUniqueSessionId():Number{ var sessionID:Number = ((Utils.generate32bitRandom() ^ _generateUserDataHash()) * 2147483647); _debug.info(("Session ID: " + sessionID), VisualDebugMode.geek); return (sessionID); } private function _getDomainHash():Number{ if (((((!(_config.domainName)) || ((_config.domainName == "")))) || ((_config.domain.mode == DomainNameMode.none)))){ _config.domainName = ""; return (1); }; _updateDomainName(); if (_config.allowDomainHash){ return (Utils.generateHash(_config.domainName)); }; return (1); } public function setSessionTimeout(newTimeout:int):void{ _config.sessionTimeout = newTimeout; _debug.info((("setSessionTimeout( " + _config.sessionTimeout) + " )")); } public function getAccount():String{ _debug.info("getAccount()"); return (_account); } public function link(targetUrl:String, useHash:Boolean=false):void{ _debug.warning((("link( " + [targetUrl, useHash].join(", ")) + " ) not implemented")); } public function setRemoteServerMode():void{ _config.serverMode = ServerOperationMode.remote; _debug.info("setRemoteServerMode()"); } } }//package com.google.analytics.v4
Section 66
//AnalyticsTracker (com.google.analytics.AnalyticsTracker) package com.google.analytics { import flash.events.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; public interface AnalyticsTracker extends GoogleAnalyticsAPI, IEventDispatcher { function set account(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics;AnalyticsTracker.as:String):void; function get config():Configuration; function get mode():String; function set config(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics;AnalyticsTracker.as:Configuration):void; function set mode(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics;AnalyticsTracker.as:String):void; function set debug(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics;AnalyticsTracker.as:DebugConfiguration):void; function get visualDebug():Boolean; function get account():String; function set visualDebug(/buRRRn/projects/GAforFlash/GA_AS3/build/tmp;com/google/analytics;AnalyticsTracker.as:Boolean):void; function isReady():Boolean; function get debug():DebugConfiguration; } }//package com.google.analytics
Section 67
//API (com.google.analytics.API) package com.google.analytics { import com.google.analytics.utils.*; public class API { public static var version:Version = new Version(); public function API(){ super(); } version.major = 1; version.minor = 0; version.build = 1; version.revision = "$Rev: 319 $ ".split(" ")[1]; } }//package com.google.analytics
Section 68
//GATracker (com.google.analytics.GATracker) package com.google.analytics { import flash.display.*; import flash.events.*; import com.google.analytics.core.*; import com.google.analytics.v4.*; import com.google.analytics.debug.*; import com.google.analytics.external.*; import com.google.analytics.utils.*; import com.google.analytics.events.*; public class GATracker implements AnalyticsTracker { private var _adSense:AdSenseGlobals; private var _env:Environment; private var _visualDebug:Boolean; private var _idleTimer:IdleTimer; private var _debug:DebugConfiguration; private var _buffer:Buffer; private var _config:Configuration; private var _mode:String; private var _display:DisplayObject; private var _jsproxy:JavascriptProxy; private var _dom:HTMLDOM; private var _eventDispatcher:EventDispatcher; private var _ready:Boolean;// = false private var _gifRequest:GIFRequest; private var _account:String; private var _tracker:GoogleAnalyticsAPI; public static var version:Version = API.version; public static var autobuild:Boolean = true; public function GATracker(display:DisplayObject, account:String, mode:String="AS3", visualDebug:Boolean=false, config:Configuration=null, debug:DebugConfiguration=null){ super(); _display = display; _eventDispatcher = new EventDispatcher(this); _tracker = new TrackerCache(); this.account = account; this.mode = mode; this.visualDebug = visualDebug; if (!debug){ this.debug = new DebugConfiguration(); }; if (!config){ this.config = new Configuration(debug); }; if (autobuild){ _factory(); }; } public function link(targetUrl:String, useHash:Boolean=false):void{ _tracker.link(targetUrl, useHash); } public function addOrganic(Layout:String, Layout:String):void{ _tracker.addOrganic(Layout, Layout); } public function setAllowLinker(enable:Boolean):void{ _tracker.setAllowLinker(enable); } public function trackEvent(TrackerCache:String, TrackerCache:String, TrackerCache:String=null, TrackerCache:Number=NaN):Boolean{ return (_tracker.trackEvent(TrackerCache, TrackerCache, TrackerCache, TrackerCache)); } public function setCookieTimeout(newDefaultTimeout:int):void{ _tracker.setCookieTimeout(newDefaultTimeout); } public function trackTrans():void{ _tracker.trackTrans(); } public function getClientInfo():Boolean{ return (_tracker.getClientInfo()); } public function trackPageview(pageURL:String=""):void{ _tracker.trackPageview(pageURL); } public function setClientInfo(Layout:Boolean):void{ _tracker.setClientInfo(Layout); } public function get account():String{ return (_account); } public function linkByPost(formObject:Object, useHash:Boolean=false):void{ _tracker.linkByPost(formObject, useHash); } public function getDetectTitle():Boolean{ return (_tracker.getDetectTitle()); } public function dispatchEvent(event:Event):Boolean{ return (_eventDispatcher.dispatchEvent(event)); } public function get config():Configuration{ return (_config); } public function set mode(value:String):void{ _mode = value; } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ _eventDispatcher.removeEventListener(type, listener, useCapture); } public function setDetectFlash(Layout:Boolean):void{ _tracker.setDetectFlash(Layout); } public function resetSession():void{ _tracker.resetSession(); } public function setCampNameKey(newCampNameKey:String):void{ _tracker.setCampNameKey(newCampNameKey); } public function get debug():DebugConfiguration{ return (_debug); } public function addItem(item:String, sku:String, name:String, category:String, price:Number, quantity:int):void{ _tracker.addItem(item, sku, name, category, price, quantity); } private function _bridgeFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (Bridge) v" + version) + "\naccount: ") + account)); return (new Bridge(account, _debug, _jsproxy)); } public function clearIgnoredOrganic():void{ _tracker.clearIgnoredOrganic(); } public function set account(value:String):void{ _account = value; } public function setVar(newVal:String):void{ _tracker.setVar(newVal); } public function build():void{ if (!isReady()){ _factory(); }; } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ _eventDispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference); } public function setDomainName(newDomainName:String):void{ _tracker.setDomainName(newDomainName); } public function createEventTracker(listener:String):EventTracker{ return (_tracker.createEventTracker(listener)); } public function setCampSourceKey(newCampSrcKey:String):void{ _tracker.setCampSourceKey(newCampSrcKey); } public function set config(value:Configuration):void{ _config = value; } public function addTrans(orderId:String, affiliation:String, total:Number, tax:Number, shipping:Number, city:String, state:String, country:String):Object{ return (_tracker.addTrans(orderId, affiliation, total, tax, shipping, city, state, country)); } public function setCampContentKey(newCampContentKey:String):void{ _tracker.setCampContentKey(newCampContentKey); } public function willTrigger(type:String):Boolean{ return (_eventDispatcher.willTrigger(type)); } public function setLocalServerMode():void{ _tracker.setLocalServerMode(); } public function getLocalGifPath():String{ return (_tracker.getLocalGifPath()); } public function setAllowAnchor(enable:Boolean):void{ _tracker.setAllowAnchor(enable); } public function clearIgnoredRef():void{ _tracker.clearIgnoredRef(); } public function isReady():Boolean{ return (_ready); } public function get mode():String{ return (_mode); } public function set debug(value:DebugConfiguration):void{ _debug = value; } public function setLocalGifPath(Layout:String):void{ _tracker.setLocalGifPath(Layout); } public function getVersion():String{ return (_tracker.getVersion()); } public function setSampleRate(newRate:Number):void{ _tracker.setSampleRate(newRate); } public function setCookiePath(newCookiePath:String):void{ _tracker.setCookiePath(newCookiePath); } public function setAllowHash(enable:Boolean):void{ _tracker.setAllowHash(enable); } public function addIgnoredOrganic(Layout:String):void{ _tracker.addIgnoredOrganic(Layout); } public function setLocalRemoteServerMode():void{ _tracker.setLocalRemoteServerMode(); } public function cookiePathCopy(newPath:String):void{ _tracker.cookiePathCopy(newPath); } private function _factory():void{ var activeTracker:GoogleAnalyticsAPI; _jsproxy = new JavascriptProxy(debug); if (visualDebug){ debug.layout = new Layout(debug, _display); debug.active = visualDebug; }; var cache:TrackerCache = (_tracker as TrackerCache); switch (mode){ case TrackerMode.BRIDGE: activeTracker = _bridgeFactory(); break; case TrackerMode.AS3: default: activeTracker = _trackerFactory(); }; if (!cache.isEmpty()){ cache.tracker = activeTracker; cache.flush(); }; _tracker = activeTracker; _ready = true; dispatchEvent(new AnalyticsEvent(AnalyticsEvent.READY, this)); } public function setCampTermKey(newCampTermKey:String):void{ _tracker.setCampTermKey(newCampTermKey); } private function _trackerFactory():GoogleAnalyticsAPI{ debug.info(((("GATracker (AS3) v" + version) + "\naccount: ") + account)); _adSense = new AdSenseGlobals(debug); _dom = new HTMLDOM(debug); _dom.cacheProperties(); _env = new Environment("", "", "", debug, _dom); _buffer = new Buffer(config, debug, false); _gifRequest = new GIFRequest(config, debug, _buffer, _env); _idleTimer = new IdleTimer(config, debug, _display, _buffer); _env.url = _display.stage.loaderInfo.url; return (new Tracker(account, config, debug, _env, _buffer, _gifRequest, _adSense)); } public function setCampNOKey(newCampNOKey:String):void{ _tracker.setCampNOKey(newCampNOKey); } public function setDetectTitle(Layout:Boolean):void{ _tracker.setDetectTitle(Layout); } public function getServiceMode():ServerOperationMode{ return (_tracker.getServiceMode()); } public function clearOrganic():void{ _tracker.clearOrganic(); } public function setCampaignTrack(enable:Boolean):void{ _tracker.setCampaignTrack(enable); } public function addIgnoredRef(Layout:String):void{ _tracker.addIgnoredRef(Layout); } public function set visualDebug(value:Boolean):void{ _visualDebug = value; } public function setCampMediumKey(newCampMedKey:String):void{ _tracker.setCampMediumKey(newCampMedKey); } public function getDetectFlash():Boolean{ return (_tracker.getDetectFlash()); } public function get visualDebug():Boolean{ return (_visualDebug); } public function hasEventListener(type:String):Boolean{ return (_eventDispatcher.hasEventListener(type)); } public function getAccount():String{ return (_tracker.getAccount()); } public function setSessionTimeout(newTimeout:int):void{ _tracker.setSessionTimeout(newTimeout); } public function setRemoteServerMode():void{ _tracker.setRemoteServerMode(); } } var _local1:* = ServerOperationMode; return (_local1); }//package com.google.analytics
Section 69
//AwardsService (com.spilgames.api.AwardsService) package com.spilgames.api { public class AwardsService { public function AwardsService(){ super(); } public static function submitAward(awardTag:String, callback:Function=null):int{ return (SpilGamesServices.getInstance().send("Awards", "submitAward", callback, {tag:awardTag, userName:User.getUserName(), userHash:User.getUserHash()})); } public static function isAvailable():Boolean{ return (SpilGamesServices.getInstance().isServiceAvailable("Awards")); } } }//package com.spilgames.api
Section 70
//ScoreService (com.spilgames.api.ScoreService) package com.spilgames.api { public class ScoreService { public function ScoreService(){ super(); } public static function submitScore(score:int, callback:Function=null):int{ return (SpilGamesServices.getInstance().send("Score", "submitScore", callback, {score:score, userName:User.getUserName(), userHash:User.getUserHash()})); } public static function isAvailable():Boolean{ return (SpilGamesServices.getInstance().isServiceAvailable("Score")); } } }//package com.spilgames.api
Section 71
//SpilGamesServices (com.spilgames.api.SpilGamesServices) package com.spilgames.api { import flash.events.*; import flash.display.*; import flash.net.*; import flash.system.*; public class SpilGamesServices extends MovieClip { private const DEFAULT_CONNECTION_LOCATION:String = "http://www8.agame.com/games/flash/services/ServicesConnection.swf"; private var _connected:Boolean;// = false private var _connecting:Boolean;// = false private var _loader:Loader; private var _servicesConnection;// = null private var _alwaysInFront:Boolean;// = false public static const INVALID_ID:int = -1; public static const CONFIGURATION_FAILED:String = "configurationFailure"; public static const INVALID_DOMAIN:String = "invalidDomain"; private static var _instance:SpilGamesServices = null; public function SpilGamesServices(access:Private=null){ super(); if (!access){ throw (new Error("Cannot instantiate this class, use SpilGamesServices.getInstance")); }; } private function handleRemovedFromStage(e:Event):void{ trace("WARNING: please do not remove SpilGamesServices from the stage"); } private function handleLoadComplete(e:Event):void{ _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); _servicesConnection = LoaderInfo(e.target).content; _servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady); _servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed); _servicesConnection.addEventListener("serviceError", handleServiceError); addChild(_servicesConnection); } public function send(serviceID:String, functionName:String, callback:Function, args:Object=null):int{ if (isReady()){ return (_servicesConnection.send(serviceID, functionName, callback, args)); }; return (INVALID_ID); } private function handleServicesFailed(e:ErrorEvent):void{ _servicesConnection.addEventListener(Event.COMPLETE, handleServicesReady); _servicesConnection.addEventListener(ErrorEvent.ERROR, handleServicesFailed); _servicesConnection.addEventListener("serviceError", handleServiceError); _connecting = false; if (hasEventListener("servicesFailed")){ dispatchEvent(new ErrorEvent("servicesFailed", false, false, e.text)); }; } public function get version():String{ return ("1.1"); } public function isReady():Boolean{ return (((!((_servicesConnection == null))) && (_servicesConnection.isReady()))); } private function handleIOError(e:IOErrorEvent):void{ _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); _connecting = false; if (hasEventListener(e.type)){ dispatchEvent(e); }; } private function handleServiceError(e:Event):void{ var message:String; if (hasEventListener("serviceError")){ message = ""; if ((e is ErrorEvent)){ message = ErrorEvent(e).text; } else { message = e.toString(); }; dispatchEvent(new ErrorEvent("serviceError", false, false, message)); }; } public function disconnect():void{ if (_servicesConnection){ _servicesConnection.removeEventListener(Event.COMPLETE, handleServicesReady); _servicesConnection.removeEventListener(ErrorEvent.ERROR, handleServicesFailed); _servicesConnection.removeEventListener("serviceError", handleServiceError); if (_connected){ _servicesConnection.disconnect(); }; removeChild(_servicesConnection); }; _servicesConnection = null; if (_loader){ try { _loader.close(); //unresolved jump var _slot1 = e; } finally { _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); }; _loader = null; }; removeEventListener(Event.ENTER_FRAME, bringToFront); removeEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage); if (parent){ parent.removeChild(this); }; _connected = (_connecting = false); } private function handleServicesReady(e:Event):void{ _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleIOError); _connected = true; _connecting = false; dispatchEvent(new Event("servicesReady")); } public function get connection(){ return (_servicesConnection); } public function getSiteID():int{ if (_servicesConnection != null){ return (_servicesConnection.getSiteID()); }; return (INVALID_ID); } public function isServiceAvailable(serviceID:String):Boolean{ return (((isReady()) && (_servicesConnection.isServiceAvailable(serviceID)))); } public function getChannelID():int{ if (_servicesConnection != null){ return (_servicesConnection.getChannelID()); }; return (INVALID_ID); } public function set alwaysInFront(value:Boolean):void{ if (_alwaysInFront != value){ _alwaysInFront = value; if (_alwaysInFront){ addEventListener(Event.ENTER_FRAME, bringToFront); } else { removeEventListener(Event.ENTER_FRAME, bringToFront); }; }; } public function getItemID():int{ if (_servicesConnection != null){ return (_servicesConnection.getItemID()); }; return (INVALID_ID); } public function allowDomain(domain:String):void{ Security.allowDomain("*"); Security.allowInsecureDomain("*"); } public function connect(clip:DisplayObjectContainer, ... _args):void{ var request:URLRequest; var connectionLocation:String; var urlVariables:URLVariables; var date:Date; if (((!(_connecting)) && (!(_connected)))){ if (!clip.stage){ throw (new Error("The given clip must be present in the display list (added to stage)")); }; _connecting = true; clip.stage.addChild(this); addEventListener(Event.REMOVED_FROM_STAGE, handleRemovedFromStage); if (((root.loaderInfo.parameters["servicesLoc"]) && ((root.loaderInfo.parameters["servicesLoc"].length > 0)))){ connectionLocation = root.loaderInfo.parameters["servicesLoc"]; request = new URLRequest(connectionLocation); } else { connectionLocation = DEFAULT_CONNECTION_LOCATION; urlVariables = new URLVariables(); date = new Date(); urlVariables.nocache = ((((date.fullYear * 12) + (date.month + 1)) * 31) + date.day); request = new URLRequest(connectionLocation); request.data = urlVariables; }; allowDomain(connectionLocation); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoadComplete); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleIOError); _loader.load(request); }; } public function get alwaysInFront():Boolean{ return (_alwaysInFront); } public function get connecting():Boolean{ return (_connecting); } public function isDomainAllowed():Boolean{ return (((!((_servicesConnection == null))) && (_servicesConnection.isDomainValid()))); } public function bringToFront(e:Event=null):void{ var e = e; if (parent){ parent.setChildIndex(this, (parent.numChildren - 1)); //unresolved jump var _slot1 = e; removeEventListener(Event.ENTER_FRAME, bringToFront); }; } public static function getInstance():SpilGamesServices{ if (!_instance){ _instance = new SpilGamesServices(new Private()); }; return (_instance); } } }//package com.spilgames.api class Private { private function Private(){ super(); } }
Section 72
//User (com.spilgames.api.User) package com.spilgames.api { import flash.display.*; public class User { public function User(){ super(); } public static function getUserName():String{ var connection:* = SpilGamesServices.getInstance().connection; if (connection != null){ return (connection.getUserName()); }; return (""); } public static function isGuest():Boolean{ var root:DisplayObject; var vars:Object; var connection:* = SpilGamesServices.getInstance().connection; if (connection != null){ return (connection.isGuest()); }; root = SpilGamesServices.getInstance().root; if (root.loaderInfo != null){ vars = root.loaderInfo.parameters; return (((((((!(vars.username)) || ((vars.username == "")))) || (!(vars.hash)))) || ((vars.hash == "")))); }; return (false); } public static function getUserHash():String{ var connection:* = SpilGamesServices.getInstance().connection; if (connection != null){ return (connection.getUserHash()); }; return (""); } } }//package com.spilgames.api
Section 73
//BilliardsData (data.BilliardsData) package data { import flash.display.*; import ui.equipment.BilliardEquipment.*; public class BilliardsData { private var _billiards:Billiards; private var _cueBall:CueBall; private var _pocket:Pocket; private var _poolCue:PoolCue; private var _mc:MovieClip; private var _shadow:Shadow; public function BilliardsData(mc:MovieClip){ super(); _mc = mc; init(); } public function moveBilliards(billiardNumber:int, mc:MovieClip, x:int, y:int):void{ _billiards.moveBall(billiardNumber, mc, x, y); } public function get billiards():Billiards{ return (_billiards); } public function removeShadow(number:int):void{ _shadow.removeShadow(number); } private function bulidPoolCue():void{ _poolCue = new PoolCue(_mc); } public function del():void{ _pocket.del(); _cueBall.del(); _billiards.del(); _poolCue.del(); _shadow.del(); _pocket = null; _cueBall = null; _billiards = null; _poolCue = null; _shadow = null; _mc = null; } private function bulidBilliards():void{ _billiards = new Billiards(_mc); } private function init():void{ bulidShaow(); bulidPocket(); bulidCueBall(); bulidBilliards(); bulidPoolCue(); } private function bulidPocket():void{ _pocket = new Pocket(_mc); } public function get cueBall():CueBall{ return (_cueBall); } public function get pocket():Pocket{ return (_pocket); } public function addEffectBilliard(billiardNumber:int, x:int, y:int):void{ _billiards.addEffectBall(billiardNumber, x, y); } private function bulidCueBall():void{ _cueBall = new CueBall(_mc); } private function bulidShaow():void{ _shadow = new Shadow(_mc); } public function addBilliards(billiardNumber:int, x:int, y:int):void{ _billiards.addBall(billiardNumber, x, y); } public function removeBilliards(ballnumber:int):void{ _billiards.removeBall(ballnumber); } public function get shadow():Shadow{ return (_shadow); } public function addShadow(number:int, x:Number, y:Number):void{ _shadow.addShadow(number, x, y); } public function removeCueBall():void{ _cueBall.removeBall(); } public function addEffectCueBall(x:int, y:int):void{ _cueBall.addEffectCueBall(x, y); } public function addCueBall(x:Number, y:Number):void{ _cueBall.addBall(x, y); } public function get poolCue():PoolCue{ return (_poolCue); } } }//package data
Section 74
//Data (data.Data) package data { import flash.display.*; import zlong.breathxue.utils.math.*; public class Data { public static const CUEBALLY:Number = 163.8; public static const BALL_NUMBER:int = 15; public static const BILLIARDS_AREA:Array = [[97, 93.5], [242, 238]]; public static const COLLIDE_LIGHT:String = "collideLight"; public static const SECOND_PALYER_SCORE:Array = [[533, 73], [556.5, 73], [579.5, 73], [602.5, 73], [625.5, 73], [533, 91.8], [556.5, 91.8], [579.5, 91.8], [602.5, 91.8], [625.5, 91.8]]; public static const CUEBALLX:Number = 455; public static const MODE_SECOND:String = "EightPlayerVsPlayer"; public static const SHOT_BALL:String = "shotBall"; public static const COLLIDE_NORMAL:String = "collideNormal"; public static const FULL_COLOR:String = "Full_Color"; public static const BALK_AREA:Array = [[455, 93.5], [527.5, 238]]; public static const SHOT_AREA:Array = [[177.8, 165.8], [163.8, 157.8], [163.8, 174.1], [149.8, 149.6], [149.8, 181.8], [135.6, 141.6], [135.6, 157.6], [135.6, 173.6], [135.6, 189.6], [121.5, 133.6], [121.5, 149.6], [121.5, 165.8], [121.5, 181.8], [121.5, 197.8], [149.8, 165.8]]; public static const EIGHT_BALL_MODE:String = "Eight_Ball_Mode"; public static const MODE_FOURTH:String = "StraightPlayerVsComputer"; public static const HALF_COLOR:String = "Half_Color"; public static const OPENING:String = "opening"; public static const MODE_THIRD:String = "StraightOnlyPlyer"; public static const MENU_TOUCH:String = "sound_menuTouch"; public static const MENU_PRESS:String = "sound_menuPress"; public static const COLLIDE_HEAVY:String = "collideHeavy"; public static const COLLIDE_TABLE:String = "collideTable"; public static const STRAIGHT_MODE:String = "Straight_Mode"; public static const BLACK_BALL:String = "Black_Ball"; public static const FIRST_PLAYER_SCORE:Array = [[72.8, 73], [96.3, 73], [119.3, 73], [142.3, 73], [165.3, 73], [72.8, 91.8], [96.3, 91.8], [119.3, 91.8], [142.3, 91.8], [165.3, 91.8]]; public static const SET_BILLIARDS:String = "setBilliards"; public static const IN_POCKET:String = "inPocket"; public static const MODE_FIRST:String = "EightPlayerVsComputer"; public static const MODE_FIFTH:String = "StraightPlayerVsPlayer"; public static var correctBilliardVector:mVector; public static var musicEnable:Boolean = true; public static var MOVE_DISTANCE:Number = 0.5; public static var Stop:Boolean; public static var BALL_SIZE:int = 8; public static var winNumber:int = 0; public static var INTERVAL:Number = 0.25; public static var makeClearance:Boolean; public static var isCorrectVector:Boolean = false; public static var FRAME_RATEP:int = 55; public static var DAMPING:Number = 0.99; public static var TABLE_ELASTICITY:Number = 0.4; public static var soundEnable:Boolean = true; public static var exitInGame:Boolean = false; public static var BALL_ELASTICITY:Number = 0.4; public static var modechoose:String; public static var POWER:int = 8; public static var quality:String = StageQuality.BEST; public function Data(){ super(); } } }//package data
Section 75
//GetScoreEvent (event.GetScoreEvent) package event { import flash.events.*; public class GetScoreEvent extends Event { private var _otherScore:Array; private var _currScore:Array; public static const GET_SCORE:String = "Get_Score"; public function GetScoreEvent(value:String, currScore:Array, otherScore:Array=null){ _otherScore = new Array(); super(value); _currScore = currScore; if (otherScore){ _otherScore = otherScore; }; } public function get currScore():Array{ return (_currScore); } public function get otherScore():Array{ return (_otherScore); } } }//package event
Section 76
//MyEvent (event.MyEvent) package event { import flash.events.*; import zlong.zelda.collisionEngine.*; public class MyEvent extends Event { private var _number:int; private var _currColor:String; private var _otherColor:String; private var _collidedBall:AbstractObject; public static const CUEBALL_EFFECT:String = "Cueball_Effect"; public static const BALL_STOP:String = "Ball_Stop"; public static const COLOR:String = "color"; public static const GAME_LOSE:String = "Game_Lose"; public static const BILLIARDS_EFFECT:String = "Billiards_Effect"; public static const BALL_MOVE:String = "Ball_Move"; public static const INTO_POCKET:String = "Into_Pocket"; public static const CUEBALL_INTO_POKCET_OVER:String = "Cueball_Into_Pokcet_Over"; public static const BALL_INTO_POCKET:String = "Ball_Into_Pocket"; public static const BALL_COLLIDE:String = "Ball_Collide"; public static const CUEBALL_INTO_POCKET:String = "Cueball_Into_Pocket"; public static const NEXT_PLAYER:String = "Next_Player"; public static const GAME_WIN:String = "Game_Win"; public static const PLAYER_AGAIN:String = "Player_Again"; public static const INTO_POCKET_OVER:String = "Into_Pokcet_Over"; public function MyEvent(value:String, number:int=0, collidedBall:AbstractObject=null, currColor:String=null, otherColor:String=null){ super(value); _number = number; _collidedBall = collidedBall; _currColor = currColor; _otherColor = otherColor; } public function get collidedBall():AbstractObject{ return (_collidedBall); } public function get number():int{ return (_number); } public function get currColor():String{ return (_currColor); } public function get otherColor():String{ return (_otherColor); } } }//package event
Section 77
//PlayerEvent (event.PlayerEvent) package event { import flash.events.*; public class PlayerEvent extends Event { private var _angle:Number; private var _power:Array; public static const PLAYER_READY_OVER:String = "Player_Ready_Over"; public function PlayerEvent(value:String, arr:Array, angle:Number){ super(value); _power = arr; _angle = angle; } public function get angle():Number{ return (_angle); } public function get locomotivity():Array{ return (_power); } } }//package event
Section 78
//UIEvent (event.UIEvent) package event { import flash.events.*; public class UIEvent extends Event { private var _mode:String; public static const BACK_MAINMENU:String = "Back_MainMenu"; public static const PLAY_AGAIN:String = "Play_Again"; public static const START_GAME:String = "Start_Game"; public function UIEvent(type:String, mode:String=null){ super(type); _mode = mode; } public function get mode():String{ return (_mode); } } }//package event
Section 79
//LivePreviewParent (fl.livepreview.LivePreviewParent) package fl.livepreview { import flash.display.*; import flash.utils.*; import flash.external.*; public class LivePreviewParent extends MovieClip { public var myInstance:DisplayObject; public function LivePreviewParent(){ super(); try { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; myInstance = getChildAt(0); onResize(stage.width, stage.height); if (ExternalInterface.available){ ExternalInterface.addCallback("onResize", onResize); ExternalInterface.addCallback("onUpdate", onUpdate); }; } catch(e) { }; } private function updateCollection(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Class; var _local5:Object; var _local6:int; var _local7:Object; var _local8:Object; var _local9:*; _local3 = Class(getDefinitionByName(_arg1.collectionClass)); _local4 = Class(getDefinitionByName(_arg1.collectionItemClass)); _local5 = new (_local3); _local6 = 0; while (_local6 < _arg1.collectionArray.length) { _local7 = new (_local4); _local8 = _arg1.collectionArray[_local6]; for (_local9 in _local8) { _local7[_local9] = _local8[_local9]; }; _local5.addItem(_local7); _local6++; }; myInstance[_arg2] = (_local5 as _local3); } public function onResize(_arg1:Number, _arg2:Number):void{ var setSizeFn:Function; var width = _arg1; var height = _arg2; setSizeFn = null; try { setSizeFn = myInstance["setSize"]; } catch(e:Error) { setSizeFn = null; }; if (setSizeFn != null){ setSizeFn(width, height); } else { myInstance.width = width; myInstance.height = height; }; } public function onUpdate(... _args):void{ var i:int; var name:String; var value:*; var updateArray = _args; i = 0; while ((i + 1) < updateArray.length) { try { name = String(updateArray[i]); value = updateArray[(i + 1)]; if ((((typeof(value) == "object")) && (value.__treatAsCollectionSpecialSauce__))){ updateCollection(value, name); } else { myInstance[name] = value; }; } catch(e:Error) { }; i = (i + 2); }; } } }//package fl.livepreview
Section 80
//BallColorGroup (implement.BallColorGroup) package implement { import data.*; public class BallColorGroup { private var _currColorArr:Array; private static var _instance:BallColorGroup; public function BallColorGroup(){ super(); } public function init(currColor:String, billiardsArr:Array):void{ _currColorArr = new Array(); var i:int; while (i < billiardsArr.length) { if (billiardsArr[i] != null){ switch (currColor){ case Data.FULL_COLOR: if ((((int(billiardsArr[i].name) >= 1)) && ((int(billiardsArr[i].name) < 8)))){ _currColorArr.push(billiardsArr[i]); }; break; case Data.HALF_COLOR: if ((((int(billiardsArr[i].name) >= 8)) && ((int(billiardsArr[i].name) < 15)))){ _currColorArr.push(billiardsArr[i]); }; break; case Data.BLACK_BALL: if (billiardsArr[i].name == 15){ _currColorArr.push(billiardsArr[(billiardsArr.length - 1)]); }; break; default: _currColorArr.push(billiardsArr[i]); break; }; }; i++; }; } public function get currColorArr():Array{ return (_currColorArr); } public function del():void{ var i:int; while (i < _currColorArr.length) { if (_currColorArr[i] != null){ _currColorArr[i] = null; }; i++; }; _currColorArr = null; } public static function instance():BallColorGroup{ if (_instance == null){ _instance = new (BallColorGroup); }; return (_instance); } } }//package implement
Section 81
//ChooseAngle (implement.ChooseAngle) package implement { public class ChooseAngle { private var _radians:Number; private var _angle:Number; private static var _instance:ChooseAngle; public function ChooseAngle(){ super(); } public function init(fx:Number, fy:Number, sx:Number, sy:Number):void{ var dx:Number; var dy:Number; dx = (sx - fx); dy = (sy - fy); _angle = ((Math.atan2(dy, dx) * 180) / Math.PI); _radians = ((_angle * Math.PI) / 180); } public function get angle():Number{ return (_angle); } public function get radinans():Number{ return (_radians); } public static function instance():ChooseAngle{ if (_instance == null){ _instance = new (ChooseAngle); }; return (_instance); } } }//package implement
Section 82
//ReleasePower (implement.ReleasePower) package implement { public class ReleasePower { private var _vx:Number; private var _vy:Number; private static var _instance:ReleasePower; public function ReleasePower(){ super(); } public function init(radians:Number, power:int):void{ _vx = (Math.cos(radians) * power); _vy = (Math.sin(radians) * power); } public function get vy():Number{ return (_vy); } public function get vx():Number{ return (_vx); } public static function instance():ReleasePower{ if (_instance == null){ _instance = new (ReleasePower); }; return (_instance); } } }//package implement
Section 83
//RelocateBall (implement.RelocateBall) package implement { import flash.events.*; import ui.equipment.apeEquipment.*; import tools.*; import data.*; public class RelocateBall extends EventDispatcher { private var _arr:Array; private static var _instance:RelocateBall; public function RelocateBall(){ super(); } public function init(area:Array, billiards:Array, cueBall:ApeCueBall=null):void{ var dist:Number; var _canRelease:Boolean; var minX:int = area[0][0]; var minY:int = area[0][1]; var maxX:int = area[1][0]; var maxY:int = area[1][1]; var x:int = (int((Math.random() * (maxX - minX))) + minX); var y:int = (int((Math.random() * (maxY - minY))) + minY); trace("重新摆放球坐标=", x, y); _arr = [x, y]; var i:int; while (i < (billiards.length - 1)) { if (billiards[i] != null){ dist = CalculateDist.instance().dist(billiards[i].x, billiards[i].y, x, y); if (dist <= (Data.BALL_SIZE * 2)){ trace("有球重叠"); init(area, billiards, cueBall); }; }; i++; }; if (cueBall != null){ dist = CalculateDist.instance().dist(cueBall.center.x, cueBall.center.y, x, y); if (dist <= (Data.BALL_SIZE * 2)){ trace("有球与母球重叠"); init(area, billiards, cueBall); }; }; } public function relocate():Array{ return (_arr); } public function del():void{ _arr = null; } public static function instance():RelocateBall{ if (_instance == null){ _instance = new (RelocateBall); }; return (_instance); } } }//package implement
Section 84
//ApeHit (mainLogic.ApeHit) package mainLogic { import flash.display.*; import flash.events.*; import utils.*; import event.*; import zlong.breathxue.utils.math.*; import zlong.zelda.collisionEngine.*; import ui.equipment.apeEquipment.*; import data.*; public class ApeHit extends Sprite { private var _effectCueBall:MovieClip; private var _allStop:Boolean;// = true private var _inPocket:Array; private var _cueBallEffect:Boolean; private var _hitPower:int; private var _cueBall:MovieClip; private var _canCheckStop:Boolean; private var _billiardsEffect:Boolean; private var _mc:MovieClip; private var _pocket:Array; private var _billiards:Array; private var _surfaces:ApePoolTable; private var _apeBilliard:ApeBilliard; private var _shadow:Array; private var _angle:Number; private var _inpocket:ApePocket; private var _apeCueBall:ApeCueBall; public function ApeHit(screen:MovieClip, pocket:Array, cueBall:MovieClip, billiards:Array, shadow:Array){ super(); _mc = screen; _pocket = pocket; _cueBall = cueBall; _billiards = billiards; _shadow = shadow; init(); } public function addCueBall(x:int, y:int):void{ _apeCueBall.addCueBall(x, y); _apeCueBall.cueBallMc.addEventListener(MyEvent.BALL_COLLIDE, ballCollide); } private function cueBallInPocketOver():void{ this.dispatchEvent(new MyEvent(MyEvent.CUEBALL_INTO_POKCET_OVER)); } public function delBilliard(ballNumber:int):void{ _apeBilliard.delBilliard(ballNumber); } public function cueBallInPocketEffect(effectCueBall:MovieClip):void{ _effectCueBall = effectCueBall; _cueBallEffect = true; } private function checkBilliardsIsStop():void{ var angle:Number; _apeBilliard.getXY(); var i:int; while (i < _apeBilliard.billiardArr.length) { if (_billiards[i] != null){ _billiards[i].x = _apeBilliard.billiardX[i]; _billiards[i].y = _apeBilliard.billiardY[i]; if (_shadow[i] != null){ _shadow[i].x = (_billiards[i].x + 2); _shadow[i].y = (_billiards[i].y + 2); }; if (_apeBilliard.billiardArr[i].velocity.length >= Data.MOVE_DISTANCE){ angle = _apeBilliard.billiardArr[i].velocity.angle; _billiards[i].ball.rotation = (angle - 90); if (_apeBilliard.billiardArr[i].velocity.length > 4){ if ((_billiards[i].ball.currentFrame + 7) > 60){ _billiards[i].ball.gotoAndStop(((_billiards[i].ball.currentFrame + 7) - 60)); } else { _billiards[i].ball.gotoAndStop((_billiards[i].ball.currentFrame + 7)); }; } else { if (_apeBilliard.billiardArr[i].velocity.length > 3){ if ((_billiards[i].ball.currentFrame + 6) > 60){ _billiards[i].ball.gotoAndStop(((_billiards[i].ball.currentFrame + 6) - 60)); } else { _billiards[i].ball.gotoAndStop((_billiards[i].ball.currentFrame + 6)); }; } else { if (_apeBilliard.billiardArr[i].velocity.length > 2){ if ((_billiards[i].ball.currentFrame + 5) > 60){ _billiards[i].ball.gotoAndStop(((_billiards[i].ball.currentFrame + 5) - 60)); } else { _billiards[i].ball.gotoAndStop((_billiards[i].ball.currentFrame + 5)); }; } else { if (_apeBilliard.billiardArr[i].velocity.length > 1.5){ if ((_billiards[i].ball.currentFrame + 4) > 60){ _billiards[i].ball.gotoAndStop(((_billiards[i].ball.currentFrame + 4) - 60)); } else { _billiards[i].ball.gotoAndStop((_billiards[i].ball.currentFrame + 4)); }; } else { if (_apeBilliard.billiardArr[i].velocity.length > 1){ if ((_billiards[i].ball.currentFrame + 3) > 60){ _billiards[i].ball.gotoAndStop(((_billiards[i].ball.currentFrame + 3) - 60)); } else { _billiards[i].ball.gotoAndStop((_billiards[i].ball.currentFrame + 3)); }; } else { if (_apeBilliard.billiardArr[i].velocity.length > 0.7){ if ((_billiards[i].ball.currentFrame + 2) > 60){ _billiards[i].ball.gotoAndStop(((_billiards[i].ball.currentFrame + 2) - 60)); } else { _billiards[i].ball.gotoAndStop((_billiards[i].ball.currentFrame + 2)); }; } else { _billiards[i].ball.nextFrame(); }; }; }; }; }; }; _allStop = false; } else { _apeBilliard.billiardArr[i].velocity = new mVector(0, 0); }; }; i++; }; } private function run(event:Event):void{ if (!Data.Stop){ CollisionEngine.step(); uiFollowAPE(); checkBilliardsInPocketEffect(); checkCueBallInPocketEffect(); }; } private function checkCueBallIsStop():void{ _cueBall.x = _apeCueBall.center.x; _cueBall.y = _apeCueBall.center.y; if (_shadow[(_shadow.length - 1)] != null){ _shadow[(_shadow.length - 1)].x = (_cueBall.x + 2); _shadow[(_shadow.length - 1)].y = (_cueBall.y + 2); }; if (_apeCueBall.cueBall.velocity.length >= Data.MOVE_DISTANCE){ _allStop = false; } else { _apeCueBall.cueBall.velocity = new mVector(0, 0); }; } private function init():void{ _mc.addChild(this); CollisionEngine.init(Data.INTERVAL); CollisionEngine.container = this; CollisionEngine.damping = Data.DAMPING; CollisionEngine.accuracyMode = true; CollisionEngine.isPaint = false; CollisionEngine.collRange = new mVector(122, 122); initDis(); initEvt(); } public function del():void{ delEvent(); delDis(); } private function inPocket(evt:MyEvent):void{ var ballNumber:int = collideNumber(evt.collidedBall); if (ballNumber == 15){ _apeCueBall.x = _pocket[evt.number].x; _apeCueBall.y = _pocket[evt.number].y; this.dispatchEvent(new MyEvent(MyEvent.CUEBALL_EFFECT)); } else { _apeBilliard.billiardArr[ballNumber].px = _pocket[evt.number].x; _apeBilliard.billiardArr[ballNumber].py = _pocket[evt.number].y; this.dispatchEvent(new MyEvent(MyEvent.BILLIARDS_EFFECT, ballNumber)); }; } public function addBilliards(BilliardNumber:int, x:int, y:int):void{ _apeBilliard.addBall(BilliardNumber, x, y); } private function delDis():void{ _apeBilliard.del(); _apeCueBall.del(); _inpocket.del(); _pocket = null; _cueBall = null; _billiards = null; _shadow = null; _surfaces.removeCollidable(_apeBilliard); _inpocket.removeCollidable(_apeBilliard); _apeCueBall.removeCollidable(_apeBilliard); _apeCueBall.removeCollidable(_surfaces); CollisionEngine.removeGroup(_apeBilliard); CollisionEngine.removeGroup(_apeCueBall); CollisionEngine.removeGroup(_surfaces); CollisionEngine.removeGroup(_inpocket); _apeBilliard = null; _apeCueBall = null; _surfaces = null; _inpocket = null; CollisionEngine.container = null; _inPocket = null; _effectCueBall = null; _mc.removeChild(this); _mc = null; } private function collideNumber(ball):int{ var billiard:CircleParticle; var i:int; for each (billiard in _apeBilliard.getAll()) { if (billiard == ball){ trace("被撞的球是:", (i + 1)); break; }; i++; }; return (i); } private function setBilliardsArea():void{ SoundsManager.instance.playSound("sound_opening", 1); _inPocket = new Array(); _billiardsEffect = false; _cueBallEffect = false; _canCheckStop = false; var temp:Array = new Array(); var i:int; while (i < (_apeBilliard.billiardArr.length - 1)) { temp.push(_apeBilliard.billiardArr[i]); i++; }; _apeBilliard.billiardArr[14].px = Data.SHOT_AREA[14][0]; _apeBilliard.billiardArr[14].py = Data.SHOT_AREA[14][1]; var random:int = int((Math.random() * 14)); temp[random].px = Data.SHOT_AREA[13][0]; temp[random].py = Data.SHOT_AREA[13][1]; temp.splice(random, 1); if (random < 7){ random = int(((Math.random() * 6) + 7)); temp[random].px = Data.SHOT_AREA[9][0]; temp[random].py = Data.SHOT_AREA[9][1]; temp.splice(random, 1); } else { random = int((Math.random() * 7)); temp[random].px = Data.SHOT_AREA[9][0]; temp[random].py = Data.SHOT_AREA[9][1]; temp.splice(random, 1); }; i = 0; for (;i < (Data.SHOT_AREA.length - 1);i++) { if ((((i == 9)) || ((i == 13)))){ continue; } else { random = int((Math.random() * temp.length)); temp[random].px = Data.SHOT_AREA[i][0]; temp[random].py = Data.SHOT_AREA[i][1]; temp.splice(random, 1); }; }; } public function removeCueBall():void{ _apeCueBall.removeCueBall(); } private function initEvt():void{ this.addEventListener(Event.ENTER_FRAME, run); } private function ballCollide(evt:MyEvent):void{ var ballNumber:int = collideNumber(evt.collidedBall); this.dispatchEvent(new MyEvent(MyEvent.BALL_COLLIDE, (ballNumber + 1))); } private function checkBilliardsInPocketEffect():void{ var ballNumber:int; var i:int; if (_billiardsEffect){ i = 0; while (i < _inPocket.length) { _inPocket[i].alpha = (_inPocket[i].alpha - 0.1); _inPocket[i].scaleX = (_inPocket[i].scaleX - 0.05); _inPocket[i].scaleY = (_inPocket[i].scaleY - 0.05); if (_inPocket[i].alpha <= 0){ ballNumber = _inPocket[i].name; _inPocket[i].parent.removeChild(_inPocket[i]); _inPocket.splice(i, 1); i--; Trace(ballNumber, "号球效果播放完毕"); }; i++; }; if (_inPocket.length == 0){ _billiardsEffect = false; }; }; } private function checkStoped():void{ var dist:Number; var billiard:CircleParticle; var cueball:CircleParticle; if ((((_cueBallEffect == false)) && ((_billiardsEffect == false)))){ _allStop = true; for each (billiard in _apeBilliard.getAll()) { if (billiard.velocity.length < Data.MOVE_DISTANCE){ billiard.velocity = new mVector(0, 0); } else { _allStop = false; }; }; for each (cueball in _apeCueBall.getAll()) { if (cueball.velocity.length < Data.MOVE_DISTANCE){ cueball.velocity = new mVector(0, 0); } else { _allStop = false; }; }; if (_allStop){ this.dispatchEvent(new MyEvent(MyEvent.BALL_STOP)); }; }; } public function get apeBilliards():Array{ return (_apeBilliard.billiardArr); } public function relocateCueBall(x:int, y:int):void{ _apeCueBall.x = x; _apeCueBall.y = y; } private function delEvent():void{ _apeCueBall.cueBallMc.removeEventListener(MyEvent.BALL_COLLIDE, ballCollide); _inpocket.removecollidedListener(MyEvent.BALL_COLLIDE, inPocket); this.removeEventListener(Event.ENTER_FRAME, run); } private function checkCueBallInPocketEffect():void{ if (_cueBallEffect){ _effectCueBall.alpha = (_effectCueBall.alpha - 0.1); _effectCueBall.scaleX = (_effectCueBall.scaleX - 0.05); _effectCueBall.scaleY = (_effectCueBall.scaleY - 0.05); if (_effectCueBall.alpha <= 0){ _effectCueBall = null; _cueBallEffect = false; cueBallInPocketOver(); }; }; } public function get apeCueBall():ApeCueBall{ return (_apeCueBall); } private function initDis():void{ _surfaces = new ApePoolTable(); CollisionEngine.addGroup(_surfaces); _inpocket = new ApePocket(_cueBall, _billiards); CollisionEngine.addGroup(_inpocket); _inpocket.addcollidedListener(MyEvent.BALL_COLLIDE, inPocket); _apeBilliard = new ApeBilliard(); CollisionEngine.addGroup(_apeBilliard); _apeCueBall = new ApeCueBall(Data.CUEBALLX, Data.CUEBALLY); CollisionEngine.addGroup(_apeCueBall); _apeCueBall.cueBallMc.addEventListener(MyEvent.BALL_COLLIDE, ballCollide); _surfaces.addCollidable(_apeBilliard); _inpocket.addCollidable(_apeBilliard); _apeCueBall.addCollidableList(new Array(_apeBilliard, _surfaces, _inpocket)); setBilliardsArea(); } public function billiardsInPokcetEffect(arr:Array):void{ _inPocket = arr; _billiardsEffect = true; } public function removeBilliard(ballnumber:int):void{ _apeBilliard.removeBilliard(ballnumber); } private function uiFollowAPE():void{ _allStop = true; checkCueBallIsStop(); checkBilliardsIsStop(); if (_canCheckStop){ if (_allStop){ if ((((_cueBallEffect == false)) && ((_billiardsEffect == false)))){ trace("全部停止 "); _canCheckStop = false; this.dispatchEvent(new MyEvent(MyEvent.BALL_STOP)); }; }; }; } public function shot(vx:Number, vy:Number):void{ _apeCueBall.speed(vx, vy); _canCheckStop = true; } public function setCollide():void{ _apeCueBall.setCollide(); } } }//package mainLogic
Section 85
//EightBallMode (mainLogic.EightBallMode) package mainLogic { import flash.display.*; import flash.events.*; import utils.*; import zlong.spilSystemTool.*; import event.*; import implement.*; import data.*; import player.*; public class EightBallMode extends EventDispatcher { private var _shotAgain:Boolean; private var _isFoul:Boolean; private var _screen:MovieClip; private var _billiardsData:BilliardsData; private var _effectArr:Array; private var _choosedColor:Boolean; private var _ballNumberArr:Array; private var _currShotWin:Boolean; private var _canShotBlackBall:Boolean; private var _apeHit:ApeHit; private var _gameOver:Boolean; private var _otherShotScoreArr:Array; private var _currPlayer; private var _cueBallFoul:Boolean; private var _otherColor:String; private var _currShotScoreArr:Array; private var _firstRound:Boolean; private var _currColor:String; private var _intoPocketArr:Array; public function EightBallMode(screen:MovieClip){ super(); _screen = screen; init(); } public function lighting(ballNumber:int, mc:MovieClip, x:Number, y:Number):void{ _apeHit.delBilliard(ballNumber); _billiardsData.moveBilliards(ballNumber, mc, x, y); } private function init():void{ GoogleEvent.instance.gaTrackEvent("8BALL_viewed"); _billiardsData = new BilliardsData(_screen); _cueBallFoul = false; _gameOver = false; _firstRound = true; _choosedColor = false; _intoPocketArr = new Array(); _effectArr = new Array(); _ballNumberArr = new Array(); initHit(); } private function nextShot():void{ var arr:Array = new Array(); if (_firstRound){ trace("firstround"); _firstRound = false; }; _intoPocketArr.length = 0; _currShotWin = true; _canShotBlackBall = false; _apeHit.setCollide(); _currPlayer.removeEventListener(PlayerEvent.PLAYER_READY_OVER, playerShot); if (_shotAgain){ _shotAgain = false; this.dispatchEvent(new MyEvent(MyEvent.PLAYER_AGAIN)); } else { this.dispatchEvent(new MyEvent(MyEvent.NEXT_PLAYER)); }; } private function delDis():void{ RelocateBall.instance().del(); _apeHit.del(); _billiardsData.del(); var i:int; while (i < _effectArr.length) { if (_effectArr[i] != null){ _effectArr[i] = null; }; i++; }; _effectArr = null; _ballNumberArr = null; _apeHit = null; _billiardsData = null; _currShotScoreArr = null; _otherShotScoreArr = null; _intoPocketArr = null; _currPlayer = null; _screen = null; } private function showScore():void{ } private function checkBallIntoPocket():void{ var ballNumber:int; if (_intoPocketArr.length == 0){ return; }; _shotAgain = true; _canShotBlackBall = false; if (!_choosedColor){ trace("notchoose"); ballNumber = int((_intoPocketArr[0] + 1)); checkCorrectColor(ballNumber); trace("当前颜色============", _currColor); if (_firstRound){ trace("firstround"); _canShotBlackBall = true; _firstRound = false; setGroup(_currColor, _currShotScoreArr, _otherShotScoreArr, true); } else { setGroup(_currColor, _currShotScoreArr, _otherShotScoreArr); }; _choosedColor = true; this.dispatchEvent(new GetScoreEvent(GetScoreEvent.GET_SCORE, _currShotScoreArr, _otherShotScoreArr)); } else { BallColorGroup.instance().init(_currColor, _billiardsData.billiards.billiardsArr); if (_isFoul == false){ setGroup(_currColor, _currShotScoreArr, _otherShotScoreArr); if (_currShotScoreArr.length == 0){ _shotAgain = false; }; if (BallColorGroup.instance().currColorArr.length == 0){ _canShotBlackBall = true; _currShotScoreArr.length = 0; _otherShotScoreArr.length = 0; setGroup(_currColor, _currShotScoreArr, _otherShotScoreArr, true); }; this.dispatchEvent(new GetScoreEvent(GetScoreEvent.GET_SCORE, _currShotScoreArr, _otherShotScoreArr)); } else { trace("击打错误颜色球,将球拿出 "); reloacteFoulBall(_currColor, _currShotScoreArr, _otherShotScoreArr); _currShotScoreArr = new Array(); this.dispatchEvent(new GetScoreEvent(GetScoreEvent.GET_SCORE, _currShotScoreArr, _otherShotScoreArr)); _shotAgain = false; _currShotWin = false; }; }; blackBallInPocket(); } private function relocateInPocketBall():void{ if (_intoPocketArr.length == 0){ return; }; _currShotWin = false; reloacteFoulBall(_currColor, _currShotScoreArr, _otherShotScoreArr); _currShotScoreArr = new Array(); if (_choosedColor){ this.dispatchEvent(new GetScoreEvent(GetScoreEvent.GET_SCORE, _currShotScoreArr, _otherShotScoreArr)); }; blackBallInPocket(); } public function del():void{ delEvent(); delDis(); } private function checkBlackBallInPocket():Boolean{ var i:int; while (i < _intoPocketArr.length) { if (_intoPocketArr[i] == 14){ trace("黑球进"); return (true); }; i++; }; return (false); } private function setGroup(color:String, currScoreArr:Array, otherScoreArr:Array, canShotBlack:Boolean=false):void{ var ballNumber:int; var i:int; while (i < _intoPocketArr.length) { ballNumber = int(_intoPocketArr[i]); if (color == null){ if (canShotBlack){ currScoreArr.push(ballNumber); } else { if (ballNumber == 14){ otherScoreArr.push(ballNumber); } else { currScoreArr.push(ballNumber); }; }; } else { if (color == whichColorBall((ballNumber + 1))){ currScoreArr.push(ballNumber); } else { if (((canShotBlack) && ((ballNumber == 14)))){ Trace("彩黑球一起进洞"); currScoreArr.push(ballNumber); } else { otherScoreArr.push(ballNumber); }; }; }; i++; }; } private function ballCollide(evt:MyEvent):void{ trace("颜色==", whichColorBall(evt.number)); if (!_choosedColor){ _isFoul = false; } else { if (_currColor == whichColorBall(evt.number)){ trace("击打的颜色准确"); _isFoul = false; } else { trace("击打的颜色错误 "); _isFoul = true; }; }; } private function checkCorrectColor(ballNumber:int):void{ if (whichColorBall(ballNumber) == Data.FULL_COLOR){ _currColor = Data.FULL_COLOR; _otherColor = Data.HALF_COLOR; } else { if (whichColorBall(ballNumber) == Data.HALF_COLOR){ _currColor = Data.HALF_COLOR; _otherColor = Data.FULL_COLOR; }; }; this.dispatchEvent(new MyEvent(MyEvent.COLOR, 0, null, _currColor, _otherColor)); } private function relocateCueBall():void{ var x:Number; var y:Number; SoundsManager.instance.playSound("sound_setBilliards", 1); trace("给母球定位"); _cueBallFoul = false; RelocateBall.instance().init(Data.BALK_AREA, _billiardsData.billiards.billiardsArr); x = RelocateBall.instance().relocate()[0]; y = RelocateBall.instance().relocate()[1]; _apeHit.relocateCueBall(x, y); _billiardsData.addCueBall(x, y); _billiardsData.addShadow((_billiardsData.shadow.shadowArr.length - 1), x, y); } private function delEvent():void{ _apeHit.removeEventListener(MyEvent.BALL_STOP, allBallStop); _apeHit.removeEventListener(MyEvent.CUEBALL_INTO_POKCET_OVER, cueballIntoPocket); _apeHit.removeEventListener(MyEvent.BALL_COLLIDE, ballCollide); _apeHit.removeEventListener(MyEvent.BILLIARDS_EFFECT, billiardsInPocketEffect); _apeHit.removeEventListener(MyEvent.CUEBALL_EFFECT, cueballInPocketEffect); _currPlayer.removeEventListener(PlayerEvent.PLAYER_READY_OVER, playerShot); } private function cueballInPocketEffect(evt:MyEvent):void{ var x:Number = _apeHit.apeCueBall.x; var y:Number = _apeHit.apeCueBall.y; _billiardsData.removeCueBall(); _apeHit.removeCueBall(); _billiardsData.removeShadow((_billiardsData.shadow.shadowArr.length - 1)); _billiardsData.addEffectCueBall(x, y); _apeHit.cueBallInPocketEffect(_billiardsData.cueBall.effectCueBall); } private function blackBallInPocket():void{ if (checkBlackBallInPocket()){ if (_canShotBlackBall){ _currShotWin = true; } else { _currShotWin = false; }; _gameOver = true; gameOver(); }; } private function allBallStop(evt:MyEvent):void{ trace("canShot"); _currShotScoreArr = new Array(); _otherShotScoreArr = new Array(); if (_cueBallFoul){ relocateInPocketBall(); relocateCueBall(); } else { checkBallIntoPocket(); }; if (_gameOver == false){ nextShot(); }; } private function initHit():void{ _apeHit = new ApeHit(_screen, _billiardsData.pocket.pocketArr, _billiardsData.cueBall.cueBallMc, _billiardsData.billiards.billiardsArr, _billiardsData.shadow.shadowArr); _apeHit.addEventListener(MyEvent.BALL_STOP, allBallStop); _apeHit.addEventListener(MyEvent.CUEBALL_INTO_POKCET_OVER, cueballIntoPocket); _apeHit.addEventListener(MyEvent.BALL_COLLIDE, ballCollide); _apeHit.addEventListener(MyEvent.BILLIARDS_EFFECT, billiardsInPocketEffect); _apeHit.addEventListener(MyEvent.CUEBALL_EFFECT, cueballInPocketEffect); } private function whichColorBall(ballNumber:int):String{ if ((((ballNumber <= 7)) && ((ballNumber > 0)))){ trace((("全色球" + ballNumber) + "号")); return (Data.FULL_COLOR); }; if (ballNumber < 15){ ballNumber = (ballNumber - 7); trace((("半色球" + ballNumber) + "号")); return (Data.HALF_COLOR); }; return (Data.BLACK_BALL); } private function cueballIntoPocket(evt:MyEvent):void{ trace("母球入袋"); _cueBallFoul = true; } public function playerReadyShot(player, color:String=null):void{ var arr:Array; var i:int; _currPlayer = player; _currColor = color; _currPlayer.addEventListener(PlayerEvent.PLAYER_READY_OVER, playerShot); if ((_currPlayer is Player)){ trace("玩家"); _currPlayer.canShot(); BallColorGroup.instance().init(_currColor, _billiardsData.billiards.billiardsArr); if (BallColorGroup.instance().currColorArr.length == 0){ _currColor = Data.BLACK_BALL; }; _currPlayer.readyShot(_billiardsData.cueBall.cueBallMc, _billiardsData.poolCue.poolCueMc); } else { trace("电脑"); arr = new Array(); if (_currColor == null){ i = 0; while (i < (_billiardsData.billiards.billiardsArr.length - 1)) { arr.push(_billiardsData.billiards.billiardsArr[i]); i++; }; } else { BallColorGroup.instance().init(_currColor, _billiardsData.billiards.billiardsArr); if (BallColorGroup.instance().currColorArr.length == 0){ arr.push(_billiardsData.billiards.billiardsArr[(_billiardsData.billiards.billiardsArr.length - 1)]); _currColor = Data.BLACK_BALL; } else { arr = BallColorGroup.instance().currColorArr; }; }; _currPlayer.readyShot(_billiardsData.cueBall.cueBallMc, arr, _billiardsData.billiards.billiardsArr, _billiardsData.poolCue.poolCueMc, _billiardsData.pocket.pocketArr); }; } private function gameOver():void{ if (_currShotWin == true){ this.dispatchEvent(new MyEvent(MyEvent.GAME_WIN)); } else { this.dispatchEvent(new MyEvent(MyEvent.GAME_LOSE)); }; } private function billiardsInPocketEffect(evt:MyEvent):void{ var x:Number = _apeHit.apeBilliards[evt.number].px; var y:Number = _apeHit.apeBilliards[evt.number].py; _intoPocketArr.push(evt.number); Trace("进洞的球:", _intoPocketArr); Trace("当前该击打的球的颜色:", _currColor); _apeHit.removeBilliard(evt.number); _billiardsData.removeBilliards(evt.number); _billiardsData.removeShadow(evt.number); _billiardsData.addEffectBilliard(evt.number, x, y); _effectArr.push(_billiardsData.billiards.billiardMc); _apeHit.billiardsInPokcetEffect(_effectArr); } private function reloacteFoulBall(currColor:String, currBallArr:Array, otherBallArr:Array):void{ var x:Number; var y:Number; SoundsManager.instance.overOldSound("sound_setBilliards", 1); setGroup(currColor, currBallArr, otherBallArr); trace("将要被拿出球的长度:", currBallArr.length, currColor); var i:int; while (i < currBallArr.length) { RelocateBall.instance().init(Data.BILLIARDS_AREA, _billiardsData.billiards.billiardsArr, _apeHit.apeCueBall); x = RelocateBall.instance().relocate()[0]; y = RelocateBall.instance().relocate()[1]; _billiardsData.addBilliards(currBallArr[i], x, y); _apeHit.addBilliards(currBallArr[i], x, y); _billiardsData.addShadow(currBallArr[i], x, y); i++; }; } private function playerShot(evt:PlayerEvent):void{ _apeHit.shot(evt.locomotivity[0], evt.locomotivity[1]); } } }//package mainLogic
Section 86
//StraightMode (mainLogic.StraightMode) package mainLogic { import flash.display.*; import flash.events.*; import utils.*; import zlong.spilSystemTool.*; import event.*; import ui.*; import implement.*; import data.*; import player.*; public class StraightMode extends EventDispatcher { private var _gameOver:Boolean; private var _shotAgain:Boolean; private var _screen:MovieClip; private var _billiardsData:BilliardsData; private var _playerTwoShotBallQuantity:int; private var _effectArr:Array; private var _currPlayer; private var _cueBallFoul:Boolean; private var _ballNumberArr:Array; private var _playerOneShotBallQuantity:int; private var _intoPocketArr:Array; private var _currShotWin:Boolean; private var _currShotBallQuantity:int; private var _currShotScoreArr:Array; private var _apeHit:ApeHit; public function StraightMode(screen:MovieClip){ super(); _screen = screen; init(); } protected function playerShot(evt:PlayerEvent):void{ _apeHit.shot(evt.locomotivity[0], evt.locomotivity[1]); _billiardsData.cueBall.cueBallMc.rotation = evt.angle; } private function delDis():void{ RelocateBall.instance().del(); _apeHit.del(); _billiardsData.del(); _apeHit = null; _billiardsData = null; _currShotScoreArr = null; _intoPocketArr = null; _ballNumberArr = null; _currPlayer = null; _screen = null; } private function allBallStop(evt:MyEvent):void{ _currShotScoreArr = new Array(); if (_cueBallFoul){ relocateInPocketBall(); relocateCueBall(); } else { checkBallIntoPocket(); }; if (_gameOver == false){ nextShot(); }; } public function lighting(ballNumber:int, mc:MovieClip, x:Number, y:Number):void{ _apeHit.delBilliard(ballNumber); _billiardsData.moveBilliards(ballNumber, mc, x, y); } private function delEvent():void{ _apeHit.removeEventListener(MyEvent.BALL_STOP, allBallStop); _apeHit.removeEventListener(MyEvent.CUEBALL_INTO_POKCET_OVER, cueballIntoPocket); _apeHit.removeEventListener(MyEvent.BILLIARDS_EFFECT, billiardsInPocketEffect); _apeHit.removeEventListener(MyEvent.CUEBALL_EFFECT, cueballInPocketEffect); _currPlayer.removeEventListener(PlayerEvent.PLAYER_READY_OVER, playerShot); } protected function init():void{ GoogleEvent.instance.gaTrackEvent("Straight_pool_viewed"); _billiardsData = new BilliardsData(_screen); _intoPocketArr = new Array(); _effectArr = new Array(); _ballNumberArr = new Array(); _playerOneShotBallQuantity = 0; _playerTwoShotBallQuantity = 0; _cueBallFoul = false; _gameOver = false; initHit(); } private function relocateCueBall():void{ var x:int; var y:int; SoundsManager.instance.playSound("sound_setBilliards", 1); _cueBallFoul = false; RelocateBall.instance().init(Data.BALK_AREA, _billiardsData.billiards.billiardsArr); x = RelocateBall.instance().relocate()[0]; y = RelocateBall.instance().relocate()[1]; _apeHit.relocateCueBall(x, y); _billiardsData.addCueBall(x, y); _billiardsData.addShadow((_billiardsData.shadow.shadowArr.length - 1), x, y); } private function checkBallIntoPocket():void{ _currShotWin = false; if (_intoPocketArr.length == 0){ return; }; if (_currPlayer.ID == InGame.FIRST_PLAYER){ _playerOneShotBallQuantity = (_playerOneShotBallQuantity + _intoPocketArr.length); _currShotBallQuantity = _playerOneShotBallQuantity; } else { _playerTwoShotBallQuantity = (_playerTwoShotBallQuantity + _intoPocketArr.length); _currShotBallQuantity = _playerTwoShotBallQuantity; }; this.dispatchEvent(new GetScoreEvent(GetScoreEvent.GET_SCORE, _intoPocketArr)); if (_currShotBallQuantity >= 8){ _currShotWin = true; _gameOver = true; gameOver(); }; _shotAgain = true; } private function cueballInPocketEffect(evt:MyEvent):void{ var x:Number = _apeHit.apeCueBall.x; var y:Number = _apeHit.apeCueBall.y; _billiardsData.removeCueBall(); _apeHit.removeCueBall(); _billiardsData.removeShadow((_billiardsData.shadow.shadowArr.length - 1)); _billiardsData.addEffectCueBall(x, y); _apeHit.cueBallInPocketEffect(_billiardsData.cueBall.effectCueBall); } private function relocateInPocketBall():void{ if (_intoPocketArr.length > 0){ reloacteFoulBall(_intoPocketArr); }; } protected function initHit():void{ _apeHit = new ApeHit(_screen, _billiardsData.pocket.pocketArr, _billiardsData.cueBall.cueBallMc, _billiardsData.billiards.billiardsArr, _billiardsData.shadow.shadowArr); _apeHit.addEventListener(MyEvent.BALL_STOP, allBallStop); _apeHit.addEventListener(MyEvent.CUEBALL_INTO_POKCET_OVER, cueballIntoPocket); _apeHit.addEventListener(MyEvent.BILLIARDS_EFFECT, billiardsInPocketEffect); _apeHit.addEventListener(MyEvent.CUEBALL_EFFECT, cueballInPocketEffect); } private function nextShot():void{ var arr:Array = new Array(); _intoPocketArr.length = 0; _currPlayer.removeEventListener(PlayerEvent.PLAYER_READY_OVER, playerShot); if (_shotAgain){ _shotAgain = false; this.dispatchEvent(new MyEvent(MyEvent.PLAYER_AGAIN)); } else { this.dispatchEvent(new MyEvent(MyEvent.NEXT_PLAYER)); }; } private function cueballIntoPocket(evt:MyEvent):void{ trace("母球入袋"); _cueBallFoul = true; _billiardsData.cueBall.removeEffectCueBall(); } public function playerReadyShot(player, color:String=null):void{ _currPlayer = player; _currPlayer.addEventListener(PlayerEvent.PLAYER_READY_OVER, playerShot); if ((_currPlayer is Player)){ trace("玩家"); _currPlayer.canShot(); _currPlayer.readyShot(_billiardsData.cueBall.cueBallMc, _billiardsData.poolCue.poolCueMc); } else { trace("电脑"); BallColorGroup.instance().init(null, _billiardsData.billiards.billiardsArr); _currPlayer.readyShot(_billiardsData.cueBall.cueBallMc, BallColorGroup.instance().currColorArr, _billiardsData.billiards.billiardsArr, _billiardsData.poolCue.poolCueMc, _billiardsData.pocket.pocketArr); }; } private function gameOver():void{ if (_currShotWin == true){ this.dispatchEvent(new MyEvent(MyEvent.GAME_WIN)); }; } private function billiardsInPocketEffect(evt:MyEvent):void{ var x:Number = _apeHit.apeBilliards[evt.number].px; var y:Number = _apeHit.apeBilliards[evt.number].py; _intoPocketArr.push(evt.number); Trace("进洞的球:", _intoPocketArr, evt); _apeHit.removeBilliard(evt.number); _billiardsData.removeBilliards(evt.number); _billiardsData.removeShadow(evt.number); _billiardsData.addEffectBilliard(evt.number, x, y); _effectArr.push(_billiardsData.billiards.billiardMc); _apeHit.billiardsInPokcetEffect(_effectArr); } private function reloacteFoulBall(intoPocketArr:Array):void{ var x:int; var y:int; SoundsManager.instance.overOldSound("sound_setBilliards", 1); var i:int; while (i < intoPocketArr.length) { RelocateBall.instance().init(Data.BILLIARDS_AREA, _billiardsData.billiards.billiardsArr, _apeHit.apeCueBall); x = RelocateBall.instance().relocate()[0]; y = RelocateBall.instance().relocate()[1]; _billiardsData.addBilliards(intoPocketArr[i], x, y); _apeHit.addBilliards(intoPocketArr[i], x, y); _billiardsData.addShadow(intoPocketArr[i], x, y); i++; }; } public function del():void{ delEvent(); delDis(); } } }//package mainLogic
Section 87
//UIManager (manager.UIManager) package manager { import flash.display.*; import event.*; import ui.*; import data.*; import zlong.breathxue.utils.debug.*; public class UIManager { private var _root:Sprite; private var _screen:AbstractScreen; public static const HELP:String = "HELP"; public static const GAMEMANAGER:String = "GAMEMANAGER"; public static const MENU:String = "MENU"; public static var GAMEUI:String = "GAMEUI"; public static var CUTIN:String = "CUTIN"; public static var LEVELINFORMATION:String = "LEVELINFORMATION"; public static var LEVELMAP:String = "LEVELMAP"; public function UIManager(r:Sprite){ super(); _root = r; initMainMenu(); initEvent(); } private function startGame(evt:UIEvent):void{ clearScreen(); _screen = new InGame(_root, evt.mode); } private function initMainMenu():void{ _screen = new MainMenu(_root); } private function clearScreen():void{ _screen.destroy(); _screen = null; GC.clear(); } private function initEvent():void{ _root.addEventListener(UIEvent.START_GAME, startGame); _root.addEventListener(UIEvent.BACK_MAINMENU, backMainMenu); _root.addEventListener(UIEvent.PLAY_AGAIN, playAgain); } private function playAgain(evt:UIEvent):void{ clearScreen(); Data.Stop = false; _screen = new InGame(_root, Data.modechoose); } private function backMainMenu(evt:UIEvent):void{ clearScreen(); initMainMenu(); } } }//package manager
Section 88
//Stats (net.hires.debug.Stats) package net.hires.debug { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.text.*; import flash.utils.*; import flash.system.*; public class Stats extends Sprite { protected const WIDTH:uint = 70; protected const HEIGHT:uint = 100; protected var xml:XML; protected var text:TextField; protected var style:StyleSheet; protected var timer:uint; protected var fps:uint; protected var ms:uint; protected var ms_prev:uint; protected var mem:Number; protected var mem_max:Number; protected var graph:Bitmap; protected var rectangle:Rectangle; protected var fps_graph:uint; protected var mem_graph:uint; protected var mem_max_graph:uint; protected var theme:Object; public function Stats(_theme:Object=null):void{ this.theme = {bg:51, fps:0xFFFF00, ms:0xFF00, mem:0xFFFF, memmax:0xFF0070}; super(); this.mouseChildren = false; this.mouseEnabled = false; if (_theme){ if (_theme.bg != null){ this.theme.bg = _theme.bg; }; if (_theme.fps != null){ this.theme.fps = _theme.fps; }; if (_theme.ms != null){ this.theme.ms = _theme.ms; }; if (_theme.mem != null){ this.theme.mem = _theme.mem; }; if (_theme.memmax != null){ this.theme.memmax = _theme.memmax; }; }; this.mem_max = 0; this.xml = <xml><fps>FPS:</fps><ms>MS:</ms><mem>MEM:</mem><memMax>MAX:</memMax></xml> ; this.style = new StyleSheet(); this.style.setStyle("xml", {fontSize:"9px", fontFamily:"_sans", leading:"-2px"}); this.style.setStyle("fps", {color:this.hex2css(this.theme.fps)}); this.style.setStyle("ms", {color:this.hex2css(this.theme.ms)}); this.style.setStyle("mem", {color:this.hex2css(this.theme.mem)}); this.style.setStyle("memMax", {color:this.hex2css(this.theme.memmax)}); this.text = new TextField(); this.text.width = this.WIDTH; this.text.height = 50; this.text.styleSheet = this.style; this.text.condenseWhite = true; this.text.selectable = false; this.text.mouseEnabled = false; this.graph = new Bitmap(); this.graph.alpha = 0.3; this.graph.y = 50; this.rectangle = new Rectangle((this.WIDTH - 1), 0, 1, (this.HEIGHT - 50)); addEventListener(Event.ADDED_TO_STAGE, this.init, false, 0, true); addEventListener(Event.REMOVED_FROM_STAGE, this.destroy, false, 0, true); } private function init(e:Event):void{ graphics.beginFill(this.theme.bg, 0.3); graphics.drawRect(0, 0, this.WIDTH, this.HEIGHT); graphics.endFill(); addChild(this.text); this.graph.bitmapData = new BitmapData(this.WIDTH, (this.HEIGHT - 50), false, this.theme.bg); addChild(this.graph); addEventListener(Event.ENTER_FRAME, this.update); } private function destroy(e:Event):void{ graphics.clear(); while (numChildren > 0) { removeChildAt(0); }; this.graph.bitmapData.dispose(); removeEventListener(Event.ENTER_FRAME, this.update); } private function update(e:Event):void{ this.timer = getTimer(); if ((this.timer - 1000) > this.ms_prev){ this.ms_prev = this.timer; this.mem = Number((System.totalMemory * 9.54E-7).toFixed(3)); this.mem_max = ((this.mem_max > this.mem)) ? this.mem_max : this.mem; this.fps_graph = Math.min(this.graph.height, ((this.fps / stage.frameRate) * this.graph.height)); this.mem_graph = (Math.min(this.graph.height, Math.sqrt(Math.sqrt((this.mem * 5000)))) - 2); this.mem_max_graph = (Math.min(this.graph.height, Math.sqrt(Math.sqrt((this.mem_max * 5000)))) - 2); this.graph.bitmapData.scroll(-1, 0); this.graph.bitmapData.fillRect(this.rectangle, this.theme.bg); this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - this.fps_graph), this.theme.fps); this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - ((this.timer - this.ms) >> 1)), this.theme.ms); this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - this.mem_graph), this.theme.mem); this.graph.bitmapData.setPixel((this.graph.width - 1), (this.graph.height - this.mem_max_graph), this.theme.memmax); this.xml.fps = ((("FPS: " + this.fps) + " / ") + stage.frameRate); this.xml.mem = ("MEM: " + this.mem); this.xml.memMax = ("MAX: " + this.mem_max); this.fps = 0; }; this.fps++; this.xml.ms = ("MS: " + (this.timer - this.ms)); this.ms = this.timer; this.text.htmlText = this.xml; } private function onClick(e:MouseEvent):void{ if (((mouseY / height) > 0.5)){ stage.frameRate--; } else { stage.frameRate++; }; this.xml.fps = ((("FPS: " + this.fps) + " / ") + stage.frameRate); this.text.htmlText = this.xml; } private function hex2css(color:int):String{ return (("#" + color.toString(16))); } } }//package net.hires.debug
Section 89
//AI (player.AI) package player { import flash.display.*; import flash.events.*; import utils.*; import event.*; import zlong.breathxue.utils.math.*; import ui.*; import implement.*; import tools.*; import data.*; public class AI extends EventDispatcher { private var _allBilliards:Array; private var _secondRadiansArr:Array; private var _power:int; private var _cueBall:MovieClip; private var _billiardVector:mVector; private var _firstRadiansArr:Array; private var _canShot:Boolean; private var _radiansArr:Array; private var _radians:Number; private var _mc:MovieClip; private var _canRelease:Boolean; private var _poolCue:MovieClip; private var _id:String; private var _pocket:Array; private var _waitTime:int; private var _billiards:Array; private var _beginShot:Boolean; private var _chooseColor:Boolean; private var _canStore:Boolean; private var _hitSpeed:int; private var _angle:Number; private var _lastRadiansArr:Array; private var _color:String; private var _x:Number; private var _y:Number; private static const SPEED:int = 10; public function AI(mc:MovieClip){ super(); _mc = mc; _chooseColor = true; } private function checkBallOnRoute(chooseBall:MovieClip, chooseBallX:Number, chooseBallY:Number, targetBallX:Number, targetBallY:Number, vx:Number, vy:Number):Boolean{ var dist:Number; var i:int; while (true) { chooseBallX = (chooseBallX - vx); chooseBallY = (chooseBallY - vy); i = 0; while (i < _allBilliards.length) { if (_allBilliards[i] != chooseBall){ dist = CalculateDist.instance().dist(_allBilliards[i].x, _allBilliards[i].y, chooseBallX, chooseBallY); if (dist <= (Data.BALL_SIZE * 2)){ return (false); }; }; i++; }; dist = CalculateDist.instance().dist(chooseBallX, chooseBallY, targetBallX, targetBallY); if (dist <= (Data.BALL_SIZE * 2)){ break; }; }; return (true); } private function delDis():void{ var i:int; _firstRadiansArr = null; _secondRadiansArr = null; _lastRadiansArr = null; _radiansArr = null; _cueBall = null; _billiards = null; if (_allBilliards != null){ i = 0; while (i < _allBilliards.length) { _allBilliards[i] = null; i++; }; _allBilliards = null; }; _poolCue = null; _pocket = null; _mc = null; } public function del():void{ delEvent(); delDis(); } private function whichBallCanShot(arr:Array):void{ var i:int; while (i < arr.length) { if (arr[i] == null){ Trace("彩球数组有空:", i, arr[i]); } else { if (_cueBall.y >= arr[i].y){ if (_cueBall.x >= arr[i].x){ if (arr[i].x <= _pocket[1].x){ checkCanShot(arr[i], _pocket[0]); } else { checkCanShot(arr[i], _pocket[0]); checkCanShot(arr[i], _pocket[1]); }; } else { if (arr[i].x <= _pocket[1].x){ checkCanShot(arr[i], _pocket[1]); checkCanShot(arr[i], _pocket[2]); } else { checkCanShot(arr[i], _pocket[2]); }; }; } else { if (_cueBall.x >= arr[i].x){ if (arr[i].x <= _pocket[1].x){ checkCanShot(arr[i], _pocket[3]); } else { checkCanShot(arr[i], _pocket[3]); checkCanShot(arr[i], _pocket[4]); }; } else { if (arr[i].x <= _pocket[1].x){ checkCanShot(arr[i], _pocket[4]); checkCanShot(arr[i], _pocket[5]); } else { checkCanShot(arr[i], _pocket[5]); }; }; }; }; i++; }; } private function init(cueBall:MovieClip, billiards:Array, allBilliards:Array, poolCue:MovieClip, pocket:Array):void{ _cueBall = cueBall; _billiards = billiards; _allBilliards = new Array(); var i:int; while (i < allBilliards.length) { if (allBilliards[i] != null){ _allBilliards.push(allBilliards[i]); }; i++; }; _poolCue = poolCue; _pocket = pocket; beginShot(); } public function get ID():String{ return (_id); } private function chooseShotAngle(arr:Array):void{ var num:int = int((Math.random() * arr.length)); _radiansArr.push(arr[num]); } private function storePower():void{ _poolCue.nextFrame(); _poolCue.nextFrame(); if (_poolCue.currentFrame >= _power){ _poolCue.stop(); _canStore = false; _canRelease = true; releasePower(); }; } private function chooseBall():void{ _firstRadiansArr = new Array(); _secondRadiansArr = new Array(); _lastRadiansArr = new Array(); _radiansArr = new Array(); whichBallCanShot(_billiards); if (InGame.aiRushBall){ trace("冲球"); rushBall(); } else { checkHaveBallShot(); }; } private function hitCueBall():void{ SoundsManager.instance.playSound("sound_shotBall", 1); ReleasePower.instance().init(_radiansArr[0][0], (_power * Data.POWER)); var vx:Number = ReleasePower.instance().vx; var vy:Number = ReleasePower.instance().vy; var arr:Array = new Array(); arr = [-(vx), -(vy)]; if (_radiansArr[0][2] != null){ Data.correctBilliardVector = _radiansArr[0][2]; Data.isCorrectVector = true; }; if (_poolCue.parent != null){ _poolCue.parent.removeChild(_poolCue); }; this.dispatchEvent(new PlayerEvent(PlayerEvent.PLAYER_READY_OVER, arr, _poolCue.rotation)); } private function releasePower():void{ var currFrame:int = (_poolCue.currentFrame - _hitSpeed); if ((((currFrame < 0)) || ((_hitSpeed == 0)))){ currFrame = 0; }; _poolCue.gotoAndStop(currFrame); if (currFrame == 0){ _canRelease = false; hitCueBall(); }; } private function choosePower():void{ var angleDifference:Number = _radiansArr[0][1]; if (angleDifference <= 20){ _power = int(((Math.random() * 20) + 30)); trace("差角小于20", _power); } else { if (angleDifference >= 60){ _power = 50; trace("差角大于60", _power); } else { _power = int(((Math.random() * 30) + 20)); trace("差角在20-60之间", _power); }; }; _hitSpeed = Math.round((_power / 5)); _canStore = true; } private function checkCanShot(chooseBall:MovieClip, pocket:MovieClip):void{ var shotBallX:Number; var shotBallY:Number; var tempArr:Array; var x:Number; var y:Number; var tempAngle:Number; _canShot = true; _angle = 0; x = chooseBall.x; y = chooseBall.y; checkChooseBetweenTarget(chooseBall, x, y, pocket.x, pocket.y); tempAngle = _angle; tempArr = calcalateShotBallXY(chooseBall, _radians); shotBallX = tempArr[0]; shotBallY = tempArr[1]; checkChooseBetweenTarget(_cueBall, _cueBall.x, _cueBall.y, shotBallX, shotBallY, tempAngle); } private function beginShot():void{ _beginShot = false; _canStore = false; _canRelease = false; _mc.addEventListener(Event.ENTER_FRAME, onFrame); } private function calcalateShotBallXY(chooseBall:MovieClip, radians:Number):Array{ var x:Number; var y:Number; var xx:Number; var yy:Number; var oppositeSide:Number; var adjacentSide:Number; oppositeSide = (Math.sin(radians) * (Data.BALL_SIZE * 2)); adjacentSide = (Math.cos(radians) * (Data.BALL_SIZE * 2)); x = (chooseBall.x + adjacentSide); y = (chooseBall.y + oppositeSide); return ([x, y]); } private function onFrame(evt:Event):void{ if (!Data.Stop){ if (!_beginShot){ _waitTime++; if (_waitTime == Data.FRAME_RATEP){ _beginShot = true; _waitTime = 0; chooseBall(); setPoolCue(); choosePower(); }; }; if (_canStore){ storePower(); }; if (_canRelease){ releasePower(); }; }; } private function checkChooseBetweenTarget(mc:MovieClip, chooseBallX:Number, chooseBallY:Number, targetBallX:Number, targetBallY:Number, tempAngle:Number=0):void{ var vx:Number; var vy:Number; var angleDifference:Number; var targetPoint:mVector = new mVector(targetBallX, targetBallY); var choosePoint:mVector = new mVector(chooseBallX, chooseBallY); var line:mVector = choosePoint.minus(targetPoint); _angle = line.angle; _radians = ((_angle * Math.PI) / 180); vx = (Math.cos(_radians) * SPEED); vy = (Math.sin(_radians) * SPEED); if (mc == _cueBall){ angleDifference = Math.abs((tempAngle - _angle)); if ((((angleDifference >= 80)) && ((angleDifference <= 100)))){ trace("角度太小", angleDifference); _canShot = false; _lastRadiansArr.push([_radians, angleDifference]); return; }; if (_canShot){ _canShot = checkBallOnRoute(mc, chooseBallX, chooseBallY, targetBallX, targetBallY, vx, vy); if (_canShot){ _firstRadiansArr.push([_radians, angleDifference, _billiardVector]); } else { _lastRadiansArr.push([_radians, angleDifference]); }; } else { _canShot = checkBallOnRoute(mc, chooseBallX, chooseBallY, targetBallX, targetBallY, vx, vy); if (_canShot){ _secondRadiansArr.push([_radians, angleDifference]); } else { _lastRadiansArr.push([_radians, angleDifference]); }; }; } else { _canShot = checkBallOnRoute(mc, chooseBallX, chooseBallY, targetBallX, targetBallY, vx, vy); _billiardVector = line; }; } public function readyShot(cueBall:MovieClip, billiards:Array, allBilliards:Array, poolCue:MovieClip, pocket:Array):void{ init(cueBall, billiards, allBilliards, poolCue, pocket); } private function setPoolCue():void{ var angle:Number = ((_radiansArr[0][0] * 180) / Math.PI); _mc.addChild(_poolCue); _poolCue.x = _cueBall.x; _poolCue.y = _cueBall.y; _poolCue.rotation = angle; } private function checkHaveBallShot():void{ if (_firstRadiansArr.length > 0){ trace("母球到洞都没其他球"); chooseShotAngle(_firstRadiansArr); } else { if (_secondRadiansArr.length > 0){ trace("母球到彩球没其他球"); chooseShotAngle(_secondRadiansArr); } else { trace("路上都有其他球"); chooseShotAngle(_lastRadiansArr); }; }; } private function delEvent():void{ _mc.removeEventListener(Event.ENTER_FRAME, onFrame); } public function set ID(value:String):void{ _id = value; } private function rushBall():void{ var vx:Number; var vy:Number; var targetPoint:mVector = new mVector(_allBilliards[(_allBilliards.length - 1)].x, _allBilliards[(_allBilliards.length - 1)].y); var choosePoint:mVector = new mVector(_cueBall.x, _cueBall.y); var line:mVector = choosePoint.minus(targetPoint); _angle = line.angle; _radians = ((_angle * Math.PI) / 180); vx = (Math.cos(_radians) * SPEED); vy = (Math.sin(_radians) * SPEED); _radiansArr.push([_radians, 10]); } } }//package player
Section 90
//Player (player.Player) package player { import flash.display.*; import flash.events.*; import utils.*; import event.*; import implement.*; import data.*; public class Player extends EventDispatcher { private var _canSetAngle:Boolean; private var _storePower:Boolean; private var _radinans:Number; private var _canMouseUp:Boolean; private var _hitPower:int; private var _hitSpeed:int; private var _mouseDownAgain:Boolean; private var _cueBall:MovieClip; private var _releasePower:Boolean; private var _canShot:Boolean; private var _mc:MovieClip; private var _poolCue:MovieClip; private var _id:String; public function Player(mc:MovieClip){ super(); _mc = mc; initEvt(); } private function delDis():void{ _cueBall = null; _poolCue = null; _mc = null; } private function init(cueBall:MovieClip, poolCue:MovieClip):void{ _cueBall = cueBall; _poolCue = poolCue; _hitPower = 0; _canSetAngle = true; _storePower = false; _releasePower = false; _canMouseUp = false; _mouseDownAgain = false; } private function run(evt:Event):void{ if (!Data.Stop){ if (_canShot){ if (_canSetAngle){ setAngle(); }; if (_storePower){ storePower(); }; if (_releasePower){ releasePower(); }; }; }; } private function takeCueBallMove():void{ SoundsManager.instance.playSound("sound_shotBall", 1); var arr:Array = new Array(); ReleasePower.instance().init(_radinans, (_hitPower * Data.POWER)); var vx:Number = ReleasePower.instance().vx; var vy:Number = ReleasePower.instance().vy; if (_poolCue.parent != null){ _poolCue.parent.removeChild(_poolCue); }; arr = [vx, vy]; _canShot = false; this.dispatchEvent(new PlayerEvent(PlayerEvent.PLAYER_READY_OVER, arr, _poolCue.rotation)); } private function initEvt():void{ _mc.addEventListener(Event.ENTER_FRAME, run); _mc.addEventListener(MouseEvent.MOUSE_DOWN, choosePower); _mc.stage.addEventListener(MouseEvent.MOUSE_UP, hitCueBall); } public function get ID():String{ return (_id); } private function setAngle():void{ if ((((((((_mc.mouseX < 0)) || ((_mc.mouseX > 617)))) || ((_mc.mouseY < 0)))) || ((_mc.mouseY > 326)))){ return; }; ChooseAngle.instance().init(_cueBall.x, _cueBall.y, _mc.mouseX, _mc.mouseY); _radinans = ChooseAngle.instance().radinans; _mc.addChild(_poolCue); _poolCue.x = _cueBall.x; _poolCue.y = _cueBall.y; _poolCue.rotation = (ChooseAngle.instance().angle + 180); } public function del():void{ delEvent(); delDis(); } private function delEvent():void{ _mc.removeEventListener(Event.ENTER_FRAME, run); _mc.removeEventListener(MouseEvent.MOUSE_DOWN, choosePower); _mc.stage.removeEventListener(MouseEvent.MOUSE_UP, hitCueBall); } private function choosePower(evt:MouseEvent):void{ if (((!(_canShot)) || (_mouseDownAgain))){ return; }; if ((((((((_mc.mouseX < 0)) || ((_mc.mouseX > 617)))) || ((_mc.mouseY < 0)))) || ((_mc.mouseY > 326)))){ return; }; _mouseDownAgain = true; _canMouseUp = true; _storePower = true; } public function canShot():void{ _canShot = true; } public function set ID(value:String):void{ _id = value; } private function storePower():void{ _poolCue.nextFrame(); _poolCue.nextFrame(); trace(_hitPower); _hitPower = _poolCue.currentFrame; if (_poolCue.currentFrame == _poolCue.totalFrames){ _poolCue.stop(); _hitPower = _poolCue.currentFrame; }; } public function readyShot(cueBall:MovieClip, poolCue:MovieClip):void{ _mouseDownAgain = false; init(cueBall, poolCue); } private function releasePower():void{ var currFrame:int = (_poolCue.currentFrame - _hitSpeed); if ((((currFrame < 0)) || ((_hitSpeed == 0)))){ currFrame = 0; }; _poolCue.gotoAndStop(currFrame); if (currFrame == 0){ _releasePower = false; takeCueBallMove(); }; } private function hitCueBall(evt:MouseEvent):void{ if (!_canMouseUp){ return; }; _hitSpeed = Math.round((_hitPower / 5)); _storePower = false; _releasePower = true; _canSetAngle = false; } } }//package player
Section 91
//BitmapMc (tools.BitmapMc) package tools { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.utils.*; public class BitmapMc extends MovieClip { private var timer:Timer; private var numFrames:int; private var curFrame:int; private var labels:Array; private var sharedTimer:Timer; private var frameFuns:Array; private var className:String; private var rate:int; private var bitmap:Bitmap; private var initStop:Boolean; private var direction:int;// = 1 private static var shareBitmaps:Array = []; public function BitmapMc(){ var i:int; frameFuns = []; super(); super.stop(); rate = (this.stage) ? (1000 / this.stage.frameRate) : 33; numFrames = super.totalFrames; className = getQualifiedClassName(this); getLabels(); if (shareBitmaps[className] == null){ shareBitmaps[className] = []; i = 0; while (i < (numFrames - 1)) { super.addFrameScript(i, getBitmapData); i++; }; if (numFrames > 1){ super.addFrameScript((numFrames - 1), lastFrame); super.gotoAndPlay(1); } else { super.addFrameScript((numFrames - 1), oneFrame); }; } else { sharedTimer = new Timer(100); sharedTimer.addEventListener("timer", sharedOver, false, 0, true); sharedTimer.start(); }; } override public function prevFrame():void{ curFrame = (curFrame - 1); testRange(); if (timer != null){ goFrame(curFrame); }; } public function set reverse(t:Boolean):void{ if (t){ direction = -1; } else { direction = 1; }; } override public function gotoAndPlay(frame:Object, scren:String=null):void{ if ((frame is Number)){ curFrame = (int(frame) - 1); } else { if ((frame is String)){ if (labels[frame] == null){ return; }; curFrame = (labels[frame] - 1); }; }; testRange(); if (timer != null){ goFrame(curFrame); timer.start(); } else { initStop = false; }; } override public function stop():void{ if (timer != null){ timer.stop(); } else { initStop = true; }; } private function testRange():int{ if (curFrame < 0){ curFrame = 0; } else { if (curFrame > (numFrames - 1)){ curFrame = (numFrames - 1); }; }; return (curFrame); } private function lastFrame():void{ getBitmapData(); super.addFrameScript(0, firstFrame); } protected function testRemoved():void{ if (this.stage == null){ gotoAndStop(1); }; } override public function get totalFrames():int{ return (numFrames); } private function clear():void{ super.gotoAndStop(1); while (super.numChildren > 0) { super.removeChildAt(0); }; } private function sharedOver(evt:TimerEvent):void{ if (shareBitmaps[className].length >= numFrames){ sharedTimer.stop(); sharedTimer.removeEventListener("timer", sharedOver); sharedTimer = null; addBitmap(); if (numFrames > 1){ timerInit(); }; }; } override public function gotoAndStop(frame:Object, scren:String=null):void{ if ((frame is Number)){ curFrame = (int(frame) - 1); } else { if ((frame is String)){ if (labels[frame] == null){ return; }; curFrame = (labels[frame] - 1); }; }; testRange(); if (timer != null){ goFrame(curFrame); timer.stop(); } else { initStop = true; }; } private function goFrame(frame:int):void{ if (shareBitmaps[className] == null){ return; }; bitmap.bitmapData = shareBitmaps[className][frame][0]; bitmap.x = shareBitmaps[className][frame][1].x; bitmap.y = shareBitmaps[className][frame][1].y; if (frameFuns[frame] != null){ var _local2 = frameFuns; _local2[frame](); }; } public function set playRate(rate:int):void{ if (this.rate != rate){ this.rate = rate; if (timer != null){ timer.delay = rate; }; }; } private function firstFrame():void{ super.addFrameScript(0, null); addBitmap(); timerInit(); } private function oneFrame():void{ super.addFrameScript(0, null); getBitmapData(); addBitmap(); } private function addBitmap():void{ clear(); bitmap = new Bitmap(); this.addChild(bitmap); goFrame(curFrame); } override public function get currentFrame():int{ return ((curFrame + 1)); } private function getLabels():void{ var tempLabels:Array = this.currentLabels; labels = []; var i:int; while (i < tempLabels.length) { labels[tempLabels[i].name] = tempLabels[i].frame; i++; }; } private function getBitmapData():void{ var rec:Rectangle = this.getBounds(this); var matrix:Matrix = new Matrix(); matrix.tx = -(rec.x); matrix.ty = -(rec.y); var bitmapData:BitmapData = new BitmapData(rec.width, rec.height, true, 0); bitmapData.draw(this, matrix, null, null, null, true); var cur:int = (super.currentFrame - 1); shareBitmaps[className][cur] = []; shareBitmaps[className][cur][0] = bitmapData; shareBitmaps[className][cur][1] = new Point(rec.x, rec.y); super.addFrameScript(cur, null); } override public function addFrameScript(... _args):void{ var i:int; while (i < (_args.length - 1)) { if ((((_args[(i + 1)] is Function)) || ((_args[(i + 1)] == null)))){ if ((_args[i] is Number)){ frameFuns[_args[i]] = _args[(i + 1)]; } else { if ((_args[i] is String)){ if (labels[_args[i]] != null){ frameFuns[(labels[_args[i]] - 1)] = _args[(i + 1)]; }; }; }; }; i = (i + 2); }; } override public function nextFrame():void{ curFrame = (curFrame + 1); testRange(); if (timer != null){ goFrame(curFrame); }; } override public function play():void{ if (timer != null){ timer.start(); } else { initStop = false; }; } private function timerInit():void{ timer = new Timer(rate); timer.addEventListener("timer", motion, false, 0, true); if (!initStop){ timer.start(); }; } protected function motion(evt:TimerEvent):void{ curFrame = (curFrame + direction); if (curFrame >= numFrames){ curFrame = 0; } else { if (curFrame < 0){ curFrame = (numFrames - 1); }; }; goFrame(curFrame); testRemoved(); } public static function delAllData():void{ shareBitmaps = []; } public static function delShareData(str:String):void{ shareBitmaps[str] = null; } } }//package tools
Section 92
//CalculateDist (tools.CalculateDist) package tools { public class CalculateDist { private var _behindString:String; private var _frontString:String; private static var _instance:CalculateDist; public function CalculateDist(){ super(); } public function dist(fx:Number, fy:Number, sx:Number=0, sy:Number=0):Number{ var dx:Number = (fx - sx); var dy:Number = (fy - sy); return (Math.sqrt(((dx * dx) + (dy * dy)))); } public static function instance():CalculateDist{ if (_instance == null){ _instance = new (CalculateDist); }; return (_instance); } } }//package tools
Section 93
//MusicButton (ui.components.MusicButton) package ui.components { import flash.display.*; import flash.events.*; import utils.*; import data.*; public class MusicButton { private var button:MovieClip; public function MusicButton(button:MovieClip){ super(); this.button = button; this.button.buttonMode = true; this.button.mouseChildren = false; initDis(); initEvent(); } public function destroy():void{ button.removeEventListener(MouseEvent.CLICK, soundButtonClickHandler); button = null; } private function initEvent():void{ button.addEventListener(MouseEvent.CLICK, soundButtonClickHandler); } private function soundButtonClickHandler(event:MouseEvent):void{ SoundsManager.instance.MusicEnable = !(SoundsManager.instance.MusicEnable); initDis(); Data.musicEnable = SoundsManager.instance.MusicEnable; } private function initDis():void{ if (SoundsManager.instance.MusicEnable){ button.gotoAndStop(1); } else { button.gotoAndStop(2); }; } } }//package ui.components
Section 94
//MyButton (ui.components.MyButton) package ui.components { import flash.display.*; import flash.events.*; import utils.*; import data.*; public class MyButton extends MovieClip { public function MyButton(){ super(); this.buttonMode = true; stop(); initEvent(); } private function onMouseRelease(evt:MouseEvent):void{ this.gotoAndStop(1); } private function initEvent():void{ this.mouseChildren = false; this.addEventListener(Event.REMOVED_FROM_STAGE, removeEvent); this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); this.addEventListener(MouseEvent.MOUSE_DOWN, onMousePress); this.addEventListener(MouseEvent.MOUSE_UP, onMouseRelease); } private function removeEvent(evt:Event):void{ removeEventListener(Event.REMOVED_FROM_STAGE, removeEvent); removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver); removeEventListener(MouseEvent.MOUSE_OUT, onMouseOut); removeEventListener(MouseEvent.MOUSE_DOWN, onMousePress); removeEventListener(MouseEvent.MOUSE_UP, onMouseRelease); } private function onMouseOut(evt:MouseEvent):void{ this.gotoAndStop(1); } private function onMouseOver(evt:MouseEvent):void{ SoundsManager.instance.playSound(Data.MENU_TOUCH, 0.5); this.gotoAndStop(2); } private function onMousePress(evt:MouseEvent):void{ SoundsManager.instance.playSound(Data.MENU_PRESS, 0.5); this.gotoAndStop(2); } } }//package ui.components
Section 95
//QualityButton (ui.components.QualityButton) package ui.components { import flash.display.*; import flash.events.*; import data.*; public class QualityButton { private var button:MovieClip; public function QualityButton(button:MovieClip){ super(); this.button = button; this.button.buttonMode = true; this.button.mouseChildren = false; initDis(); initEvent(); } public function destroy():void{ button.removeEventListener(MouseEvent.CLICK, buttonClickHandler); button = null; } public function initEvent():void{ button.addEventListener(MouseEvent.CLICK, buttonClickHandler); } private function buttonClickHandler(event:MouseEvent):void{ if (button.currentFrame == button.totalFrames){ button.gotoAndStop(1); } else { button.nextFrame(); }; Main.instance.stage.quality = button.currentLabel; Data.quality = button.currentLabel; } public function initDis():void{ button.gotoAndStop(Data.quality); } } }//package ui.components
Section 96
//SoundButton (ui.components.SoundButton) package ui.components { import flash.display.*; import flash.events.*; import utils.*; import data.*; public class SoundButton { private var button:MovieClip; public function SoundButton(button:MovieClip){ super(); this.button = button; this.button.buttonMode = true; this.button.mouseChildren = false; initDis(); initEvent(); } public function destroy():void{ button.removeEventListener(MouseEvent.CLICK, soundButtonClickHandler); button = null; } private function initEvent():void{ button.addEventListener(MouseEvent.CLICK, soundButtonClickHandler); } private function soundButtonClickHandler(event:MouseEvent):void{ SoundsManager.instance.Enabled = !(SoundsManager.instance.Enabled); initDis(); Data.soundEnable = SoundsManager.instance.Enabled; } private function initDis():void{ if (SoundsManager.instance.Enabled){ button.gotoAndStop(1); } else { button.gotoAndStop(2); }; } } }//package ui.components
Section 97
//ApeBilliard (ui.equipment.apeEquipment.ApeBilliard) package ui.equipment.apeEquipment { import utils.*; import zlong.zelda.collisionEngine.*; import data.*; public class ApeBilliard extends Group { private var _billiardArrX:Array; private var _billiardArrY:Array; private var _billiard:CircleParticle; private var _billiardArr:Array; public function ApeBilliard(){ super(); _billiardArr = new Array(); var i:int; while (i < Data.BALL_NUMBER) { _billiard = new CircleParticle((100 + (i * 10)), (200 + (i * 1)), Data.BALL_SIZE, false, 1, Data.BALL_ELASTICITY); this.addParticle(_billiard); _billiardArr.push(_billiard); _billiard.name = String(i); _billiard.visible = false; _billiard.addEventListener(CollisionEvent.COLLIDED, hasCollided); i++; }; this.collideInternal = true; } private function hasCollided(evt:CollisionEvent):void{ CollideSound.instance().playSound(evt.collVelocity); } public function delDis():void{ var i:int; while (i < _billiardArr.length) { if (_billiardArr[i] != null){ _billiardArr[i].cleanup; _billiardArr[i] = null; }; i++; }; _billiardArr = null; _billiardArrX = null; _billiardArrY = null; _billiard = null; } public function get billiardY():Array{ return (_billiardArrY); } public function del():void{ delEvent(); delDis(); } public function removeBilliard(ballnumber:int):void{ _billiardArr[ballnumber].px = -100; _billiardArr[ballnumber].py = -100; } public function get billiardX():Array{ return (_billiardArrX); } public function getXY():void{ var billiard:CircleParticle; _billiardArrX = new Array(); _billiardArrY = new Array(); for each (billiard in this.getAll()) { _billiardArrX.push(billiard.center.x); _billiardArrY.push(billiard.center.y); }; } public function addBall(ballnumber:int, x:int, y:int):void{ _billiardArr[ballnumber].px = x; _billiardArr[ballnumber].py = y; } public function delBilliard(ballnumber:int):void{ if (_billiardArr[ballnumber] != null){ _billiardArr[ballnumber].cleanup; _billiardArr[ballnumber] = null; }; } private function delEvent():void{ _billiard.removeEventListener(CollisionEvent.COLLIDED, hasCollided); } public function get billiardArr():Array{ return (_billiardArr); } } }//package ui.equipment.apeEquipment
Section 98
//ApeCueBall (ui.equipment.apeEquipment.ApeCueBall) package ui.equipment.apeEquipment { import flash.display.*; import event.*; import zlong.breathxue.utils.math.*; import ui.*; import zlong.zelda.collisionEngine.*; import data.*; public class ApeCueBall extends Group { private var _hasCollide:Boolean;// = false private var _cueBall:CircleParticle; public function ApeCueBall(x:int, y:int){ super(); initBall(x, y); } private function hasCollided(evt:CollisionEvent):void{ if (_hasCollide == false){ trace("母球撞的是:", evt.collItem); if ((evt.collItem is CircleParticle)){ trace("母球撞的是圆"); _hasCollide = true; InGame.aiRushBall = false; _cueBall.sprite.dispatchEvent(new MyEvent(MyEvent.BALL_COLLIDE, 0, evt.collItem)); }; }; } public function get cueBall():CircleParticle{ return (_cueBall); } public function speed(x:Number, y:Number):void{ _cueBall.addMasslessForce(new mVector(x, y)); } public function get cueBallMc():Sprite{ return (_cueBall.sprite); } private function delDis():void{ _cueBall.cleanup(); _cueBall = null; } public function del():void{ delEvent(); delDis(); } public function removeCueBall():void{ _cueBall.px = -100; _cueBall.py = -100; } private function initBall(x:int, y:int):void{ _cueBall = new CircleParticle(x, y, Data.BALL_SIZE, false, 1, Data.BALL_ELASTICITY); this.addParticle(_cueBall); _cueBall.name = "cueball"; _cueBall.visible = false; _cueBall.addEventListener(CollisionEvent.COLLIDED, hasCollided); } public function set x(value:int):void{ _cueBall.px = value; } public function addCueBall(x:int, y:int):void{ _cueBall.px = x; _cueBall.py = y; } public function set y(value:int):void{ _cueBall.py = value; } public function get center():mVector{ return (_cueBall.center); } private function delEvent():void{ _cueBall.removeEventListener(CollisionEvent.COLLIDED, hasCollided); } public function get x():int{ return (_cueBall.px); } public function get y():int{ return (_cueBall.py); } public function setCollide():void{ _hasCollide = false; } } }//package ui.equipment.apeEquipment
Section 99
//ApePocket (ui.equipment.apeEquipment.ApePocket) package ui.equipment.apeEquipment { import flash.display.*; import flash.events.*; import utils.*; import event.*; import zlong.breathxue.utils.math.*; import zlong.zelda.collisionEngine.*; public class ApePocket extends Group { private var _eventDispatcher:EventDispatcher; private var _cueBall:MovieClip; private var _billiards:Array; public function ApePocket(cueBall:MovieClip, billiards:Array){ super(); _eventDispatcher = new EventDispatcher(); _cueBall = cueBall; _billiards = billiards; var firstPocket:CurveWall = new CurveWall(new mVector(15, 40), new mVector(40, 25), new mVector(50, 10)); firstPocket.name = "1"; firstPocket.isShowResolver = false; firstPocket.addEventListener(CollisionEvent.COLLIDED, collided); addWall(firstPocket); var secondPocket:CurveWall = new CurveWall(new mVector(290, 20), new mVector(305, 26), new mVector(330, 20)); secondPocket.name = "2"; secondPocket.isShowResolver = false; secondPocket.addEventListener(CollisionEvent.COLLIDED, collided); addWall(secondPocket); var thirdPocket:CurveWall = new CurveWall(new mVector(565, 5), new mVector(580, 25), new mVector(615, 45)); thirdPocket.name = "3"; thirdPocket.isShowResolver = false; thirdPocket.addEventListener(CollisionEvent.COLLIDED, collided); addWall(thirdPocket); var fourthPocket:CurveWall = new CurveWall(new mVector(5, 275), new mVector(35, 300), new mVector(40, 315)); fourthPocket.name = "4"; fourthPocket.isShowResolver = false; fourthPocket.addEventListener(CollisionEvent.COLLIDED, collided); addWall(fourthPocket); var fifthPocket:CurveWall = new CurveWall(new mVector(290, 312), new mVector(308, 300), new mVector(330, 312)); fifthPocket.name = "5"; fifthPocket.isShowResolver = false; fifthPocket.addEventListener(CollisionEvent.COLLIDED, collided); addWall(fifthPocket); var sixthPocket:CurveWall = new CurveWall(new mVector(610, 280), new mVector(570, 305), new mVector(560, 330)); sixthPocket.name = "6"; sixthPocket.isShowResolver = false; sixthPocket.addEventListener(CollisionEvent.COLLIDED, collided); addWall(sixthPocket); var firstPocketTemp:RectangleParticle = new RectangleParticle(10, -20, 80, 150, 0.9, true, 1, 0); firstPocketTemp.setStyle(0, 0, 1, 0); addParticle(firstPocketTemp); firstPocketTemp.name = "1"; firstPocketTemp.addEventListener(CollisionEvent.COLLIDED, collided); var secondPocketTemp:RectangleParticle = new RectangleParticle(310, -30, 150, 80, 0, true, 1, 0); secondPocketTemp.setStyle(0, 0, 1, 0); addParticle(secondPocketTemp); secondPocketTemp.name = "2"; secondPocketTemp.addEventListener(CollisionEvent.COLLIDED, collided); var thirdPocketTemp:RectangleParticle = new RectangleParticle(610, -22, 80, 150, 2.3, true, 1, 0); thirdPocketTemp.setStyle(0, 0, 1, 0); addParticle(thirdPocketTemp); thirdPocketTemp.name = "3"; thirdPocketTemp.addEventListener(CollisionEvent.COLLIDED, collided); var fourthPocketTemp:RectangleParticle = new RectangleParticle(-5, 340, 80, 150, 2.4, true, 1, 0); fourthPocketTemp.setStyle(0, 0, 1, 0); addParticle(fourthPocketTemp); fourthPocketTemp.name = "4"; fourthPocketTemp.addEventListener(CollisionEvent.COLLIDED, collided); var fifthPocketTemp:RectangleParticle = new RectangleParticle(310, 360, 150, 80, 0, true, 1, 0); fifthPocketTemp.setStyle(0, 0, 1, 0); addParticle(fifthPocketTemp); fifthPocketTemp.name = "5"; fifthPocketTemp.addEventListener(CollisionEvent.COLLIDED, collided); var sixthPocketTemp:RectangleParticle = new RectangleParticle(610, 345, 80, 150, 0.8, true, 1, 0); sixthPocketTemp.setStyle(0, 0, 1, 0); addParticle(sixthPocketTemp); sixthPocketTemp.name = "6"; sixthPocketTemp.addEventListener(CollisionEvent.COLLIDED, collided); } public function del():void{ _eventDispatcher = null; _billiards = null; _cueBall = null; } private function collided(evt:CollisionEvent):void{ SoundsManager.instance.playSound("sound_inPocket", 1); trace("进洞~~~~~~~~~~~~~~~~~~~"); if (evt.collItem.name == "cueball"){ if (_cueBall.inpocket == false){ _cueBall.inpocket = true; _eventDispatcher.dispatchEvent(new MyEvent(MyEvent.BALL_COLLIDE, (evt.target.name - 1), evt.collItem)); }; } else { if (_billiards[int(evt.collItem.name)].inpocket == false){ _billiards[int(evt.collItem.name)].inpocket = true; _eventDispatcher.dispatchEvent(new MyEvent(MyEvent.BALL_COLLIDE, (evt.target.name - 1), evt.collItem)); }; }; } public function addcollidedListener(type:String, listener:Function):void{ _eventDispatcher.addEventListener(type, listener); } public function removecollidedListener(type:String, listener:Function):void{ _eventDispatcher.removeEventListener(type, listener); } } }//package ui.equipment.apeEquipment
Section 100
//ApePoolTable (ui.equipment.apeEquipment.ApePoolTable) package ui.equipment.apeEquipment { import utils.*; import zlong.breathxue.utils.math.*; import zlong.zelda.collisionEngine.*; import data.*; public class ApePoolTable extends Group { private static const color:uint = 0xFF00FF; public function ApePoolTable(){ super(); var leftWall:RectangleParticle = new RectangleParticle(7, 162.6, 50, 229.5, 0, true, 1, Data.TABLE_ELASTICITY); leftWall.setStyle(0, color, 1, color); addParticle(leftWall); leftWall.addEventListener(CollisionEvent.COLLIDED, collided); var leftUpWall:RectangleParticle = new RectangleParticle(172.4, 8.5, 237.5, 50, 0, true, 1, Data.TABLE_ELASTICITY); leftUpWall.setStyle(0, color, 1, color); addParticle(leftUpWall); leftUpWall.addEventListener(CollisionEvent.COLLIDED, collided); var rightUpWall:RectangleParticle = new RectangleParticle(445, 8.5, 238.5, 50, 0, true, 1, Data.TABLE_ELASTICITY); rightUpWall.setStyle(0, color, 1, color); addParticle(rightUpWall); rightUpWall.addEventListener(CollisionEvent.COLLIDED, collided); var rightWall:RectangleParticle = new RectangleParticle(608, 163.6, 50, 233.3, 0, true, 1, Data.TABLE_ELASTICITY); rightWall.setStyle(0, color, 1, color); addParticle(rightWall); rightWall.addEventListener(CollisionEvent.COLLIDED, collided); var leftDownWall:RectangleParticle = new RectangleParticle(169, 323, 244.5, 50, 0, true, 1, Data.TABLE_ELASTICITY); leftDownWall.setStyle(0, color, 1, color); addParticle(leftDownWall); leftDownWall.addEventListener(CollisionEvent.COLLIDED, collided); var rightDownWall:RectangleParticle = new RectangleParticle(447.7, 323, 240, 50, 0, true, 1, Data.TABLE_ELASTICITY); rightDownWall.setStyle(0, color, 1, color); addParticle(rightDownWall); rightDownWall.addEventListener(CollisionEvent.COLLIDED, collided); var leftWallUp:LineWall = new LineWall(new mVector(8, 27), new mVector(32, 47), Data.TABLE_ELASTICITY); addWall(leftWallUp); leftWallUp.pointNormal = new mVector(1, 0); leftWallUp.addEventListener(CollisionEvent.COLLIDED, collided); var leftWallDown:LineWall = new LineWall(new mVector(10, 292), new mVector(32, 277), Data.TABLE_ELASTICITY); addWall(leftWallDown); leftWallDown.pointNormal = new mVector(1, 0); leftWallDown.addEventListener(CollisionEvent.COLLIDED, collided); var leftUpWallLeft:LineWall = new LineWall(new mVector(38, 10), new mVector(54, 32), Data.TABLE_ELASTICITY); addWall(leftUpWallLeft); leftUpWallLeft.pointNormal = new mVector(0, 1); leftUpWallLeft.addEventListener(CollisionEvent.COLLIDED, collided); var leftUpWallRight:LineWall = new LineWall(new mVector(290, 32), new mVector(298, 10), Data.TABLE_ELASTICITY); addWall(leftUpWallRight); leftUpWallRight.pointNormal = new mVector(0, 1); leftUpWallRight.addEventListener(CollisionEvent.COLLIDED, collided); var rightUpWallLeft:LineWall = new LineWall(new mVector(325, 32), new mVector(320, 10), Data.TABLE_ELASTICITY); addWall(rightUpWallLeft); rightUpWallLeft.pointNormal = new mVector(0, 1); rightUpWallLeft.addEventListener(CollisionEvent.COLLIDED, collided); var rightUpWallRight:LineWall = new LineWall(new mVector(567, 32), new mVector(582, 10), Data.TABLE_ELASTICITY); addWall(rightUpWallRight); rightUpWallRight.pointNormal = new mVector(0, 1); rightUpWallRight.addEventListener(CollisionEvent.COLLIDED, collided); var rightWallUp:LineWall = new LineWall(new mVector(585, 47), new mVector(610, 30), Data.TABLE_ELASTICITY); addWall(rightWallUp); rightWallUp.pointNormal = new mVector(1, 0); rightWallUp.addEventListener(CollisionEvent.COLLIDED, collided); var rightWallDown:LineWall = new LineWall(new mVector(585, 280), new mVector(620, 300), Data.TABLE_ELASTICITY); addWall(rightWallDown); rightWallDown.pointNormal = new mVector(1, 0); rightWallDown.addEventListener(CollisionEvent.COLLIDED, collided); var leftDownWallleft:LineWall = new LineWall(new mVector(47, 299), new mVector(28, 330), 1, Data.TABLE_ELASTICITY); addWall(leftDownWallleft); leftDownWallleft.pointNormal = new mVector(0, 1); leftDownWallleft.addEventListener(CollisionEvent.COLLIDED, collided); var leftDownWallright:LineWall = new LineWall(new mVector(290, 299), new mVector(300, 330), Data.TABLE_ELASTICITY); addWall(leftDownWallright); leftDownWallright.pointNormal = new mVector(0, 1); leftDownWallright.addEventListener(CollisionEvent.COLLIDED, collided); var rightDownWallleft:LineWall = new LineWall(new mVector(328, 299), new mVector(318, 330), Data.TABLE_ELASTICITY); addWall(rightDownWallleft); rightDownWallleft.pointNormal = new mVector(0, 1); rightDownWallleft.addEventListener(CollisionEvent.COLLIDED, collided); var rightDownWallright:LineWall = new LineWall(new mVector(568, 299), new mVector(590, 330), Data.TABLE_ELASTICITY); addWall(rightDownWallright); rightDownWallright.pointNormal = new mVector(0, 1); rightDownWallright.addEventListener(CollisionEvent.COLLIDED, collided); } private function collided(evt:CollisionEvent):void{ if (evt.collVelocity != 0){ SoundsManager.instance.overNewSound("sound_collideTable", 1); }; } } }//package ui.equipment.apeEquipment
Section 101
//Billiards (ui.equipment.BilliardEquipment.Billiards) package ui.equipment.BilliardEquipment { import flash.display.*; import utils.*; import data.*; public class Billiards { private var _billards:MovieClip; private var _tempArr:Array; private var _mc:MovieClip; private var _billiardsArr:Array; public function Billiards(mc:MovieClip){ super(); _mc = mc; init(); } public function addBall(ballnumber:int, x:int, y:int):void{ buildBall(ballnumber); _mc.addChild(_billards); _billiardsArr[ballnumber] = _billards; _billards.x = x; _billards.y = y; _billards.ball.gotoAndStop(6); } public function get billiardMc():MovieClip{ return (_billards); } public function del():void{ var i:int; while (i < _billiardsArr.length) { if (_billiardsArr[i] != null){ _billiardsArr[i].parent.removeChild(_billiardsArr[i]); _billiardsArr[i] = null; }; i++; }; _billiardsArr = null; i = 0; while (i < _tempArr.length) { if (_tempArr[i] != null){ _tempArr[i].parent.removeChild(_tempArr[i]); _tempArr[i] = null; }; i++; }; _tempArr = null; _billards = null; } private function buildBall(num:int):void{ _billards = Attach.getMovieClip(("billards" + (num + 1))); _billards.name = String((num + 1)); _billards.inpocket = false; } private function init():void{ var random:int; _billiardsArr = new Array(); _tempArr = new Array(); var i:int; while (i < Data.BALL_NUMBER) { buildBall(i); _mc.addChild(_billards); _billiardsArr[i] = _billards; random = (int((Math.random() * _billards.ball.totalFrames)) + 1); _billards.ball.gotoAndStop(random); random = int((Math.random() * 180)); _billards.ball.rotation = random; i++; }; } public function addEffectBall(ballnumber:int, x:Number, y:Number):void{ buildBall(ballnumber); _mc.addChild(_billards); _billards.x = x; _billards.y = y; } public function removeBall(ballnumber:int):void{ Trace("删除的球:", (ballnumber + 1)); _mc.removeChild(_billiardsArr[ballnumber]); _billiardsArr[ballnumber] = null; _billards = null; } public function moveBall(ballnumber:int, mc:MovieClip, x:int, y:int):void{ Trace("得分:", (ballnumber + 1)); Trace("位置:", x, y); buildBall(ballnumber); mc.addChild(_billards); _tempArr.push(_billards); _billards.x = x; _billards.y = y; _billards.ball.gotoAndStop(30); } public function get billiardsArr():Array{ return (_billiardsArr); } } }//package ui.equipment.BilliardEquipment
Section 102
//CueBall (ui.equipment.BilliardEquipment.CueBall) package ui.equipment.BilliardEquipment { import flash.display.*; import utils.*; public class CueBall { private var _effectCueBall:MovieClip; private var _cueBall:MovieClip; private var _mc:MovieClip; public function CueBall(mc:MovieClip){ super(); _mc = mc; init(); } public function addBall(x:Number, y:Number):void{ _mc.addChild(_cueBall); _cueBall.x = x; _cueBall.y = y; _cueBall.inpocket = false; } public function get effectCueBall():MovieClip{ return (_effectCueBall); } public function removeBall():void{ _mc.removeChild(_cueBall); } public function addEffectCueBall(x:Number, y:Number):void{ _effectCueBall = Attach.getMovieClip("cueBall"); _mc.addChild(_effectCueBall); _effectCueBall.x = x; _effectCueBall.y = y; } public function get cueBallMc():MovieClip{ return (_cueBall); } public function del():void{ if (_cueBall.parent != null){ _cueBall.parent.removeChild(_cueBall); }; _cueBall = null; if (_effectCueBall != null){ _effectCueBall.parent.removeChild(_effectCueBall); _effectCueBall = null; }; } private function init():void{ _cueBall = Attach.getMovieClip("cueBall"); _mc.addChild(_cueBall); _cueBall.inpocket = false; } public function removeEffectCueBall():void{ if (_effectCueBall != null){ _effectCueBall.parent.removeChild(_effectCueBall); _effectCueBall = null; }; } } }//package ui.equipment.BilliardEquipment
Section 103
//Pocket (ui.equipment.BilliardEquipment.Pocket) package ui.equipment.BilliardEquipment { import flash.display.*; public class Pocket { private var _mc:MovieClip; private var _pocket:MovieClip; private var _pocketArr:Array; public function Pocket(mc:MovieClip){ super(); _mc = mc; init(); } private function init():void{ _pocketArr = new Array(); var i:int; while (i < 6) { _pocket = (_mc.getChildByName(String(("hole" + int((i + 1))))) as MovieClip); _pocketArr[i] = _pocket; i++; }; } public function del():void{ var i:int; while (i < _pocketArr.length) { _pocketArr[i] = null; i++; }; } public function get pocketArr():Array{ return (_pocketArr); } } }//package ui.equipment.BilliardEquipment
Section 104
//PoolCue (ui.equipment.BilliardEquipment.PoolCue) package ui.equipment.BilliardEquipment { import flash.display.*; public class PoolCue { private var _mc:MovieClip; private var _poolCue:MovieClip; public function PoolCue(mc:MovieClip){ super(); _mc = mc; init(); } private function init():void{ _poolCue = (_mc.getChildByName("poolCue") as MovieClip); } public function del():void{ _poolCue = null; } public function get poolCueMc():MovieClip{ _poolCue.gotoAndStop(1); return (_poolCue); } } }//package ui.equipment.BilliardEquipment
Section 105
//Shadow (ui.equipment.BilliardEquipment.Shadow) package ui.equipment.BilliardEquipment { import flash.display.*; import utils.*; import data.*; public class Shadow { private var _shadowArr:Array; private var _shadowLevel:Array; private var _mc:MovieClip; private var _shadow:MovieClip; public function Shadow(mc:MovieClip){ super(); _mc = mc; init(); } public function get shadowArr():Array{ return (_shadowArr); } public function addShadow(number:int, x:Number, y:Number):void{ _shadow = Attach.getMovieClip("shadow"); _mc.addChildAt(_shadow, _shadowLevel[number]); _shadowArr[number] = _shadow; _shadow.x = x; _shadow.y = y; } public function removeShadow(number:int):void{ _shadowLevel[number] = _shadowArr[number].parent.getChildIndex(_shadowArr[number]); _shadowArr[number].parent.removeChild(_shadowArr[number]); _shadowArr[number] = null; } private function init():void{ _shadowArr = new Array(); _shadowLevel = new Array(); var i:int; while (i < (Data.BALL_NUMBER + 1)) { _shadow = Attach.getMovieClip("shadow"); _mc.addChild(_shadow); _shadowArr.push(_shadow); i++; }; i = 0; while (i < _shadowArr.length) { _shadowLevel.push(_shadowArr[i].parent.getChildIndex(_shadowArr[i])); i++; }; } public function del():void{ var i:int; while (i < (Data.BALL_NUMBER + 1)) { if (_shadowArr[i] != null){ _shadowArr[i].parent.removeChild(_shadowArr[i]); _shadowArr[i] = null; }; i++; }; _shadowArr = null; _shadowLevel = null; _shadow = null; _mc = null; } } }//package ui.equipment.BilliardEquipment
Section 106
//AbstractScreen (ui.AbstractScreen) package ui { import flash.display.*; import flash.utils.*; public class AbstractScreen { protected var _root:Sprite; public function AbstractScreen(r:Sprite){ super(); if (getQualifiedClassName(this) == "ui::AbstractScreen"){ throw (new ArgumentError("can't be constructed")); }; _root = r; } public function destroy():void{ throw (new Error("Abstract Method!")); } } }//package ui
Section 107
//HowToPlay (ui.HowToPlay) package ui { import flash.display.*; import flash.events.*; import utils.*; import data.*; public class HowToPlay { private var _mc:MovieClip; private static var _instance:HowToPlay; public function HowToPlay(){ super(); } public function init(parentMc:MovieClip, mode:String):void{ Data.Stop = true; _mc = Attach.getMovieClip("howtoplay"); parentMc.addChild(_mc); _mc.backBt.addEventListener(MouseEvent.CLICK, onClick); if (mode == Data.EIGHT_BALL_MODE){ _mc.howstraight.parent.removeChild(_mc.howstraight); } else { _mc.howeight.parent.removeChild(_mc.howeight); }; } private function onClick(evt:MouseEvent):void{ trace("delhowtoplay"); Data.Stop = false; _mc.backBt.removeEventListener(MouseEvent.CLICK, onClick); _mc.parent.removeChild(_mc); _mc = null; } public static function instance():HowToPlay{ if (_instance == null){ _instance = new (HowToPlay); }; return (_instance); } } }//package ui
Section 108
//InGame (ui.InGame) package ui { import flash.display.*; import flash.events.*; import utils.*; import flash.media.*; import zlong.spilSystemTool.*; import event.*; import data.*; import player.*; import mainLogic.*; public class InGame extends AbstractScreen { private var _mode:String; private var _gameLose:MovieClip; private var _chooseMode; private var _screen:MovieClip; private var _firstPlayerColor:String; private var _leftColor:MovieClip; private var _rightLightArr:Array; private var _playerTwo; private var _mc:MovieClip; private var _playerWin:MovieClip; private var _menu:Menu; private var _rightColor:MovieClip; private var _ai:AI; private var _gameWin:MovieClip; private var _playerOne:Player; private var _leftLight:MovieClip; private var _currPlayer; private var _currColor:String; private var _secondPlayerColor:String; private var _leftLightArr:Array; private var _rightLight:MovieClip; public static const FIRST_PLAYER:String = "First_Player"; private static const STRAIGHT_POOL:String = "Straight_Pool"; public static const SECOND_PLAYER:String = "Second_Player"; private static const EIGHT_BALL:String = "Eight_Ball"; public static var aiRushBall:Boolean; public function InGame(root:Sprite, mode:String){ super(root); _mode = mode; Data.makeClearance = true; aiRushBall = true; init(); } private function showStatistics(evt:MouseEvent):void{ if ((_chooseMode is EightBallMode)){ Statistics.instance().eightMode(_mc); } else { Statistics.instance().statisticsMode(_mc); }; } private function delDis():void{ _playerOne.del(); _playerOne = null; if (_playerTwo != null){ _playerTwo.del(); _playerTwo = null; }; if (_ai != null){ _ai.del(); _ai = null; }; _currPlayer = null; _chooseMode.del(); _chooseMode = null; _leftLightArr = null; _rightLightArr = null; _menu = null; _leftLight = null; _rightLight = null; _leftColor = null; _rightColor = null; _screen = null; _gameWin = null; _gameLose = null; _playerWin = null; _mc.parent.removeChild(_mc); _mc = null; } private function setAI():void{ _playerTwo = new AI(_screen); _playerTwo.ID = SECOND_PLAYER; } private function shotAgain(evt:MyEvent):void{ trace("继续当前玩家击打"); if (_currPlayer == _playerOne){ _chooseMode.playerReadyShot(_currPlayer, _firstPlayerColor); } else { _chooseMode.playerReadyShot(_currPlayer, _secondPlayerColor); }; } private function init():void{ initDis(); initMode(); initButton(); } private function highScore():void{ if (_leftLightArr.length < 8){ Data.makeClearance = false; }; GoogleEvent.instance.gaTrackEvent("Game_completed_viewed"); Award_HighScore.instance.submitAchievement("award1"); trace("获得一次胜利"); if ((((Data.makeClearance == true)) && (!((_mode == Data.MODE_THIRD))))){ Award_HighScore.instance.submitAchievement("award4"); trace("完胜"); }; if ((((_mode == Data.MODE_FIRST)) || ((_mode == Data.MODE_FOURTH)))){ if (!Data.exitInGame){ Data.winNumber++; trace("连胜", Data.winNumber, "次", Data.exitInGame); }; if (Data.winNumber == 2){ Award_HighScore.instance.submitAchievement("award3"); trace("VS电脑,2连胜"); } else { if (Data.winNumber == 5){ Award_HighScore.instance.submitAchievement("award5"); trace("VS电脑,5连胜利"); }; }; }; } private function gameWin(evt:MyEvent):void{ Data.exitInGame = false; if (_currPlayer == _playerOne){ trace("玩家胜利"); highScore(); playerOneWin(); } else { trace("AI胜利 "); Data.winNumber = 0; playerTwoWin(); }; } private function delEvents():void{ _mc.howBt.removeEventListener(MouseEvent.CLICK, howToPlay); _mc.statisticsBt.removeEventListener(MouseEvent.CLICK, showStatistics); _mc.gomenuBt.removeEventListener(MouseEvent.CLICK, goMenu); _mc.gomenuBt.removeEventListener(MouseEvent.CLICK, goMenu); if (_menu != null){ _menu.removeEventListener(UIEvent.BACK_MAINMENU, backMainMenu); }; _chooseMode.removeEventListener(MyEvent.COLOR, defineColor); _chooseMode.removeEventListener(MyEvent.PLAYER_AGAIN, shotAgain); _chooseMode.removeEventListener(MyEvent.NEXT_PLAYER, changeShot); _chooseMode.removeEventListener(MyEvent.GAME_WIN, gameWin); _chooseMode.removeEventListener(MyEvent.GAME_LOSE, gameLose); _chooseMode.removeEventListener(GetScoreEvent.GET_SCORE, getScore); } private function restartGame(evt:UIEvent):void{ _root.dispatchEvent(new UIEvent(UIEvent.PLAY_AGAIN)); } private function gameLose(evt:MyEvent):void{ Data.exitInGame = false; if (_currPlayer == _playerOne){ trace("AI胜利 "); Data.winNumber = 0; playerTwoWin(); } else { trace("玩家胜利"); highScore(); playerOneWin(); }; } private function playAgain(evt:MouseEvent):void{ _root.dispatchEvent(new UIEvent(UIEvent.PLAY_AGAIN)); } private function playerTwoWin():void{ var cookie:MyCookie = new MyCookie(); _mc.retryBt.visible = true; if ((_chooseMode is EightBallMode)){ cookie.addPlayerOneEightScore(0, 1); if ((_playerTwo is Player)){ cookie.addPlayerTwoEightSocre(1, 0); }; } else { cookie.addPlayerOneStatisticsScore(0, 1); if ((_playerTwo is Player)){ cookie.addPlayerTwoStatisticsSocre(1, 0); }; }; if ((_playerTwo is Player)){ completeSound("sound_win"); _playerWin.visible = true; _playerWin.gotoAndStop(2); } else { completeSound("sound_lose"); _gameLose.visible = true; }; Data.Stop = true; } private function howToPlay(evt:MouseEvent):void{ var mode:String; if ((_chooseMode is EightBallMode)){ mode = Data.EIGHT_BALL_MODE; } else { mode = Data.STRAIGHT_MODE; }; HowToPlay.instance().init(_mc, mode); } private function setSceondPlayer():void{ _playerTwo = new Player(_screen); _playerTwo.ID = SECOND_PLAYER; } private function changeShot(evt:MyEvent):void{ trace("交换击打者"); Data.makeClearance = false; if (_currPlayer == _playerOne){ _currPlayer = _playerTwo; _rightLight.gotoAndStop(1); _leftLight.gotoAndStop(2); _chooseMode.playerReadyShot(_currPlayer, _secondPlayerColor); } else { _currPlayer = _playerOne; _leftLight.gotoAndStop(1); _rightLight.gotoAndStop(2); _chooseMode.playerReadyShot(_currPlayer, _firstPlayerColor); }; } private function backMainMenu(evt:UIEvent):void{ if (Data.exitInGame){ Data.winNumber = 0; }; _root.dispatchEvent(new UIEvent(UIEvent.BACK_MAINMENU)); } private function initMode():void{ switch (_mode){ case Data.MODE_FIRST: _mc.eightballtitle.visible = true; _mc.computer.visible = true; _chooseMode = new EightBallMode(_screen); setAI(); break; case Data.MODE_SECOND: _mc.eightballtitle.visible = true; _mc.player2.visible = true; _chooseMode = new EightBallMode(_screen); setSceondPlayer(); break; case Data.MODE_THIRD: _mc.straighttitile.visible = true; _leftLight.parent.removeChild(_leftLight); _rightLight.parent.removeChild(_rightLight); _leftColor.parent.removeChild(_leftColor); _rightColor.parent.removeChild(_rightColor); _mc.rightside.visible = false; _screen.rightside.visible = false; _chooseMode = new StraightMode(_screen); break; case Data.MODE_FOURTH: _mc.straighttitile.visible = true; _mc.computer.visible = true; _chooseMode = new StraightMode(_screen); setAI(); break; case Data.MODE_FIFTH: _mc.straighttitile.visible = true; _mc.player2.visible = true; _chooseMode = new StraightMode(_screen); setSceondPlayer(); break; default: break; }; _chooseMode.addEventListener(MyEvent.COLOR, defineColor); _chooseMode.addEventListener(MyEvent.PLAYER_AGAIN, shotAgain); if (_mode == Data.MODE_THIRD){ _chooseMode.addEventListener(MyEvent.NEXT_PLAYER, shotAgain); _leftLightArr = new Array(); } else { _chooseMode.addEventListener(MyEvent.NEXT_PLAYER, changeShot); _leftLightArr = new Array(); _rightLightArr = new Array(); }; _chooseMode.addEventListener(MyEvent.GAME_WIN, gameWin); _chooseMode.addEventListener(MyEvent.GAME_LOSE, gameLose); _chooseMode.addEventListener(GetScoreEvent.GET_SCORE, getScore); setFirstPlayer(); _currPlayer = _playerOne; _chooseMode.playerReadyShot(_playerOne); } private function completeSound(soundName:String):void{ var sound:Sound; var sc:SoundChannel; var st:SoundTransform; SoundsManager.instance.stopMusic(); if (SoundsManager.instance.Enabled){ sound = Attach.getSound(soundName); sc = sound.play(0, 1); st = sc.soundTransform; st.volume = 1; sc.soundTransform = st; sc.addEventListener(Event.SOUND_COMPLETE, soundComplete); }; } private function getScore(evt:GetScoreEvent):void{ var x:Number; var y:Number; var i:int; trace("显示得分"); if (_currPlayer == _playerOne){ i = 0; while (i < evt.currScore.length) { _leftLightArr.push(evt.currScore[i]); x = Data.FIRST_PLAYER_SCORE[(_leftLightArr.length - 1)][0]; y = Data.FIRST_PLAYER_SCORE[(_leftLightArr.length - 1)][1]; _chooseMode.lighting(_leftLightArr[(_leftLightArr.length - 1)], _mc, x, y); i++; }; i = 0; while (i < evt.otherScore.length) { _rightLightArr.push(evt.otherScore[i]); x = Data.SECOND_PALYER_SCORE[(_rightLightArr.length - 1)][0]; y = Data.SECOND_PALYER_SCORE[(_rightLightArr.length - 1)][1]; _chooseMode.lighting(_rightLightArr[(_rightLightArr.length - 1)], _mc, x, y); i++; }; if ((_chooseMode is StraightMode)){ if (evt.currScore.length >= 2){ Award_HighScore.instance.submitAchievement("award2"); trace("在StraightMode中,1次打入2个球"); }; }; } else { i = 0; while (i < evt.currScore.length) { _rightLightArr.push(evt.currScore[i]); x = Data.SECOND_PALYER_SCORE[(_rightLightArr.length - 1)][0]; y = Data.SECOND_PALYER_SCORE[(_rightLightArr.length - 1)][1]; _chooseMode.lighting(_rightLightArr[(_rightLightArr.length - 1)], _mc, x, y); i++; }; i = 0; while (i < evt.otherScore.length) { _leftLightArr.push(evt.otherScore[i]); x = Data.FIRST_PLAYER_SCORE[(_leftLightArr.length - 1)][0]; y = Data.FIRST_PLAYER_SCORE[(_leftLightArr.length - 1)][1]; _chooseMode.lighting(_leftLightArr[(_leftLightArr.length - 1)], _mc, x, y); i++; }; }; } private function initButton():void{ _mc.retryBt.visible = false; _mc.retryBt.addEventListener(MouseEvent.CLICK, playAgain); _mc.howBt.addEventListener(MouseEvent.CLICK, howToPlay); _mc.statisticsBt.addEventListener(MouseEvent.CLICK, showStatistics); _mc.gomenuBt.addEventListener(MouseEvent.CLICK, goMenu); } private function initDis():void{ SoundsManager.instance.playMusic("sound_ingame", 0.8); Data.exitInGame = true; _mc = Attach.getMovieClip("ingameUI"); _root.addChild(_mc); _mc.straighttitile.visible = false; _mc.eightballtitle.visible = false; _leftLight = (_mc.getChildByName("leftlight") as MovieClip); _rightLight = (_mc.getChildByName("rightlight") as MovieClip); _leftLight.gotoAndStop(1); _rightLight.gotoAndStop(2); _leftColor = (_mc.getChildByName("leftcolor") as MovieClip); _rightColor = (_mc.getChildByName("rightcolor") as MovieClip); _leftColor.visible = false; _rightColor.visible = false; _screen = (_mc.getChildByName("screenMc") as MovieClip); _gameWin = (_mc.getChildByName("gamewin") as MovieClip); _gameLose = (_mc.getChildByName("gamelose") as MovieClip); _playerWin = (_mc.getChildByName("playerwin") as MovieClip); _playerWin.visible = false; _gameWin.visible = false; _gameLose.visible = false; _mc.player2.visible = false; _mc.computer.visible = false; } private function playerOneWin():void{ completeSound("sound_win"); var cookie:MyCookie = new MyCookie(); _mc.retryBt.visible = true; if ((_chooseMode is EightBallMode)){ cookie.addPlayerOneEightScore(1, 0); if ((_playerTwo is Player)){ cookie.addPlayerTwoEightSocre(0, 1); }; } else { cookie.addPlayerOneStatisticsScore(1, 0); if ((_playerTwo is Player)){ cookie.addPlayerTwoStatisticsSocre(0, 1); }; }; if ((_playerTwo is Player)){ _playerWin.visible = true; _playerWin.gotoAndStop(1); } else { _gameWin.visible = true; }; Data.Stop = true; } private function goMenu(evt:MouseEvent):void{ _menu = new Menu(_mc); if (_menu == null){ Trace("menu is empty"); }; _menu.addEventListener(UIEvent.BACK_MAINMENU, backMainMenu); _menu.addEventListener(UIEvent.PLAY_AGAIN, restartGame); } private function defineColor(evt:MyEvent):void{ if (_currPlayer == _playerOne){ _firstPlayerColor = evt.currColor; _secondPlayerColor = evt.otherColor; } else { _secondPlayerColor = evt.currColor; _firstPlayerColor = evt.otherColor; }; _leftColor.visible = true; _rightColor.visible = true; if (_firstPlayerColor == Data.FULL_COLOR){ _leftColor.gotoAndStop(2); _rightColor.gotoAndStop(1); } else { if (_firstPlayerColor == Data.HALF_COLOR){ _leftColor.gotoAndStop(1); _rightColor.gotoAndStop(2); } else { _leftColor.visible = false; _rightColor.visible = false; }; }; } private function setFirstPlayer():void{ _playerOne = new Player(_screen); _playerOne.ID = FIRST_PLAYER; } private function soundComplete(evt:Event):void{ SoundsManager.instance.playMusic("sound_ingame", 0.8); } override public function destroy():void{ delEvents(); delDis(); } } }//package ui
Section 109
//Loading (ui.Loading) package ui { import flash.display.*; import flash.events.*; import zlong.Template.*; import flash.text.*; import zlong.breathxue.utils.*; public class Loading extends AbstractLoadingClass { private var _mc_perText:TextField; private var _mc:Sprite; private var _logo:MovieClip; private static const MC_CLASS_NAME:String = "loadingUI"; public function Loading(pmc:Sprite):void{ super(pmc); initDis(pmc); initEvent(); } private function initPercentText():void{ _mc_perText = (_mc["pertext"] as TextField); } private function delDis():void{ _mc_perText = null; _mc.parent.removeChild(_mc); _mc = null; } private function delEvent():void{ _mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function initEvent():void{ _mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler); } override public function destroy():void{ trace("destroy"); delEvent(); delDis(); } private function enterFrameHandler(event:Event):void{ var percentSWF:Number = (_mc.root.loaderInfo.bytesLoaded / _mc.root.loaderInfo.bytesTotal); trace(percentSWF); _mc_perText.text = (String(int((percentSWF * 100))) + "%"); } private function initDis(pmc:Sprite):void{ _mc = Attach.getSprite(MC_CLASS_NAME); pmc.addChild(_mc); initPercentText(); } } }//package ui
Section 110
//MainMenu (ui.MainMenu) package ui { import flash.display.*; import flash.events.*; import utils.*; import zlong.spilSystemTool.*; import event.*; import ui.components.*; import data.*; public class MainMenu extends AbstractScreen { private var _music:MusicButton; private var _sound:SoundButton; private var _qualityBt:QualityButton; private var _mc:MovieClip; public function MainMenu(root:Sprite){ super(root); initDis(); initEvents(); } override public function destroy():void{ delEvents(); delDis(); } private function delDis():void{ _qualityBt.destroy(); _music.destroy(); _sound.destroy(); _qualityBt = null; _music = null; _sound = null; _root.removeChild(_mc); _mc = null; } private function eightPlayerVsComputer():void{ Data.modechoose = Data.MODE_FIRST; _root.dispatchEvent(new UIEvent(UIEvent.START_GAME, Data.MODE_FIRST)); } private function onClick(evt:MouseEvent):void{ var temp:MovieClip; if ((evt.target is MyButton)){ temp = (evt.target as MyButton); } else { return; }; var tempName:String = temp.name; switch (tempName){ case "eightpvscBt": eightPlayerVsComputer(); break; case "eightpvspBt": eightPlayerVsPlayer(); break; case "straightpBt": straightOnlyPlyer(); break; case "straightpvscBt": straightPlayerVsComputer(); break; case "straightpvspBt": straightPlayerVsPlayer(); break; default: break; }; } private function straightOnlyPlyer():void{ Data.modechoose = Data.MODE_THIRD; _root.dispatchEvent(new UIEvent(UIEvent.START_GAME, Data.MODE_THIRD)); } private function eightPlayerVsPlayer():void{ Data.modechoose = Data.MODE_SECOND; _root.dispatchEvent(new UIEvent(UIEvent.START_GAME, Data.MODE_SECOND)); } private function initEvents():void{ _mc.addEventListener(MouseEvent.CLICK, onClick); } private function straightPlayerVsPlayer():void{ Data.modechoose = Data.MODE_FIFTH; _root.dispatchEvent(new UIEvent(UIEvent.START_GAME, Data.MODE_FIFTH)); } private function straightPlayerVsComputer():void{ Data.modechoose = Data.MODE_FOURTH; _root.dispatchEvent(new UIEvent(UIEvent.START_GAME, Data.MODE_FOURTH)); } private function delEvents():void{ _mc.removeEventListener(MouseEvent.CLICK, onClick); } private function initDis():void{ GoogleEvent.instance.gaTrackEvent("mainscreen viewed"); SoundsManager.instance.playMusic("sound_inmenu", 0.8); _mc = Attach.getMovieClip("mainMenuUI"); _root.addChild(_mc); _qualityBt = new QualityButton(_mc["quality_button"]); _music = new MusicButton(_mc["music_button"]); _sound = new SoundButton(_mc["sound_button"]); } } }//package ui
Section 111
//Menu (ui.Menu) package ui { import flash.display.*; import flash.events.*; import utils.*; import event.*; import ui.components.*; import data.*; public class Menu extends EventDispatcher { private var _music:MusicButton; private var _sound:SoundButton; private var _qualityBt:QualityButton; private var _mc:MovieClip; private var _parentMc:MovieClip; public function Menu(parentMc:MovieClip){ super(); _parentMc = parentMc; init(); } private function restartGame():void{ del(); this.dispatchEvent(new UIEvent(UIEvent.PLAY_AGAIN)); } private function backInGame():void{ del(); } private function goMainMenu():void{ del(); this.dispatchEvent(new UIEvent(UIEvent.BACK_MAINMENU)); } private function onClick(evt:MouseEvent):void{ var temp:MovieClip; if ((evt.target is MyButton)){ temp = (evt.target as MyButton); } else { return; }; var tempName:String = temp.name; switch (tempName){ case "menuBt": goMainMenu(); break; case "backBt": backInGame(); break; case "restartBt": restartGame(); default: break; }; } public function del():void{ Data.Stop = false; _qualityBt.destroy(); _qualityBt = null; _music.destroy(); _music = null; _sound.destroy(); _sound = null; _mc.removeEventListener(MouseEvent.CLICK, onClick); _mc.parent.removeChild(_mc); _mc = null; _parentMc = null; } private function init():void{ Data.Stop = true; _mc = Attach.getMovieClip("menuUI"); _parentMc.addChild(_mc); _qualityBt = new QualityButton(_mc["quality_button"]); _music = new MusicButton(_mc["music_button"]); _sound = new SoundButton(_mc["sound_button"]); _mc.addEventListener(MouseEvent.CLICK, onClick); } } }//package ui
Section 112
//Statistics (ui.Statistics) package ui { import flash.display.*; import flash.events.*; import utils.*; import data.*; public class Statistics { private var _mc:MovieClip; private static var _instance:Statistics; public function Statistics(){ super(); } private function resetEight(evt:MouseEvent):void{ var cookie:MyCookie = new MyCookie(); cookie.clearEightData(); showEightScore(); } public function eightMode(parentMc:MovieClip):void{ Data.Stop = true; _mc = Attach.getMovieClip("statisticeight"); parentMc.addChild(_mc); _mc.backBt.addEventListener(MouseEvent.CLICK, backBt); _mc.resetBt.addEventListener(MouseEvent.CLICK, resetEight); showEightScore(); } public function statisticsMode(parentMc:MovieClip):void{ Data.Stop = true; _mc = Attach.getMovieClip("statisticstraight"); parentMc.addChild(_mc); _mc.backBt.addEventListener(MouseEvent.CLICK, backBt); _mc.resetBt.addEventListener(MouseEvent.CLICK, resetStraight); showStraightScore(); } private function showEightScore():void{ var cookie:MyCookie = new MyCookie(); _mc.eplayeronewin.text = String(cookie.playerOneEightScore[0].win); _mc.eplayeronelose.text = String(cookie.playerOneEightScore[0].lose); _mc.eplayeroneper.text = (int(((cookie.playerOneEightScore[0].win / (cookie.playerOneEightScore[0].win + cookie.playerOneEightScore[0].lose)) * 100)) + "%"); _mc.eplayertwowin.text = String(cookie.playerTwoEightScore[0].win); _mc.eplayertwolose.text = String(cookie.playerTwoEightScore[0].lose); _mc.eplayertwoper.text = (int(((cookie.playerTwoEightScore[0].win / (cookie.playerTwoEightScore[0].win + cookie.playerTwoEightScore[0].lose)) * 100)) + "%"); } private function backBt(evt:MouseEvent):void{ Data.Stop = false; _mc.backBt.removeEventListener(MouseEvent.CLICK, backBt); _mc.resetBt.removeEventListener(MouseEvent.CLICK, resetStraight); _mc.resetBt.removeEventListener(MouseEvent.CLICK, resetEight); _mc.parent.removeChild(_mc); _mc = null; } private function resetStraight(evt:MouseEvent):void{ var cookie:MyCookie = new MyCookie(); cookie.clearStraightData(); showStraightScore(); } private function showStraightScore():void{ var cookie:MyCookie = new MyCookie(); _mc.splayeronewin.text = String(cookie.playerOneStatisticsScore[0].win); _mc.splayeronelose.text = String(cookie.playerOneStatisticsScore[0].lose); _mc.splayeroneper.text = (int(((cookie.playerOneStatisticsScore[0].win / (cookie.playerOneStatisticsScore[0].win + cookie.playerOneStatisticsScore[0].lose)) * 100)) + "%"); _mc.splayertwowin.text = String(cookie.playerTwoStatisticsScore[0].win); _mc.splayertwolose.text = String(cookie.playerTwoStatisticsScore[0].lose); _mc.splayertwoper.text = (int(((cookie.playerTwoStatisticsScore[0].win / (cookie.playerTwoStatisticsScore[0].win + cookie.playerTwoStatisticsScore[0].lose)) * 100)) + "%"); } public static function instance():Statistics{ if (_instance == null){ _instance = new (Statistics); }; return (_instance); } } }//package ui
Section 113
//a10_com_logo_72 (UI_fla.a10_com_logo_72) package UI_fla { import flash.display.*; public dynamic class a10_com_logo_72 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 114
//girlsgogames_57 (UI_fla.girlsgogames_57) package UI_fla { import flash.display.*; public dynamic class girlsgogames_57 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 115
//girlsgogames_58 (UI_fla.girlsgogames_58) package UI_fla { import flash.display.*; public dynamic class girlsgogames_58 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 116
//girlsgogames_59 (UI_fla.girlsgogames_59) package UI_fla { import flash.display.*; public dynamic class girlsgogames_59 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 117
//girlsgogames_60 (UI_fla.girlsgogames_60) package UI_fla { import flash.display.*; public dynamic class girlsgogames_60 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 118
//girlsgogames_61 (UI_fla.girlsgogames_61) package UI_fla { import flash.display.*; public dynamic class girlsgogames_61 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 119
//girlsgogames_62 (UI_fla.girlsgogames_62) package UI_fla { import flash.display.*; public dynamic class girlsgogames_62 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 120
//girlsgogames_63 (UI_fla.girlsgogames_63) package UI_fla { import flash.display.*; public dynamic class girlsgogames_63 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 121
//girlsgogames_65 (UI_fla.girlsgogames_65) package UI_fla { import flash.display.*; public dynamic class girlsgogames_65 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 122
//girlsgogames_66 (UI_fla.girlsgogames_66) package UI_fla { import flash.display.*; public dynamic class girlsgogames_66 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 123
//girlsgogames_67 (UI_fla.girlsgogames_67) package UI_fla { import flash.display.*; public dynamic class girlsgogames_67 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 124
//girlsgogames_68 (UI_fla.girlsgogames_68) package UI_fla { import flash.display.*; public dynamic class girlsgogames_68 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 125
//juegosdechicas_64 (UI_fla.juegosdechicas_64) package UI_fla { import flash.display.*; public dynamic class juegosdechicas_64 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 126
//label_169 (UI_fla.label_169) package UI_fla { import flash.display.*; public dynamic class label_169 extends MovieClip { public var flag:MovieClip; } }//package UI_fla
Section 127
//LanguageSelectPopup_168 (UI_fla.LanguageSelectPopup_168) package UI_fla { import flash.display.*; public dynamic class LanguageSelectPopup_168 extends MovieClip { public var l_se:MovieClip; public var l_ar:MovieClip; public var l_arg:MovieClip; public var l_br:MovieClip; public var l_cn:MovieClip; public var l_in:MovieClip; public var l_tr:MovieClip; public var l_de:MovieClip; public var l_my:MovieClip; public var _blank:MovieClip; public var l_es:MovieClip; public var l_en_uk:MovieClip; public var l_mx:MovieClip; public var l_fr:MovieClip; public var l_en_us:MovieClip; public var l_pl:MovieClip; public var l_pt:MovieClip; public var l_ph:MovieClip; public var l_nl:MovieClip; public var l_id:MovieClip; public var l_it:MovieClip; public var l_jp:MovieClip; public var l_ru:MovieClip; } }//package UI_fla
Section 128
//logo_asoyun_com_43 (UI_fla.logo_asoyun_com_43) package UI_fla { import flash.display.*; public dynamic class logo_asoyun_com_43 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 129
//logo_game_20 (UI_fla.logo_game_20) package UI_fla { import flash.display.*; public dynamic class logo_game_20 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 130
//logo_game_com_my_44 (UI_fla.logo_game_com_my_44) package UI_fla { import flash.display.*; public dynamic class logo_game_com_my_44 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 131
//logo_giocaregratis_it_32 (UI_fla.logo_giocaregratis_it_32) package UI_fla { import flash.display.*; public dynamic class logo_giocaregratis_it_32 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 132
//logo_laro_com_ph_70 (UI_fla.logo_laro_com_ph_70) package UI_fla { import flash.display.*; public dynamic class logo_laro_com_ph_70 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 133
//logo_minigry_pl_42 (UI_fla.logo_minigry_pl_42) package UI_fla { import flash.display.*; public dynamic class logo_minigry_pl_42 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 134
//logo_my_games_co_uk_35 (UI_fla.logo_my_games_co_uk_35) package UI_fla { import flash.display.*; public dynamic class logo_my_games_co_uk_35 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 135
//logo_oyunlar123_com_56 (UI_fla.logo_oyunlar123_com_56) package UI_fla { import flash.display.*; public dynamic class logo_oyunlar123_com_56 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 136
//new_agame_com_17 (UI_fla.new_agame_com_17) package UI_fla { import flash.display.*; public dynamic class new_agame_com_17 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 137
//new_clickjogos_com_30 (UI_fla.new_clickjogos_com_30) package UI_fla { import flash.display.*; public dynamic class new_clickjogos_com_30 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 138
//new_flashgames_ru_36 (UI_fla.new_flashgames_ru_36) package UI_fla { import flash.display.*; public dynamic class new_flashgames_ru_36 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 139
//new_game_co_in_38 (UI_fla.new_game_co_in_38) package UI_fla { import flash.display.*; public dynamic class new_game_co_in_38 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 140
//new_games_co_id_40 (UI_fla.new_games_co_id_40) package UI_fla { import flash.display.*; public dynamic class new_games_co_id_40 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 141
//new_jeu_fr_26 (UI_fla.new_jeu_fr_26) package UI_fla { import flash.display.*; public dynamic class new_jeu_fr_26 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 142
//new_spel_se_33 (UI_fla.new_spel_se_33) package UI_fla { import flash.display.*; public dynamic class new_spel_se_33 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 143
//new_spielen_com_28 (UI_fla.new_spielen_com_28) package UI_fla { import flash.display.*; public dynamic class new_spielen_com_28 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 144
//new_zapjuegos_com_22 (UI_fla.new_zapjuegos_com_22) package UI_fla { import flash.display.*; public dynamic class new_zapjuegos_com_22 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 145
//newagame_co_uk_74 (UI_fla.newagame_co_uk_74) package UI_fla { import flash.display.*; public dynamic class newagame_co_uk_74 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 146
//newspel_nl_24 (UI_fla.newspel_nl_24) package UI_fla { import flash.display.*; public dynamic class newspel_nl_24 extends MovieClip { public var displayArea_mc:MovieClip; } }//package UI_fla
Section 147
//table_176 (UI_fla.table_176) package UI_fla { import flash.display.*; public dynamic class table_176 extends MovieClip { public var hole1:MovieClip; public var hole5:MovieClip; public var hole6:MovieClip; public var poolCue:poolcue; public var hole4:MovieClip; public var hole2:MovieClip; public var hole3:MovieClip; public var rightside:MovieClip; } }//package UI_fla
Section 148
//Timeline_250 (UI_fla.Timeline_250) package UI_fla { import flash.display.*; public dynamic class Timeline_250 extends MovieClip { public var ball:MovieClip; public function Timeline_250(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 149
//Timeline_254 (UI_fla.Timeline_254) package UI_fla { import flash.display.*; public dynamic class Timeline_254 extends MovieClip { public var ball:MovieClip; public function Timeline_254(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 150
//Timeline_258 (UI_fla.Timeline_258) package UI_fla { import flash.display.*; public dynamic class Timeline_258 extends MovieClip { public var ball:MovieClip; public function Timeline_258(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 151
//Timeline_262 (UI_fla.Timeline_262) package UI_fla { import flash.display.*; public dynamic class Timeline_262 extends MovieClip { public var ball:MovieClip; public function Timeline_262(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 152
//Timeline_266 (UI_fla.Timeline_266) package UI_fla { import flash.display.*; public dynamic class Timeline_266 extends MovieClip { public var ball:MovieClip; public function Timeline_266(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 153
//Timeline_270 (UI_fla.Timeline_270) package UI_fla { import flash.display.*; public dynamic class Timeline_270 extends MovieClip { public var ball:MovieClip; public function Timeline_270(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 154
//Timeline_274 (UI_fla.Timeline_274) package UI_fla { import flash.display.*; public dynamic class Timeline_274 extends MovieClip { public var ball:MovieClip; public function Timeline_274(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 155
//Timeline_278 (UI_fla.Timeline_278) package UI_fla { import flash.display.*; public dynamic class Timeline_278 extends MovieClip { public var ball:MovieClip; public function Timeline_278(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 156
//Timeline_282 (UI_fla.Timeline_282) package UI_fla { import flash.display.*; public dynamic class Timeline_282 extends MovieClip { public var ball:MovieClip; public function Timeline_282(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 157
//Timeline_286 (UI_fla.Timeline_286) package UI_fla { import flash.display.*; public dynamic class Timeline_286 extends MovieClip { public var ball:MovieClip; public function Timeline_286(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 158
//Timeline_289 (UI_fla.Timeline_289) package UI_fla { import flash.display.*; public dynamic class Timeline_289 extends MovieClip { public var ball:MovieClip; public function Timeline_289(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 159
//Timeline_292 (UI_fla.Timeline_292) package UI_fla { import flash.display.*; public dynamic class Timeline_292 extends MovieClip { public var ball:MovieClip; public function Timeline_292(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 160
//Timeline_295 (UI_fla.Timeline_295) package UI_fla { import flash.display.*; public dynamic class Timeline_295 extends MovieClip { public var ball:MovieClip; public function Timeline_295(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 161
//Timeline_298 (UI_fla.Timeline_298) package UI_fla { import flash.display.*; public dynamic class Timeline_298 extends MovieClip { public var ball:MovieClip; public function Timeline_298(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 162
//Timeline_301 (UI_fla.Timeline_301) package UI_fla { import flash.display.*; public dynamic class Timeline_301 extends MovieClip { public var ball:MovieClip; public function Timeline_301(){ addFrameScript(59, frame60); } function frame60(){ gotoAndStop(1); } } }//package UI_fla
Section 163
//Attach (utils.Attach) package utils { import flash.display.*; import flash.media.*; import flash.utils.*; public class Attach { public function Attach(){ super(); } public static function getSound(s:String):Sound{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:Sound = new (temp); return (returnObj); } public static function getMovieClip(s:String):MovieClip{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:MovieClip = new (temp); return (returnObj); } public static function getSprite(s:String):Sprite{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:Sprite = new (temp); return (returnObj); } public static function getBitmapData(s:String):BitmapData{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:BitmapData = new temp(null, null); return (returnObj); } } }//package utils
Section 164
//CollideSound (utils.CollideSound) package utils { public class CollideSound { private static var _instance:CollideSound; public function CollideSound(){ super(); } public function playSound(velocity:Number):void{ if (velocity >= 10){ SoundsManager.instance.overNewSound("sound_collideHeavy", 1); } else { if (velocity >= 5){ SoundsManager.instance.overNewSound("sound_collideNormal", 1); } else { if (velocity > 0){ SoundsManager.instance.overNewSound("sound_collideLight", 1); }; }; }; } public static function instance():CollideSound{ if (_instance == null){ _instance = new (CollideSound); }; return (_instance); } } }//package utils
Section 165
//MyCookie (utils.MyCookie) package utils { import flash.net.*; public class MyCookie { private var dat:Object; private var so:SharedObject; private static const COOKIE_NAME:String = "Billiards_Master"; public function MyCookie(){ super(); initSo(); initData(); } private function flush():void{ so.flush(); } public function get playerTwoStatisticsScore():Array{ return (dat["player_two"]["statistics"]); } public function addPlayerOneEightScore(win:int, lose:int):void{ dat["player_one"]["eightBall"][0].win = (dat["player_one"]["eightBall"][0].win + win); dat["player_one"]["eightBall"][0].lose = (dat["player_one"]["eightBall"][0].lose + lose); flush(); } public function get playerOneEightScore():Array{ return (dat["player_one"]["eightBall"]); } public function get playerOneStatisticsScore():Array{ return (dat["player_one"]["statistics"]); } public function addPlayerOneStatisticsScore(win:int, lose:int):void{ dat["player_one"]["statistics"][0].win = (dat["player_one"]["statistics"][0].win + win); dat["player_one"]["statistics"][0].lose = (dat["player_one"]["statistics"][0].lose + lose); flush(); } private function initSo():void{ so = SharedObject.getLocal(COOKIE_NAME, "/"); } public function clear():void{ trace("clear"); so.clear(); } public function clearStraightData():void{ dat["player_one"]["statistics"] = null; dat["player_two"]["statistics"] = null; flush(); } public function addPlayerTwoStatisticsSocre(win:int, lose:int):void{ dat["player_two"]["statistics"][0].win = (dat["player_two"]["statistics"][0].win + win); dat["player_two"]["statistics"][0].lose = (dat["player_two"]["statistics"][0].lose + lose); flush(); } public function addPlayerTwoEightSocre(win:int, lose:int):void{ dat["player_two"]["eightBall"][0].win = (dat["player_two"]["eightBall"][0].win + win); dat["player_two"]["eightBall"][0].lose = (dat["player_two"]["eightBall"][0].lose + lose); flush(); } private function initData():void{ dat = so.data; if (dat["player_one"] == null){ dat["player_one"] = new Array(); dat["player_one"]["statistics"] = new Array(); dat["player_one"]["statistics"].push({win:0, lose:0}); dat["player_one"]["eightBall"] = new Array(); dat["player_one"]["eightBall"].push({win:0, lose:0}); } else { if (dat["player_one"]["statistics"] == null){ dat["player_one"]["statistics"] = new Array(); dat["player_one"]["statistics"].push({win:0, lose:0}); }; if (dat["player_one"]["eightBall"] == null){ dat["player_one"]["eightBall"] = new Array(); dat["player_one"]["eightBall"].push({win:0, lose:0}); }; }; if (dat["player_two"] == null){ dat["player_two"] = new Array(); dat["player_two"]["statistics"] = new Array(); dat["player_two"]["statistics"].push({win:0, lose:0}); dat["player_two"]["eightBall"] = new Array(); dat["player_two"]["eightBall"].push({win:0, lose:0}); } else { if (dat["player_two"]["statistics"] == null){ dat["player_two"]["statistics"] = new Array(); dat["player_two"]["statistics"].push({win:0, lose:0}); }; if (dat["player_two"]["eightBall"] == null){ dat["player_two"]["eightBall"] = new Array(); dat["player_two"]["eightBall"].push({win:0, lose:0}); }; }; } public function clearEightData():void{ dat["player_one"]["eightBall"] = null; dat["player_two"]["eightBall"] = null; flush(); } public function get playerTwoEightScore():Array{ return (dat["player_two"]["eightBall"]); } public function close():void{ so.close(); } } }//package utils
Section 166
//SoundsManager (utils.SoundsManager) package utils { import flash.events.*; import flash.media.*; import flash.utils.*; public class SoundsManager { private const VALUE_FADE:Number = 0.02; private var fadeInTimer:Timer; private var curMusic_sc:SoundChannel; private var curMusic_so:Sound; private var valueSound:Number; private var valueGroupSound:Number; private var fadeTimes:int; private var fadeInLabel:String; private var valueMusic:Number; private var fadeOutTimer:Timer; private var curMusic_st:String; private var enabled:Boolean; private var pauseMusic_st:String; private var soundArr:Array; private var musicEnabled:Boolean; private var currGroupSoundId:int; private var groupSoundArr:Array; private var curMusic_rp:int; private var pausePos:Number; private static var currentInstance:SoundsManager; public function SoundsManager(){ super(); init(); } private function initGroupSound():void{ var obj:Object = groupSoundArr[currGroupSoundId]; obj["soundChannel"] = obj["sound"].play(0, 0, new SoundTransform(valueGroupSound)); initGroupSoundChannelEvent(obj["soundChannel"]); } public function get ValueGroupSound():Number{ return (valueGroupSound); } public function set ValueSound(n:Number):void{ var i:int; var transform:SoundTransform; valueSound = n; if (soundArr != null){ i = 0; while (i < soundArr.length) { transform = soundArr[i]["soundChannel"].soundTransform; transform.volume = n; soundArr[i]["soundChannel"].soundTransform = transform; i++; }; }; } private function stopFadeIn():void{ var transform:SoundTransform; if (((curMusic_sc) && (curMusic_sc.soundTransform))){ transform = curMusic_sc.soundTransform; transform.volume = valueMusic; curMusic_sc.soundTransform = transform; delFadeInTimer(); }; } public function set ValueGroupSound(n:Number):void{ var transform:SoundTransform; valueGroupSound = n; if (groupSoundArr != null){ transform = groupSoundArr[currGroupSoundId]["soundChannel"].soundTransform; transform.volume = n; groupSoundArr[currGroupSoundId]["soundChannel"].soundTransform = transform; }; } private function remSoundArr(sc:SoundChannel):void{ var obj:Object; var i:int; while (i < soundArr.length) { obj = soundArr[i]; if (((obj["soundChannel"]) && ((obj["soundChannel"] == sc)))){ obj["soundChannel"].stop(); obj["label"] = null; obj["sound"] = null; obj["soundChannel"] = null; soundArr.splice(i, 1); }; i++; }; } public function stopAllSound():void{ var i:int; while (i < soundArr.length) { delSound(soundArr[i]["soundChannel"]); i++; }; } public function get FadeTimes():int{ return (fadeTimes); } public function fadeOutMusic():void{ if (curMusic_sc != null){ startFadeOut(); }; } public function set FadeTimes(v:int):void{ fadeTimes = v; } public function get curMusic_sound():Sound{ return (curMusic_so); } private function init():void{ FadeTimes = 300; Enabled = true; MusicEnable = true; ValueMusic = 1; ValueSound = 1; valueGroupSound = 1; soundArr = new Array(); groupSoundArr = new Array(); } private function addSoundArr(obj:Object):void{ soundArr.push(obj); } public function overOldSound(s:String, v:Number, loops:int=0):void{ var same:Boolean; var obj:Object; var i:int; if (enabled){ same = false; i = 0; while (i < soundArr.length) { obj = soundArr[i]; if (obj["label"] == s){ same = true; break; }; i++; }; if (same){ delSound(obj["soundChannel"]); }; playSound(s, v, loops); }; } public function delAllTimer():void{ if (fadeInTimer != null){ fadeInTimer.removeEventListener(TimerEvent.TIMER, fadeIn); fadeInTimer = null; }; if (fadeOutTimer != null){ fadeOutTimer.removeEventListener(TimerEvent.TIMER, fadeOut); fadeOutTimer = null; }; } private function startFadeIn(s:String, t:int):void{ initMusic(s, 0.3, t); initFadeInTimer(); } public function set ValueMusic(n:Number):void{ var transform:SoundTransform; valueMusic = n; if (curMusic_sc != null){ transform = curMusic_sc.soundTransform; transform.volume = n; curMusic_sc.soundTransform = transform; }; } public function stopSound(s:String):void{ var obj:Object; var i:int; while (i < soundArr.length) { obj = soundArr[i]; if (obj["label"] == s){ delSound(obj["soundChannel"]); break; }; i++; }; } public function get Enabled():Boolean{ return (enabled); } private function delGroupSoundChannelEvent(sc:SoundChannel):void{ sc.removeEventListener(Event.SOUND_COMPLETE, groupSoundCompleteHandler); } private function fadeOut(e:TimerEvent):void{ var transform:SoundTransform; if (curMusic_sc){ transform = curMusic_sc.soundTransform; transform.volume = (transform.volume - VALUE_FADE); curMusic_sc.soundTransform = transform; if (curMusic_sc.soundTransform.volume <= 0){ stopFadeOut(); }; }; } public function playSound(s:String, v:Number, loops:int=0):void{ if (enabled){ initSound(s, v, loops); }; } public function get ValueSound():Number{ return (valueSound); } public function get currentMusic_sc():String{ if (curMusic_sc == null){ return (null); }; return (curMusic_st); } private function delSound(sc:SoundChannel):void{ delSoundChannelEvent(sc); remSoundArr(sc); } private function fadeIn(e:TimerEvent):void{ var transform:SoundTransform; if (curMusic_sc){ transform = curMusic_sc.soundTransform; transform.volume = (transform.volume + VALUE_FADE); curMusic_sc.soundTransform = transform; if (curMusic_sc.soundTransform.volume >= valueMusic){ stopFadeIn(); }; }; } public function set Enabled(b:Boolean):void{ enabled = b; if (b){ } else { stopAllSound(); }; } public function overNewSound(s:String, v:Number, loops:int=0):void{ var same:Boolean; var obj:Object; var i:int; if (enabled){ same = false; i = 0; while (i < soundArr.length) { obj = soundArr[i]; if (obj["label"] == s){ same = true; break; }; i++; }; if (!same){ playSound(s, v, loops); }; }; } public function pauseMusic():void{ if (curMusic_sc != null){ pausePos = curMusic_sc.position; curMusic_sc.stop(); curMusic_sc = null; pauseMusic_st = curMusic_st; }; } public function set MusicEnable(b:Boolean):void{ musicEnabled = b; if (curMusic_st != null){ if (b){ restartMusic(); } else { pauseMusic(); }; }; } private function delGroupSound():void{ var obj:Object = groupSoundArr[currGroupSoundId]; obj["soundChannel"].stop(); obj["soundChannel"] = null; } public function restartMusic():void{ if (pauseMusic_st == curMusic_st){ curMusic_sc = curMusic_so.play(pausePos, int.MAX_VALUE, new SoundTransform(valueMusic)); if (curMusic_sc == null){ curMusic_sc = curMusic_so.play(1, int.MAX_VALUE, new SoundTransform(valueMusic)); }; pausePos = NaN; } else { initMusic(curMusic_st, ValueMusic); }; } private function stopFadeOut():void{ delFadeOutTimer(); delMusic(); if (fadeInLabel != null){ initMusic(fadeInLabel, 0, curMusic_rp); initFadeInTimer(); fadeInLabel = null; }; } public function playMusic(s:String, v:Number, t:int=2147483647):void{ curMusic_st = s; curMusic_rp = t; if (musicEnabled){ if (curMusic_sc != null){ stopMusic(); }; initMusic(s, v, t); }; } public function overNewMusic(s:String, v:Number):void{ if (((!((curMusic_st == s))) && (musicEnabled))){ playMusic(s, v); }; } private function delMusic():void{ curMusic_sc.stop(); curMusic_st = null; curMusic_so = null; curMusic_sc = null; } private function delFadeOutTimer():void{ fadeOutTimer.stop(); fadeOutTimer.removeEventListener(TimerEvent.TIMER, fadeOut); fadeOutTimer = null; } private function initSound(s:String, v:Number, loops:int):void{ var obj:Object = new Object(); obj["label"] = s; obj["sound"] = getSound(s); obj["soundChannel"] = obj["sound"].play(0, loops, new SoundTransform(v)); initSoundChannelEvent(obj["soundChannel"]); addSoundArr(obj); } private function getSound(s:String):Sound{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:Sound = new (temp); return (returnObj); } private function groupSoundCompleteHandler(e:Event):void{ delGroupSound(); currGroupSoundId++; if (currGroupSoundId == groupSoundArr.length){ currGroupSoundId = 0; }; initGroupSound(); } public function get ValueMusic():Number{ return (valueMusic); } public function fadeInMusic(s:String, t:int=2147483647):void{ curMusic_st = s; curMusic_rp = t; if (musicEnabled){ if (curMusic_sc != null){ fadeInLabel = s; startFadeOut(); } else { startFadeIn(s, t); }; }; } public function stopMusic():void{ if (curMusic_sc != null){ delMusic(); }; } public function setOneValueSound(s:String, n:Number):void{ var transform:SoundTransform; var i:int; while (i < soundArr.length) { if (s == soundArr[i]["label"]){ transform = soundArr[i]["soundChannel"].soundTransform; }; transform.volume = n; soundArr[i]["soundChannel"].soundTransform = transform; i++; }; } private function initFadeOutTimer():void{ if (fadeOutTimer){ return; }; if (fadeInTimer){ delFadeInTimer(); }; fadeOutTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE))); fadeOutTimer.addEventListener(TimerEvent.TIMER, fadeOut); fadeOutTimer.start(); } private function initFadeInTimer():void{ if (fadeInTimer){ return; }; if (fadeOutTimer){ delFadeOutTimer(); }; fadeInTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE))); fadeInTimer.addEventListener(TimerEvent.TIMER, fadeIn); fadeInTimer.start(); } private function initSoundChannelEvent(sc:SoundChannel):void{ if (sc){ sc.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); }; } public function get MusicEnable():Boolean{ return (musicEnabled); } public function stopGroupSound():void{ var obj:Object; if (groupSoundArr != null){ obj = groupSoundArr[currGroupSoundId]; if (obj != null){ delGroupSoundChannelEvent(obj["soundChannel"]); delGroupSound(); }; groupSoundArr = new Array(); currGroupSoundId = NaN; }; } private function delSoundChannelEvent(sc:SoundChannel):void{ if (sc){ sc.removeEventListener(Event.SOUND_COMPLETE, soundCompleteHandler); }; } private function initMusic(s:String, v:Number, t:int=2147483647):void{ curMusic_st = s; curMusic_so = getSound(s); curMusic_sc = curMusic_so.play(0, t, new SoundTransform(v)); } private function initGroupSoundChannelEvent(sc:SoundChannel):void{ sc.addEventListener(Event.SOUND_COMPLETE, groupSoundCompleteHandler); } private function delFadeInTimer():void{ fadeInTimer.stop(); fadeInTimer.removeEventListener(TimerEvent.TIMER, fadeIn); fadeInTimer = null; } private function soundCompleteHandler(e:Event):void{ delSound((e.target as SoundChannel)); } public function addAllTimer():void{ if (fadeInTimer == null){ fadeInTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE))); fadeInTimer.addEventListener(TimerEvent.TIMER, fadeIn); fadeInTimer.start(); }; if (fadeOutTimer == null){ fadeOutTimer = new Timer((fadeTimes / (valueMusic / VALUE_FADE))); fadeOutTimer.addEventListener(TimerEvent.TIMER, fadeOut); fadeOutTimer.start(); }; } private function startFadeOut():void{ initFadeOutTimer(); } public static function get instance():SoundsManager{ if (currentInstance == null){ currentInstance = new (SoundsManager); }; return (currentInstance); } } }//package utils
Section 167
//AbstractEffect (zlong.breathxue.utils.animationEffect.AbstractEffect) package zlong.breathxue.utils.animationEffect { import flash.display.*; import zlong.breathxue.utils.*; import flash.utils.*; public class AbstractEffect { protected var _mc:DisplayObject; protected var _id:uint; protected var _isMerge:Boolean; protected var _runframe:uint; protected var _stepframe:uint; protected var _frameTimerId:uint; protected var _running:Boolean; breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; public function AbstractEffect(){ super(); if (getQualifiedClassName(this) == "zlong::breathxue::utils::animationEffect::AbstractEffect"){ throw (new ArgumentError("can't be constructed")); }; } protected function initAbSet(id:uint, mc:DisplayObject, runframe:uint, isMerge:Boolean):void{ this._id = id; this._mc = mc; this._isMerge = isMerge; this._runframe = runframe; this._stepframe = 0; this._frameTimerId = 0; this._running = true; if (this._mc == null){ throw (new ArgumentError("mc can't = null")); }; } function checkFinish():Boolean{ return (true); } function step():void{ } function dispatchEvent():void{ } function pause():void{ this._running = false; if (this._frameTimerId != 0){ FrameTimer.pauseById(this._frameTimerId); }; } function reStart():void{ this._running = true; if (this._frameTimerId != 0){ FrameTimer.reStartById(this._frameTimerId); }; } function del():void{ } protected function delMeByFrameTimer():void{ this._frameTimerId = 0; var _local1 = getDefinitionByName(getQualifiedClassName(this)); _local1["del"](this._id); this.dispatchEvent(); } function get mc():DisplayObject{ return (this._mc); } function get isMerge():Boolean{ return (this._isMerge); } function get id():uint{ return (this._id); } } }//package zlong.breathxue.utils.animationEffect
Section 168
//EffectManager (zlong.breathxue.utils.animationEffect.EffectManager) package zlong.breathxue.utils.animationEffect { import flash.display.*; import flash.events.*; import zlong.breathxue.utils.animationEffect.*; import zlong.breathxue.utils.*; class EffectManager { public var IdCount:uint; private var _arr:Array; breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; function EffectManager():void{ super(); this.IdCount = 0; this._arr = new Array(); } public function push(effect:AbstractEffect):uint{ this._arr.push(effect); if (this._arr.length > 0){ GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, this.run); }; return (this.IdCount++); } function findAndDeleteSameMcEffect(mc:DisplayObject, isMerge:Boolean):AbstractEffect{ var tempEffect:AbstractEffect; var i:int = (this._arr.length - 1); while (i >= 0) { tempEffect = this._arr[i]; if (tempEffect.mc == mc){ if (((isMerge) && (tempEffect.isMerge))){ return (tempEffect); }; this._arr.splice(i, 1); }; i--; }; return (null); } private function run(event:Event):void{ var tempEffect:AbstractEffect; var tmc:AbstractEffect; var i:int; while (i < this._arr.length) { tempEffect = this._arr[i]; if (tempEffect.checkFinish()){ tmc = (this._arr[i] as AbstractEffect); this._arr.splice(i, 1); tmc.dispatchEvent(); i--; if (this._arr.length <= 0){ GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run); }; } else { tempEffect.step(); }; i++; }; } public function del(id:uint):void{ var i:int; while (i < this._arr.length) { if ((this._arr[i] as AbstractEffect).id == id){ (this._arr[i] as AbstractEffect).del(); this._arr.splice(i, 1); if (this._arr.length <= 0){ GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run); }; return; }; i++; }; } public function delByMc(mc:DisplayObject):void{ var temp:AbstractEffect; var i:int = (this._arr.length - 1); while (i >= 0) { temp = this._arr[i]; if (temp.mc == mc){ temp.del(); this._arr.splice(i, 1); }; i--; }; } public function delAll():void{ var i:int; while (i < this._arr.length) { (this._arr[i] as AbstractEffect).del(); i++; }; this._arr = new Array(); GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run); } public function pauseAll():void{ var i:int; while (i < this._arr.length) { (this._arr[i] as AbstractEffect).pause(); i++; }; GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, this.run); } public function reStartAll():void{ var i:int; while (i < this._arr.length) { (this._arr[i] as AbstractEffect).reStart(); i++; }; GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, this.run); } } }//package zlong.breathxue.utils.animationEffect
Section 169
//MoveEffect (zlong.breathxue.utils.animationEffect.MoveEffect) package zlong.breathxue.utils.animationEffect { import flash.display.*; import flash.events.*; import zlong.breathxue.utils.math.*; import zlong.breathxue.utils.*; public class MoveEffect extends AbstractEffect { private var _position:mVector; private var _EndPoint:mVector; private var _stepVector:mVector; breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; public static const Move_EFFECT_FINISH:String = "Move_EFFECT_FINISH"; private static var _effectManager:EffectManager = new EffectManager(); private function initSet(id:uint, mc:DisplayObject, StartPoint:mVector, EndPoint:mVector, stepDistance:Number, runframe:uint=0, stepVector:mVector=null, isMerge:Boolean=false, sameMcEffect:AbstractEffect=null):void{ super.initAbSet(id, mc, runframe, isMerge); this._EndPoint = EndPoint; this._stepVector = stepVector; if ((((stepDistance == 0)) && ((runframe == 0)))){ throw (new ArgumentError("one of stepDistance or runframe need be setting")); }; if (((!(this._EndPoint)) && (((!(stepVector)) || ((_runframe == 0)))))){ throw (new ArgumentError("if EndAlpha == NaN,then stepVector and runframe must be setting")); }; if (StartPoint == null){ StartPoint = new mVector(_mc.x, _mc.y); }; if (((isMerge) && (sameMcEffect))){ this._position = (sameMcEffect as MoveEffect)._position; } else { this._position = new mVector(); _mc.x = (this._position.x = StartPoint.x); _mc.y = (this._position.y = StartPoint.y); }; if (!this._EndPoint){ _frameTimerId = FrameTimer.push(new FrameTimer(_runframe), delMeByFrameTimer); } else { this._stepVector = this._EndPoint.minus(this._position); if (_runframe > 0){ this._stepVector.multEquals((1 / (_runframe - _stepframe))); } else { this._stepVector.length = Math.abs(stepDistance); }; }; } override function step():void{ var tempStepDistance:Number; if (!_running){ return; }; if (this._EndPoint){ if (_runframe > 0){ this._stepVector = this._EndPoint.minus(this._position); this._stepVector.multEquals((1 / (_runframe - _stepframe))); _stepframe++; } else { tempStepDistance = this._stepVector.length; this._stepVector = this._EndPoint.minus(this._position); this._stepVector.length = Math.abs(tempStepDistance); }; }; _mc.x = (this._position.x = (this._position.x + this._stepVector.x)); _mc.y = (this._position.y = (this._position.y + this._stepVector.y)); } override function checkFinish():Boolean{ if (((this._EndPoint) && ((((((_runframe > 0)) && ((_stepframe >= _runframe)))) || ((this._EndPoint.minus(this._position).length <= Math.abs(this._stepVector.length))))))){ _mc.x = (this._position.x = this._EndPoint.x); _mc.y = (this._position.y = this._EndPoint.y); return (true); }; return (false); } override function dispatchEvent():void{ _mc.dispatchEvent(new Event(Move_EFFECT_FINISH)); } override function del():void{ this._position = null; this._EndPoint = null; this._stepVector = null; if (_frameTimerId != 0){ FrameTimer.delById(_frameTimerId); }; } public static function push(mc:DisplayObject, StartPoint:mVector, EndPoint:mVector, stepDistance:Number, runframe:uint=0, stepVector:mVector=null, isMerge:Boolean=false):uint{ var sameMcEffect:AbstractEffect = _effectManager.findAndDeleteSameMcEffect(mc, isMerge); var tempMoveEffect:MoveEffect = new (MoveEffect); tempMoveEffect.initSet(_effectManager.IdCount, mc, StartPoint, EndPoint, stepDistance, runframe, stepVector, isMerge, sameMcEffect); return (_effectManager.push(tempMoveEffect)); } public static function del(id:uint):void{ _effectManager.del(id); } public static function delByMc(mc:DisplayObject):void{ _effectManager.delByMc(mc); } public static function delAll():void{ _effectManager.delAll(); } public static function pauseAll():void{ _effectManager.pauseAll(); } public static function reStartAll():void{ _effectManager.reStartAll(); } } }//package zlong.breathxue.utils.animationEffect
Section 170
//GC (zlong.breathxue.utils.debug.GC) package zlong.breathxue.utils.debug { import flash.net.*; public class GC { breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; public static function clear():void{ new LocalConnection().connect("haha"); new LocalConnection().connect("haha"); //unresolved jump var _slot1 = error; } } }//package zlong.breathxue.utils.debug
Section 171
//TC (zlong.breathxue.utils.debug.TC) package zlong.breathxue.utils.debug { import flash.display.*; import flash.events.*; import zlong.breathxue.utils.math.*; import zlong.breathxue.utils.animationEffect.*; import zlong.breathxue.utils.*; import flash.text.*; public class TC { breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; static const TITLE_HEIGHT:int = 20; private static var _tabArr:Array; private static var _tabArrNum:Array; static var _width:int; static var _height:int; private static var _MC:Sprite; private static var _showMc:Sprite; private static var _smallMc:Sprite; private static var _smallMcPos:mVector; private static var _nowEffect:Boolean; public static function InitTC(mc:Sprite, width:int=0, height:int=0, startOpen:Boolean=true):void{ if (mc.stage == null){ return; }; TcShow = true; _smallMcPos = new mVector(0, -20); if (width == 0){ width = ((mc.stage.stageWidth / 3) * 2); }; if (height == 0){ height = ((mc.stage.stageHeight / 3) * 2); }; _width = width; _height = height; _MC = new Sprite(); mc.addChild(_MC); _MC.alpha = 0.5; _tabArr = new Array(); _tabArrNum = new Array(); createShow(); createSmall(width); if (!startOpen){ openAndClose(); }; _MC.addEventListener(Event.ENTER_FRAME, run); } private static function run(event:Event):void{ if (_MC.parent.getChildIndex(_MC) != (_MC.parent.numChildren - 1)){ _MC.parent.addChild(_MC); }; } private static function createShow():void{ _showMc = new Sprite(); _MC.addChild(_showMc); _showMc.addChild(maketitle(_width)); var temp:TC_Tab = new TC_Tab(_showMc, "*", 0, 2); _tabArr["*"] = temp; _tabArrNum.push("*"); temp = new TC_Tab(_showMc, "&NT&", 1, 2); temp.visible = true; _tabArr["&NT&"] = temp; _tabArrNum.push("&NT&"); _MC.stage.addEventListener(KeyboardEvent.KEY_DOWN, openAndClose); } private static function maketitle(w:int):DisplayObject{ var handMc:Sprite = new Sprite(); handMc.graphics.beginFill(11187199); handMc.graphics.drawRect(0, 0, w, TITLE_HEIGHT); handMc.graphics.endFill(); handMc.doubleClickEnabled = true; var titleText:TextField = new TextField(); titleText.text = "Debug Text ('ctrl + d' open and close it)"; titleText.width = w; titleText.height = TITLE_HEIGHT; titleText.mouseEnabled = false; titleText.selectable = false; handMc.addChild(titleText); var closeButton:Sprite = new Sprite(); closeButton.graphics.beginFill(0, 0); closeButton.graphics.drawRect(0, 0, 18, 18); closeButton.graphics.endFill(); closeButton.graphics.lineStyle(2, 4084223); closeButton.graphics.moveTo(6, 6); closeButton.graphics.lineTo(12, 12); closeButton.graphics.moveTo(12, 6); closeButton.graphics.lineTo(6, 12); closeButton.x = (w - 19); closeButton.y = 1; handMc.addChild(closeButton); closeButton.addEventListener(MouseEvent.CLICK, openAndClose); handMc.addEventListener(MouseEvent.DOUBLE_CLICK, openAndClose); handMc.addEventListener(MouseEvent.MOUSE_DOWN, startMove); handMc.addEventListener(MouseEvent.MOUSE_UP, endMove); return (handMc); } private static function createSmall(w:int):void{ _smallMc = new Sprite(); _smallMc.x = _smallMcPos.x; _smallMc.y = _smallMcPos.y; var handMc:Sprite = new Sprite(); handMc.y = 0; handMc.graphics.beginFill(11187199); handMc.graphics.drawRect(0, 0, (w / 2), TITLE_HEIGHT); handMc.graphics.endFill(); handMc.doubleClickEnabled = true; var titleText:TextField = new TextField(); titleText.text = "Debug Text"; titleText.width = (w / 2); titleText.height = TITLE_HEIGHT; titleText.mouseEnabled = false; titleText.selectable = false; handMc.addChild(titleText); _smallMc.addChild(handMc); handMc.addEventListener(MouseEvent.DOUBLE_CLICK, openAndClose); } private static function openAndClose(event:Event=null):void{ var e:KeyboardEvent = (event as KeyboardEvent); if (((!(_nowEffect)) && (((((!(e)) || (((e.ctrlKey) && ((e.keyCode == 68)))))) || (((e.shiftKey) && ((e.keyCode == 68)))))))){ if (_showMc.parent == null){ MoveEffect.push(_smallMc, _smallMcPos, new mVector(_showMc.x, _showMc.y), 0, 5); _smallMc.addEventListener(MoveEffect.Move_EFFECT_FINISH, EffectFinish); _nowEffect = true; } else { _showMc.visible = false; _MC.addChild(_smallMc); MoveEffect.push(_smallMc, new mVector(_showMc.x, _showMc.y), _smallMcPos, 0, 5); _smallMc.addEventListener(MoveEffect.Move_EFFECT_FINISH, EffectFinish); _nowEffect = true; }; }; } private static function EffectFinish(event:Event):void{ _smallMc.removeEventListener(MoveEffect.Move_EFFECT_FINISH, EffectFinish); _nowEffect = false; if (_showMc.parent == null){ _showMc.visible = true; _MC.addChild(_showMc); _MC.removeChild(_smallMc); } else { _MC.removeChild(_showMc); }; } private static function endMove(event:MouseEvent):void{ _showMc.stopDrag(); } private static function startMove(event:MouseEvent):void{ _showMc.startDrag(); } public static function SHOW(type:String, arg:Array):void{ var i:int; if (_MC){ if (type != ""){ if (!(_tabArr[type] is TC_Tab)){ _tabArr[type] = new TC_Tab(_showMc, type, _tabArrNum.length, (_tabArrNum.length + 1)); _tabArrNum.push(type); i = 0; while (i < _tabArrNum.length) { (_tabArr[_tabArrNum[i]] as TC_Tab).updateTabTitle(i, _tabArrNum.length); i++; }; }; (_tabArr[type] as TC_Tab).show((((Tools.getNowTimeAndMileSecond_1() + ": ") + arg.join(" ")) + "\n")); } else { (_tabArr["&NT&"] as TC_Tab).show((((Tools.getNowTimeAndMileSecond_1() + ": ") + arg.join(" ")) + "\n")); }; (_tabArr["*"] as TC_Tab).show((((Tools.getNowTimeAndMileSecond_1() + ": ") + arg.join(" ")) + "\n")); _MC.parent.setChildIndex(_MC, (_MC.parent.numChildren - 1)); }; } public static function onTabTitle(name:String):void{ var i:String; for (i in _tabArr) { if ((_tabArr[i] is TC_Tab)){ (_tabArr[i] as TC_Tab).visible = false; }; }; (_tabArr[name] as TC_Tab).visible = true; } } }//package zlong.breathxue.utils.debug
Section 172
//TC_Tab (zlong.breathxue.utils.debug.TC_Tab) package zlong.breathxue.utils.debug { import flash.display.*; import flash.events.*; import flash.text.*; public class TC_Tab { private var _pmc:DisplayObjectContainer; private var _name:String; private var _tabTitle:Sprite; private var _Text:TextField; private var _tabBaby:Sprite; private static const colorArr:Array = [14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988, 14541311, 10079385, 16777164, 13434828, 16724889, 6710988]; static var TabTitleHeight:Number = 20; static var maxWidth:Number = 80; public function TC_Tab(pmc:DisplayObjectContainer, name:String, id:uint, totalNum:uint){ super(); this._pmc = pmc; this._name = name; this.createTabTitle(id, totalNum); this.createTabBady(id); } private function createTabTitle(id:uint, totalNum:uint):void{ this._tabTitle = new Sprite(); this._pmc.addChild(this._tabTitle); this._tabTitle.y = TC.TITLE_HEIGHT; this._tabTitle.addEventListener(MouseEvent.CLICK, this.onTabTitle); this.updateTabTitle(id, totalNum); var tabtitle:TextField = new TextField(); this._tabTitle.addChild(tabtitle); tabtitle.text = this._name; tabtitle.mouseEnabled = false; tabtitle.selectable = false; } private function onTabTitle(event:MouseEvent):void{ TC.onTabTitle(this._name); } function updateTabTitle(id:uint, totalNum:uint):void{ var tabWidth:Number = (((TC._width / totalNum) > maxWidth)) ? maxWidth : (TC._width / totalNum); this._tabTitle.graphics.clear(); this._tabTitle.graphics.beginFill(colorArr[id]); this._tabTitle.graphics.drawRect(0, 0, tabWidth, TabTitleHeight); this._tabTitle.graphics.endFill(); this._tabTitle.x = (tabWidth * id); } private function createTabBady(id:uint):void{ this._tabBaby = new Sprite(); this._pmc.addChild(this._tabBaby); this._tabBaby.visible = false; this._tabBaby.y = (TC.TITLE_HEIGHT + TabTitleHeight); this._tabBaby.graphics.beginFill(colorArr[id]); this._tabBaby.graphics.drawRect(0, 0, TC._width, ((TC._height - TC.TITLE_HEIGHT) - TabTitleHeight)); this._tabBaby.graphics.endFill(); this._Text = new TextField(); this._Text.width = TC._width; this._Text.height = ((TC._height - TC.TITLE_HEIGHT) - TabTitleHeight); this._tabBaby.addChild(this._Text); this._Text.multiline = true; this._Text.mouseWheelEnabled = true; this._Text.wordWrap = true; } public function show(string:String):void{ var t:int = this._Text.scrollV; this._Text.appendText(string); if (this._Text.length != this._Text.selectionEndIndex){ this._Text.scrollV = t; } else { this._Text.scrollV = this._Text.numLines; }; } public function set visible(v:Boolean):void{ this._tabBaby.visible = v; } public function get name():String{ return (this._name); } public function set name(value:String):void{ this._name = value; } } }//package zlong.breathxue.utils.debug
Section 173
//TcShow (zlong.breathxue.utils.debug.TcShow) package zlong.breathxue.utils.debug { public var TcShow:Boolean = false; }//package zlong.breathxue.utils.debug
Section 174
//mVector (zlong.breathxue.utils.math.mVector) package zlong.breathxue.utils.math { public class mVector { private var m_x:Number; private var m_y:Number; public function mVector(px:Number=0, py:Number=0){ super(); m_x = px; m_y = py; } public function cross(v:mVector):Number{ return (((m_x * v.m_y) - (m_y * v.m_x))); } public function negate():mVector{ return (new mVector(-(m_x), -(m_y))); } public function times(v:mVector):mVector{ return (new mVector((m_x * v.m_x), (m_y * v.m_y))); } public function get x():Number{ return (m_x); } public function divEquals(s:Number):mVector{ if (s == 0){ s = 0.0001; }; m_x = (m_x / s); m_y = (m_y / s); return (this); } public function dot(v:mVector):Number{ return (((m_x * v.m_x) + (m_y * v.m_y))); } public function normalize():mVector{ var m:Number = this.length; if (m == 0){ m = 0.0001; }; return (mult((1 / m))); } public function minusEquals(v:mVector):mVector{ m_x = (m_x - v.m_x); m_y = (m_y - v.m_y); return (this); } public function div(s:Number):mVector{ if (s == 0){ s = 0.0001; }; return (new mVector((m_x / s), (m_y / s))); } public function set x(x:Number):void{ m_x = x; } public function isNormalTo(v:mVector):Boolean{ return ((this.dot(v) == 0)); } public function multEquals(s:Number):mVector{ m_x = (m_x * s); m_y = (m_y * s); return (this); } public function rotateAngleEquals(ang:Number):mVector{ return (this.copyFrom(rotateAngle(ang))); } public function plus(v:mVector):mVector{ return (new mVector((m_x + v.m_x), (m_y + v.m_y))); } public function set length(len:Number):void{ var r:Number = length; if (r){ this.multEquals((len / r)); } else { this.m_x = len; }; } public function rotateRadian(radian:Number):mVector{ var cos:Number = Math.cos(radian); var sin:Number = Math.sin(radian); var result:mVector = new mVector(((m_x * cos) - (m_y * sin)), ((m_y * cos) + (m_x * sin))); return (result); } public function clone():mVector{ return (new mVector(this.m_x, this.m_y)); } public function negateEquals():void{ m_x = -(m_x); m_y = -(m_y); } public function get angle():Number{ return (TF_Class.atan2D(m_y, m_x)); } public function getNormal():mVector{ return (new mVector(-(m_y), m_x)); } public function compare(v:mVector):Boolean{ if ((((this.m_x == v.m_x)) && ((this.m_y == v.m_y)))){ return (true); }; return (false); } public function toString():String{ var rx:Number = (Math.round((this.m_x * 1000)) / 1000); var ry:Number = (Math.round((this.m_y * 1000)) / 1000); return ((((("[" + rx) + ", ") + ry) + "]")); } public function get length():Number{ return (Math.sqrt(((m_x * m_x) + (m_y * m_y)))); } public function radianBetween(v:mVector):Number{ var cos:Number = (this.dot(v) / (this.length * v.length)); return (Math.acos(cos)); } public function minus(v:mVector):mVector{ return (new mVector((m_x - v.m_x), (m_y - v.m_y))); } public function set y(y:Number):void{ m_y = y; } public function distance(v:mVector):Number{ var delta:mVector = this.minus(v); return (delta.length); } public function get y():Number{ return (m_y); } public function mult(s:Number):mVector{ return (new mVector((m_x * s), (m_y * s))); } public function rotateAngle(ang:Number):mVector{ var cos:Number = TF_Class.cosD(ang); var sin:Number = TF_Class.sinD(ang); var result:mVector = new mVector(((m_x * cos) - (m_y * sin)), ((m_y * cos) + (m_x * sin))); return (result); } public function plusEquals(v:mVector):mVector{ m_x = (m_x + v.m_x); m_y = (m_y + v.m_y); return (this); } public function rotateRadianEquals(radian:Number):mVector{ return (this.copyFrom(rotateRadian(radian))); } public function angleBetween(v:mVector):Number{ var dp:Number = this.dot(v); var cosAngle:Number = (dp / (this.length * v.length)); return (TF_Class.acosD(cosAngle)); } public function setTo(px:Number, py:Number):void{ m_x = px; m_y = py; } public function set angle(ang:Number):void{ var r:Number = length; m_x = (r * TF_Class.cosD(ang)); m_y = (r * TF_Class.sinD(ang)); } public function copyFrom(v:mVector):mVector{ m_x = v.m_x; m_y = v.m_y; return (this); } } }//package zlong.breathxue.utils.math
Section 175
//TF_Class (zlong.breathxue.utils.math.TF_Class) package zlong.breathxue.utils.math { public class TF_Class { public function TF_Class(){ super(); } public static function tanD(angle:Number):Number{ return (Math.tan((angle * (Math.PI / 180)))); } public static function atanD(ratio:Number):Number{ return ((Math.atan(ratio) * (180 / Math.PI))); } public static function acosD(ratio:Number):Number{ return ((Math.acos(ratio) * (180 / Math.PI))); } public static function sinD(angle:Number):Number{ return (Math.sin((angle * (Math.PI / 180)))); } public static function asinD(ratio:Number):Number{ return ((Math.asin(ratio) * (180 / Math.PI))); } public static function degreesToRadians(angle:Number):Number{ return ((angle * (Math.PI / 180))); } public static function atan2D(y:Number, x:Number):Number{ return ((Math.atan2(y, x) * (180 / Math.PI))); } public static function FormatAngle90(r:Number):Number{ r = (r % 180); if (r > 90){ r = (180 - r); }; if (r < -90){ r = (r + 180); }; return (r); } public static function distance(x1:Number, y1:Number, x2:Number, y2:Number):Number{ var dx:Number = (x2 - x1); var dy:Number = (y2 - y1); return (Math.sqrt(((dx * dx) + (dy * dy)))); } public static function fixAngle(angle:Number):Number{ angle = (angle % 360); return (((angle)<0) ? (angle + 360) : angle); } public static function radiansToDegrees(angle:Number):Number{ return ((angle * (180 / Math.PI))); } public static function cartesianToPolar(p:mVector):Object{ var radius:Number = Math.sqrt(((p.x * p.x) + (p.y * p.y))); var theta:Number = atan2D(p.y, p.x); return ({r:radius, t:theta}); } public static function FormatAngle(r:Number):Number{ r = (r % 360); if (r > 180){ r = (r - 360); }; if (r < -180){ r = (r + 360); }; return (r); } public static function cosD(angle:Number):Number{ return (Math.cos((angle * (Math.PI / 180)))); } public static function angleOfLine(x1:Number, y1:Number, x2:Number, y2:Number):Number{ return (atan2D((y2 - y1), (x2 - x1))); } } }//package zlong.breathxue.utils.math
Section 176
//Attach (zlong.breathxue.utils.Attach) package zlong.breathxue.utils { import flash.display.*; import flash.media.*; import flash.utils.*; public class Attach { breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; private static var bitMapDataArray:Array; public static function getDisplayObject(s:String):DisplayObject{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:DisplayObject = new (temp); return (returnObj); } public static function getSprite(s:String):Sprite{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:Sprite = new (temp); return (returnObj); } public static function getMovieClip(s:String):MovieClip{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:MovieClip = new (temp); return (returnObj); } public static function getBitmapData(s:String, repeatedUse_NoChange:Boolean=false):BitmapData{ var i:int; if (repeatedUse_NoChange){ if (!bitMapDataArray){ bitMapDataArray = new Array(); }; i = 0; while (i < bitMapDataArray.length) { if (bitMapDataArray[i][0] == s){ return (bitMapDataArray[i][1]); }; i++; }; }; var temp:Class = (getDefinitionByName(s) as Class); var returnObj:BitmapData = new temp(null, null); if (repeatedUse_NoChange){ bitMapDataArray.push([s, returnObj]); }; return (returnObj); } public static function clearBitmapDataCache():void{ var i:int; while (i < bitMapDataArray.length) { (bitMapDataArray[i][1] as BitmapData).dispose(); i++; }; bitMapDataArray = new Array(); } public static function getSound(s:String):Sound{ var temp:Class = (getDefinitionByName(s) as Class); var returnObj:Sound = new (temp); return (returnObj); } } }//package zlong.breathxue.utils
Section 177
//breathxue_utils_internal (zlong.breathxue.utils.breathxue_utils_internal) package zlong.breathxue.utils { public namespace breathxue_utils_internal = "http://www.zlonggames.com/flash/breathxue/utils/internal"; }//package zlong.breathxue.utils
Section 178
//FrameTimer (zlong.breathxue.utils.FrameTimer) package zlong.breathxue.utils { import flash.display.*; import flash.events.*; public class FrameTimer implements IEventDispatcher { private var _ED:EventDispatcher; private var _running:Boolean; private var _runframe:uint; private var _cycleNum:uint; private var _step:uint; private var _id:uint; private var _returnFunctionAlarm:Function; private var _returnFunctionFinish:Function; breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; public static const FRAMETIMER_ALARM:String = "FRAMETIMER_ALARM"; public static const FRAMETIMER_FINISH:String = "FRAMETIMER_FINISH"; private static var IdCount:uint = 1; private static var _arr:Array = new Array(); public function FrameTimer(runframe:uint, cycleNum:uint=0, Millisecond:uint=0, mc:DisplayObject=null){ super(); this._running = true; this._step = 0; this._runframe = runframe; this._cycleNum = cycleNum; this._ED = new EventDispatcher(this); if ((((Millisecond > 0)) && (mc))){ if (!mc.stage){ throw (new ArgumentError("mc didn`t connect stage")); }; this._runframe = uint(((Millisecond / 1000) * mc.stage.frameRate)); }; this._id = FrameTimer.add(this); } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ this._ED.addEventListener(type, listener, useCapture, priority, useWeakReference); } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ this._ED.removeEventListener(type, listener, useCapture); } public function dispatchEvent(event:Event):Boolean{ return (this._ED.dispatchEvent(event)); } public function hasEventListener(type:String):Boolean{ return (this._ED.hasEventListener(type)); } public function willTrigger(type:String):Boolean{ return (this._ED.willTrigger(type)); } public function pause():void{ this._running = false; } public function reStart():void{ this._running = true; } public function del():void{ FrameTimer.delById(this._id); } public function get id():uint{ return (this._id); } public static function push(fTimer:FrameTimer, returnFunctionAlarm:Function=null, returnFunctionFinish:Function=null):uint{ fTimer._returnFunctionAlarm = returnFunctionAlarm; fTimer._returnFunctionFinish = returnFunctionFinish; return (fTimer._id); } private static function add(fTimer:FrameTimer, returnFunctionAlarm:Function=null, returnFunctionFinish:Function=null):uint{ _arr.push(fTimer); if (_arr.length > 0){ GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, run); }; return (IdCount++); } private static function run(event:Event):void{ var tempFrameTimer:FrameTimer; var i:int; while (i < _arr.length) { tempFrameTimer = _arr[i]; if (!tempFrameTimer._running){ } else { if (tempFrameTimer._step >= tempFrameTimer._runframe){ tempFrameTimer._ED.dispatchEvent(new Event(FRAMETIMER_ALARM)); if (tempFrameTimer._returnFunctionAlarm != null){ tempFrameTimer._returnFunctionAlarm(); }; tempFrameTimer._step = 0; tempFrameTimer._step++; if (tempFrameTimer._cycleNum <= 0){ tempFrameTimer._ED.dispatchEvent(new Event(FRAMETIMER_FINISH)); if (tempFrameTimer._returnFunctionFinish != null){ tempFrameTimer._returnFunctionFinish(); }; _arr.splice(i, 1); i--; if (_arr.length <= 0){ GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run); }; } else { tempFrameTimer._cycleNum--; }; } else { tempFrameTimer._step++; }; }; i++; }; } public static function pauseById(id:uint):void{ var i:int; while (i < _arr.length) { if ((_arr[i] as FrameTimer)._id == id){ (_arr[i] as FrameTimer).pause(); }; i++; }; } public static function reStartById(id:uint):void{ var i:int; while (i < _arr.length) { if ((_arr[i] as FrameTimer)._id == id){ (_arr[i] as FrameTimer).reStart(); }; i++; }; } public static function delById(id:uint):void{ var i:int; while (i < _arr.length) { if ((_arr[i] as FrameTimer)._id == id){ _arr.splice(i, 1); if (_arr.length <= 0){ GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run); }; return; }; i++; }; } public static function delAll():void{ _arr = new Array(); GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run); } public static function pauseAll():void{ GoddenEnterFrame.instance.removeEventListener(Event.ENTER_FRAME, run); } public static function reStartAll():void{ GoddenEnterFrame.instance.addEventListener(Event.ENTER_FRAME, run); } } }//package zlong.breathxue.utils
Section 179
//GoddenEnterFrame (zlong.breathxue.utils.GoddenEnterFrame) package zlong.breathxue.utils { import flash.display.*; import flash.events.*; public class GoddenEnterFrame extends EventDispatcher { private var _listenerMc:DisplayObject; private var _controlFunction:Function; private static var _instance:GoddenEnterFrame; public function GoddenEnterFrame(target:IEventDispatcher=null){ super(target); this._controlFunction = this.undefinedControlFunction; this._listenerMc = new Bitmap(); } private function run(event:Event):void{ this._controlFunction(event); } private function undefinedControlFunction(event:Event):void{ dispatchEvent(event); } public function set controlFunction(f:Function):void{ this._controlFunction = f; } override public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ super.addEventListener(type, listener, useCapture, priority, useWeakReference); this._listenerMc.addEventListener(Event.ENTER_FRAME, this.run); } override public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ super.removeEventListener(type, listener, useCapture); if (!this.hasEventListener(Event.ENTER_FRAME)){ this._listenerMc.removeEventListener(Event.ENTER_FRAME, this.run); }; } public static function get instance():GoddenEnterFrame{ if (!_instance){ _instance = new (GoddenEnterFrame); }; return (_instance); } } }//package zlong.breathxue.utils
Section 180
//Tools (zlong.breathxue.utils.Tools) package zlong.breathxue.utils { import flash.display.*; import flash.geom.*; public class Tools { breathxue_utils_internal static const VERSION:String = "v1.15.201008201148"; public static function getNowTimeAndMileSecond_1():String{ var time:Date = new Date(); var h:int = time.getHours(); var m:int = time.getMinutes(); var s:int = time.getSeconds(); var ms:int = time.getMilliseconds(); return (((((((((h < 10)) ? ("0" + h) : h + ":") + ((m < 10)) ? ("0" + m) : m) + ":") + ((s < 10)) ? ("0" + s) : s) + ":") + ((ms < 10)) ? ("00" + ms) : ((ms < 100)) ? ("0" + ms) : ms)); } public static function cutBmp(_mc:DisplayObject, _bmpDataWidth:int, _bmpDataHeight:int, _cutStartX:int, _cutStartY:int, _cutBmpWidth:int, _cutBmpHeight:int):BitmapData{ var bitmapData:BitmapData; var rectangle:Rectangle; var matrix:Matrix = new Matrix(); matrix.tx = -(_cutStartX); matrix.ty = -(_cutStartY); rectangle = new Rectangle(0, 0, _cutBmpWidth, _cutBmpHeight); bitmapData = new BitmapData(_bmpDataWidth, _bmpDataHeight, true, 0); bitmapData.draw(_mc, matrix, null, null, rectangle, true); return (bitmapData); } } }//package zlong.breathxue.utils
Section 181
//Countries (zlong.country.Countries) package zlong.country { import zlong.country.*; import zlong.*; class Countries { private var _countries:Object; private var _portal:String; private var _portalGroup:Array; private var _country:String; private var _countryGroup:Array; localComponent_internal static const VERSION:String = "v1.08.201012121509"; function Countries(){ super(); this.initPortalGroup(); } function set portal(gameType:String):void{ if (!this.inArray(gameType, this._portalGroup)){ throw (new ArgumentError(("Please set portal with value : " + this._portalGroup.toString()))); }; this._portal = gameType; this.initCountries(); if (((!((this._country == null))) && (!(this.inArray(this._country, this._countryGroup))))){ throw (new ArgumentError(("Please reset country with value : " + this._countryGroup.toString()))); }; } function get portal():String{ return (this._portal); } function set country(name:String):void{ if (((!((this._countryGroup == null))) && (!(this.inArray(name, this._countryGroup))))){ this._country = this._countryGroup[0]; Trace("||ZFW||", ("Error in the country value,set country with default value : " + this._countryGroup[0])); Trace("||ZFW||", ("Please set country with value : " + this._countryGroup.toString())); } else { this._country = name; }; } function get current():CountryItem{ if (this._portal == null){ throw (new ArgumentError("Please set portal")); }; if (this._country == null){ throw (new ArgumentError("Please set country")); }; return (this._countries[this._country]); } function get countryGroup():Array{ if (this._countryGroup == null){ throw (new ArgumentError("Please set portal")); }; return (this._countryGroup); } private function initCountries():void{ var countryItem:CountryItem; var name:String; var domain:String; var game:String; var language:int; this._countries = new Object(); this._countryGroup = new Array(); var i:int; while (i < CountriesData.DATA[this._portal]["country"].length()) { name = CountriesData.DATA[this._portal]["country"][i].@name; domain = CountriesData.DATA[this._portal]["country"][i].@domain; game = CountriesData.DATA[this._portal]["country"][i].@game; language = int(CountriesData.DATA[this._portal]["country"][i].@language); countryItem = new CountryItem(); countryItem.name = name; countryItem.domain = domain; countryItem.game = game; countryItem.language = language; this._countries[countryItem.name] = countryItem; this._countryGroup.push(name); i++; }; } private function initPortalGroup():void{ this._portalGroup = new Array(); var i:int; while (i < CountriesData.DATA.children().length()) { this._portalGroup.push(CountriesData.DATA.children()[i].name()); i++; }; } private function inArray(str:String, arr:Array):Boolean{ var i:int; while (i < arr.length) { if (str == arr[i]){ return (true); }; i++; }; return (false); } } }//package zlong.country
Section 182
//CountriesData (zlong.country.CountriesData) package zlong.country { import zlong.*; class CountriesData { localComponent_internal static const VERSION:String = "v1.08.201012121509"; static const DATA:XML = <data> <family> <!-- new --> <country name="arg" domain="www.juegos.com.ar" game="game" language="18"/><!-- Argentina --> <country name="mx" domain="www.juegos.mx" game="game" language="19"/><!-- Mexico --> <country name="ar" domain="www.dailygame.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14--> <country name="br" domain="www.ojogos.com.br" game="jogo" language="7"/><!-- Brazillian --> <country name="cn" domain="www.game.com.cn" game="moregames" language="17"/><!-- Chinese --> <country name="de" domain="www.jetztspielen.de" game="spiel" language="5"/><!-- German --> <country name="es" domain="www.juegos.com" game="juego" language="6"/><!-- Spanish --> <country name="fr" domain="www.jeux.fr" game="jeu" language="4"/><!-- French --> <country name="id" domain="www.games.co.id" game="permainanme" language="14"/><!-- Indonesian --> <country name="in" domain="www.game.co.in" game="game" language="2"/><!-- English UK --> <country name="it" domain="www.gioco.it" game="gioco" language="9"/><!-- Italian --> <country name="jp" domain="www.egames.jp" game="game" language="16"/><!-- Japanese --> <country name="nl" domain="www.spelletjes.nl" game="spel" language="3"/><!-- Dutch --> <country name="pl" domain="www.gry.pl" game="gra" language="11"/><!-- Polish --> <country name="pt" domain="www.ojogos.pt" game="jogo" language="8"/><!-- Portuguese --> <country name="ru" domain="www.ourgames.ru" game="igra" language="12"/><!-- Russian --> <country name="se" domain="www.spela.se" game="spel_" language="10"/><!-- Swedish --> <country name="en_uk" domain="www.games.co.uk" game="game" language="2"/><!-- English UK --> <country name="en_us" domain="www.gamesgames.com" game="game" language="1"/><!-- English US --> <!-- removed --> <!-- country name="ph" domain="www.laro.com.ph" game="game" language="2"/ --><!-- English UK --> <!-- country name="tr" domain="www.asoyun.com" game="oyun" language="13"/ --><!-- Turkish --> <!-- country name="my" domain="www.game.com.my" game="permainan_" language="15"/ --><!-- Malaysian --> </family> <tween> <!-- new --> <country name="arg" domain="www.juegos.com.ar" game="game" language="18"/><!-- Argentina --> <country name="mx" domain="www.juegos.mx" game="game" language="19"/><!-- Mexico --> <country name="ar" domain="www.dailygame.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14 --> <country name="br" domain="www.clickjogos.com" game="jogo" language="7"/><!-- Brazillian --> <country name="cn" domain="www.game.com.cn" game="moregames" language="17"/><!-- Chinese --> <country name="de" domain="www.spielen.com" game="spiel" language="5"/><!-- German --> <country name="es" domain="www.zapjuegos.com" game="juego" language="6"/><!-- Spanish --> <country name="fr" domain="www.jeu.fr" game="jeu" language="4"/><!-- French --> <country name="id" domain="www.games.co.id" game="permainanme" language="14"/><!-- Indonesian --> <country name="in" domain="www.game.co.in" game="game" language="2"/><!-- English UK --> <country name="it" domain="www.gioco.it" game="gioco" language="9"/><!-- Italian 2009.08.10 --> <country name="jp" domain="www.egames.jp" game="game" language="16"/><!-- Japanese --> <country name="nl" domain="www.spel.nl" game="spel" language="3"/><!-- Dutch --> <country name="pl" domain="www.gry.pl" game="gra" language="11"/><!-- Polish 2009.08.10--> <country name="pt" domain="www.ojogos.pt" game="jogo" language="8"/><!-- Portuguese --> <country name="ru" domain="www.flashgames.ru" game="igra" language="12"/><!-- Russian --> <country name="se" domain="www.spel.se" game="spel_" language="10"/><!-- Swedish --> <country name="en_uk" domain="www.agame.com" game="game" language="2"/><!-- English UK 2009.08.28--> <country name="en_us" domain="www.agame.com" game="game" language="1"/><!-- English US --> <!-- removed --> <!-- country name="ph" domain="www.laro.com.ph" game="game" language="2"/ --><!-- English UK --> <!-- country name="tr" domain="www.asoyun.com" game="oyun" language="13"/ --><!-- Turkish --> <!-- country name="my" domain="www.game.com.my" game="permainan_" language="15"/ --><!-- Malaysian --> </tween> <girl> <!-- new --> <country name="arg" domain="www.juegosdechicas.com.ar" game="game" language="18"/><!-- Argentina --> <country name="mx" domain="www.juegosdechicas.mx" game="game" language="19"/><!-- Mexico --> <country name="ar" domain="www.dailygame.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14--> <country name="br" domain="www.girlsgogames.com.br" game="jogo" language="7"/><!-- Brazillian --> <country name="cn" domain="www.game.com.cn" game="moregames" language="17"/><!-- Chinese --> <country name="de" domain="www.girlsgogames.de" game="spiel" language="5"/><!-- German --> <country name="es" domain="www.girlsgogames.es" game="juego" language="6"/><!-- Spanish --> <country name="fr" domain="www.girlsgogames.fr" game="jeu" language="4"/><!-- French --> <country name="id" domain="www.games.co.id" game="permainanme" language="14"/><!-- Indonesian --> <country name="in" domain="www.game.co.in" game="game" language="2"/><!-- English UK --> <country name="it" domain="www.girlsgogames.it" game="gioco" language="9"/><!-- Italian --> <country name="jp" domain="www.egames.jp" game="game" language="16"/><!-- Japanese --> <country name="nl" domain="www.girlsgogames.nl" game="spel" language="3"/><!-- Dutch --> <country name="pl" domain="www.girlsgogames.pl" game="gra" language="11"/><!-- Polish --> <country name="pt" domain="www.ojogos.pt" game="jogo" language="8"/><!-- Portuguese --> <country name="ru" domain="www.girlsgogames.ru" game="igra" language="12"/><!-- Russian --> <country name="se" domain="www.girlsgogames.se" game="spel_" language="10"/><!-- Swedish --> <country name="en_uk" domain="www.girlsgogames.co.uk" game="game" language="2"/><!-- English UK --> <country name="en_us" domain="www.girlsgogames.com" game="game" language="1"/><!-- English US --> <!-- removed --> <!-- country name="ph" domain="www.laro.com.ph" game="game" language="2"/ --><!-- English UK --> <!-- country name="tr" domain="www.girlsgogamestr.com" game="oyun" language="13"/ --><!-- Turkish --> <!-- country name="my" domain="www.game.com.my" game="permainan_" language="15"/ --><!-- Malaysian --> </girl> <teen> <!-- new --> <!--country name="arg" domain="www.juegosdechicas.com.ar" game="game" language="18"/ --><!-- Argentina --> <!--country name="mx" domain="www.juegosdechicas.mx" game="game" language="19"/ --><!-- Mexico --> <!--country name="ar" domain="www.dailygame.com" game="game" language="1"/ --><!-- Arabic(English US) 2009.07.14--> <!--country name="br" domain="www.a10.com" game="jogo" language="7"/ --><!-- Brazillian --> <!--country name="cn" domain="www.game.com.cn" game="moregames" language="17"/ --><!-- Chinese --> <!--country name="de" domain="www.a10.com" game="spiel" language="5"/ --><!-- German --> <!--country name="es" domain="www.a10.com" game="juego" language="6"/ --><!-- Spanish --> <!--country name="fr" domain="www.a10.com" game="jeu" language="4"/ --><!-- French --> <!--country name="id" domain="www.a10.com" game="permainanme" language="14"/ --><!-- Indonesian --> <!--country name="in" domain="www.a10.com" game="game" language="2"/ --><!-- English UK --> <!--country name="it" domain="www.a10.com" game="gioco" language="9"/ --><!-- Italian --> <!--country name="jp" domain="www.a10.com" game="game" language="16"/ --><!-- Japanese --> <!--country name="nl" domain="www.a10.com" game="spel" language="3"/ --><!-- Dutch --> <!--country name="pl" domain="www.a10.com" game="gra" language="11"/ --><!-- Polish --> <!--country name="pt" domain="www.a10.com" game="jogo" language="8"/ --><!-- Portuguese --> <!--country name="ru" domain="www.a10.com" game="igra" language="12"/ --><!-- Russian --> <!--country name="se" domain="www.a10.com" game="spel_" language="10"/ --><!-- Swedish --> <!--country name="en_uk" domain="www.a10.com" game="game" language="2"/ --><!-- English UK --> <country name="en_us" domain="www.a10.com" game="game" language="1"/><!-- English US --> <!-- removed --> <!-- country name="ph" domain="www.a10.com" game="game" language="2"/ --><!-- English UK --> <!-- country name="tr" domain="www.a10.com" game="oyun" language="13"/ --><!-- Turkish --> <!-- country name="my" domain="www.a10.com" game="permainan_" language="15"/ --><!-- Malaysian --> </teen> <zapapa> <!-- new --> <country name="arg" domain="www.zapapa.com" game="game" language="18"/><!-- Argentina --> <country name="mx" domain="www.zapapa.com" game="game" language="19"/><!-- Mexico --> <country name="ar" domain="www.zapapa.com" game="game" language="1"/><!-- Arabic(English US) 2009.07.14--> <country name="br" domain="www.zapapa.com" game="game" language="7"/><!-- Brazillian --> <country name="cn" domain="www.zapapa.com" game="game" language="17"/><!-- Chinese --> <country name="de" domain="www.zapapa.com" game="game" language="5"/><!-- German --> <country name="es" domain="www.zapapa.com" game="game" language="6"/><!-- Spanish --> <country name="fr" domain="www.zapapa.com" game="game" language="4"/><!-- French --> <country name="id" domain="www.zapapa.com" game="game" language="14"/><!-- Indonesian --> <country name="in" domain="www.zapapa.com" game="game" language="2"/><!-- English UK --> <country name="it" domain="www.zapapa.com" game="game" language="9"/><!-- Italian --> <country name="jp" domain="www.zapapa.com" game="game" language="16"/><!-- Japanese --> <country name="nl" domain="www.zapapa.com" game="game" language="3"/><!-- Dutch --> <country name="pl" domain="www.zapapa.com" game="game" language="11"/><!-- Polish --> <country name="pt" domain="www.zapapa.com" game="game" language="8"/><!-- Portuguese --> <country name="ru" domain="www.zapapa.com" game="game" language="12"/><!-- Russian --> <country name="se" domain="www.zapapa.com" game="game" language="10"/><!-- Swedish --> <country name="en_uk" domain="www.zapapa.com" game="game" language="2"/><!-- English UK --> <country name="en_us" domain="www.zapapa.com" game="game" language="1"/><!-- English US --> </zapapa> <hyves> <!-- new --> <country name="nl" domain="www.zapapa.nl" game="game" language="3"/><!-- Dutch --> </hyves> </data> ; } }//package zlong.country
Section 183
//CountryInfo (zlong.country.CountryInfo) package zlong.country { import zlong.domain.*; import zlong.*; import zlong.data.*; public class CountryInfo { private var countries:Countries; localComponent_internal static const VERSION:String = "v1.08.201012121509"; private static var _instance:CountryInfo; public function CountryInfo(){ super(); this.countries = new Countries(); } public function set portal(portal:String):void{ this.countries.portal = portal; } public function get portal():String{ return (this.countries.portal); } public function set country(country:String):void{ this.countries.country = country; } public function get country():String{ return (this.countries.current.name); } public function get domain():String{ return (this.countries.current.domain); } public function get language():int{ return (this.countries.current.language); } public function get countryGroup():Array{ return (this.countries.countryGroup); } public function get copyRightLink():String{ var str:String; str = "http://www.gameportal.net"; str = (str + "/"); str = (str + ("?utm_medium=brandedgames_" + (DomainInfo.instance.allowed) ? "internal" : "external")); str = (str + ("&utm_campaign=" + GameInfo.name)); str = (str + ("&utm_source=" + DomainInfo.instance.domainAb)); str = (str + "&utm_content=Mainscreen"); return (str); } public function get moreGameLink():String{ var str:String; str = ("http://" + this.domain); if (this.countries.current.name != "cn"){ str = (str + "/"); str = (str + ("?utm_medium=brandedgames_" + (DomainInfo.instance.allowed) ? "internal" : "external")); str = (str + ("&utm_campaign=" + GameInfo.name)); str = (str + ("&utm_source=" + DomainInfo.instance.domainAb)); } else { str = (str + "/"); str = (str + "moregames"); str = (str + "/"); }; return (str); } public function get thisGameLink():String{ var str:String; str = ("http://" + this.domain); str = (str + ((("/" + this.countries.current.game) + "/") + GameInfo.html)); if (this.countries.current.name != "cn"){ str = (str + ("?utm_medium=brandedgames_" + (DomainInfo.instance.allowed) ? "internal" : "external")); str = (str + ("&utm_campaign=" + GameInfo.name)); str = (str + ("&utm_source=" + DomainInfo.instance.domainAb)); }; return (str); } public function get sendToFriendLink():String{ var str:String = this.thisGameLink; if (this.countries.current.name != "cn"){ str = (str + "&utm_content=send_to_friend"); }; return (str); } public static function get instance():CountryInfo{ if (_instance == null){ _instance = new (CountryInfo); }; return (_instance); } } }//package zlong.country
Section 184
//CountryItem (zlong.country.CountryItem) package zlong.country { import zlong.*; final class CountryItem { var name:String; var domain:String; var game:String; var language:int; localComponent_internal static const VERSION:String = "v1.08.201012121509"; } }//package zlong.country
Section 185
//CountryCookie (zlong.data.CountryCookie) package zlong.data { import flash.net.*; import zlong.*; public class CountryCookie { localComponent_internal static const VERSION:String = "v1.08.201012121509"; private static const name:String = "spilgames_language_v100"; private static const countryName:String = "savedLang"; private static var so:SharedObject; public function CountryCookie():void{ super(); so = SharedObject.getLocal(name, "/"); } localComponent_internal static function set country(_value:String):void{ so.data[countryName] = _value; } localComponent_internal static function get country():String{ return (so.data[countryName]); } } }//package zlong.data
Section 186
//GameInfo (zlong.data.GameInfo) package zlong.data { import zlong.*; public class GameInfo { localComponent_internal static const VERSION:String = "v1.08.201012121509"; localComponent_internal static var cnversion:Boolean = false; localComponent_internal static var portal:String = "family"; localComponent_internal static var name:String = "game_name"; localComponent_internal static var html:String = "Game-Name.html"; localComponent_internal static var width:int = 550; localComponent_internal static var height:int = 400; } }//package zlong.data
Section 187
//AbstractBindingDisplay (zlong.display.AbstractBindingDisplay) package zlong.display { import flash.display.*; import flash.events.*; import flash.utils.*; public class AbstractBindingDisplay extends MovieClip { localComponent_internal static const VERSION:String = "v1.08.201012121509"; public function AbstractBindingDisplay(){ super(); if (getQualifiedClassName(this) == "zlong::display::AbstractBindingDisplay"){ throw (new ArgumentError("can't be constructed")); }; } public function initEvent(e:Event=null):void{ } public function delEvent(e:Event=null):void{ } } }//package zlong.display
Section 188
//BindingDisplayEvent (zlong.display.BindingDisplayEvent) package zlong.display { import flash.events.*; public class BindingDisplayEvent extends Event { private var _BD:AbstractBindingDisplay; private var _displayType:String; localComponent_internal static const VERSION:String = "v1.08.201012121509"; public static const BINDING_DISPLAY_INIT:String = "BINDING_DISPLAY_INIT"; public static const BINDING_DISPLAY_DEL_EVENT:String = "BINDING_DISPLAY_DEL_EVENT"; public static const BINDING_DISPLAY_ADDED_TO_STAGE:String = "BINDING_DISPLAY_ADDED_TO_STAGE"; public static const BINDING_DISPLAY_REMOVE_TO_STAGE:String = "BINDING_DISPLAY_REMOVE_TO_STAGE"; public function BindingDisplayEvent(type:String, BD:AbstractBindingDisplay, displayType:String, bubbles:Boolean=false, cancelable:Boolean=false){ super(type, bubbles, cancelable); this._BD = BD; this._displayType = displayType; } public function get bindingDisplay():AbstractBindingDisplay{ return (this._BD); } public function get displayType():String{ return (this._displayType); } } }//package zlong.display
Section 189
//BindingDisplayManager (zlong.display.BindingDisplayManager) package zlong.display { import flash.events.*; public class BindingDisplayManager extends EventDispatcher { localComponent_internal static const VERSION:String = "v1.08.201012121509"; private static var _instance:BindingDisplayManager; public function BindingDisplayManager():void{ super(); } public static function get Instance():BindingDisplayManager{ if (_instance == null){ _instance = new (BindingDisplayManager); }; return (_instance); } } }//package zlong.display
Section 190
//Copyright (zlong.display.Copyright) package zlong.display { import flash.events.*; import zlong.navigate.*; public class Copyright extends AbstractBindingDisplay { localComponent_internal static const VERSION:String = "v1.08.201012121509"; public function Copyright(){ super(); this.gotoAndStop(1); this.buttonMode = true; this.mouseChildren = false; addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "Copyright")); } private function addToStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "Copyright")); this.initEvent(); } private function removeFromStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "Copyright")); this.delEvent(); } override public function initEvent(e:Event=null):void{ if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; this.addEventListener(MouseEvent.CLICK, Handler.click_copyright); this.addEventListener(MouseEvent.ROLL_OVER, this.rollOverHandler); this.addEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler); this.addEventListener(MouseEvent.MOUSE_UP, this.mouseUpHandler); this.addEventListener(MouseEvent.ROLL_OUT, this.rollOutHandler); this.addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); } override public function delEvent(e:Event=null):void{ this.removeEventListener(MouseEvent.CLICK, Handler.click_copyright); this.removeEventListener(MouseEvent.ROLL_OVER, this.rollOverHandler); this.removeEventListener(MouseEvent.MOUSE_DOWN, this.mouseDownHandler); this.removeEventListener(MouseEvent.MOUSE_UP, this.mouseUpHandler); this.removeEventListener(MouseEvent.ROLL_OUT, this.rollOutHandler); if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){ removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); }; BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "Copyright")); } private function rollOverHandler(evt:MouseEvent):void{ this.gotoAndStop(2); } private function mouseDownHandler(evt:MouseEvent):void{ this.gotoAndStop(3); } private function mouseUpHandler(evt:MouseEvent):void{ this.gotoAndStop(2); } private function rollOutHandler(evt:MouseEvent):void{ this.gotoAndStop(1); } } }//package zlong.display
Section 191
//CountriesBox (zlong.display.CountriesBox) package zlong.display { import flash.display.*; import flash.events.*; import flash.geom.*; import zlong.data.*; import zlong.*; import zlong.country.*; public class CountriesBox extends AbstractBindingDisplay { private var i:uint; private var mul:int;// = 1 private var baseX:Number;// = 0 private var baseY:Number;// = 0 private var nameGroup:Array; private var obj:Object; private var pop:Sprite; private var flagMc:MovieClip; private var selectBox:MovieClip; private var country_name:MovieClip; localComponent_internal static const VERSION:String = "v1.08.201012121509"; public function CountriesBox(){ this.nameGroup = []; super(); if (GameInfo.portal == GameSetting.PORTAL_TYPE_HYVES){ this.visible = false; }; addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "CountriesBox")); } private function addToStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "CountriesBox")); this.initEvent(); } private function removeFromStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "CountriesBox")); this.delEvent(); } override public function initEvent(e:Event=null):void{ if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; this.initShow(); addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); } override public function delEvent(e:Event=null):void{ removeEventListener(MouseEvent.ROLL_OVER, this.overHandler); removeEventListener(MouseEvent.ROLL_OUT, this.outHandler); removeEventListener(MouseEvent.CLICK, this.clickHandler); if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){ removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); }; this.delPoPEvent(); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "CountriesBox")); } private function initShow():void{ this.obj = new Object(); this.initPos(); this.setFlag(); this.setPop(); this.initFlagEvent(); this.initPoPEvent(); if (GameInfo.cnversion){ this.visible = false; this.setLanguage("cn"); }; } private function initPos():void{ var p:Point = new Point(); p = this.parent.localToGlobal(new Point(x, y)); if (p.y > (GameInfo.height / 2)){ this.mul = 1; } else { this.mul = -1; }; } private function setFlag():void{ this.country_name = (getChildByName("countryName") as MovieClip); this.flagMc = (getChildByName("flag") as MovieClip); this.flagMc.gotoAndStop(CountryInfo.instance.country); this.country_name.gotoAndStop(CountryInfo.instance.country); } private function setPop():void{ var unitW:Number; var unitH:Number; var pop_flag:MovieClip; var _name:String; var pop_flag_flag:MovieClip; var dx:Number = 0; var dy:Number = 0; this.pop = (getChildByName("popList") as Sprite); this.selectBox = (getChildByName("selectbox") as MovieClip); unitW = this.pop.getChildByName("_blank").width; unitH = (this.pop.getChildByName("_blank").height - 1); this.baseX = this.selectBox.x; this.nameGroup = CountryInfo.instance.countryGroup; var len:int = this.nameGroup.length; if (this.mul == 1){ this.baseY = ((this.selectBox.y - (Math.round((len / 2)) * unitH)) + unitH); } else { this.baseY = ((this.selectBox.y + this.selectBox.height) + unitH); }; this.pop.y = this.baseY; this.pop.visible = false; this.pop.getChildByName("_blank").visible = false; this.i = 0; while (this.i < len) { _name = this.nameGroup[this.i]; if (this.pop.getChildByName(("l_" + _name)) != null){ pop_flag = (this.pop.getChildByName(("l_" + _name)) as MovieClip); pop_flag.mouseChildren = false; pop_flag.buttonMode = true; pop_flag.stop(); pop_flag_flag = (pop_flag.getChildByName("flag") as MovieClip); pop_flag_flag.mouseEnabled = false; pop_flag_flag.mouseChildren = false; pop_flag_flag.gotoAndStop(_name); this.obj[("l_" + _name)] = true; dx = (((this.i % 2) == 0)) ? 0 : 1; pop_flag.x = ((unitW * (this.i % 2)) - dx); pop_flag.y = ((unitH * Math.floor((this.i / 2))) - unitH); }; this.i++; }; this.i = 0; while (this.i < this.pop.numChildren) { if (this.pop.getChildAt(this.i).name.indexOf("l_") != -1){ if (this.obj[this.pop.getChildAt(this.i).name] == undefined){ this.pop.getChildAt(this.i).visible = false; }; }; this.i++; }; if ((this.nameGroup.length % 2) == 0){ this.pop.getChildByName("_blank").visible = false; } else { this.pop.getChildByName("_blank").visible = true; this.pop.getChildByName("_blank").x = (unitW - 1); this.pop.getChildByName("_blank").y = (((unitH * Math.floor((this.nameGroup.length / 2))) - unitH) - dy); }; } private function initFlagEvent():void{ addEventListener(MouseEvent.ROLL_OVER, this.overHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, this.outHandler, false, 0, true); addEventListener(MouseEvent.CLICK, this.clickHandler, false, 0, true); } private function clickHandler(e:MouseEvent):void{ var _flag:MovieClip; var _name:String = e.target["name"]; if (_name == "_blank"){ return; }; if (_name.indexOf("l_") != -1){ _flag = (e.target["getChildByName"]("flag") as MovieClip); this.flagMc.gotoAndStop(_name.substr(2)); this.country_name.gotoAndStop(_flag.currentFrame); this.setLanguage(_name.substr(2)); this.pop.visible = false; }; } private function setLanguage(_cnm:String):void{ CountryInfo.instance.country = _cnm; CountryCookie.country = _cnm; Dispatcher.langChanged(); } private function overHandler(e:MouseEvent):void{ this.pop.visible = true; } private function outHandler(e:MouseEvent):void{ this.pop.visible = false; } private function initPoPEvent():void{ this.pop.addEventListener(MouseEvent.MOUSE_OVER, this.overPoPHandler); this.pop.addEventListener(MouseEvent.MOUSE_OUT, this.outPoPHandler); } private function delPoPEvent():void{ this.pop.removeEventListener(MouseEvent.MOUSE_OVER, this.overPoPHandler); this.pop.removeEventListener(MouseEvent.MOUSE_OUT, this.outPoPHandler); } private function overPoPHandler(e:MouseEvent):void{ var _local2 = e.target; _local2["gotoAndStop"](2); } private function outPoPHandler(e:MouseEvent):void{ var _local2 = e.target; _local2["gotoAndStop"](1); } } }//package zlong.display
Section 192
//Dispatcher (zlong.display.Dispatcher) package zlong.display { import flash.events.*; import zlong.*; class Dispatcher { localComponent_internal static const VERSION:String = "v1.08.201012121509"; static const LANGUAGE_CHANGED:String = "languageChanged"; static var dispatcher:EventDispatcher = new EventDispatcher(); static function langChanged():void{ dispatcher.dispatchEvent(new Event(LANGUAGE_CHANGED)); } } }//package zlong.display
Section 193
//HyvesLoading (zlong.display.HyvesLoading) package zlong.display { import flash.display.*; import zlong.country.*; import zlong.*; public class HyvesLoading extends Sprite { public function HyvesLoading(){ var logo:Sprite; var logohyves:Sprite; var hyves:Sprite; var poweredby:Sprite; super(); if (CountryInfo.instance.portal == GameSetting.PORTAL_TYPE_HYVES){ logo = (this.getChildByName("logo") as Sprite); if (logo){ logo.visible = false; }; Trace("||error||", "logo not in HyvesLoading"); } else { logohyves = (this.getChildByName("logohyves") as Sprite); hyves = (this.getChildByName("hyves") as Sprite); poweredby = (this.getChildByName("poweredby") as Sprite); logohyves.visible = false; hyves.visible = false; poweredby.visible = false; //unresolved jump var _slot1 = e; Trace("||error||", _slot1); this.visible = false; }; } } }//package zlong.display
Section 194
//Logo (zlong.display.Logo) package zlong.display { import flash.display.*; import flash.events.*; import zlong.breathxue.utils.math.*; import zlong.country.*; import zlong.navigate.*; public class Logo extends AbstractBindingDisplay { private const MAX_WIDTH:int = 200; private const Max_HEIGHT:int = 50; private var _hitArea:Sprite; private var _position:String;// = "logo_preloader" private var _alignHorizontal:String;// = "Center" private var _alignVertical:String;// = "Center" private var _maxWidth:Number;// = 150 private var _maxHeight:Number;// = 40 localComponent_internal static const VERSION:String = "v1.08.201012121509"; public function Logo(){ super(); this.initDis(); addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler, false, 0, true); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "Logo")); } private function addToStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "Logo")); this.initEvent(); } private function removeFromStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "Logo")); this.delEvent(); } override public function initEvent(e:Event=null):void{ gotoAndStop(CountryInfo.instance.domain); if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; this.addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); this.addEventListener(MouseEvent.CLICK, this.clickHandler); Dispatcher.dispatcher.addEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler); this.updateView(); } override public function delEvent(e:Event=null):void{ this.delDis(); if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){ removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); }; this.removeEventListener(MouseEvent.CLICK, this.clickHandler); Dispatcher.dispatcher.removeEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "Logo")); } public function set position(_str:String):void{ this._position = _str; } public function set alignHorizontal(str:String):void{ this._alignHorizontal = str; } public function set alignVertical(str:String):void{ this._alignVertical = str; } public function set maxWidth(value:Number):void{ if (value < 0){ value = 0; } else { if (value > this.MAX_WIDTH){ value = this.MAX_WIDTH; }; }; this._maxWidth = value; } public function set maxHeight(value:Number):void{ if (value < 0){ value = 0; } else { if (value > this.Max_HEIGHT){ value = this.Max_HEIGHT; }; }; this._maxHeight = value; } private function updateView():void{ var wh:mVector; var scale1:Number; var scale2:Number; var scale:Number; var twh:Sprite = (this.getChildByName("wh") as Sprite); var target:Sprite = (this.getChildAt(0) as Sprite); if (!target){ return; }; target.scaleX = 1; target.scaleY = 1; if (twh){ wh = new mVector(twh.width, twh.height); } else { wh = new mVector(target.width, target.height); }; if ((((wh.x > 0)) && ((wh.y > 0)))){ scale1 = (this._maxHeight / wh.y); scale2 = (this._maxWidth / wh.x); scale = ((scale1 > scale2)) ? scale2 : scale1; wh.multEquals(scale); target.scaleX = scale; target.scaleY = scale; }; if (this._alignHorizontal){ switch (this._alignHorizontal){ case "Left": target.x = 0; break; case "Right": target.x = (this.MAX_WIDTH - wh.x); break; case "Center": target.x = ((this.MAX_WIDTH - wh.x) / 2); break; }; }; if (this._alignVertical){ switch (this._alignVertical){ case "Up": target.y = 0; break; case "Down": target.y = (this.Max_HEIGHT - wh.y); break; case "Center": target.y = ((this.Max_HEIGHT - wh.y) / 2); break; }; }; this._hitArea.width = wh.x; this._hitArea.height = wh.y; this._hitArea.x = target.x; this._hitArea.y = target.y; } private function initDis():void{ buttonMode = true; this._hitArea = new Sprite(); this.addChild(this._hitArea); this._hitArea.graphics.beginFill(3368601, 0); this._hitArea.graphics.drawRect(0, 0, 10, 10); this._hitArea.graphics.endFill(); this.getChildByName("displayArea_mc").visible = false; var i:int; while (i < this.totalFrames) { this.addFrameScript(i, this.updateView); i++; }; } private function delDis():void{ stop(); } private function clickHandler(e:MouseEvent):void{ Handler.click_moregames(this._position); } private function langChangeHandler(e:Event):void{ gotoAndStop(CountryInfo.instance.domain); } } }//package zlong.display
Section 195
//Menu (zlong.display.Menu) package zlong.display { import flash.events.*; import flash.display.*; import zlong.country.*; import zlong.*; import flash.ui.*; import zlong.navigate.*; public class Menu { private var displayObject:InteractiveObject; private var menu:ContextMenu; private var item:ContextMenuItem; localComponent_internal static const VERSION:String = "v1.08.201012121509"; public function Menu(doc:InteractiveObject){ super(); this.displayObject = doc; this.init(); this.initEvent(); } private function init():void{ this.menu = new ContextMenu(); this.menu.hideBuiltInItems(); var defaultItems:ContextMenuBuiltInItems = this.menu.builtInItems; defaultItems.print = true; defaultItems.zoom = true; defaultItems.quality = true; this.item = new ContextMenuItem(("MoreGame: " + CountryInfo.instance.domain)); this.menu.customItems.push(this.item); this.displayObject.contextMenu = this.menu; } private function initEvent():void{ this.item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, this.clickItemHandler); Dispatcher.dispatcher.addEventListener(Dispatcher.LANGUAGE_CHANGED, this.changeLang); } private function changeLang(e:Event):void{ this.item.caption = CountryInfo.instance.domain; } private function clickItemHandler(e:ContextMenuEvent):void{ Handler.click_moregames("Contex_Menu"); } } }//package zlong.display
Section 196
//TranText (zlong.display.TranText) package zlong.display { import flash.events.*; import zlong.country.*; public class TranText extends AbstractBindingDisplay { private var isChange:Boolean;// = true localComponent_internal static const VERSION:String = "v1.08.201012121509"; public function TranText(){ super(); addEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler, false, 0, true); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_INIT, this, "TranText")); } private function addToStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_ADDED_TO_STAGE, this, "TranText")); this.initEvent(); } private function removeFromStageHandler(e:Event):void{ BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_REMOVE_TO_STAGE, this, "TranText")); this.delEvent(); } override public function initEvent(e:Event=null):void{ this.changeLang(); if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; addEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); Dispatcher.dispatcher.addEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler); } override public function delEvent(e:Event=null):void{ if (this.hasEventListener(Event.ADDED_TO_STAGE)){ removeEventListener(Event.ADDED_TO_STAGE, this.addToStageHandler); }; if (this.hasEventListener(Event.REMOVED_FROM_STAGE)){ removeEventListener(Event.REMOVED_FROM_STAGE, this.removeFromStageHandler); }; Dispatcher.dispatcher.removeEventListener(Dispatcher.LANGUAGE_CHANGED, this.langChangeHandler); BindingDisplayManager.Instance.dispatchEvent(new BindingDisplayEvent(BindingDisplayEvent.BINDING_DISPLAY_DEL_EVENT, this, "TranText")); } public function set change(_v:Boolean):void{ this.isChange = _v; } private function changeLang():void{ gotoAndStop(CountryInfo.instance.language); } private function langChangeHandler(e:Event):void{ if (this.isChange){ this.changeLang(); }; } } }//package zlong.display
Section 197
//DomainData (zlong.domain.DomainData) package zlong.domain { import zlong.*; final class DomainData { localComponent_internal static const VERSION:String = "v1.08.201012121509"; static const allowedDomain:Array = ["www8.agame.com", "www.zlonggamestest.com", "gamedev.dev.spilgames.com"]; } }//package zlong.domain
Section 198
//DomainInfo (zlong.domain.DomainInfo) package zlong.domain { import flash.net.*; import zlong.*; public final class DomainInfo { private var _allowed:Boolean; private var _domain:String; private var _domainAb:String; localComponent_internal static const VERSION:String = "v1.08.201012121509"; private static var _instance:DomainInfo; public function DomainInfo(){ super(); this._domain = new LocalConnection().domain; this.initAllowed(); this.initAb(); } localComponent_internal function get allowed():Boolean{ return (this._allowed); } localComponent_internal function get domain():String{ return (this._domain); } localComponent_internal function get domainAb():String{ return (this._domainAb); } private function initAllowed():void{ var i:int; while (i < DomainData.allowedDomain.length) { if (this._domain == DomainData.allowedDomain[i]){ this._allowed = true; break; }; i++; }; } private function initAb():void{ var temp:Array; var extention:int; var name:int; if (this._domain != "localhost"){ temp = this._domain.split("."); extention = (temp.length - 1); name = (temp.length - 2); this._domainAb = ((temp[name] + ".") + temp[extention]); } else { this._domainAb = "offline_play"; }; } public static function get instance():DomainInfo{ if (_instance == null){ _instance = new (DomainInfo); }; return (_instance); } } }//package zlong.domain
Section 199
//Handler (zlong.navigate.Handler) package zlong.navigate { import flash.events.*; import zlong.country.*; import flash.net.*; import zlong.*; import flash.external.*; public class Handler { localComponent_internal static const VERSION:String = "v1.08.201012121509"; public static function click_gamecn(e:Event=null):void{ var request:URLRequest = new URLRequest("http://www.game.com.cn"); navigateToURL(request, "_blank"); } public static function click_copyright(e:Event=null):void{ var request:URLRequest; if (CountryInfo.instance.country == "cn"){ request = new URLRequest("http://www.game.com.cn"); } else { request = new URLRequest(CountryInfo.instance.copyRightLink); }; navigateToURL(request, "_blank"); Trace("||Tester||", request.url); } public static function refurbish(e:Event=null):void{ var e = e; ExternalInterface.call("location.reload"); navigateToURL(new URLRequest(ExternalInterface.call("window.location.href.toString")), "_top"); //unresolved jump var _slot1 = myError; } public static function click_thisgame(_position:String):void{ var request:URLRequest; if (CountryInfo.instance.country == "cn"){ request = new URLRequest(CountryInfo.instance.moreGameLink); } else { request = new URLRequest(((CountryInfo.instance.thisGameLink + "&utm_content=") + _position)); }; navigateToURL(request, "_blank"); Trace("||Tester||", request.url); } public static function click_moregames(_position:String):void{ var request:URLRequest; if (CountryInfo.instance.country == "cn"){ request = new URLRequest(CountryInfo.instance.moreGameLink); } else { request = new URLRequest(((CountryInfo.instance.moreGameLink + "&utm_content=") + _position)); }; navigateToURL(request, "_blank"); Trace("||Tester||", request.url); } } }//package zlong.navigate
Section 200
//LocalSiteDataLoader (zlong.site.LocalSiteDataLoader) package zlong.site { import flash.events.*; import flash.net.*; import zlong.*; public class LocalSiteDataLoader { private var _localSiteDataLoader:URLLoader; localComponent_internal static const VERSION:String = "v1.08.201012121509"; private static var _localSiteDataLoaderFinish:Boolean = true; public function LocalSiteDataLoader(){ super(); _localSiteDataLoaderFinish = false; this._localSiteDataLoader = new URLLoader(); this._localSiteDataLoader.dataFormat = URLLoaderDataFormat.TEXT; this._localSiteDataLoader.addEventListener(IOErrorEvent.IO_ERROR, this.errorHandler); this._localSiteDataLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.errorHandler); this._localSiteDataLoader.addEventListener(Event.COMPLETE, this.LocalSiteDataLoaderFinish); this._localSiteDataLoader.load(new URLRequest(SiteData.URL)); //unresolved jump var _slot1 = e; errorHandler(); } private function LocalSiteDataLoaderFinish(event:Event):void{ SiteData.allowedSite = new XML(this._localSiteDataLoader.data); _localSiteDataLoaderFinish = true; SiteInfo.instance.reInit(); this.delLocalSiteDataLoader(); } private function errorHandler(e:Event=null):void{ SiteData.allowedSite = <sites></sites> ; _localSiteDataLoaderFinish = true; SiteInfo.instance.reInit(); this.delLocalSiteDataLoader(); } private function delLocalSiteDataLoader():void{ this._localSiteDataLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.errorHandler); this._localSiteDataLoader.removeEventListener(Event.COMPLETE, this.LocalSiteDataLoaderFinish); this._localSiteDataLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.errorHandler); this._localSiteDataLoader = null; } public static function get localSiteDataLoaderFinish():Boolean{ return (_localSiteDataLoaderFinish); } } }//package zlong.site
Section 201
//SiteData (zlong.site.SiteData) package zlong.site { import zlong.*; public final class SiteData { localComponent_internal static const VERSION:String = "v1.08.201012121509"; public static const URL:String = "http://www8.agame.com/games/sitelock/sites.xml"; public static var allowedSite:XML = <sites></sites> ; } }//package zlong.site
Section 202
//SiteInfo (zlong.site.SiteInfo) package zlong.site { import zlong.*; import zlong.data.*; import flash.external.*; public class SiteInfo { private var _sites:Array; private var _link:String; private var _html:String; private var _domain:String; private var _allowed:Boolean; localComponent_internal static const VERSION:String = "v1.08.201012121509"; private static var _instance:SiteInfo; public function SiteInfo():void{ super(); this.initSites(); this._link = this.getURL(); this._html = this.getHtml(this._link); this._domain = this.getDomain(this._link); this._allowed = this.check(this._domain, this._sites); } function reInit():void{ this.initSites(); this._link = this.getURL(); this._html = this.getHtml(this._link); this._domain = this.getDomain(this._link); this._allowed = this.check(this._domain, this._sites); } public function get allowed():Boolean{ if (GameInfo.cnversion){ return (true); }; return (this._allowed); } public function get link():String{ return (this._link); } public function get html():String{ return (this._html); } public function get domain():String{ return (this._domain); } private function initSites():void{ var siteList:XMLList; var i:int; this._sites = new Array(); if (SiteData.allowedSite != null){ siteList = SiteData.allowedSite.child("item"); i = 0; while (i < siteList.length()) { this._sites.push(siteList[i]); i++; }; }; } private function getURL():String{ var loc:String; try { loc = ExternalInterface.call("window.location.href.toString"); //unresolved jump var _slot1 = e; loc = "error"; } finally { }; if ((((loc == null)) || ((loc == "")))){ loc = "error"; }; if (String(loc).indexOf(".swf") != -1){ loc = "error"; }; return (loc); } private function getHtml(str:String):String{ var index:int = str.indexOf("?"); if (index != -1){ return (str); }; return (str.substr(0, index)); } private function getDomain(w:String):String{ var temp:String = ""; var j:uint = 7; while (j < w.length) { if (w.charAt(j) == "/"){ break; }; temp = (temp + w.charAt(j)); j++; }; return (temp); } private function check(str:String, arr:Array):Boolean{ var i:uint; while (i < arr.length) { if (str == arr[i]){ return (true); }; i++; }; return (false); } public static function get instance():SiteInfo{ if (_instance == null){ _instance = new (SiteInfo); }; return (_instance); } } }//package zlong.site
Section 203
//Award_HighScore (zlong.spilSystemTool.Award_HighScore) package zlong.spilSystemTool { import flash.events.*; import flash.display.*; import com.spilgames.api.*; import zlong.*; public class Award_HighScore implements IEventDispatcher { framework_internal static const VERSION:String = "v1.15.201012131511"; public static const AWORD_HIGHSCORE_TOOL_INITIALIZED_COMPONENT:String = "SPILGAMESSERVICS_INITIALIZED_COMPONENT"; public static const AWORD_HIGHSCORE_TOOL_INITIALIZED_FAILED:String = "SPILGAMESSERVICS_INITIALIZED_FAILED"; static var _instance:Award_HighScore; public function Award_HighScore(){ super(); } public function init(gameName:String, container:Sprite, debug:Boolean=false, isLive:Boolean=true):void{ if (!SpilSetting._instance){ SpilSetting.instance.init(container, gameName, debug); }; if (debug){ container.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.keyBoardSendAwards); }; } public function isAwardsServiceAvailable():Boolean{ return (AwardsService.isAvailable()); } public function isScoreServiceAvailable():Boolean{ return (ScoreService.isAvailable()); } private function keyBoardSendAwards(event:Event):void{ var e:KeyboardEvent = (event as KeyboardEvent); if (((((e.ctrlKey) && ((e.keyCode > 48)))) && ((e.keyCode < 58)))){ this.submitAchievement(("award" + String.fromCharCode(e.keyCode))); }; } public function requestAchievementList():void{ } public function requestAchievementInfo(id:int):void{ } public function requestHighScoreList():void{ } public function requestUserHighScoreList(target_username:String):void{ } public function submitScore(score):void{ if (ScoreService.isAvailable()){ ScoreService.submitScore(score); } else { Trace("||ZFW||", "No...isAvailable"); }; } public function submitAchievement(achievement):void{ if (AwardsService.isAvailable()){ AwardsService.submitAward(achievement); } else { Trace("||ZFW||", "No...isAvailable"); }; } public function isComponentInitialized():Boolean{ return (((AwardsService.isAvailable()) && (ScoreService.isAvailable()))); } public function isDomainAllowed():Boolean{ return (this.isComponentInitialized()); } public function destroy():void{ } public function dispatchEvent(event:Event):Boolean{ return (SpilSetting.instance.dispatchEvent(event)); } public function hasEventListener(type:String):Boolean{ return (SpilSetting.instance.hasEventListener(type)); } public function willTrigger(type:String):Boolean{ return (SpilSetting.instance.willTrigger(type)); } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ SpilSetting.instance.removeEventListener(type, listener, useCapture); } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ SpilSetting.instance.addEventListener(type, listener, useCapture, priority, useWeakReference); } public static function get instance():Award_HighScore{ if (_instance == null){ _instance = new (Award_HighScore); }; return (_instance); } public static function get initializedFinish():Boolean{ if (SpilSetting._instance){ return (SpilSetting.instance.initSpilGamesServices_finish); }; return (true); } } }//package zlong.spilSystemTool
Section 204
//GoogleEvent (zlong.spilSystemTool.GoogleEvent) package zlong.spilSystemTool { import flash.display.*; import flash.net.*; import com.google.analytics.*; import zlong.utils.*; public class GoogleEvent { private var _gaGameName:String; private var _gaTracker:GATracker; private var _gaEventArr:Array; private var _gaSharedObject:SharedObject; framework_internal static const VERSION:String = "v1.15.201012131511"; private static var _instance:GoogleEvent; public function GoogleEvent():void{ super(); } public function init(gameName:String, display:DisplayObject, debug:Boolean):void{ var k:String; this._gaGameName = gameName; this._gaTracker = new GATracker(display, "UA-6695967-1", "AS3", debug); this._gaEventArr = new Array(); this._gaSharedObject = SharedObjectUtil.getLocal("googleEvent"); for (k in this._gaSharedObject.data) { this._gaEventArr.push(k); }; } public function gaTrackEvent(eventName:String, isRepeatedInOneGame:Boolean=false, isRepeatedInOnePC:Boolean=true):void{ var i:int; if (((!(isRepeatedInOnePC)) || (!(isRepeatedInOneGame)))){ i = 0; while (i < this._gaEventArr.length) { if (eventName == this._gaEventArr[i]){ return; }; i++; }; if (!isRepeatedInOnePC){ this._gaSharedObject.data[eventName] = 1; SharedObjectUtil.save(this._gaSharedObject); }; this._gaEventArr.push(eventName); }; this._gaTracker.trackEvent(this._gaGameName, eventName, "per session", 0); } public static function get instance():GoogleEvent{ if (_instance == null){ _instance = new (GoogleEvent); }; return (_instance); } } }//package zlong.spilSystemTool
Section 205
//SpilSetting (zlong.spilSystemTool.SpilSetting) package zlong.spilSystemTool { import flash.events.*; import flash.display.*; import com.spilgames.api.*; import zlong.*; import flash.utils.*; public class SpilSetting implements IEventDispatcher { private var _isDebug:Boolean; private var _spilGamesServices:SpilGamesServices; private var _outTimer:Timer; framework_internal static const VERSION:String = "v1.15.201012131511"; public static const SPILGAMESSERVICS_INITIALIZED_COMPONENT:String = "SPILGAMESSERVICS_INITIALIZED_COMPONENT"; public static const SPILGAMESSERVICS_INITIALIZED_FAILED:String = "SPILGAMESSERVICS_INITIALIZED_FAILED"; private static const MAX_CONNECT_TIME:int = 15; private static var _initSpilGamesServices_finish:Boolean = true; static var _instance:SpilSetting; public function SpilSetting(){ super(); } public function init(disObj:Sprite, gameName:String, isDebug:Boolean=false):void{ var disObj = disObj; var gameName = gameName; var isDebug = isDebug; if (this._spilGamesServices){ return; }; this._isDebug = isDebug; if (disObj.stage == null){ throw (new ArgumentError("disObj need be added in stage")); }; this._outTimer = new Timer((MAX_CONNECT_TIME * 1000), 1); this._outTimer.start(); this._outTimer.addEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerend_initSpilGamesServices); _initSpilGamesServices_finish = false; this._spilGamesServices = SpilGamesServices.getInstance(); this._spilGamesServices.addEventListener("servicesReady", this.onServicesReady); this._spilGamesServices.addEventListener("servicesFailed", this.onServicesFailed); this._spilGamesServices.connect(disObj); //unresolved jump var _slot1 = error; onServicesFailed(); } private function onTimerend_initSpilGamesServices(event:TimerEvent):void{ Trace("||ZFW||", "10second TimeOut--onTimerend_initSpilGamesServices"); this._spilGamesServices.dispatchEvent(new ErrorEvent("servicesFailed", false, false, ":connect_Timeout")); } private function onServicesReady(event:Event):void{ this._outTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerend_initSpilGamesServices); this._outTimer.stop(); this._outTimer = null; this._spilGamesServices.removeEventListener("servicesReady", this.onServicesReady); this._spilGamesServices.removeEventListener("servicesFailed", this.onServicesFailed); if (this._isDebug){ Trace("||ZFW||", ("SpilSetting_SpilGamesServices_Initialized_Complete::" + event)); }; _initSpilGamesServices_finish = true; } private function onServicesFailed(event:ErrorEvent=null):void{ this._outTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.onTimerend_initSpilGamesServices); this._outTimer.stop(); this._outTimer = null; this._spilGamesServices.removeEventListener("servicesReady", this.onServicesReady); this._spilGamesServices.removeEventListener("servicesFailed", this.onServicesFailed); if (this._isDebug){ Trace("||ZFW||", ("SpilSetting_SpilGamesServices_Initialize_Failed:" + event.text)); }; _initSpilGamesServices_finish = true; } public function checkUserLogin():Boolean{ if (this._spilGamesServices){ return (!(User.isGuest())); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function get itemId():String{ if (this._spilGamesServices){ return (String(this._spilGamesServices.getItemID())); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function get siteId():String{ if (this._spilGamesServices){ return (String(this._spilGamesServices.getSiteID())); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function get username():String{ if (this._spilGamesServices){ return (User.getUserName()); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function get hash():String{ if (this._spilGamesServices){ return (User.getUserHash()); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function get initSpilGamesServices_finish():Boolean{ if (this._spilGamesServices){ return (_initSpilGamesServices_finish); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function dispatchEvent(event:Event):Boolean{ if (this._spilGamesServices){ return (this._spilGamesServices.dispatchEvent(event)); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function hasEventListener(type:String):Boolean{ if (this._spilGamesServices){ return (this._spilGamesServices.hasEventListener(type)); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function willTrigger(type:String):Boolean{ if (this._spilGamesServices){ return (this._spilGamesServices.willTrigger(type)); }; throw (new ArgumentError("SpilSetting didn`t init")); } public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void{ if (this._spilGamesServices){ this._spilGamesServices.removeEventListener(type, listener); } else { throw (new ArgumentError("SpilSetting didn`t init")); }; } public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void{ if (this._spilGamesServices){ this._spilGamesServices.addEventListener(type, listener); } else { throw (new ArgumentError("SpilSetting didn`t init")); }; } public static function get instance():SpilSetting{ if (_instance == null){ _instance = new (SpilSetting); }; return (_instance); } } }//package zlong.spilSystemTool
Section 206
//AbstractLoadingClass (zlong.Template.AbstractLoadingClass) package zlong.Template { import flash.display.*; import flash.utils.*; public class AbstractLoadingClass { framework_internal static const VERSION:String = "v1.15.201012131511"; public function AbstractLoadingClass(pmc:Sprite){ super(); if (getQualifiedClassName(this) == "zlong::Template::AbstractLoadingClass"){ throw (new ArgumentError("can't be constructed")); }; } public function destroy():void{ throw (new ArgumentError("function destroy must be override")); } } }//package zlong.Template
Section 207
//AbstractMainClass (zlong.Template.AbstractMainClass) package zlong.Template { import flash.display.*; import zlong.spilSystemTool.*; import flash.text.*; import flash.utils.*; import net.hires.debug.*; import zlong.utils.*; public class AbstractMainClass { private var __mainMc:Sprite; protected var __GameMc:Sprite; private var _childClass:Class; framework_internal static const VERSION:String = "v1.15.201012131511"; public function AbstractMainClass(mainMc:Sprite){ super(); if (getQualifiedClassName(this) == "zlong::Template::AbstractMainClass"){ throw (new ArgumentError("can't be constructed")); }; this._childClass = (getDefinitionByName(getQualifiedClassName(this)) as Class); this.__mainMc = mainMc; this.__GameMc = new Sprite(); this.__GameMc.name = "GameMc"; this.__mainMc.addChild(this.__GameMc); this.initGameSetting(); } protected function initGameSetting():void{ SpilSetting.instance.init((this.__mainMc.root as Sprite), this.gameNameUnderline, AbstractRootClass.instance._childClass["__debug__"]); SharedObjectUtil.init(this.gameNameUnderline); GoogleEvent.instance.init(this.gameNameUnderline, this.__mainMc.root, AbstractRootClass.instance._childClass["__debug__"]); } protected function showVersion(v:String):void{ var tempMc:Sprite; tempMc = new Sprite(); tempMc.name = "VersionMc"; tempMc.mouseEnabled = false; this.__mainMc.addChild(tempMc); var _tf:TextField = new TextField(); _tf.selectable = false; _tf.mouseEnabled = false; _tf.defaultTextFormat = new TextFormat("_san", 12, 0); _tf.width = 200; _tf.height = 50; _tf.x = 0; _tf.y = 0; _tf.text = v; tempMc.addChild(_tf); } protected function showFPS():void{ this.__mainMc.addChild(new Stats()); } public function get gameNameUnderline():String{ return (AbstractRootClass.cutGameName((AbstractRootClass.instance._childClass["GAME_NAME"] as String))); } } }//package zlong.Template
Section 208
//AbstractRootClass (zlong.Template.AbstractRootClass) package zlong.Template { import flash.events.*; import flash.display.*; import zlong.spilSystemTool.*; import zlong.site.*; import zlong.utils.*; import zlong.*; import flash.utils.*; import flash.geom.*; public class AbstractRootClass extends MovieClip { var _childClass:Class; private var __mainMc:Sprite; private var _game:Object; private var _realLoaderUI:Object; private var _textLoaderUI:TextLoader; private var _loadingComplete:Boolean; framework_internal static const VERSION:String = "v1.15.201012131511"; static var instance:AbstractRootClass; public function AbstractRootClass(){ super(); if (stage){ this.init(); } else { addEventListener(Event.ADDED_TO_STAGE, this.init); }; } private function init(event:Event=null):void{ removeEventListener(Event.ADDED_TO_STAGE, this.init); instance = this; this._loadingComplete = false; this.stop(); if (getQualifiedClassName(this) == "zlong::Template::AbstractRootClass"){ throw (new ArgumentError("can't be constructed")); }; this._childClass = (getDefinitionByName(getQualifiedClassName(this)) as Class); if (!(this._childClass["GAME_FRAMERATE"] is int)){ throw (new ArgumentError("Class Root need static const Int 'GAME_FRAMERATE'")); }; if (!(this._childClass["GAME_NAME"] is String)){ throw (new ArgumentError("Class Root need static const String 'GAME_NAME'")); }; if (!(this._childClass["STAGE_WIGHT"] is int)){ throw (new ArgumentError("Class Root need static const Int 'STAGE_WIGHT'")); }; if (!(this._childClass["STAGE_HEIGHT"] is int)){ throw (new ArgumentError("Class Root need static const Int 'STAGE_HEIGHT'")); }; if (!(this._childClass["PORTAL_TYPE"] is String)){ throw (new ArgumentError("Class Root need static const String 'PORTAL_TYPE'")); }; if (!(this._childClass["LOADING_CLASS_NAME"] is String)){ throw (new ArgumentError("Class Root need static const String 'LOADING_CLASS_NAME'")); }; if (!(this._childClass["GAME_CLASS_NAME"] is String)){ throw (new ArgumentError("Class Root need static const String 'GAME_CLASS_NAME'")); }; if (!(this._childClass["VERSION_NUM"] is String)){ throw (new ArgumentError("Class Root need static const String 'VERSION_NUM'")); }; if (!(this._childClass["__debug__"] is Boolean)){ throw (new ArgumentError("Class Root need static const Boolean '__debug__'")); }; stage.frameRate = this._childClass["GAME_FRAMERATE"]; this.__mainMc = new Sprite(); this.__mainMc.name = "__mainMc"; this.addChild(this.__mainMc); if (!this._childClass["__debug__"]){ this.__mainMc.scrollRect = new Rectangle(0, 0, this._childClass["STAGE_WIGHT"], this._childClass["STAGE_HEIGHT"]); }; this.addFrameScript(0, this.s0); this.addFrameScript(1, this.s1); this.addFrameScript(2, this.s2); this.checkFPVersion(); HideConsole = ["|ZLC|"]; } private function checkFPVersion():void{ FPVersionCheck.checkVersion(); } private function s0():void{ this.script0(); this.stop(); this.initSettingBeforeLoading(); this.initTextloader(); this.initLoading(); } private function s1():void{ var realLoadingClass:Class; this.script1(); this.stop(); this._childClass["LOADING_CLASS_NAME"]; realLoadingClass = (getDefinitionByName(this._childClass["LOADING_CLASS_NAME"]) as Class); //unresolved jump var _slot1 = e; throw (new ArgumentError(("can`t found the Loading Class " + _childClass["LOADING_CLASS_NAME"]))); return; this._realLoaderUI = new realLoadingClass(this.__mainMc); if (!(this._realLoaderUI is (getDefinitionByName("zlong.Template.AbstractLoadingClass") as Class))){ throw (new ArgumentError("the Loading Class mush extends Class AbstractLoadingClass")); }; } private function s2():void{ var mainClass:Class; this.script2(); this.stop(); mainClass = (getDefinitionByName(this._childClass["GAME_CLASS_NAME"]) as Class); //unresolved jump var _slot1 = e; throw (new ArgumentError(("can`t found the Main Class " + _childClass["GAME_CLASS_NAME"]))); return; this._game = new mainClass(this.__mainMc); if (!(this._game is (getDefinitionByName("zlong.Template.AbstractMainClass") as Class))){ throw (new ArgumentError("the Main Class mush extends Class AbstractMainClass")); }; } private function initLoading():void{ this.addEventListener(Event.ENTER_FRAME, this.updateLoading); this.loaderInfo.addEventListener(Event.COMPLETE, this.LoadingComplete); } private function LoadingComplete(event:Event):void{ this._loadingComplete = true; this.loaderInfo.removeEventListener(Event.COMPLETE, this.LoadingComplete); } private function updateLoading(event:Event):void{ if (this.framesLoaded == 1){ this._textLoaderUI.update(); }; if ((((this.currentFrame == 1)) && ((this.framesLoaded >= 2)))){ this.realLoaderLoadingFinish(); }; if ((((((((this.currentFrame == 2)) && (((this._loadingComplete) || ((this.totalFrames == this.framesLoaded)))))) && (LocalSiteDataLoader.localSiteDataLoaderFinish))) && (Award_HighScore.initializedFinish))){ this.loadingFinish(); this.delLoading(); }; Trace("||ZFW||", "currentFrame:", currentFrame, "framesLoaded", framesLoaded, "_loadingComplete", this._loadingComplete); } private function delLoading():void{ this.removeEventListener(Event.ENTER_FRAME, this.updateLoading); } private function initTextloader():void{ this._textLoaderUI = new TextLoader(this.__mainMc, this._childClass["STAGE_WIGHT"], this._childClass["STAGE_HEIGHT"]); } protected function delTextLoader():void{ if (this._textLoaderUI){ this._textLoaderUI.del(); this._textLoaderUI = null; }; } protected function delRealLoadingUI():void{ if (this._realLoaderUI){ var _local1 = this._realLoaderUI; _local1["destroy"](); }; } protected function initSettingBeforeLoading():void{ new GameSetting(this, false, this._childClass["PORTAL_TYPE"], cutGameName((this._childClass["GAME_NAME"] as String)), (cutGameName((this._childClass["GAME_NAME"] as String), "-", true) + ".html"), this._childClass["STAGE_WIGHT"], this._childClass["STAGE_HEIGHT"]); Award_HighScore.instance.init(cutGameName((this._childClass["GAME_NAME"] as String)), this, this._childClass["__debug__"], this._childClass["__debug__"]); } protected function realLoaderLoadingFinish():void{ this.delTextLoader(); this.gotoAndStop(2); } protected function loadingFinish():void{ this.delRealLoadingUI(); this.gotoAndStop(3); } protected function script0():void{ } protected function script1():void{ } protected function script2():void{ } public static function cutGameName(gamename:String, delim:String="_", initialToUpperCase:Boolean=false):String{ var re:RegExp = /[-| |_]/; var gameNamePartArr:Array = gamename.split(re); var paraName:String = ""; var paraNamePart:String = ""; var i:int; while (i < gameNamePartArr.length) { paraNamePart = ((gameNamePartArr[i] as String).toLowerCase() + delim); if (initialToUpperCase){ paraName = (paraName + (paraNamePart.charAt(0).toUpperCase() + paraNamePart.substr(1))); } else { paraName = (paraName + paraNamePart); }; i++; }; paraName = paraName.substr(0, (paraName.length - 1)); return (paraName); } } }//package zlong.Template
Section 209
//TextLoader (zlong.Template.TextLoader) package zlong.Template { import flash.display.*; import flash.text.*; import zlong.*; public class TextLoader { private var _tf:TextField; private var _loaderInfo:LoaderInfo; private var _width:Number; private var _height:Number; private var _pmc:Sprite; framework_internal static const VERSION:String = "v1.15.201012131511"; public function TextLoader(pmc:Sprite, width:Number, height:Number){ super(); this._pmc = pmc; this._width = width; this._height = height; this._loaderInfo = pmc.root.loaderInfo; this._tf = new TextField(); this._tf.autoSize = TextFieldAutoSize.LEFT; this._tf.defaultTextFormat = new TextFormat("_sans", 16, 0, true); this._tf.height = 30; this._pmc.addChild(this._tf); } function update():void{ this._tf.text = (("Loading... " + Math.floor(((100 * this._loaderInfo.bytesLoaded) / this._loaderInfo.bytesTotal))) + "%"); this._tf.x = ((this._width - this._tf.width) / 2); this._tf.y = ((this._height - this._tf.height) / 2); } function del():void{ this._pmc.removeChild(this._tf); this._tf = null; this._loaderInfo = null; this._pmc = null; } } }//package zlong.Template
Section 210
//FPVersionCheck (zlong.utils.FPVersionCheck) package zlong.utils { import zlong.*; import flash.system.*; public class FPVersionCheck { public static const ALLOW_VERSION_MIN:String = "9,0,0,0"; public static function getVersion():String{ return (Capabilities.version); } framework_internal static function checkVersion():void{ var i:int; var __information:String = Capabilities.version; var __curVersion:Array = (__information.split(" ")[1] as String).split(","); var __needVersion:Array = ALLOW_VERSION_MIN.split(","); for (;i < __curVersion.length;i++) { if (int(__curVersion[i]) > int(__needVersion[i])){ return; }; if (int(__curVersion[i]) == int(__needVersion[i])){ continue; } else { if (int(__curVersion[i]) < int(__needVersion[i])){ Trace(("当前flash player版本为" + __information)); Trace(("游戏允许的最低flash player版本为flash player" + ALLOW_VERSION_MIN)); throw (new VerifyError(("The current Flash Player version is too low,please use the version above Flash Player" + ALLOW_VERSION_MIN))); }; }; }; } } }//package zlong.utils
Section 211
//SharedObjectUtil (zlong.utils.SharedObjectUtil) package zlong.utils { import flash.events.*; import flash.net.*; public class SharedObjectUtil { private static const PREFIX:String = "SpilGames"; private static const GLOBAL:String = "global"; private static var gameName:String; private static var operatedSharedObject:SharedObject; public static function init(sharedObjectGameName:String):void{ gameName = sharedObjectGameName; } public static function getGlobal(name:String):SharedObject{ var so:SharedObject; var name = name; so = SharedObject.getLocal(((((PREFIX + "_") + GLOBAL) + "_") + name), "/"); //unresolved jump var _slot1 = err; trace("create error"); return (so); } public static function getLocal(name:String):SharedObject{ var so:SharedObject; var name = name; so = SharedObject.getLocal(((((PREFIX + "_") + gameName) + "_") + name), "/"); //unresolved jump var _slot1 = err; trace("create error"); return (so); } public static function save(sharedObject:SharedObject):void{ var flushResult:String; var sharedObject = sharedObject; operatedSharedObject = sharedObject; flushResult = operatedSharedObject.flush(); if (flushResult == SharedObjectFlushStatus.PENDING){ operatedSharedObject.addEventListener(NetStatusEvent.NET_STATUS, statusHandler); } else { operatedSharedObject = null; }; //unresolved jump var _slot1 = err; } private static function statusHandler(event:NetStatusEvent):void{ if (event.info.code == "SharedObject.Flush.Failed"){ } else { if (event.info.code == "SharedObject.Flush.Success"){ trace("save successed"); }; }; operatedSharedObject.removeEventListener(NetStatusEvent.NET_STATUS, statusHandler); operatedSharedObject = null; } } }//package zlong.utils
Section 212
//AbstractCollection (zlong.zelda.collisionEngine.AbstractCollection) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; import flash.utils.*; public class AbstractCollection { private var _walls:Array; private var _particles:Array; private var _isParented:Boolean; private var _constraints:Array; private var _sprite:Sprite; public function AbstractCollection(){ super(); if (getQualifiedClassName(this) == "zlong.zelda.collisionEngine::AbstractCollection"){ throw (new ArgumentError("AbstractCollection can't be instantiated directly")); }; _isParented = false; _particles = new Array(); _constraints = new Array(); _walls = new Array(); } public function removeConstraint(c:AbstractConstraint):void{ var cpos:int = constraints.indexOf(c); if (cpos == -1){ return; }; constraints.splice(cpos, 1); c.cleanup(); } function checkCollisionsVsCollection(ac:AbstractCollection):void{ var normal:mVector; var pga:AbstractParticle; var acplen:int; var x:int; var acclen:int; var acwlen:int; var relationWalls:Array; var pgb:AbstractParticle; var cgb:SpringConstraint; var wgb:AbstractWall; var tempWall:AbstractWall; var cga:SpringConstraint; var n:int; var pa:AbstractParticle; var waLen:int; var m:int; var wa:AbstractWall; var tempWall2:AbstractWall; var plen:int = _particles.length; var j:int; while (j < plen) { pga = _particles[j]; if (((pga) && (!(pga.collidable)))){ } else { acplen = ac.particles.length; x = 0; while (x < acplen) { pgb = ac.particles[x]; if (((pgb) && (pgb.collidable))){ if ((((Math.abs((pga.px - pgb.px)) > CollisionEngine.collRange.x)) || ((Math.abs((pga.py - pgb.py)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.test(pga, pgb); if (normal){ pga.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pgb, normal, pgb.velocity.length)); pgb.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pga, normal, pga.velocity.length)); }; }; }; x++; }; acclen = ac.constraints.length; x = 0; while (x < acclen) { if (((ac.constraints[x]) && ((ac.constraints[x] is AngularConstraint)))){ } else { cgb = ac.constraints[x]; if (((((cgb) && (cgb.collidable))) && (!(cgb.isConnectedTo(pga))))){ cgb.scp.updatePosition(); if ((((Math.abs((pga.px - cgb.center.x)) > CollisionEngine.collRange.x)) || ((Math.abs((pga.py - cgb.center.y)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.test(pga, cgb.scp); if (normal){ pga.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, cgb, normal)); cgb.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pga, normal, pga.velocity.length)); }; }; }; }; x++; }; acwlen = ac.walls.length; relationWalls = new Array(); x = 0; while (x < acwlen) { wgb = ac.walls[x]; if (((wgb) && (wgb.collidable))){ for each (tempWall in relationWalls) { if (wgb == tempWall){ //unresolved jump }; }; if ((((Math.abs((pga.px - wgb.center.x)) > CollisionEngine.collRange.x)) || ((Math.abs((pga.py - wgb.center.y)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.testObjToWall(pga, wgb); if (normal){ pga.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, wgb, normal)); wgb.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pga, normal, pga.velocity.length)); if (wgb.relationWalls){ relationWalls = wgb.relationWalls; }; }; }; }; x++; }; }; j++; }; var clen:int = _constraints.length; j = 0; while (j < clen) { if (((_constraints[j]) && ((_constraints[j] is AngularConstraint)))){ } else { cga = _constraints[j]; if (((cga) && (!(cga.collidable)))){ } else { acplen = ac.particles.length; n = 0; while (n < acplen) { pgb = ac.particles[n]; if (((((pgb) && (pgb.collidable))) && (!(cga.isConnectedTo(pgb))))){ cga.scp.updatePosition(); if ((((Math.abs((pgb.px - cga.scp.px)) > CollisionEngine.collRange.x)) || ((Math.abs((pgb.py - cga.scp.py)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.test(pgb, cga.scp); if (normal){ pgb.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, cga, normal)); cga.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pgb, normal, pgb.velocity.length)); }; }; }; n++; }; }; }; j++; }; var paLen:int = ac.particles.length; var relationWalls2:Array = new Array(); j = 0; while (j < paLen) { pa = ac.particles[j]; if (((pa) && (!(pa.collidable)))){ } else { waLen = _walls.length; m = 0; while (m < waLen) { wa = _walls[m]; if (((wa) && (wa.collidable))){ for each (tempWall2 in relationWalls2) { if (wa == tempWall){ //unresolved jump }; }; if ((((Math.abs((pa.px - wa.center.x)) > CollisionEngine.collRange.x)) || ((Math.abs((pa.py - wa.center.y)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.testObjToWall(pa, wa); if (normal){ pa.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, wa, normal)); wa.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pa, normal, pa.velocity.length)); if (wa.relationWalls){ relationWalls2 = wa.relationWalls; }; }; }; }; m++; }; }; j++; }; } public function get sprite():Sprite{ if (_sprite != null){ return (_sprite); }; if (CollisionEngine.container == null){ throw (new Error("The container property of the CollisionEngine class has not been set")); }; _sprite = new Sprite(); CollisionEngine.container.addChild(_sprite); return (_sprite); } function checkInternalCollisions():void{ var normal:mVector; var pa:AbstractParticle; var i:int; var clen:int; var n:int; var wlen:int; var relationWalls:Array; var pb:AbstractParticle; var c:SpringConstraint; var m:int; var wall:AbstractWall; var tempWall:AbstractWall; var plen:int = _particles.length; var j:int; while (j < plen) { pa = _particles[j]; if (((pa) && (!(pa.collidable)))){ } else { i = (j + 1); while (i < plen) { pb = _particles[i]; if (((pb) && (pb.collidable))){ if ((((Math.abs((pa.px - pb.px)) > CollisionEngine.collRange.x)) || ((Math.abs((pa.py - pb.py)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.test(pa, pb); if (normal){ pa.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pb, normal, pb.velocity.length)); pb.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pa, normal, pa.velocity.length)); }; }; }; i++; }; clen = _constraints.length; n = 0; while (n < clen) { if (((_constraints[n]) && ((_constraints[n] is AngularConstraint)))){ } else { c = _constraints[n]; if (((((c) && (c.collidable))) && (!(c.isConnectedTo(pa))))){ c.scp.updatePosition(); if ((((Math.abs((pa.px - c.scp.px)) > CollisionEngine.collRange.x)) || ((Math.abs((pa.py - c.scp.py)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.test(pa, c.scp); if (normal){ pa.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, c, normal)); c.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pa, normal, pa.velocity.length)); }; }; }; }; n++; }; wlen = _walls.length; relationWalls = new Array(); m = 0; while (m < wlen) { wall = _walls[m]; if (((wall) && (wall.collidable))){ for each (tempWall in relationWalls) { if (wall == tempWall){ //unresolved jump }; }; if ((((Math.abs((pa.px - wall.center.x)) > CollisionEngine.collRange.x)) || ((Math.abs((pa.py - wall.center.y)) > CollisionEngine.collRange.y)))){ } else { normal = CollisionDetector.testObjToWall(pa, wall); if (normal){ pa.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, wall, normal)); wall.dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDED, pa, normal, pa.velocity.length)); if (wall.relationWalls){ relationWalls = wall.relationWalls; }; }; }; }; m++; }; }; j++; }; } public function addParticle(p:AbstractParticle):void{ particles.push(p); if (isParented){ p.init(); }; } public function addWall(w:AbstractWall):void{ walls.push(w); if (isParented){ w.init(); }; } public function init():void{ var i:int; while (i < particles.length) { particles[i].init(); i++; }; i = 0; while (i < constraints.length) { constraints[i].init(); i++; }; i = 0; while (i < walls.length) { walls[i].init(); i++; }; } function satisfyConstraints():void{ var c:AbstractConstraint; var len:int = _constraints.length; var i:int; while (i < len) { c = _constraints[i]; c.resolve(); i++; }; } function get isParented():Boolean{ return (_isParented); } public function addConstraint(c:AbstractConstraint):void{ constraints.push(c); if (isParented){ c.init(); }; } public function paint():void{ var p:AbstractParticle; var c:SpringConstraint; var w:AbstractWall; var len:int = _particles.length; var i:int; while (i < len) { p = _particles[i]; if (((!(p.fixed)) || (p.alwaysRepaint))){ p.paint(); }; i++; }; len = _constraints.length; i = 0; while (i < len) { if ((_constraints[i] is AngularConstraint)){ } else { c = _constraints[i]; if (((!(c.fixed)) || (c.alwaysRepaint))){ c.paint(); }; }; i++; }; len = _walls.length; i = 0; while (i < len) { w = _walls[i]; if (w.alwaysRepaint){ w.paint(); }; i++; }; } function set isParented(b:Boolean):void{ _isParented = b; } public function get walls():Array{ return (_walls); } public function getAll():Array{ return (particles.concat(constraints).concat(walls)); } public function get particles():Array{ return (_particles); } public function removeParticle(p:AbstractParticle):void{ var ppos:int = particles.indexOf(p); if (ppos == -1){ return; }; particles.splice(ppos, 1); p.cleanup(); } public function cleanup():void{ var i:int; while (i < particles.length) { particles[i].cleanup(); i++; }; i = 0; while (i < constraints.length) { constraints[i].cleanup(); i++; }; i = 0; while (i < walls.length) { walls[i].cleanup(); i++; }; } public function get constraints():Array{ return (_constraints); } function integrate(dt2:Number):void{ var p:AbstractParticle; var len:int = _particles.length; var i:int; while (i < len) { p = _particles[i]; p.update(dt2); i++; }; } public function removeWall(w:AbstractWall):void{ var wpos:int = walls.indexOf(w); if (wpos == -1){ return; }; walls.splice(wpos, 1); w.cleanup(); } } }//package zlong.zelda.collisionEngine
Section 213
//AbstractConstraint (zlong.zelda.collisionEngine.AbstractConstraint) package zlong.zelda.collisionEngine { import flash.utils.*; public class AbstractConstraint extends AbstractObject { private var _stiffness:Number; public function AbstractConstraint(stiffness:Number){ super(); if (getQualifiedClassName(this) == "zlong.zelda.collisionEngine::AbstractConstraint"){ throw (new ArgumentError("AbstractConstraint can't be instantiated directly")); }; this.stiffness = stiffness; } public function get stiffness():Number{ return (_stiffness); } function resolve():void{ } public function set stiffness(v:Number):void{ _stiffness = v; } } }//package zlong.zelda.collisionEngine
Section 214
//AbstractObject (zlong.zelda.collisionEngine.AbstractObject) package zlong.zelda.collisionEngine { import flash.display.*; import flash.events.*; import zlong.breathxue.utils.math.*; import flash.geom.*; import flash.utils.*; public class AbstractObject extends EventDispatcher { private var _alwaysRepaint:Boolean; private var _isShowResolver:Boolean; var fillAlpha:Number; var fillColor:uint; var displayObject:DisplayObject; var displayObjectOffset:mVector; private var _engineForceEffect:Boolean; var displayObjectRotation:Number; var _rect:Rectangle; var lineAlpha:Number; private var _visible:Boolean; var lineColor:uint; var lineThickness:Number; private var _name:String; private var _sprite:Sprite; private var _customerArr:Array; public function AbstractObject(){ super(); if (getQualifiedClassName(this) == "zlong.zelda.collisionEngine::AbstractObject"){ throw (new ArgumentError("AbstractObject can't be instantiated directly")); }; _visible = true; _alwaysRepaint = false; _engineForceEffect = true; _isShowResolver = true; setStyle(); } public function setFill(color:uint=0xFFFFFF, alpha:Number=1):void{ fillColor = color; fillAlpha = alpha; } public function get name():String{ return (_name); } public function init():void{ } public function set name(n:String):void{ _name = n; } public function get customerArr():Array{ if (_customerArr == null){ _customerArr = new Array(); }; return (_customerArr); } public function cleanup():void{ sprite.graphics.clear(); while (sprite.numChildren != 0) { sprite.removeChildAt(0); }; } public function get engineForceEffect():Boolean{ return (_engineForceEffect); } public function get sprite():Sprite{ if (_sprite != null){ return (_sprite); }; if (CollisionEngine.container == null){ throw (new Error("The container property of the CollisionEngine class has not been set")); }; _sprite = new Sprite(); CollisionEngine.container.addChild(_sprite); return (_sprite); } public function set isShowResolver(h:Boolean):void{ _isShowResolver = h; } public function paint():void{ } public function getRect():Rectangle{ return (_rect); } public function set visible(v:Boolean):void{ _visible = v; sprite.visible = v; } public function get isShowResolver():Boolean{ return (_isShowResolver); } public function setStyle(lineThickness:Number=0, lineColor:uint=0, lineAlpha:Number=1, fillColor:uint=0xFFFFFF, fillAlpha:Number=1):void{ setLine(lineThickness, lineColor, lineAlpha); setFill(fillColor, fillAlpha); } public function get visible():Boolean{ return (_visible); } public function set engineForceEffect(v:Boolean):void{ _engineForceEffect = v; } public function setLine(thickness:Number=0, color:uint=0, alpha:Number=1):void{ lineThickness = thickness; lineColor = color; lineAlpha = alpha; } final public function set alwaysRepaint(b:Boolean):void{ _alwaysRepaint = b; } final public function get alwaysRepaint():Boolean{ return (_alwaysRepaint); } } }//package zlong.zelda.collisionEngine
Section 215
//AbstractParticle (zlong.zelda.collisionEngine.AbstractParticle) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; import flash.utils.*; public class AbstractParticle extends AbstractObject { private var _collidable:Boolean; private var _forces:mVector; private var _center:mVector; private var _temp:mVector; private var _kfr:Number; var curr:mVector; private var _collision:Collision; var interval:Interval; private var _invMass:Number; var prev:mVector; private var _mass:Number; private var _friction:Number; private var _multisample:int; var samp:mVector; private var _fixed:Boolean; public function AbstractParticle(x:Number, y:Number, isFixed:Boolean, mass:Number, elasticity:Number, friction:Number){ super(); if (getQualifiedClassName(this) == "zlong.zelda.collisionEngine::AbstractParticle"){ throw (new ArgumentError("AbstractParticle can't be instantiated directly")); }; interval = new Interval(0, 0); curr = new mVector(x, y); prev = new mVector(x, y); samp = new mVector(); _temp = new mVector(); _fixed = isFixed; _forces = new mVector(); _collision = new Collision(new mVector(), new mVector()); _collidable = true; this.mass = mass; this.elasticity = elasticity; this.friction = friction; setStyle(); _center = new mVector(); _multisample = 0; } function resolveCollisionInternal(mtd:mVector, vel:mVector, n:mVector, d:Number, o:int, p:AbstractParticle=null):void{ resolveCollision(mtd, vel, n, d, o, p); } public function set currPos(v:mVector):void{ curr.copyFrom(v); } function get invMass():Number{ return ((fixed) ? 0 : _invMass); } public function get px():Number{ return (curr.x); } public function get py():Number{ return (curr.y); } public function set px(x:Number):void{ curr.x = x; prev.x = x; } function initDisplay():void{ displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); } function getComponents(collisionNormal:mVector):Collision{ var vel:mVector = velocity; var vdotn:Number = collisionNormal.dot(vel); _collision.vn = collisionNormal.mult(vdotn); _collision.vt = vel.minus(_collision.vn); return (_collision); } public function setDisplay(d:DisplayObject, offsetX:Number=0, offsetY:Number=0, rotation:Number=0):void{ displayObject = d; displayObjectRotation = rotation; displayObjectOffset = new mVector(offsetX, offsetY); } public function set py(y:Number):void{ curr.y = y; prev.y = y; } public function get mass():Number{ return (_mass); } public function get multisample():int{ return (_multisample); } protected function resolveCollision(mtd:mVector, vel:mVector, n:mVector, d:Number, o:int, p:AbstractParticle=null):void{ curr.plusEquals(mtd); velocity = velocity.copyFrom(vel); } public function get position():mVector{ return (new mVector(curr.x, curr.y)); } public function addMasslessForce(f:mVector):void{ _forces.plusEquals(f); } public function get elasticity():Number{ return (_kfr); } public function set velocity(v:mVector):void{ prev = curr.minus(v); } public function update(dt2:Number):void{ if (_fixed){ return; }; if (this.engineForceEffect){ addForce(CollisionEngine.force); addMasslessForce(CollisionEngine.masslessForce); }; _temp.copyFrom(curr); var nv:mVector = velocity.plus(_forces.multEquals(dt2)); curr.plusEquals(nv.multEquals(CollisionEngine.damping)); prev.copyFrom(_temp); _forces.setTo(0, 0); } public function addForce(f:mVector):void{ _forces.plusEquals(f.mult(_invMass)); } public function set multisample(m:int):void{ _multisample = m; } public function set collidable(b:Boolean):void{ _collidable = b; } public function set position(p:mVector):void{ curr.copyFrom(p); prev.copyFrom(p); } public function get center():mVector{ _center.setTo(curr.x, curr.y); return (_center); } public function get currPos():mVector{ return (curr); } public function get velocity():mVector{ return (curr.minus(prev)); } public function get collidable():Boolean{ return (_collidable); } public function set mass(m:Number):void{ if (m <= 0){ throw (new ArgumentError("mass may not be set <= 0")); }; _mass = m; _invMass = (1 / _mass); } public function set elasticity(k:Number):void{ _kfr = k; } public function set friction(f:Number):void{ if ((((f < 0)) || ((f > 1)))){ throw (new ArgumentError("Legal friction must be >= 0 and <=1")); }; _friction = f; } public function set fixed(f:Boolean):void{ _fixed = f; } public function get friction():Number{ return (_friction); } public function get fixed():Boolean{ return (_fixed); } } }//package zlong.zelda.collisionEngine
Section 216
//AbstractWall (zlong.zelda.collisionEngine.AbstractWall) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; import flash.utils.*; public class AbstractWall extends AbstractObject { private var _collidable:Boolean; private var _isStartPointColl:Boolean; private var _singleWallFix:Number; private var _isDownColl:Boolean; private var _kfr:Number; var curr:mVector; private var _relationWalls:Array; private var _isUpColl:Boolean; private var _endPoint:mVector; private var _pointNormal:mVector; private var _friction:Number; private var _isEndPointColl:Boolean; private var _startPoint:mVector; private var _center:mVector; public function AbstractWall(startPoint:mVector, endPoint:mVector, elasticity:Number=0, friction:Number=0){ super(); if (getQualifiedClassName(this) == "zlong.zelda.collisionEngine::AbstractWall"){ throw (new ArgumentError("AbstractWall can't be instantiated directly")); }; _collidable = true; this.startPoint = startPoint; this.endPoint = endPoint; this.elasticity = elasticity; this.friction = friction; _isStartPointColl = true; _isEndPointColl = true; _isUpColl = true; _isDownColl = true; _singleWallFix = 0.3; this.setStyle(); _center = new mVector(); } public function get py():Number{ return (curr.y); } public function get singleWallFix():Number{ return (_singleWallFix); } public function set singleWallFix(v:Number):void{ if (_singleWallFix < 0){ _singleWallFix = 0; } else { if (_singleWallFix > 1){ _singleWallFix = 1; } else { _singleWallFix = v; }; }; } public function setDisplay(d:DisplayObject, offsetX:Number=0, offsetY:Number=0, rotation:Number=0):void{ displayObject = d; displayObjectRotation = rotation; displayObjectOffset = new mVector(offsetX, offsetY); } public function set px(x:Number):void{ curr.x = x; } function initDisplay():void{ displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); } public function set isEndPointColl(b:Boolean):void{ _isEndPointColl = b; } public function set py(y:Number):void{ curr.y = y; } public function set relationWalls(v:Array):void{ _relationWalls = v; } public function get pointNormal():mVector{ return (_pointNormal); } public function set startPoint(p:mVector):void{ _startPoint = p; } public function get isStartPointColl():Boolean{ return (_isStartPointColl); } public function get px():Number{ return (curr.x); } public function set pointNormal(v:mVector):void{ _pointNormal = v; } public function get elasticity():Number{ return (_kfr); } public function set collidable(b:Boolean):void{ _collidable = b; } public function set isStartPointColl(b:Boolean):void{ _isStartPointColl = b; } public function get isEndPointColl():Boolean{ return (_isEndPointColl); } public function get relationWalls():Array{ return (_relationWalls); } public function get startPoint():mVector{ return (_startPoint); } public function get center():mVector{ _center.setTo(curr.x, curr.y); return (_center); } public function get collidable():Boolean{ return (_collidable); } public function set isUpColl(b:Boolean):void{ _isUpColl = b; } override public function setStyle(lineThickness:Number=5, lineColor:uint=0xFF, lineAlpha:Number=1, fillColor:uint=0xFFFFFF, fillAlpha:Number=1):void{ setLine(lineThickness, lineColor, lineAlpha); setFill(fillColor, fillAlpha); } public function get isUpColl():Boolean{ return (_isUpColl); } public function set elasticity(k:Number):void{ _kfr = k; } public function get endPoint():mVector{ return (_endPoint); } public function set isDownColl(b:Boolean):void{ _isDownColl = b; } public function get isDownColl():Boolean{ return (_isDownColl); } public function set endPoint(p:mVector):void{ _endPoint = p; } public function get friction():Number{ return (_friction); } public function set friction(f:Number):void{ if ((((f < 0)) || ((f > 1)))){ throw (new ArgumentError("Legal friction must be >= 0 and <=1")); }; _friction = f; } } }//package zlong.zelda.collisionEngine
Section 217
//AngularConstraint (zlong.zelda.collisionEngine.AngularConstraint) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; public class AngularConstraint extends AbstractConstraint { private var prevAngle:Number; private var currAngle:Number; private var pA:mVector; private var pB:mVector; private var pC:mVector; private var pD:mVector; public function AngularConstraint(p1:AbstractParticle, p2:AbstractParticle, p3:AbstractParticle, stiffness:Number=1){ super(stiffness); pA = p1.curr; pB = p2.curr; pC = p3.curr; prevAngle = calcTheta(pA, pB, pC); } override function resolve():void{ var center:mVector = getCentroid(); pD = new mVector((pB.x + 0), (pB.y - 1)); var abRadius:Number = pA.distance(pB); var bcRadius:Number = pB.distance(pC); currAngle = calcTheta(pA, pB, pC); var thetaABD:Number = calcTheta(pA, pB, pD); var thetaCBD:Number = calcTheta(pC, pB, pD); var halfTheta:Number = ((prevAngle - currAngle) / 2); var paTheta:Number = (thetaABD + (halfTheta * stiffness)); var pcTheta:Number = (thetaCBD - (halfTheta * stiffness)); pA.x = ((abRadius * Math.sin(paTheta)) + pB.x); pA.y = ((abRadius * Math.cos(paTheta)) + pB.y); pC.x = ((bcRadius * Math.sin(pcTheta)) + pB.x); pC.y = ((bcRadius * Math.cos(pcTheta)) + pB.y); var newCenter:mVector = getCentroid(); var dfx:Number = (newCenter.x - center.x); var dfy:Number = (newCenter.y - center.y); pA.x = (pA.x - dfx); pA.y = (pA.y - dfy); pB.x = (pB.x - dfx); pB.y = (pB.y - dfy); pC.x = (pC.x - dfx); pC.y = (pC.y - dfy); } private function calcTheta(pa:mVector, pb:mVector, pc:mVector):Number{ var AB:mVector = new mVector((pb.x - pa.x), (pb.y - pa.y)); var BC:mVector = new mVector((pc.x - pb.x), (pc.y - pb.y)); var dotProd:Number = AB.dot(BC); var crossProd:Number = AB.cross(BC); return (Math.atan2(crossProd, dotProd)); } private function getCentroid():mVector{ var avgX:Number = (((pA.x + pB.x) + pC.x) / 3); var avgY:Number = (((pA.y + pB.y) + pC.y) / 3); return (new mVector(avgX, avgY)); } } }//package zlong.zelda.collisionEngine
Section 218
//BezierUtil (zlong.zelda.collisionEngine.BezierUtil) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; public class BezierUtil { public static const ON_LINE:String = "ON_LINE"; public static const UP_LINE:String = "UP_LINE"; public static const DOWN_LINE:String = "DOWN_LINE"; private static var _B:Number; private static var _A:Number; private static var _C:Number; private static var _ax:Number; private static var _ay:Number; private static var _bx:Number; private static var _by:Number; public function BezierUtil(){ super(); } public static function getTForClosestPoint(start:mVector, control:mVector, anchor:mVector, point:mVector):Number{ var t:Number; var distance:Number; var ax:Number = ((start.x - (2 * control.x)) + anchor.x); var bx:Number = (control.x - start.x); var cx:Number = start.x; var ay:Number = ((start.y - (2 * control.y)) + anchor.y); var by:Number = (control.y - start.y); var cy:Number = start.y; var a:Number = -(((ax * ax) + (ay * ay))); var b:Number = (-3 * ((ax * bx) + (ay * by))); var c:Number = ((((ax * (point.x - cx)) - ((2 * bx) * bx)) + (ay * (point.y - cy))) - ((2 * by) * by)); var d:Number = ((bx * (point.x - cx)) + (by * (point.y - cy))); var answer:Array = _cubicFormula(a, b, c, d); var minimum:Number = Number.MAX_VALUE; var length:int = answer.length; var i:int; while (i < length) { if (answer[i] < 0){ answer[i] = 0; } else { if (answer[i] > 1){ answer[i] = 1; }; }; distance = point.distance(getValue(start, control, anchor, answer[i])); if (distance < minimum){ t = answer[i]; minimum = distance; }; i++; }; return (t); } public static function getTForX(start:mVector, control:mVector, anchor:mVector, x:Number):Array{ var t:Number; var ax:Number = ((start.x - (2 * control.x)) + anchor.x); var bx:Number = (2 * (control.x - start.x)); var cx:Number = (start.x - x); var answer:Array = _quadraticFormula(ax, bx, cx); var i:int = answer.length; while (i--) { t = answer[i]; if ((((t < 0)) || ((t > 1)))){ answer.splice(i, 1); }; }; return (answer); } public static function getTForY(start:mVector, control:mVector, anchor:mVector, y:Number):Array{ var t:Number; var ay:Number = ((start.y - (2 * control.y)) + anchor.y); var by:Number = (2 * (control.y - start.y)); var cy:Number = (start.y - y); var answer:Array = _quadraticFormula(ay, by, cy); var i:int = answer.length; while (i--) { t = answer[i]; if ((((t < 0)) || ((t > 1)))){ answer.splice(i, 1); }; }; return (answer); } public static function getLocaOfBezier(start:mVector, control:mVector, anchor:mVector, point:mVector):String{ var t:Number; var value:mVector; var temp:Number = (anchor.x - start.x); if (temp == 0){ t = getTForY(start, control, anchor, point.y)[0]; value = getValue(start, control, anchor, t); if (point.x < value.x){ return (UP_LINE); }; if (point.x == value.x){ return (ON_LINE); }; return (DOWN_LINE); }; t = getTForX(start, control, anchor, point.x)[0]; value = getValue(start, control, anchor, t); if (point.y < value.y){ return (UP_LINE); }; if (point.y == value.y){ return (ON_LINE); }; return (DOWN_LINE); } private static function _cubicFormula(a:Number, b:Number, c:Number, d:Number):Array{ var D:Number; var s:Number; var t:Number; var u:Number; var theta:Number; if (a == 0){ return (_quadraticFormula(b, c, d)); }; var answer:Array = []; var q:Number = ((((3 * a) * c) - (b * b)) / ((9 * a) * a)); var r:Number = ((((((9 * a) * b) * c) - (((27 * a) * a) * d)) - (((2 * b) * b) * b)) / (((54 * a) * a) * a)); if (q == 0){ answer.push(((((r < 0)) ? -1 : 1 * Math.pow(Math.abs(r), (1 / 3))) - (b / (3 * a)))); } else { D = (((q * q) * q) + (r * r)); if (D > 0){ D = Math.sqrt(D); s = (r + D); s = (((s < 0)) ? -1 : 1 * Math.pow(Math.abs(s), (1 / 3))); t = (r - D); t = (((t < 0)) ? -1 : 1 * Math.pow(Math.abs(t), (1 / 3))); answer.push(((s + t) - (b / (3 * a)))); } else { u = Math.sqrt(-(q)); theta = Math.acos((r / Math.sqrt(-(Math.pow(q, 3))))); answer.push((((2 * u) * Math.cos((theta / 3))) - (b / (3 * a)))); answer.push((((2 * u) * Math.cos(((theta + (2 * Math.PI)) / 3))) - (b / (3 * a)))); answer.push((((2 * u) * Math.cos(((theta + (4 * Math.PI)) / 3))) - (b / (3 * a)))); }; }; return (answer); } public static function getLength(start:mVector, control:mVector, anchor:mVector, t:Number):Number{ _initIntegration(start, control, anchor); return (_calculateLength(t)); } public static function getTForIntersectionOfLine(start:mVector, control:mVector, anchor:mVector, a:Number, b:Number, c:Number):Array{ var t:Number; var aa:Number = ((a * ((start.x - (2 * control.x)) + anchor.x)) + (b * ((start.y - (2 * control.y)) + anchor.y))); var bb:Number = (((2 * a) * (control.x - start.x)) + ((2 * b) * (control.y - start.y))); var cc:Number = (((a * start.x) + (b * start.y)) + c); var answer:Array = _quadraticFormula(aa, bb, cc); var i:int = answer.length; while (i--) { t = answer[i]; if ((((t < 0)) || ((t > 1)))){ answer.splice(i, 1); }; }; return (answer); } private static function _initIntegration(start:mVector, control:mVector, anchor:mVector):void{ _ax = ((start.x - (2 * control.x)) + anchor.x); _ay = ((start.y - (2 * control.y)) + anchor.y); _bx = (control.x - start.x); _by = (control.y - start.y); _A = ((_ax * _ax) + (_ay * _ay)); _B = ((_ax * _bx) + (_ay * _by)); _C = ((_bx * _bx) + (_by * _by)); if (_A != 0){ _B = (_B / _A); _C = ((_C / _A) - (_B * _B)); _A = Math.sqrt(_A); }; } public static function getControlPoint(start:mVector, middle:mVector, end:mVector):mVector{ var x:Number = ((((4 * middle.x) - start.x) - end.x) * 0.5); var y:Number = ((((4 * middle.y) - start.y) - end.y) * 0.5); return (new mVector(x, y)); } private static function _calculateLength(t:Number):Number{ if (_A == 0){ return ((Math.sqrt((4 * _C)) * t)); }; return ((_integrate(t) - _integrate(0))); } private static function _quadraticFormula(a:Number, b:Number, c:Number):Array{ var D:Number; var answer:Array = []; if (a == 0){ if (b != 0){ answer.push((-(c) / b)); }; } else { D = ((b * b) - ((4 * a) * c)); if (D > 0){ D = Math.sqrt(D); answer.push(((-(b) - D) / (2 * a)), ((-(b) + D) / (2 * a))); } else { if (D == 0){ answer.push((-(b) / (2 * a))); }; }; }; return (answer); } public static function getTForLength(start:mVector, control:mVector, anchor:mVector, length:Number):Number{ _initIntegration(start, control, anchor); var totalLength:Number = _calculateLength(1); var t:Number = (length / totalLength); if ((((t <= 0)) || ((t >= 1)))){ return (((t <= 0)) ? 0 : 1); }; var temp:Number = _calculateLength(t); var d:Number = (length - temp); while (Math.abs(d) > 0.01) { t = (t + (d / totalLength)); temp = _calculateLength(t); d = (length - temp); }; return (t); } private static function _integrate(t:Number):Number{ var m:Number = (_B + t); var n:Number = Math.sqrt(((m * m) + _C)); if (_C <= 0){ return (((_A * m) * n)); }; return ((_A * ((m * n) + (_C * Math.log((m + n)))))); } public static function getValue(start:mVector, control:mVector, anchor:mVector, t:Number):mVector{ var m:Number = (1 - t); var x:Number = ((((m * m) * start.x) + (((2 * t) * m) * control.x)) + ((t * t) * anchor.x)); var y:Number = ((((m * m) * start.y) + (((2 * t) * m) * control.y)) + ((t * t) * anchor.y)); return (new mVector(x, y)); } public static function getTangVector(start:mVector, control:mVector, anchor:mVector, t:Number, targetPoint:mVector):mVector{ var point:mVector = new mVector(); point.x = (start.x + ((control.x - start.x) * t)); point.y = (start.y + ((control.y - start.y) * t)); return (new mVector((point.x - targetPoint.x), (point.y - targetPoint.y))); } } }//package zlong.zelda.collisionEngine
Section 219
//CircleParticle (zlong.zelda.collisionEngine.CircleParticle) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; import flash.geom.*; public class CircleParticle extends AbstractParticle { private var _radius:Number; private var _yForRect:Number; private var _xForRect:Number; private var _radiusForRect:Number; public function CircleParticle(x:Number, y:Number, radius:Number, isFixed:Boolean=false, mass:Number=1, elasticity:Number=0.3, friction:Number=0){ super(x, y, isFixed, mass, elasticity, friction); _radius = radius; makeRect(); } public function set radius(r:Number):void{ _radius = r; } function getProjection(axis:mVector):Interval{ var c:Number = samp.dot(axis); interval.min = (c - _radius); interval.max = (c + _radius); return (interval); } function getIntervalY():Interval{ interval.min = (curr.y - _radius); interval.max = (curr.y + _radius); return (interval); } override public function init():void{ if (!CollisionEngine.isPaint){ return; }; cleanup(); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawCircle(0, 0, radius); sprite.graphics.endFill(); }; paint(); } private function makeRect():void{ _rect = new Rectangle((this.px - radius), (this.py - radius), (2 * this.radius), (2 * this.radius)); _xForRect = this.px; _yForRect = this.py; _radiusForRect = this.radius; } public function get radius():Number{ return (_radius); } override public function getRect():Rectangle{ if (((((!((_xForRect == this.px))) || (!((_yForRect == this.py))))) || (!((_radiusForRect == this.radius))))){ makeRect(); }; return (_rect); } function getIntervalX():Interval{ interval.min = (curr.x - _radius); interval.max = (curr.x + _radius); return (interval); } override public function paint():void{ if (!CollisionEngine.isPaint){ return; }; sprite.x = curr.x; sprite.y = curr.y; } } }//package zlong.zelda.collisionEngine
Section 220
//Collision (zlong.zelda.collisionEngine.Collision) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; class Collision { var vn:mVector; var vt:mVector; function Collision(vn:mVector, vt:mVector){ super(); this.vn = vn; this.vt = vt; } } }//package zlong.zelda.collisionEngine
Section 221
//CollisionDetector (zlong.zelda.collisionEngine.CollisionDetector) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; import zlong.zelda.collisionEngine.*; import flash.geom.*; import data.*; final class CollisionDetector { function CollisionDetector(){ super(); } private static function collisionBezierCircle(cp:CircleParticle, cw:CurveWall):mVector{ var collisionNormal:mVector; var tempTan:mVector; var tempNorm:mVector; var radian:Number; var tPre:Number; var valuePre:mVector; var normPre:mVector; var fix:Number; var point1:mVector; var point2:mVector; var upPoint:mVector; var downPoint:mVector; var locaUpPoint:String; var locaDownPoint:String; var v:mVector; var d:Number; var count:int; var i:int; var start:mVector = cw.startPoint; var control:mVector = cw.controlPoint; var anchor:mVector = cw.endPoint; var vel:mVector = cp.velocity; var pos:mVector = new mVector(cp.position.x, cp.position.y); if (((((!(cw.isUpColl)) && (cw.isDownColl))) || (((cw.isUpColl) && (!(cw.isDownColl)))))){ tPre = BezierUtil.getTForClosestPoint(start, control, anchor, cp.prev); valuePre = BezierUtil.getValue(start, control, anchor, tPre); normPre = cp.prev.minus(valuePre); fix = (((cp.radius * cw.singleWallFix) > 1)) ? (cp.radius * cw.singleWallFix) : 1; point1 = cp.prev.plus(normPre.normalize().mult((cp.radius - fix))); point2 = cp.prev.minus(normPre.normalize().mult((cp.radius - fix))); if ((((point1.y < point2.y)) || ((((point1.y == point2.y)) && ((point1.x < point2.x)))))){ upPoint = point1; downPoint = point2; } else { upPoint = point2; downPoint = point1; }; if (!cw.isUpColl){ locaUpPoint = BezierUtil.getLocaOfBezier(start, control, anchor, upPoint); if (locaUpPoint == BezierUtil.UP_LINE){ return (null); }; } else { if (!cw.isDownColl){ locaDownPoint = BezierUtil.getLocaOfBezier(start, control, anchor, downPoint); if (locaDownPoint == BezierUtil.DOWN_LINE){ return (null); }; }; }; } else { if (((!(cw.isUpColl)) && (!(cw.isDownColl)))){ return (null); }; }; var t:Number = BezierUtil.getTForClosestPoint(start, control, anchor, pos); var value:mVector = BezierUtil.getValue(start, control, anchor, t); var v1:mVector = value.minus(pos); var v2:mVector = v1.plus(vel); var dot:Number = v1.dot(v2); if (dot <= 0){ pos.plusEquals(new mVector(-(vel.x), -(vel.y))); v = new mVector(vel.x, vel.y); v = v.normalize().multEquals((cp.radius * 0.5)); d = vel.length; count = Math.ceil((d / (cp.radius * 0.5))); i = 0; while (i < count) { pos.x = (pos.x + v.x); pos.y = (pos.y + v.y); t = BezierUtil.getTForClosestPoint(start, control, anchor, pos); value = BezierUtil.getValue(start, control, anchor, t); var _temp1 = d; d = pos.distance(value); if ((_temp1 - d) < 0){ return (null); }; if (d <= cp.radius){ break; }; i++; }; }; var dist:Number = pos.minus(value).length; if (dist > cp.radius){ return (null); }; if ((((t == 0)) && (!(cw.isStartPointColl)))){ tempTan = control.minus(start); tempNorm = tempTan.rotateRadian((Math.PI / 2)); if (tempNorm.dot(cp.velocity) <= 0){ collisionNormal = tempNorm; } else { collisionNormal = tempTan.rotateRadian((-(Math.PI) / 2)); }; } else { if ((((t == 1)) && (!(cw.isEndPointColl)))){ tempTan = control.minus(anchor); tempNorm = tempTan.rotateRadian((Math.PI / 2)); if (tempNorm.dot(cp.velocity) <= 0){ collisionNormal = tempNorm; } else { collisionNormal = tempTan.rotateRadian((-(Math.PI) / 2)); }; } else { collisionNormal = pos.minus(value); }; }; collisionNormal = collisionNormal.normalize(); var collisionDepth:Number = (cp.radius - dist); CollisionResolver.resolveParticleWall(cp, cw, collisionNormal, collisionDepth, pos, value); return (collisionNormal); } private static function testIntervals(intervalA:Interval, intervalB:Interval):Number{ if (intervalA.max < intervalB.min){ return (0); }; if (intervalB.max < intervalA.min){ return (0); }; var lenA:Number = (intervalB.max - intervalA.min); var lenB:Number = (intervalB.min - intervalA.max); return (((Math.abs(lenA))<Math.abs(lenB)) ? lenA : lenB); } private static function testTypes(objA:AbstractParticle, objB:AbstractObject):mVector{ if ((((objA is RectangleParticle)) && ((objB is RectangleParticle)))){ return (testOBBvsOBB((objA as RectangleParticle), (objB as RectangleParticle))); }; if ((((objA is CircleParticle)) && ((objB is CircleParticle)))){ return (testCirclevsCircle((objA as CircleParticle), (objB as CircleParticle))); }; if ((((objA is RectangleParticle)) && ((objB is CircleParticle)))){ return (testOBBvsCircle((objA as RectangleParticle), (objB as CircleParticle))); }; if ((((objA is CircleParticle)) && ((objB is RectangleParticle)))){ return (testOBBvsCircle((objB as RectangleParticle), (objA as CircleParticle))); }; if ((((objA is RectangleParticle)) && ((objB is LineWall)))){ return (testRecVsLine((objA as RectangleParticle), (objB as LineWall))); }; if ((((objA is RectangleParticle)) && ((objB is CurveWall)))){ return (testRecVsCurve((objA as RectangleParticle), (objB as CurveWall))); }; if ((((objA is CircleParticle)) && ((objB is LineWall)))){ return (testCircleVsLine((objA as CircleParticle), (objB as LineWall))); }; if ((((objA is CircleParticle)) && ((objB is CurveWall)))){ return (testCircleVsCurve((objA as CircleParticle), (objB as CurveWall))); }; return (null); } private static function sampVsNorm(objA:AbstractParticle, objB:AbstractParticle):mVector{ var normal:mVector; var s:Number = (1 / (objA.multisample + 1)); var t:Number = s; objB.samp.copyFrom(objB.curr); var i:int; while (i <= objA.multisample) { objA.samp.setTo((objA.prev.x + (t * (objA.curr.x - objA.prev.x))), (objA.prev.y + (t * (objA.curr.y - objA.prev.y)))); normal = testTypes(objA, objB); if (normal){ return (normal); }; t = (t + s); i++; }; return (null); } private static function testCirclevsCircle(ca:CircleParticle, cb:CircleParticle):mVector{ var caRect:Rectangle; var d:Number; var cbRect:Rectangle; var tempCaVel:mVector; var tempCbVel:mVector; var caNum:uint; var cbNum:uint; var testNum:uint; var i:uint; var caSampIntervalX:Interval; var caSampIntervalY:Interval; var cbSampIntervalX:Interval; var cbSampIntervalY:Interval; var depthX:Number; var depthY:Number; var collisionNormal:mVector; var mag:Number; var collisionDepth:Number; if (CollisionEngine.accuracyMode){ caRect = ca.getRect(); d = (ca.velocity.length - (ca.radius * 2)); if (d > 0){ caRect.inflate(d, d); }; cbRect = cb.getRect(); d = (cb.velocity.length - (cb.radius * 2)); if (d > 0){ cbRect.inflate(d, d); }; if (!caRect.intersects(cbRect)){ return (null); }; tempCaVel = ca.velocity.clone(); ca.samp = ca.samp.minus(ca.velocity); tempCbVel = cb.velocity.clone(); cb.samp = cb.samp.minus(cb.velocity); caNum = (int((ca.velocity.length / (ca.radius / 2))) + 1); cbNum = (int((cb.velocity.length / (cb.radius / 2))) + 1); testNum = Math.max(caNum, cbNum); i = 0; while (i < testNum) { ca.samp = ca.samp.plus(tempCaVel.mult((1 / testNum))); cb.samp = cb.samp.plus(tempCbVel.mult((1 / testNum))); caSampIntervalX = new Interval((ca.samp.x - ca.radius), (ca.samp.x + ca.radius)); caSampIntervalY = new Interval((ca.samp.y - ca.radius), (ca.samp.y + ca.radius)); cbSampIntervalX = new Interval((cb.samp.x - cb.radius), (cb.samp.x + cb.radius)); cbSampIntervalY = new Interval((cb.samp.y - cb.radius), (cb.samp.y + cb.radius)); depthX = testIntervals(caSampIntervalX, cbSampIntervalX); if (depthX == 0){ } else { depthY = testIntervals(caSampIntervalY, cbSampIntervalY); if (depthY == 0){ } else { collisionNormal = ca.samp.minus(cb.samp); mag = collisionNormal.length; collisionDepth = ((ca.radius + cb.radius) - mag); if (collisionDepth > 0){ collisionNormal.divEquals(mag); ca.curr = ca.samp.clone(); ca.velocity = tempCaVel.clone(); cb.curr = cb.samp.clone(); cb.velocity = tempCbVel.clone(); if (Data.isCorrectVector){ collisionNormal = Data.correctBilliardVector.negate(); mag = collisionNormal.length; collisionDepth = 0; collisionNormal.divEquals(mag); Data.isCorrectVector = false; }; CollisionResolver.resolveParticleParticle(ca, cb, collisionNormal, collisionDepth); return (collisionNormal); }; }; }; i++; }; } else { depthX = testIntervals(ca.getIntervalX(), cb.getIntervalX()); if (depthX == 0){ return (null); }; depthY = testIntervals(ca.getIntervalY(), cb.getIntervalY()); if (depthY == 0){ return (null); }; collisionNormal = ca.samp.minus(cb.samp); mag = collisionNormal.length; collisionDepth = ((ca.radius + cb.radius) - mag); if (collisionDepth > 0){ collisionNormal.divEquals(mag); CollisionResolver.resolveParticleParticle(ca, cb, collisionNormal, collisionDepth); return (collisionNormal); }; }; return (null); } private static function testCircleVsCurve(cp:CircleParticle, cw:CurveWall):mVector{ var cpRect:Rectangle = cp.getRect(); var d:Number = (cp.velocity.length - (cp.radius * 2)); if (d > 0){ cpRect.inflate(d, d); }; var cwRect:Rectangle = cw.getRect(); if (cwRect.width < 1){ cwRect.width = 1; }; if (cwRect.height < 1){ cwRect.height = 1; }; if (cpRect.intersects(cwRect)){ return (collisionBezierCircle(cp, cw)); }; return (null); } private static function testOBBvsCircle(ra:RectangleParticle, ca:CircleParticle):mVector{ var collisionNormal:mVector; var boxAxis:mVector; var depth:Number; var vertex:mVector; var mag:Number; var collisionDepth:Number = Number.POSITIVE_INFINITY; var depths:Array = new Array(2); var i:int; while (i < 2) { boxAxis = ra.axes[i]; depth = testIntervals(ra.getProjection(boxAxis), ca.getProjection(boxAxis)); if (depth == 0){ return (null); }; if (Math.abs(depth) < Math.abs(collisionDepth)){ collisionNormal = boxAxis; collisionDepth = depth; }; depths[i] = depth; i++; }; var r:Number = ca.radius; if ((((Math.abs(depths[0]) < r)) && ((Math.abs(depths[1]) < r)))){ vertex = closestVertexOnOBB(ca.samp, ra); collisionNormal = vertex.minus(ca.samp); mag = collisionNormal.length; collisionDepth = (r - mag); if (collisionDepth > 0){ collisionNormal.divEquals(mag); } else { return (null); }; }; CollisionResolver.resolveParticleParticle(ra, ca, collisionNormal, collisionDepth); return (collisionNormal); } static function test(objA:AbstractParticle, objB:AbstractParticle):mVector{ if (((objA.fixed) && (objB.fixed))){ return (null); }; if ((((objA.multisample == 0)) && ((objB.multisample == 0)))){ return (normVsNorm(objA, objB)); }; if ((((objA.multisample > 0)) && ((objB.multisample == 0)))){ return (sampVsNorm(objA, objB)); }; if ((((objB.multisample > 0)) && ((objA.multisample == 0)))){ return (sampVsNorm(objB, objA)); }; if (objA.multisample == objB.multisample){ return (sampVsSamp(objA, objB)); }; return (normVsNorm(objA, objB)); } private static function testCircleVsLine(cp:CircleParticle, lw:LineWall):mVector{ var cpRect:Rectangle = cp.getRect(); var d:Number = (cp.velocity.length - (cp.radius * 2)); if (d > 0){ cpRect.inflate(d, d); }; var lwRect:Rectangle = lw.getRect(); if (lwRect.width < 1){ lwRect.width = 1; }; if (lwRect.height < 1){ lwRect.height = 1; }; if (cpRect.intersects(lwRect)){ return (collisionLineCircle(cp, lw)); }; return (null); } private static function testRecVsCurve(rp:RectangleParticle, cw:CurveWall):mVector{ return (null); } private static function normVsNorm(objA:AbstractParticle, objB:AbstractParticle):mVector{ objA.samp.copyFrom(objA.curr); objB.samp.copyFrom(objB.curr); return (testTypes(objA, objB)); } private static function testRecVsLine(rp:RectangleParticle, lw:LineWall):mVector{ return (null); } static function testObjToWall(obj:AbstractParticle, wall:AbstractWall):mVector{ return (testTypes(obj, wall)); } private static function closestVertexOnOBB(p:mVector, r:RectangleParticle):mVector{ var dist:Number; var d:mVector = p.minus(r.samp); var q:mVector = new mVector(r.samp.x, r.samp.y); var i:int; while (i < 2) { dist = d.dot(r.axes[i]); if (dist >= 0){ dist = r.extents[i]; } else { if (dist < 0){ dist = -(r.extents[i]); }; }; q.plusEquals(r.axes[i].mult(dist)); i++; }; return (q); } private static function testOBBvsOBB(ra:RectangleParticle, rb:RectangleParticle):mVector{ var collisionNormal:mVector; var axisA:mVector; var depthA:Number; var axisB:mVector; var depthB:Number; var absA:Number; var absB:Number; var altb:Boolean; var collisionDepth:Number = Number.POSITIVE_INFINITY; var i:int; while (i < 2) { axisA = ra.axes[i]; depthA = testIntervals(ra.getProjection(axisA), rb.getProjection(axisA)); if (depthA == 0){ return (null); }; axisB = rb.axes[i]; depthB = testIntervals(ra.getProjection(axisB), rb.getProjection(axisB)); if (depthB == 0){ return (null); }; absA = Math.abs(depthA); absB = Math.abs(depthB); if ((((absA < Math.abs(collisionDepth))) || ((absB < Math.abs(collisionDepth))))){ altb = (absA < absB); collisionNormal = (altb) ? axisA : axisB; collisionDepth = (altb) ? depthA : depthB; }; i++; }; CollisionResolver.resolveParticleParticle(ra, rb, collisionNormal, collisionDepth); return (collisionNormal); } private static function collisionLineCircle(cp:CircleParticle, lw:LineWall):mVector{ var collisionNormal:mVector; var tempTan:mVector; var tempNorm:mVector; var radian:Number; var ratePre:Number; var valuePre:mVector; var normPre:mVector; var fix:Number; var point1:mVector; var point2:mVector; var upPoint:mVector; var downPoint:mVector; var locaUpPoint:String; var locaDownPoint:String; var v:mVector; var d:Number; var count:int; var i:int; var start:mVector = lw.startPoint; var end:mVector = lw.endPoint; var vel:mVector = cp.velocity; var pos:mVector = new mVector(cp.position.x, cp.position.y); if (((((!(lw.isUpColl)) && (lw.isDownColl))) || (((lw.isUpColl) && (!(lw.isDownColl)))))){ ratePre = LineUtil.getRateForClosestPoint(start, end, cp.prev); valuePre = LineUtil.getValue(start, end, ratePre); normPre = cp.prev.minus(valuePre); fix = (((cp.radius * lw.singleWallFix) > 1)) ? (cp.radius * lw.singleWallFix) : 1; point1 = cp.prev.plus(normPre.normalize().mult((cp.radius - fix))); point2 = cp.prev.minus(normPre.normalize().mult((cp.radius - fix))); if ((((point1.y < point2.y)) || ((((point1.y == point2.y)) && ((point1.x < point2.x)))))){ upPoint = point1; downPoint = point2; } else { upPoint = point2; downPoint = point1; }; if (!lw.isUpColl){ locaUpPoint = LineUtil.getLocaOfLine(start, end, upPoint); if (locaUpPoint == LineUtil.UP_LINE){ return (null); }; } else { if (!lw.isDownColl){ locaDownPoint = LineUtil.getLocaOfLine(start, end, downPoint); if (locaDownPoint == LineUtil.DOWN_LINE){ return (null); }; }; }; } else { if (((!(lw.isUpColl)) && (!(lw.isDownColl)))){ return (null); }; }; var rate:Number = LineUtil.getRateForClosestPoint(start, end, pos); var value:mVector = LineUtil.getValue(start, end, rate); var v1:mVector = value.minus(pos); var dot:Number = v1.dot(vel); if (dot <= 0){ pos.plusEquals(new mVector(-(vel.x), -(vel.y))); v = new mVector(vel.x, vel.y); v = v.normalize().multEquals((cp.radius * 0.5)); d = vel.length; count = Math.ceil((d / (cp.radius * 0.5))); i = 0; while (i < count) { pos.x = (pos.x + v.x); pos.y = (pos.y + v.y); rate = LineUtil.getRateForClosestPoint(start, end, pos); value = LineUtil.getValue(start, end, rate); var _temp1 = d; d = pos.distance(value); if ((_temp1 - d) < 0){ return (null); }; if (d <= cp.radius){ break; }; i++; }; }; var dist:Number = pos.minus(value).length; if (dist > cp.radius){ return (null); }; if ((((((rate == 0)) && (!(lw.isStartPointColl)))) || ((((rate == 1)) && (!(lw.isEndPointColl)))))){ tempTan = end.minus(start); tempNorm = tempTan.rotateRadian((Math.PI / 2)); if (tempNorm.dot(cp.velocity) <= 0){ collisionNormal = tempNorm; } else { collisionNormal = tempTan.rotateRadian((-(Math.PI) / 2)); }; } else { if ((((rate == 0)) || ((rate == 1)))){ if (lw.pointNormal){ collisionNormal = lw.pointNormal; }; } else { collisionNormal = pos.minus(value); }; }; collisionNormal = collisionNormal.normalize(); var collisionDepth:Number = (cp.radius - dist); CollisionResolver.resolveParticleWall(cp, lw, collisionNormal, collisionDepth, pos, value); return (collisionNormal); } private static function sampVsSamp(objA:AbstractParticle, objB:AbstractParticle):mVector{ var normal:mVector; var s:Number = (1 / (objA.multisample + 1)); var t:Number = s; var i:int; while (i <= objA.multisample) { objA.samp.setTo((objA.prev.x + (t * (objA.curr.x - objA.prev.x))), (objA.prev.y + (t * (objA.curr.y - objA.prev.y)))); objB.samp.setTo((objB.prev.x + (t * (objB.curr.x - objB.prev.x))), (objB.prev.y + (t * (objB.curr.y - objB.prev.y)))); normal = testTypes(objA, objB); if (normal){ return (normal); }; t = (t + s); i++; }; return (null); } } }//package zlong.zelda.collisionEngine
Section 222
//CollisionEngine (zlong.zelda.collisionEngine.CollisionEngine) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; public class CollisionEngine { private static var _container:DisplayObjectContainer; private static var _damping:Number; private static var _constraintCollisionCycles:int; private static var _isPaint:Boolean; private static var _timeStep:Number; private static var _accuracyMode:Boolean; static var masslessForce:mVector; private static var _constraintCycles:int; static var force:mVector; private static var _collRange:mVector; private static var _groups:Array; private static var _numGroups:int; public function CollisionEngine(){ super(); } public static function get collRange():mVector{ return (_collRange); } public static function get container():DisplayObjectContainer{ return (_container); } public static function removeGroup(g:Group):void{ var gpos:int = _groups.indexOf(g); if (gpos == -1){ return; }; _groups.splice(gpos, 1); g.isParented = false; _numGroups--; g.cleanup(); } public static function get damping():Number{ return (_damping); } public static function set damping(d:Number):void{ _damping = d; } public static function addMasslessForce(v:mVector):void{ masslessForce.plusEquals(v); } public static function init(dt:Number=0.25, isPaint:Boolean=true):void{ _timeStep = (dt * dt); _numGroups = 0; _groups = new Array(); force = new mVector(0, 0); masslessForce = new mVector(0, 0); damping = 1; _constraintCycles = 0; _constraintCollisionCycles = 1; _collRange = new mVector(Number.MAX_VALUE, Number.MAX_VALUE); _isPaint = isPaint; _accuracyMode = false; } public static function addForce(v:mVector):void{ force.plusEquals(v); } public static function step():void{ integrate(); var j:int; while (j < _constraintCycles) { satisfyConstraints(); j++; }; var i:int; while (i < _constraintCollisionCycles) { satisfyConstraints(); checkCollisions(); i++; }; } public static function set constraintCycles(numCycles:int):void{ _constraintCycles = numCycles; } public static function get constraintCycles():int{ return (_constraintCycles); } private static function satisfyConstraints():void{ var g:Group; var j:int; while (j < _numGroups) { g = _groups[j]; g.satisfyConstraints(); j++; }; } public static function set constraintCollisionCycles(numCycles:int):void{ _constraintCollisionCycles = numCycles; } public static function get accuracyMode():Boolean{ return (_accuracyMode); } public static function get isPaint():Boolean{ return (_isPaint); } public static function paint():void{ var g:Group; var j:int; while (j < _numGroups) { g = _groups[j]; g.paint(); j++; }; } public static function set isPaint(v:Boolean):void{ var i:uint; if ((((_isPaint == false)) && ((v == true)))){ _isPaint = v; i = 0; while (i < _numGroups) { (_groups[i] as Group).init(); i++; }; } else { if ((((_isPaint == true)) && ((v == false)))){ _isPaint = v; i = 0; while (i < _numGroups) { (_groups[i] as Group).cleanup(); i++; }; }; }; } public static function addGroup(g:Group):void{ _groups.push(g); g.isParented = true; _numGroups++; g.init(); } public static function get constraintCollisionCycles():int{ return (_constraintCollisionCycles); } private static function integrate():void{ var g:Group; var j:int; while (j < _numGroups) { g = _groups[j]; g.integrate(_timeStep); j++; }; } public static function set container(d:DisplayObjectContainer):void{ _container = d; } private static function checkCollisions():void{ var g:Group; var j:int; while (j < _numGroups) { g = _groups[j]; g.checkCollisions(); j++; }; } public static function set collRange(v:mVector):void{ _collRange = v; } public static function set accuracyMode(v:Boolean):void{ _accuracyMode = v; } } }//package zlong.zelda.collisionEngine
Section 223
//CollisionEvent (zlong.zelda.collisionEngine.CollisionEvent) package zlong.zelda.collisionEngine { import flash.events.*; import zlong.breathxue.utils.math.*; public class CollisionEvent extends Event { private var _collNormal:mVector; private var _velocity:Number; private var _collItem:AbstractObject; public static const COLLIDED:String = "COLLIDED"; public function CollisionEvent(type:String, item:AbstractObject, normal:mVector, velocity:Number=0){ super(type, bubbles, cancelable); _collItem = item; _collNormal = normal; _velocity = velocity; } public function get collVelocity():Number{ return (_velocity); } public function get collNormal():mVector{ return (_collNormal); } public function get collItem():AbstractObject{ return (_collItem); } } }//package zlong.zelda.collisionEngine
Section 224
//CollisionResolver (zlong.zelda.collisionEngine.CollisionResolver) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; import zlong.zelda.collisionEngine.*; final class CollisionResolver { function CollisionResolver(){ super(); } static function resolveParticleParticle(pa:AbstractParticle, pb:AbstractParticle, normal:mVector, depth:Number):void{ pa.curr.copyFrom(pa.samp); pb.curr.copyFrom(pb.samp); var mtd:mVector = normal.mult(depth); var te:Number = (pa.elasticity + pb.elasticity); var sumInvMass:Number = (pa.invMass + pb.invMass); var tf:Number = clamp((1 - (pa.friction + pb.friction)), 0, 1); var ca:Collision = pa.getComponents(normal); var cb:Collision = pb.getComponents(normal); var vnA:mVector = cb.vn.mult(((te + 1) * pa.invMass)).plus(ca.vn.mult((pb.invMass - (te * pa.invMass)))).divEquals(sumInvMass); var vnB:mVector = ca.vn.mult(((te + 1) * pb.invMass)).plus(cb.vn.mult((pa.invMass - (te * pb.invMass)))).divEquals(sumInvMass); ca.vt.multEquals(tf); cb.vt.multEquals(tf); var mtdA:mVector = mtd.mult((pa.invMass / sumInvMass)); var mtdB:mVector = mtd.mult((-(pb.invMass) / sumInvMass)); vnA.plusEquals(ca.vt); vnB.plusEquals(cb.vt); if (((pa.isShowResolver) && (pb.isShowResolver))){ if (!pa.fixed){ pa.resolveCollisionInternal(mtdA, vnA, normal, depth, -1, pb); }; if (!pb.fixed){ pb.resolveCollisionInternal(mtdB, vnB, normal, depth, 1, pa); }; }; } static function clamp(input:Number, min:Number, max:Number):Number{ if (input > max){ return (max); }; if (input < min){ return (min); }; return (input); } static function resolveParticleWall(p:AbstractParticle, w:AbstractWall, normal:mVector, depth:Number, pos:mVector, collPoint:mVector):void{ var tempPoint:mVector; var length:Number; var mtd:mVector = normal.mult(depth); var te:Number = (p.elasticity + w.elasticity); var tf:Number = clamp((1 - (p.friction + w.friction)), 0, 1); var cp:Collision = p.getComponents(normal); cp.vn.multEquals(-(te)); cp.vt.multEquals(tf); var vnA:mVector = cp.vn.plus(cp.vt); var tempVecter:mVector = w.startPoint.minus(w.endPoint); if (p.velocity.dot(tempVecter) > 0){ tempPoint = w.startPoint; } else { if (p.velocity.dot(tempVecter) < 0){ tempPoint = w.endPoint; }; }; if (tempPoint){ length = collPoint.minus(tempPoint).length; }; var temp:mVector = pos.plus(mtd); var moveDepth:Number = (p.velocity.length - p.prev.minus(temp).length); if (moveDepth >= length){ mtd.plusEquals(vnA.normalize().mult(moveDepth)); } else { mtd.plusEquals(vnA.normalize().mult((moveDepth * te))); }; if (((((p.isShowResolver) && (w.isShowResolver))) && (!(p.fixed)))){ p.curr.copyFrom(pos); p.velocity = p.velocity.copyFrom(vnA); p.resolveCollisionInternal(mtd, vnA, normal, depth, -1); }; } } }//package zlong.zelda.collisionEngine
Section 225
//Composite (zlong.zelda.collisionEngine.Composite) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; public class Composite extends AbstractCollection { private var _rotationAngle:Number; private var delta:mVector; public function Composite(){ super(); delta = new mVector(); _rotationAngle = 0; } public function rotateByAngle(angleDegrees:Number, center:mVector):void{ _rotationAngle = (_rotationAngle + angleDegrees); var angleRadians:Number = (angleDegrees * MathUtil.PI_OVER_ONE_EIGHTY); rotateByRadian(angleRadians, center); } public function rotateByRadian(angleRadians:Number, center:mVector):void{ var p:AbstractParticle; var w:AbstractWall; var radius:Number; var angle:Number; var points:Array; var m:int; var point:mVector; var radiusW:Number; var angleW:Number; var pa:Array = particles; var len:int = pa.length; var i:int; while (i < len) { p = pa[i]; radius = p.center.distance(center); angle = (getRelativeAngle(center, p.center) + angleRadians); p.px = ((Math.cos(angle) * radius) + center.x); p.py = ((Math.sin(angle) * radius) + center.y); i++; }; var wa:Array = walls; var wlen:int = wa.length; var j:int; while (j < wlen) { w = wa[j]; if ((w is LineWall)){ points = [(w as LineWall).startPoint, (w as LineWall).endPoint]; } else { if ((w is CurveWall)){ points = [(w as CurveWall).startPoint, (w as CurveWall).controlPoint, (w as CurveWall).endPoint]; }; }; m = 0; while (m < points.length) { point = points[m]; radiusW = point.distance(center); angleW = (getRelativeAngle(center, point) + angleRadians); point.x = ((Math.cos(angleW) * radiusW) + center.x); point.y = ((Math.sin(angleW) * radiusW) + center.y); m++; }; j++; }; } public function get fixed():Boolean{ var i:int; while (i < particles.length) { if (!particles[i].fixed){ return (false); }; i++; }; return (true); } public function get rotationAngle():Number{ return ((_rotationAngle % 360)); } private function getRelativeAngle(center:mVector, p:mVector):Number{ delta.setTo((p.x - center.x), (p.y - center.y)); return (Math.atan2(delta.y, delta.x)); } public function set fixed(b:Boolean):void{ var i:int; while (i < particles.length) { particles[i].fixed = b; i++; }; } } }//package zlong.zelda.collisionEngine
Section 226
//CurveWall (zlong.zelda.collisionEngine.CurveWall) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; import flash.geom.*; public class CurveWall extends AbstractWall { private var _cpForRect:mVector; private var _epForRect:mVector; private var _spForRect:mVector; private var _controlPoint:mVector; private var _showAssLine:Boolean; public function CurveWall(startPoint:mVector, controlPoint:mVector, endPoint:mVector, elasticity:Number=0.3, friction:Number=0){ super(startPoint, endPoint, elasticity, friction); _controlPoint = controlPoint; _showAssLine = false; curr = new mVector((((startPoint.x + controlPoint.x) + endPoint.x) / 3), (((startPoint.y + controlPoint.y) + endPoint.y) / 3)); _spForRect = new mVector(); _cpForRect = new mVector(); _epForRect = new mVector(); makeRect(); } public function get controlPoint():mVector{ return (_controlPoint); } public function set controlPoint(p:mVector):void{ _controlPoint = p; } override public function init():void{ if (!CollisionEngine.isPaint){ return; }; cleanup(); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(startPoint.x, startPoint.y); sprite.graphics.curveTo(controlPoint.x, controlPoint.y, endPoint.x, endPoint.y); if (_showAssLine){ sprite.graphics.lineStyle(lineThickness, 0xFF00, lineAlpha); sprite.graphics.moveTo(startPoint.x, startPoint.y); sprite.graphics.lineTo(controlPoint.x, controlPoint.y); sprite.graphics.lineTo(endPoint.x, endPoint.y); }; }; paint(); } private function makeRect():void{ var tempSprite:Sprite = new Sprite(); tempSprite.graphics.moveTo(this.startPoint.x, this.startPoint.y); tempSprite.graphics.curveTo(this.controlPoint.x, this.controlPoint.y, this.endPoint.x, this.endPoint.y); _rect = tempSprite.getRect(tempSprite); tempSprite = null; _spForRect.copyFrom(this.startPoint); _cpForRect.copyFrom(this.controlPoint); _epForRect.copyFrom(this.endPoint); } public function set showAssLine(v:Boolean):void{ _showAssLine = v; } public function get showAssLine():Boolean{ return (_showAssLine); } override public function getRect():Rectangle{ if (((((!(_spForRect.compare(this.startPoint))) || (!(_cpForRect.compare(this.controlPoint))))) || (!(_epForRect.compare(this.endPoint))))){ makeRect(); }; return (_rect); } override public function paint():void{ if (!CollisionEngine.isPaint){ return; }; sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(startPoint.x, startPoint.y); sprite.graphics.curveTo(controlPoint.x, controlPoint.y, endPoint.x, endPoint.y); if (_showAssLine){ sprite.graphics.lineStyle(lineThickness, 0xFF00, lineAlpha); sprite.graphics.moveTo(startPoint.x, startPoint.y); sprite.graphics.lineTo(controlPoint.x, controlPoint.y); sprite.graphics.lineTo(endPoint.x, endPoint.y); }; } } }//package zlong.zelda.collisionEngine
Section 227
//Group (zlong.zelda.collisionEngine.Group) package zlong.zelda.collisionEngine { public class Group extends AbstractCollection { private var _collisionList:Array; private var _collideInternal:Boolean; private var _composites:Array; public function Group(collideInternal:Boolean=false){ super(); _composites = new Array(); _collisionList = new Array(); this.collideInternal = collideInternal; } public function removeCollidable(g:Group):void{ var pos:int = collisionList.indexOf(g); if (pos == -1){ return; }; collisionList.splice(pos, 1); } public function get composites():Array{ return (_composites); } override public function init():void{ super.init(); var i:int; while (i < composites.length) { composites[i].init(); i++; }; } override function satisfyConstraints():void{ var cmp:Composite; super.satisfyConstraints(); var len:int = _composites.length; var i:int; while (i < len) { cmp = _composites[i]; cmp.satisfyConstraints(); i++; }; } private function checkCollisionVsGroup(g:Group):void{ var c:Composite; var j:int; var gc:Composite; checkCollisionsVsCollection(g); var clen:int = _composites.length; var gclen:int = g.composites.length; var i:int; while (i < clen) { c = _composites[i]; c.checkCollisionsVsCollection(g); j = 0; while (j < gclen) { gc = g.composites[j]; c.checkCollisionsVsCollection(gc); j++; }; i++; }; j = 0; while (j < gclen) { gc = g.composites[j]; checkCollisionsVsCollection(gc); j++; }; } public function get collideInternal():Boolean{ return (_collideInternal); } override public function paint():void{ var c:Composite; super.paint(); var len:int = _composites.length; var i:int; while (i < len) { c = _composites[i]; c.paint(); i++; }; } public function addCollidableList(list:Array):void{ var g:Group; var i:int; while (i < list.length) { g = list[i]; collisionList.push(g); i++; }; } public function removeComposite(c:Composite):void{ var cpos:int = composites.indexOf(c); if (cpos == -1){ return; }; composites.splice(cpos, 1); c.isParented = false; c.cleanup(); } override public function cleanup():void{ super.cleanup(); var i:int; while (i < composites.length) { composites[i].cleanup(); i++; }; } public function addComposite(c:Composite):void{ composites.push(c); c.isParented = true; if (isParented){ c.init(); }; } function checkCollisions():void{ var g:Group; if (collideInternal){ checkCollisionGroupInternal(); }; var len:int = collisionList.length; var i:int; while (i < len) { g = collisionList[i]; checkCollisionVsGroup(g); i++; }; } public function get collisionList():Array{ return (_collisionList); } public function addCollidable(g:Group):void{ collisionList.push(g); } override public function getAll():Array{ return (particles.concat(constraints).concat(composites)); } public function set collideInternal(b:Boolean):void{ _collideInternal = b; } override function integrate(dt2:Number):void{ var cmp:Composite; super.integrate(dt2); var len:int = _composites.length; var i:int; while (i < len) { cmp = _composites[i]; cmp.integrate(dt2); i++; }; } private function checkCollisionGroupInternal():void{ var ca:Composite; var i:int; var cb:Composite; checkInternalCollisions(); var clen:int = _composites.length; var j:int; while (j < clen) { ca = _composites[j]; ca.checkCollisionsVsCollection(this); i = (j + 1); while (i < clen) { cb = _composites[i]; ca.checkCollisionsVsCollection(cb); i++; }; j++; }; } } }//package zlong.zelda.collisionEngine
Section 228
//Interval (zlong.zelda.collisionEngine.Interval) package zlong.zelda.collisionEngine { class Interval { var min:Number; var max:Number; function Interval(min:Number, max:Number){ super(); this.min = min; this.max = max; } function toString():String{ return (((min + " : ") + max)); } } }//package zlong.zelda.collisionEngine
Section 229
//LineUtil (zlong.zelda.collisionEngine.LineUtil) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; public class LineUtil { public static const DOWN_LINE:String = "DOWN_LINE"; public static const ON_LINE:String = "ON_LINE"; public static const UP_LINE:String = "UP_LINE"; public function LineUtil(){ super(); } public static function getRateForX(start:mVector, end:mVector, x:Number):Number{ return ((Math.abs((start.x - x)) / Math.abs((start.x - end.x)))); } public static function getRateForY(start:mVector, end:mVector, y:Number):Number{ return ((Math.abs((start.y - y)) / Math.abs((start.y - end.y)))); } public static function getRateForClosestPoint(start:mVector, end:mVector, point:mVector):Number{ var lSE:mVector = end.minus(start); var lSP:mVector = point.minus(start); var radian:Number = lSE.radianBetween(lSP); var rate:Number = ((lSP.length * Math.cos(radian)) / lSE.length); rate = ((rate < 0)) ? 0 : rate; rate = ((rate > 1)) ? 1 : rate; return (rate); } public static function getPointFromLines(p11:mVector, p12:mVector, p21:mVector, p22:mVector):mVector{ var x:Number; var y:Number; var a1:Number = ((p11.y - p12.y) / (p11.x - p12.x)); var b1:Number = (p11.y - (a1 * p11.x)); var a2:Number = ((p21.y - p22.y) / (p21.x - p22.x)); var b2:Number = (p21.y - (a2 * p21.x)); if (((((p11.x - p12.x) == 0)) && (((p21.x - p22.x) == 0)))){ return (null); }; if (((((p11.x - p12.x) == 0)) && (!(((p21.x - p22.x) == 0))))){ x = p11.x; y = ((a2 * x) + b2); return (new mVector(x, y)); }; if (((((p21.x - p22.x) == 0)) && (!(((p11.x - p12.x) == 0))))){ x = p21.x; y = ((a1 * x) + b1); } else { if (a1 == a2){ return (null); }; x = ((b2 - b1) / (a1 - a2)); y = ((a1 * x) + b1); }; if ((((x < Math.min(p11.x, p12.x))) || ((x > Math.max(p11.x, p12.x))))){ return (null); }; return (new mVector(x, y)); } public static function getRateForLength(start:mVector, end:mVector, length:Number):Number{ return ((length / start.minus(end).length)); } public static function getLocaOfLine(start:mVector, end:mVector, point:mVector):String{ var rate:Number; var value:mVector; var temp:Number = (end.x - start.x); if (temp == 0){ if (point.x < start.x){ return (UP_LINE); }; if (point.x == start.x){ return (ON_LINE); }; return (DOWN_LINE); }; rate = getRateForX(start, end, point.x); value = getValue(start, end, rate); if (point.y < value.y){ return (UP_LINE); }; if (point.y == value.y){ return (ON_LINE); }; return (DOWN_LINE); } public static function getValue(start:mVector, end:mVector, rate:Number):mVector{ var tempX:Number = (start.x + ((end.x - start.x) * rate)); var tempY:Number = (start.y + ((end.y - start.y) * rate)); return (new mVector(tempX, tempY)); } public static function getSymPoint(startPoint:mVector, endPoint:mVector, point:mVector):mVector{ var jPoint:mVector; var a1:Number; var b1:Number; var a2:Number; var b2:Number; var x:Number; var y:Number; if ((endPoint.x - startPoint.x) == 0){ jPoint = new mVector(startPoint.x, point.y); } else { a1 = ((endPoint.y - startPoint.y) / (endPoint.x - startPoint.x)); b1 = (startPoint.y - (a1 * startPoint.x)); a2 = (-1 / a1); b2 = (point.y - (a1 * point.x)); x = ((b2 - b1) / (a1 - a2)); y = ((a1 * x) + b1); jPoint = new mVector(x, y); }; return (new mVector(((jPoint.x * 2) - point.x), ((jPoint.y * 2) - point.y))); } } }//package zlong.zelda.collisionEngine
Section 230
//LineWall (zlong.zelda.collisionEngine.LineWall) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; import flash.geom.*; public class LineWall extends AbstractWall { private var _spForRect:mVector; private var _epForRect:mVector; public function LineWall(startPoint:mVector, endPoint:mVector, elasticity:Number=0.3, friction:Number=0){ super(startPoint, endPoint, elasticity, friction); curr = new mVector(((startPoint.x + endPoint.x) / 2), ((startPoint.y + endPoint.y) / 2)); _spForRect = new mVector(); _epForRect = new mVector(); makeRect(); } override public function init():void{ if (!CollisionEngine.isPaint){ return; }; cleanup(); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(startPoint.x, startPoint.y); sprite.graphics.lineTo(endPoint.x, endPoint.y); }; paint(); } private function makeRect():void{ var centerPoint:mVector = this.startPoint.plus(this.endPoint).mult(0.5); var width:Number = Math.abs((this.startPoint.x - this.endPoint.x)); var height:Number = Math.abs((this.startPoint.y - this.endPoint.y)); _rect = new Rectangle((centerPoint.x - (width / 2)), (centerPoint.y - (height / 2)), width, height); _spForRect.copyFrom(this.startPoint); _epForRect.copyFrom(this.endPoint); } public function radian():Number{ return (Math.atan((curr.y / curr.x))); } override public function getRect():Rectangle{ if (((!(_spForRect.compare(this.startPoint))) || (!(_epForRect.compare(this.endPoint))))){ makeRect(); }; return (_rect); } public function get length():Number{ var tempVector:mVector = startPoint.minus(endPoint); return (tempVector.length); } override public function paint():void{ if (!CollisionEngine.isPaint){ return; }; sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(startPoint.x, startPoint.y); sprite.graphics.lineTo(endPoint.x, endPoint.y); } } }//package zlong.zelda.collisionEngine
Section 231
//MathUtil (zlong.zelda.collisionEngine.MathUtil) package zlong.zelda.collisionEngine { final class MathUtil { static var ONE_EIGHTY_OVER_PI:Number = 57.2957795130823; static var PI_OVER_ONE_EIGHTY:Number = 0.0174532925199433; function MathUtil(){ super(); } static function clamp(n:Number, min:Number, max:Number):Number{ if (n < min){ return (min); }; if (n > max){ return (max); }; return (n); } static function sign(val:Number):int{ if (val < 0){ return (-1); }; return (1); } } }//package zlong.zelda.collisionEngine
Section 232
//RectangleParticle (zlong.zelda.collisionEngine.RectangleParticle) package zlong.zelda.collisionEngine { import zlong.breathxue.utils.math.*; import flash.geom.*; public class RectangleParticle extends AbstractParticle { private var _axes:Array; private var _widthForRect:Number; private var _radian:Number; private var _extents:Array; private var _xForRect:Number; private var _heightForRect:Number; private var _radianForRect:Number; private var _yForRect:Number; public function RectangleParticle(x:Number, y:Number, width:Number, height:Number, rotation:Number=0, isFixed:Boolean=false, mass:Number=1, elasticity:Number=0.3, friction:Number=0){ super(x, y, isFixed, mass, elasticity, friction); _extents = new Array((width / 2), (height / 2)); _axes = new Array(new mVector(0, 0), new mVector(0, 0)); radian = rotation; makeRect(); } public function set radian(t:Number):void{ _radian = t; setAxes(t); } function getProjection(axis:mVector):Interval{ var radius:Number = ((extents[0] * Math.abs(axis.dot(axes[0]))) + (extents[1] * Math.abs(axis.dot(axes[1])))); var c:Number = samp.dot(axis); interval.min = (c - radius); interval.max = (c + radius); return (interval); } function get extents():Array{ return (_extents); } public function get width():Number{ return ((_extents[0] * 2)); } override public function init():void{ var w:Number; var h:Number; if (!CollisionEngine.isPaint){ return; }; cleanup(); if (displayObject != null){ initDisplay(); } else { w = (extents[0] * 2); h = (extents[1] * 2); sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawRect((-(w) / 2), (-(h) / 2), w, h); sprite.graphics.endFill(); }; paint(); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function set height(h:Number):void{ _extents[1] = (h / 2); } override public function getRect():Rectangle{ if (((((((((!((_xForRect == this.px))) || (!((_yForRect == this.py))))) || (!((_radianForRect == this.radian))))) || (!((_widthForRect == this.width))))) || (!((_heightForRect == this.height))))){ makeRect(); }; return (_rect); } override public function paint():void{ if (!CollisionEngine.isPaint){ return; }; sprite.x = curr.x; sprite.y = curr.y; sprite.rotation = angle; } public function set width(w:Number):void{ _extents[0] = (w / 2); } function get axes():Array{ return (_axes); } private function setAxes(t:Number):void{ var s:Number = Math.sin(t); var c:Number = Math.cos(t); axes[0].x = c; axes[0].y = s; axes[1].x = -(s); axes[1].y = c; } public function get radian():Number{ return (_radian); } private function makeRect():void{ var halfDiagonal:Number = (Math.sqrt((Math.pow(this.width, 2) + Math.pow(this.height, 2))) / 2); var diagRadian:Number = Math.atan((this.height / this.width)); var halfWidth:Number = (halfDiagonal * Math.sin((((Math.PI / 2) - this.radian) + diagRadian))); var halfHeight:Number = (halfDiagonal * Math.sin((this.radian + diagRadian))); _rect = new Rectangle((this.px - halfWidth), (this.py - halfHeight), (2 * halfWidth), (2 * halfHeight)); _xForRect = this.px; _yForRect = this.py; _radianForRect = this.radian; _widthForRect = this.width; _heightForRect = this.height; } public function set angle(a:Number):void{ radian = (a * MathUtil.PI_OVER_ONE_EIGHTY); } public function get height():Number{ return ((_extents[1] * 2)); } } }//package zlong.zelda.collisionEngine
Section 233
//SpringConstraint (zlong.zelda.collisionEngine.SpringConstraint) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; public class SpringConstraint extends AbstractConstraint { private var _collidable:Boolean; private var _p1:AbstractParticle; private var _p2:AbstractParticle; private var _scp:SpringConstraintParticle; private var _restLength:Number; public function SpringConstraint(p1:AbstractParticle, p2:AbstractParticle, stiffness:Number=0.5, collidable:Boolean=false, rectHeight:Number=1, rectScale:Number=1, scaleToLength:Boolean=false){ super(stiffness); _p1 = p1; _p2 = p2; checkParticlesLocation(); _restLength = currLength; setCollidable(collidable, rectHeight, rectScale, scaleToLength); } public function get collidable():Boolean{ return (_collidable); } public function get rectScale():Number{ return (_scp.rectScale); } public function setDisplay(d:DisplayObject, offsetX:Number=0, offsetY:Number=0, rotation:Number=0):void{ if (collidable){ scp.setDisplay(d, offsetX, offsetY, rotation); } else { displayObject = d; displayObjectRotation = rotation; displayObjectOffset = new mVector(offsetX, offsetY); }; } public function set rectScale(s:Number):void{ if (_scp == null){ return; }; _scp.rectScale = s; } override public function init():void{ if (!CollisionEngine.isPaint){ return; }; cleanup(); if (collidable){ scp.init(); } else { if (displayObject != null){ initDisplay(); }; }; paint(); } function initDisplay():void{ if (collidable){ scp.initDisplay(); } else { displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); }; } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function get center():mVector{ return (_p1.curr.plus(_p2.curr).divEquals(2)); } public function set rectHeight(h:Number):void{ if (_scp == null){ return; }; _scp.rectHeight = h; } public function isConnectedTo(p:AbstractParticle):Boolean{ return ((((p == _p1)) || ((p == _p2)))); } override public function paint():void{ var c:mVector; if (!CollisionEngine.isPaint){ return; }; if (collidable){ scp.paint(); } else { if (displayObject != null){ c = center; sprite.x = c.x; sprite.y = c.y; sprite.rotation = angle; } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(_p1.px, _p1.py); sprite.graphics.lineTo(_p2.px, _p2.py); }; }; } public function setCollidable(b:Boolean, rectHeight:Number, rectScale:Number, scaleToLength:Boolean=false):void{ _collidable = b; _scp = null; if (_collidable){ _scp = new SpringConstraintParticle(_p1, _p2, this, rectHeight, rectScale, scaleToLength); }; } function get scp():SpringConstraintParticle{ return (_scp); } private function checkParticlesLocation():void{ if ((((_p1.curr.x == _p2.curr.x)) && ((_p1.curr.y == _p2.curr.y)))){ _p2.curr.x = (_p2.curr.x + 0.0001); }; } public function get rectHeight():Number{ return (_scp.rectHeight); } override function resolve():void{ if (((_p1.fixed) && (_p2.fixed))){ return; }; var deltaLength:Number = currLength; var diff:Number = ((deltaLength - restLength) / (deltaLength * (_p1.invMass + _p2.invMass))); var dmds:mVector = delta.mult((diff * stiffness)); _p1.curr.minusEquals(dmds.mult(_p1.invMass)); _p2.curr.plusEquals(dmds.mult(_p2.invMass)); } public function get fixed():Boolean{ return (((_p1.fixed) && (_p2.fixed))); } public function set fixedEndLimit(f:Number):void{ if (_scp == null){ return; }; _scp.fixedEndLimit = f; } public function get radian():Number{ var d:mVector = delta; return (Math.atan2(d.y, d.x)); } public function set restLength(r:Number):void{ if (r <= 0){ throw (new ArgumentError("restLength must be greater than 0")); }; _restLength = r; } public function get currLength():Number{ return (_p1.curr.distance(_p2.curr)); } public function get fixedEndLimit():Number{ return (_scp.fixedEndLimit); } public function get restLength():Number{ return (_restLength); } function get delta():mVector{ return (_p1.curr.minus(_p2.curr)); } } }//package zlong.zelda.collisionEngine
Section 234
//SpringConstraintParticle (zlong.zelda.collisionEngine.SpringConstraintParticle) package zlong.zelda.collisionEngine { import flash.display.*; import zlong.breathxue.utils.math.*; import zlong.zelda.collisionEngine.*; class SpringConstraintParticle extends RectangleParticle { private var _rectScale:Number; private var _parent:SpringConstraint; private var _rectHeight:Number; private var _avgVelocity:mVector; private var _rca:mVector; private var _rcb:mVector; private var _p1:AbstractParticle; private var _p2:AbstractParticle; private var _lambda:mVector; private var _scaleToLength:Boolean; private var _s:Number; private var _fixedEndLimit:Number; function SpringConstraintParticle(p1:AbstractParticle, p2:AbstractParticle, p:SpringConstraint, rectHeight:Number, rectScale:Number, scaleToLength:Boolean){ super(0, 0, 0, 0, 0, false); _p1 = p1; _p2 = p2; _lambda = new mVector(0, 0); _avgVelocity = new mVector(0, 0); _parent = p; this.rectScale = rectScale; this.rectHeight = rectHeight; _scaleToLength = scaleToLength; fixedEndLimit = 0; _rca = new mVector(); _rcb = new mVector(); } override public function get friction():Number{ return (((_p1.friction + _p2.friction) / 2)); } private function setCorners(r:RectangleParticle, i:int):void{ var rx:Number = r.curr.x; var ry:Number = r.curr.y; var axes:Array = r.axes; var extents:Array = r.extents; var ae0_x:Number = (axes[0].x * extents[0]); var ae0_y:Number = (axes[0].y * extents[0]); var ae1_x:Number = (axes[1].x * extents[1]); var ae1_y:Number = (axes[1].y * extents[1]); var emx:Number = (ae0_x - ae1_x); var emy:Number = (ae0_y - ae1_y); var epx:Number = (ae0_x + ae1_x); var epy:Number = (ae0_y + ae1_y); if (i == 0){ _rca.x = (rx - epx); _rca.y = (ry - epy); _rcb.x = (rx + emx); _rcb.y = (ry + emy); } else { if (i == 1){ _rca.x = (rx + emx); _rca.y = (ry + emy); _rcb.x = (rx + epx); _rcb.y = (ry + epy); } else { if (i == 2){ _rca.x = (rx + epx); _rca.y = (ry + epy); _rcb.x = (rx - emx); _rcb.y = (ry - emy); } else { if (i == 3){ _rca.x = (rx - emx); _rca.y = (ry - emy); _rcb.x = (rx - epx); _rcb.y = (ry - epy); }; }; }; }; } override function get invMass():Number{ if (((_p1.fixed) && (_p2.fixed))){ return (0); }; return ((1 / ((_p1.mass + _p2.mass) / 2))); } function get rectScale():Number{ return (_rectScale); } function updatePosition():void{ var c:mVector = _parent.center; curr.setTo(c.x, c.y); width = (_scaleToLength) ? (_parent.currLength * rectScale) : (_parent.restLength * rectScale); height = rectHeight; radian = _parent.radian; } function set rectScale(s:Number):void{ _rectScale = s; } function set rectHeight(r:Number):void{ _rectHeight = r; } override public function init():void{ var inner:Sprite; var w:Number; var h:Number; if (!CollisionEngine.isPaint){ return; }; if (displayObject != null){ initDisplay(); } else { inner = new Sprite(); _parent.sprite.addChild(inner); inner.name = "inner"; w = (_parent.currLength * rectScale); h = rectHeight; inner.graphics.clear(); inner.graphics.lineStyle(_parent.lineThickness, _parent.lineColor, _parent.lineAlpha); inner.graphics.beginFill(_parent.fillColor, _parent.fillAlpha); inner.graphics.drawRect((-(w) / 2), (-(h) / 2), w, h); inner.graphics.endFill(); }; paint(); } private function closestPtSegmentSegment():Number{ var t:Number; var pp1:mVector = _p1.curr; var pq1:mVector = _p2.curr; var pp2:mVector = _rca; var pq2:mVector = _rcb; var d1:mVector = pq1.minus(pp1); var d2:mVector = pq2.minus(pp2); var r:mVector = pp1.minus(pp2); var a:Number = d1.dot(d1); var e:Number = d2.dot(d2); var f:Number = d2.dot(r); var c:Number = d1.dot(r); var b:Number = d1.dot(d2); var denom:Number = ((a * e) - (b * b)); if (denom != 0){ _s = MathUtil.clamp((((b * f) - (c * e)) / denom), 0, 1); } else { _s = 0.5; }; t = (((b * _s) + f) / e); if (t < 0){ t = 0; _s = MathUtil.clamp((-(c) / a), 0, 1); } else { if (t > 0){ t = 1; _s = MathUtil.clamp(((b - c) / a), 0, 1); }; }; var c1:mVector = pp1.plus(d1.mult(_s)); var c2:mVector = pp2.plus(d2.mult(t)); var c1mc2:mVector = c1.minus(c2); return (c1mc2.dot(c1mc2)); } override public function paint():void{ if (!CollisionEngine.isPaint){ return; }; var c:mVector = _parent.center; var s:Sprite = _parent.sprite; if (_scaleToLength){ s.getChildByName("inner").width = (_parent.currLength * rectScale); } else { if (displayObject != null){ s.getChildByName("inner").width = (_parent.restLength * rectScale); }; }; s.x = c.x; s.y = c.y; s.rotation = _parent.angle; } override public function get velocity():mVector{ var p1v:mVector = _p1.velocity; var p2v:mVector = _p2.velocity; _avgVelocity.setTo(((p1v.x + p2v.x) / 2), ((p1v.y + p2v.y) / 2)); return (_avgVelocity); } function get rectHeight():Number{ return (_rectHeight); } override protected function resolveCollision(mtd:mVector, vel:mVector, n:mVector, d:Number, o:int, p:AbstractParticle=null):void{ var denom:Number; var corrParticle:AbstractParticle; var t:Number = getContactPointParam(p); var c1:Number = (1 - t); var c2:Number = t; if (_p1.fixed){ if (c2 <= fixedEndLimit){ return; }; _lambda.setTo((mtd.x / c2), (mtd.y / c2)); _p2.curr.plusEquals(_lambda); _p2.velocity = vel; } else { if (_p2.fixed){ if (c1 <= fixedEndLimit){ return; }; _lambda.setTo((mtd.x / c1), (mtd.y / c1)); _p1.curr.plusEquals(_lambda); _p1.velocity = vel; } else { denom = ((c1 * c1) + (c2 * c2)); if (denom == 0){ return; }; _lambda.setTo((mtd.x / denom), (mtd.y / denom)); _p1.curr.plusEquals(_lambda.mult(c1)); _p2.curr.plusEquals(_lambda.mult(c2)); if (t == 0.5){ _p1.velocity = vel; _p2.velocity = vel; } else { corrParticle = ((t)<0.5) ? _p1 : _p2; corrParticle.velocity = vel; }; }; }; } private function getContactPointParam(p:AbstractParticle):Number{ var t:Number; var shortestIndex:Number; var paramList:Array; var shortestDistance:Number; var i:int; var d:Number; if ((p is CircleParticle)){ t = closestParamPoint(p.curr); } else { if ((p is RectangleParticle)){ paramList = new Array(4); shortestDistance = Number.POSITIVE_INFINITY; i = 0; while (i < 4) { setCorners((p as RectangleParticle), i); d = closestPtSegmentSegment(); if (d < shortestDistance){ shortestDistance = d; shortestIndex = i; paramList[i] = _s; }; i++; }; t = paramList[shortestIndex]; }; }; return (t); } function set fixedEndLimit(f:Number):void{ _fixedEndLimit = f; } override public function get elasticity():Number{ return (((_p1.elasticity + _p2.elasticity) / 2)); } override public function get mass():Number{ return (((_p1.mass + _p2.mass) / 2)); } function get fixedEndLimit():Number{ return (_fixedEndLimit); } private function closestParamPoint(c:mVector):Number{ var ab:mVector = _p2.curr.minus(_p1.curr); var t:Number = (ab.dot(c.minus(_p1.curr)) / ab.dot(ab)); return (MathUtil.clamp(t, 0, 1)); } override function initDisplay():void{ displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; var inner:Sprite = new Sprite(); inner.name = "inner"; inner.addChild(displayObject); _parent.sprite.addChild(inner); } } }//package zlong.zelda.collisionEngine
Section 235
//framework_internal (zlong.framework_internal) package zlong { public namespace framework_internal = "http://www.zlonggames.com/flash/framework/internal"; }//package zlong
Section 236
//GameSetting (zlong.GameSetting) package zlong { import flash.display.*; import zlong.site.*; import zlong.country.*; import zlong.data.*; import zlong.display.*; public class GameSetting { private var _XMLLoader:LocalSiteDataLoader; localComponent_internal static const VERSION:String = "v1.08.201012121509"; public static const PORTAL_TYPE_FAMILY:String = "family"; public static const PORTAL_TYPE_TWEEN:String = "tween"; public static const PORTAL_TYPE_GIRL:String = "girl"; public static const PORTAL_TYPE_TEEN:String = "teen"; public static const PORTAL_TYPE_ZAPAPA:String = "zapapa"; public static const PORTAL_TYPE_HYVES:String = "hyves"; public function GameSetting(displayObject:InteractiveObject, cnversion:Boolean, portal:String, name:String, html:String, width:int, height:int, loadSiteInfoXml:Boolean=true){ super(); GameInfo.cnversion = cnversion; GameInfo.portal = portal; GameInfo.name = name; GameInfo.html = html; GameInfo.width = width; GameInfo.height = height; if (loadSiteInfoXml){ this._XMLLoader = new LocalSiteDataLoader(); }; this.init(); this.initMenu(displayObject); } private function init():void{ new CountryCookie(); CountryInfo.instance.portal = GameInfo.portal; if (CountryCookie.country == null){ CountryInfo.instance.country = "en_us"; } else { CountryInfo.instance.country = String(CountryCookie.country); }; } private function initMenu(p:InteractiveObject):void{ new Menu(p); } } }//package zlong
Section 237
//localComponent_internal (zlong.localComponent_internal) package zlong { public namespace localComponent_internal = "http://www.zlonggames.com/flash/localComponent/internal"; }//package zlong
Section 238
//BACK (BACK) package { import ui.components.*; public dynamic class BACK extends MyButton { } }//package
Section 239
//back1 (back1) package { import zlong.display.*; public dynamic class back1 extends TranText { } }//package
Section 240
//backmain (backmain) package { import ui.components.*; public dynamic class backmain extends MyButton { } }//package
Section 241
//bg (bg) package { import tools.*; public dynamic class bg extends BitmapMc { } }//package
Section 242
//BGBit (BGBit) package { import tools.*; public dynamic class BGBit extends BitmapMc { } }//package
Section 243
//billards1 (billards1) package { import flash.display.*; public dynamic class billards1 extends MovieClip { public var ball:MovieClip; } }//package
Section 244
//billards10 (billards10) package { import flash.display.*; public dynamic class billards10 extends MovieClip { public var ball:MovieClip; } }//package
Section 245
//billards11 (billards11) package { import flash.display.*; public dynamic class billards11 extends MovieClip { public var ball:MovieClip; } }//package
Section 246
//billards12 (billards12) package { import flash.display.*; public dynamic class billards12 extends MovieClip { public var ball:MovieClip; } }//package
Section 247
//billards13 (billards13) package { import flash.display.*; public dynamic class billards13 extends MovieClip { public var ball:MovieClip; } }//package
Section 248
//billards14 (billards14) package { import flash.display.*; public dynamic class billards14 extends MovieClip { public var ball:MovieClip; } }//package
Section 249
//billards15 (billards15) package { import flash.display.*; public dynamic class billards15 extends MovieClip { public var ball:MovieClip; } }//package
Section 250
//billards2 (billards2) package { import flash.display.*; public dynamic class billards2 extends MovieClip { public var ball:MovieClip; } }//package
Section 251
//billards3 (billards3) package { import flash.display.*; public dynamic class billards3 extends MovieClip { public var ball:MovieClip; } }//package
Section 252
//billards4 (billards4) package { import flash.display.*; public dynamic class billards4 extends MovieClip { public var ball:MovieClip; } }//package
Section 253
//billards5 (billards5) package { import flash.display.*; public dynamic class billards5 extends MovieClip { public var ball:MovieClip; } }//package
Section 254
//billards6 (billards6) package { import flash.display.*; public dynamic class billards6 extends MovieClip { public var ball:MovieClip; } }//package
Section 255
//billards7 (billards7) package { import flash.display.*; public dynamic class billards7 extends MovieClip { public var ball:MovieClip; } }//package
Section 256
//billards8 (billards8) package { import flash.display.*; public dynamic class billards8 extends MovieClip { public var ball:MovieClip; } }//package
Section 257
//billards9 (billards9) package { import flash.display.*; public dynamic class billards9 extends MovieClip { public var ball:MovieClip; } }//package
Section 258
//computer11 (computer11) package { import zlong.display.*; public dynamic class computer11 extends TranText { } }//package
Section 259
//Copyright (Copyright) package { import zlong.display.*; public dynamic class Copyright extends Copyright { } }//package
Section 260
//CountriesBox (CountriesBox) package { import zlong.display.*; public dynamic class CountriesBox extends CountriesBox { } }//package
Section 261
//cueBall (cueBall) package { import flash.display.*; public dynamic class cueBall extends MovieClip { } }//package
Section 262
//eigthball (eigthball) package { import zlong.display.*; public dynamic class eigthball extends TranText { } }//package
Section 263
//gamelose11 (gamelose11) package { import zlong.display.*; public dynamic class gamelose11 extends TranText { } }//package
Section 264
//gamewin11 (gamewin11) package { import zlong.display.*; public dynamic class gamewin11 extends TranText { } }//package
Section 265
//HideConsole (HideConsole) package { public var HideConsole:Object; HideConsole = false; }//package
Section 266
//how (how) package { import ui.components.*; public dynamic class how extends MyButton { } }//package
Section 267
//how8ball (how8ball) package { import zlong.display.*; public dynamic class how8ball extends TranText { } }//package
Section 268
//howstraight (howstraight) package { import zlong.display.*; public dynamic class howstraight extends TranText { } }//package
Section 269
//howtoplay (howtoplay) package { import flash.display.*; public dynamic class howtoplay extends MovieClip { public var howeight:MovieClip; public var howstraight:MovieClip; public var backBt:BACK; } }//package
Section 270
//howtoplaystraight (howtoplaystraight) package { import flash.display.*; public dynamic class howtoplaystraight extends MovieClip { } }//package
Section 271
//HyvesLoading (HyvesLoading) package { import zlong.display.*; public dynamic class HyvesLoading extends HyvesLoading { } }//package
Section 272
//ingameUI (ingameUI) package { import flash.display.*; public dynamic class ingameUI extends MovieClip { public var gamelose:gamelose11; public var retryBt:RETRY; public var computer:computer11; public var eightballtitle:eigthball; public var screenMc:MovieClip; public var straighttitile:straight; public var playerwin:MovieClip; public var __id0_:Logo; public var player2:player2111; public var leftlight:MovieClip; public var rightlight:MovieClip; public var rightside:MovieClip; public var gamewin:gamewin11; public var howBt:how; public var leftcolor:MovieClip; public var rightcolor:MovieClip; public var statisticsBt:statistics; public var gomenuBt:backmain; public function ingameUI(){ __setProp___id0__8_1(); } function __setProp___id0__8_1(){ try { __id0_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id0_.alignHorizontal = "Center"; __id0_.alignVertical = "Center"; __id0_.maxHeight = 40; __id0_.maxWidth = 150; __id0_.position = "logo_playingGame"; try { __id0_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 273
//LOADING (LOADING) package { import zlong.display.*; public dynamic class LOADING extends TranText { } }//package
Section 274
//loadingUI (loadingUI) package { import flash.display.*; import flash.text.*; public dynamic class loadingUI extends MovieClip { public var pertext:TextField; } }//package
Section 275
//localization (localization) package { import flash.display.*; public dynamic class localization extends MovieClip { } }//package
Section 276
//Logo (Logo) package { import zlong.display.*; public dynamic class Logo extends Logo { } }//package
Section 277
//lose (lose) package { import zlong.display.*; public dynamic class lose extends TranText { } }//package
Section 278
//Main (Main) package { import flash.display.*; import zlong.Template.*; import data.*; import manager.*; import zlong.breathxue.utils.debug.*; public class Main extends AbstractMainClass { public var stage:Stage; public static const __debug__:Boolean = false; public static const VERSION_NUM:String = "v. 1.00"; private static var _instance:Main; public function Main(mainMc:Sprite){ _instance = this; super(mainMc); showVersion(VERSION_NUM); if (Main.__debug__){ TC.InitTC(__GameMc); showFPS(); }; gameStart(); } private function gameStart():void{ stage = __GameMc.stage; stage.frameRate = Data.FRAME_RATEP; new UIManager(__GameMc); } public static function get instance():Main{ return (_instance); } } }//package
Section 279
//mainMenuUI (mainMenuUI) package { import flash.display.*; public dynamic class mainMenuUI extends MovieClip { public var eightpvspBt:playervsplayer; public var eightpvscBt:playervscomputer; public var straightpvspBt:playervsplayer; public var sound_button:sound; public var straightpvscBt:playervscomputer; public var quality_button:quality; public var __id1_:Logo; public var straightpBt:player; public var music_button:music; public function mainMenuUI(){ __setProp___id1___1(); } function __setProp___id1___1(){ try { __id1_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id1_.alignHorizontal = "Center"; __id1_.alignVertical = "Center"; __id1_.maxHeight = 40; __id1_.maxWidth = 150; __id1_.position = "logo_mainscreen"; try { __id1_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 280
//MENU (MENU) package { import ui.components.*; public dynamic class MENU extends MyButton { } }//package
Section 281
//menu1 (menu1) package { import zlong.display.*; public dynamic class menu1 extends TranText { } }//package
Section 282
//menuUI (menuUI) package { import flash.display.*; public dynamic class menuUI extends MovieClip { public var menuBt:MENU; public var sound_button:sound; public var quality_button:quality; public var backBt:BACK; public var music_button:music; public var restartBt:RESTART; } }//package
Section 283
//music (music) package { import flash.display.*; public dynamic class music extends MovieClip { } }//package
Section 284
//PERCENTAGE (PERCENTAGE) package { import zlong.display.*; public dynamic class PERCENTAGE extends TranText { } }//package
Section 285
//play1 (play1) package { import zlong.display.*; public dynamic class play1 extends TranText { } }//package
Section 286
//play2 (play2) package { import zlong.display.*; public dynamic class play2 extends TranText { } }//package
Section 287
//player (player) package { import ui.components.*; public dynamic class player extends MyButton { } }//package
Section 288
//player1 (player1) package { import zlong.display.*; public dynamic class player1 extends TranText { } }//package
Section 289
//player11 (player11) package { import zlong.display.*; public dynamic class player11 extends TranText { } }//package
Section 290
//player1win (player1win) package { import zlong.display.*; public dynamic class player1win extends TranText { } }//package
Section 291
//player1vs21 (player1vs21) package { import zlong.display.*; public dynamic class player1vs21 extends TranText { } }//package
Section 292
//player1vsc1 (player1vsc1) package { import zlong.display.*; public dynamic class player1vsc1 extends TranText { } }//package
Section 293
//player2111 (player2111) package { import zlong.display.*; public dynamic class player2111 extends TranText { } }//package
Section 294
//player2win (player2win) package { import zlong.display.*; public dynamic class player2win extends TranText { } }//package
Section 295
//playervscomputer (playervscomputer) package { import ui.components.*; public dynamic class playervscomputer extends MyButton { } }//package
Section 296
//playervsplayer (playervsplayer) package { import ui.components.*; public dynamic class playervsplayer extends MyButton { } }//package
Section 297
//poolcue (poolcue) package { import flash.display.*; public dynamic class poolcue extends MovieClip { } }//package
Section 298
//quality (quality) package { import flash.display.*; public dynamic class quality extends MovieClip { } }//package
Section 299
//reset (reset) package { import ui.components.*; public dynamic class reset extends MyButton { } }//package
Section 300
//reset1 (reset1) package { import zlong.display.*; public dynamic class reset1 extends TranText { } }//package
Section 301
//RESTART (RESTART) package { import ui.components.*; public dynamic class RESTART extends MyButton { } }//package
Section 302
//restart1 (restart1) package { import zlong.display.*; public dynamic class restart1 extends TranText { } }//package
Section 303
//RETRY (RETRY) package { import ui.components.*; public dynamic class RETRY extends MyButton { } }//package
Section 304
//retry1 (retry1) package { import zlong.display.*; public dynamic class retry1 extends TranText { } }//package
Section 305
//Root (Root) package { import flash.events.*; import zlong.spilSystemTool.*; import zlong.Template.*; import flash.net.*; import zlong.*; public class Root extends AbstractRootClass { public static const STAGE_WIGHT:int = 700; public static const GAME_CLASS_NAME:String = "Main"; public static const STAGE_HEIGHT:int = 500; public static const PORTAL_TYPE:String = "tween"; public static const VERSION_NUM:String = "v. 1.00"; public static const __debug__:Boolean = false; public static const LOADING_CLASS_NAME:String = "ui.Loading"; public static const GAME_FRAMERATE:int = 30; public static const GAME_NAME:String = "Billiards Master"; public function Root(){ super(); } private function loadXML():void{ var loader:URLLoader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; loader.addEventListener(Event.COMPLETE, loadComplete); loader.load(new URLRequest("data.xml")); } override protected function script0():void{ Trace("script0"); } override protected function script1():void{ Trace("script1"); } override protected function script2():void{ Trace("script2"); } override protected function initSettingBeforeLoading():void{ new GameSetting(this, false, PORTAL_TYPE, cutGameName(GAME_NAME), (cutGameName(GAME_NAME, "-", true) + ".html"), STAGE_WIGHT, STAGE_HEIGHT); Award_HighScore.instance.init(cutGameName(GAME_NAME), this, __debug__, __debug__); } private function loadComplete(evt:Event):void{ var evt = evt; XMLData.instance.xml = new XML(evt.target.data); trace("XML load complete"); this.gotoAndStop(3); //unresolved jump var _slot1 = err; trace("Could not parse text into XML"); trace(_slot1); } } }//package
Section 306
//shadow (shadow) package { import flash.display.*; public dynamic class shadow extends MovieClip { } }//package
Section 307
//sound (sound) package { import flash.display.*; public dynamic class sound extends MovieClip { } }//package
Section 308
//sound_collideHeavy (sound_collideHeavy) package { import flash.media.*; public dynamic class sound_collideHeavy extends Sound { } }//package
Section 309
//sound_collideLight (sound_collideLight) package { import flash.media.*; public dynamic class sound_collideLight extends Sound { } }//package
Section 310
//sound_collideNormal (sound_collideNormal) package { import flash.media.*; public dynamic class sound_collideNormal extends Sound { } }//package
Section 311
//sound_collideTable (sound_collideTable) package { import flash.media.*; public dynamic class sound_collideTable extends Sound { } }//package
Section 312
//sound_ingame (sound_ingame) package { import flash.media.*; public dynamic class sound_ingame extends Sound { } }//package
Section 313
//sound_inmenu (sound_inmenu) package { import flash.media.*; public dynamic class sound_inmenu extends Sound { } }//package
Section 314
//sound_inPocket (sound_inPocket) package { import flash.media.*; public dynamic class sound_inPocket extends Sound { } }//package
Section 315
//sound_lose (sound_lose) package { import flash.media.*; public dynamic class sound_lose extends Sound { } }//package
Section 316
//sound_menuPress (sound_menuPress) package { import flash.media.*; public dynamic class sound_menuPress extends Sound { } }//package
Section 317
//sound_menuTouch (sound_menuTouch) package { import flash.media.*; public dynamic class sound_menuTouch extends Sound { } }//package
Section 318
//sound_opening (sound_opening) package { import flash.media.*; public dynamic class sound_opening extends Sound { } }//package
Section 319
//sound_setBilliards (sound_setBilliards) package { import flash.media.*; public dynamic class sound_setBilliards extends Sound { } }//package
Section 320
//sound_shotBall (sound_shotBall) package { import flash.media.*; public dynamic class sound_shotBall extends Sound { } }//package
Section 321
//sound_win (sound_win) package { import flash.media.*; public dynamic class sound_win extends Sound { } }//package
Section 322
//statisticeight (statisticeight) package { import flash.display.*; import flash.text.*; public dynamic class statisticeight extends MovieClip { public var resetBt:reset; public var eplayertwolose:TextField; public var eplayertwowin:TextField; public var eplayeronelose:TextField; public var eplayertwoper:TextField; public var backBt:BACK; public var eplayeronewin:TextField; public var eplayeroneper:TextField; } }//package
Section 323
//statistics (statistics) package { import ui.components.*; public dynamic class statistics extends MyButton { } }//package
Section 324
//statisticstraight (statisticstraight) package { import flash.display.*; import flash.text.*; public dynamic class statisticstraight extends MovieClip { public var resetBt:reset; public var splayeroneper:TextField; public var splayertwowin:TextField; public var splayertwoper:TextField; public var backBt:BACK; public var splayeronewin:TextField; public var splayertwolose:TextField; public var splayeronelose:TextField; } }//package
Section 325
//straight (straight) package { import zlong.display.*; public dynamic class straight extends TranText { } }//package
Section 326
//tablebitmap (tablebitmap) package { import tools.*; public dynamic class tablebitmap extends BitmapMc { } }//package
Section 327
//title (title) package { import zlong.display.*; public dynamic class title extends TranText { } }//package
Section 328
//Trace (Trace) package { import flash.utils.*; import zlong.breathxue.utils.debug.*; public function Trace(... _args):void{ var i:String; var TcClass:Class; var args = _args; var arg0 = ""; if ((args[0] is String)){ arg0 = args[0]; if ((((((((arg0.charAt(0) == "|")) && ((arg0.charAt(1) == "|")))) && ((arg0.charAt((arg0.length - 2)) == "|")))) && ((arg0.charAt((arg0.length - 1)) == "|")))){ arg0 = arg0.substring(1, (arg0.length - 1)); args.shift(); } else { arg0 = ""; }; }; var isShowConsole:Boolean; if (HideConsole == false){ isShowConsole = true; } else { if (HideConsole == true){ isShowConsole = false; } else { for (i in HideConsole) { if (HideConsole[i] == arg0){ isShowConsole = false; break; }; }; }; }; if (isShowConsole){ trace((arg0 + args.join(" "))); }; if (TcShow){ TcClass = (getDefinitionByName("zlong.breathxue.utils.debug.TC") as Class); //unresolved jump var _slot1 = e; TcShow = false; if (TcClass){ var _local3 = TcClass; _local3["SHOW"](arg0, args); }; }; } }//package
Section 329
//win (win) package { import zlong.display.*; public dynamic class win extends TranText { } }//package
Section 330
//XMLData (XMLData) package { public class XMLData { private var _dataXML:XML; private static var _instance:XMLData; public function XMLData(){ super(); } public function getMovedistance():Number{ return (Number(_dataXML["movedistance"])); } public function getSize():int{ return (int(_dataXML["size"])); } public function getDamping():Number{ return (Number(_dataXML["damping"])); } public function getPower():int{ return (int(_dataXML["power"])); } public function getTableelasticity():Number{ return (Number(_dataXML["tableelasticity"])); } public function getBallelasticity():Number{ return (Number(_dataXML["ballelasticity"])); } public function getFramerate():Number{ return (Number(_dataXML["framerate"])); } public function getInterval():Number{ return (Number(_dataXML["interval"])); } public function set xml(xml:XML):void{ _dataXML = xml; } public function get xml():XML{ return (_dataXML); } public static function get instance():XMLData{ if (_instance == null){ _instance = new (XMLData); }; return (_instance); } } }//package

Library Items

Symbol 1 GraphicUsed by:4
Symbol 2 BitmapUsed by:3
Symbol 3 GraphicUses:2Used by:4
Symbol 4 MovieClipUses:1 3Used by:355 817
Symbol 5 FontUsed by:6 11 12 13 14 15 16 17 18 19 20 21 23 24 27 360 365 369 370 371 372 373 374 375 376 377 378 379 381 385 386 390 395 400 406 412 417 423 424 425 426 427 428 429 430 432 435 440 441 442 443 444 445 446 447 448 450 453 454 456 457 458 459 460 461 462 463 464 465 467 481 487 488 489 490 491 492 493 494 495 496 497 499 502 503 505 506 507 508 509 510 511 512 513 514 515 518 519 521 522 523 524 525 526 527 528 529 530 531 535 536 537 538 539 540 541 542 543 544 545 546 547 549 553 554 555 556 557 558 559 560 561 562 564 572 575 576 577 578 579 580 581 582 583 584 585 587 590 594 601 602 603 604 605 606 607 608 609 610 613 617 627 634 635 636 637 638 639 640 641 642 643 644 645 647 650 651 657 666 683 684 685 686 687 688 689 690 691 692 697 698 699 700 701 702 703 704 705 706 707 709 715 716 717 718 719 720 721 722 723 724 725 726 729 730 851 852 853 854 855 856 857 858 859 860 861 862 864 867 869 870 871 872 873 874 875 876 877 878 879 880 883 884 886 887 888 889 890 891 892 893 894 895 896 897 900 901 907 908 909 910 911 912 913 916 927 928 929 930 931 932 933 934 935 936 937 938 943 944 945 946 947 948 949 950 951 952 953 954 956 959 960 962 963 964 965 966 967 968 969 970 971 972 973 975 978 979 982 983 984 985 986 987 988 989 990 991 1014
Symbol 6 EditableTextUses:5Used by:355
Symbol 7 GraphicUsed by:10
Symbol 8 GraphicUsed by:10
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip {title} [title]Uses:7 8 9Used by:355 817 942
Symbol 11 TextUses:5Used by:28
Symbol 12 TextUses:5Used by:28
Symbol 13 TextUses:5Used by:28
Symbol 14 TextUses:5Used by:28
Symbol 15 TextUses:5Used by:28
Symbol 16 TextUses:5Used by:28
Symbol 17 TextUses:5Used by:28
Symbol 18 TextUses:5Used by:28
Symbol 19 TextUses:5Used by:28
Symbol 20 TextUses:5Used by:28
Symbol 21 TextUses:5Used by:28
Symbol 22 TextUsed by:28
Symbol 23 TextUses:5Used by:28
Symbol 24 TextUses:5Used by:28
Symbol 25 FontUsed by:26 384 434 452 469 501 517 533 551 566 589 612 649 694 711 728 866 882 899 915 940 958 977 993
Symbol 26 TextUses:25Used by:28
Symbol 27 TextUses:5Used by:28
Symbol 28 MovieClip {LOADING} [LOADING]Uses:11 12 13 14 15 16 17 18 19 20 21 22 23 24 26 27Used by:355
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:354
Symbol 31 FontUsed by:32
Symbol 32 TextUses:31Used by:33
Symbol 33 MovieClipUses:32Used by:354
Symbol 34 GraphicUsed by:39
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClipUses:35Used by:39
Symbol 37 GraphicUsed by:38 676
Symbol 38 MovieClipUses:37Used by:39 52 56 60 64 68 72 74 78 80 84 88 92 94 96 98 122 124 126 128 130 132 134 136 138 140 142 144 146 150 154 160 353
Symbol 39 MovieClip {UI_fla.new_agame_com_17} [UI_fla.new_agame_com_17]Uses:34 36 38Used by:40
Symbol 40 MovieClipUses:39Used by:353
Symbol 41 GraphicUsed by:52
Symbol 42 GraphicUsed by:52
Symbol 43 GraphicUsed by:52
Symbol 44 GraphicUsed by:52 407 413 418 482 573 595 618 628
Symbol 45 GraphicUsed by:52
Symbol 46 GraphicUsed by:52
Symbol 47 GraphicUsed by:52
Symbol 48 GraphicUsed by:52
Symbol 49 GraphicUsed by:52
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClipUses:50Used by:52
Symbol 52 MovieClip {UI_fla.logo_game_20} [UI_fla.logo_game_20]Uses:41 42 43 44 45 46 47 48 49 51 38Used by:353
Symbol 53 GraphicUsed by:56
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClipUses:54Used by:56
Symbol 56 MovieClip {UI_fla.new_zapjuegos_com_22} [UI_fla.new_zapjuegos_com_22]Uses:53 55 38Used by:353
Symbol 57 GraphicUsed by:60
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:60
Symbol 60 MovieClip {UI_fla.newspel_nl_24} [UI_fla.newspel_nl_24]Uses:57 59 38Used by:353
Symbol 61 GraphicUsed by:64
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClipUses:62Used by:64
Symbol 64 MovieClip {UI_fla.new_jeu_fr_26} [UI_fla.new_jeu_fr_26]Uses:61 63 38Used by:353
Symbol 65 GraphicUsed by:68
Symbol 66 GraphicUsed by:67
Symbol 67 MovieClipUses:66Used by:68
Symbol 68 MovieClip {UI_fla.new_spielen_com_28} [UI_fla.new_spielen_com_28]Uses:65 67 38Used by:353
Symbol 69 GraphicUsed by:72
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClipUses:70Used by:72
Symbol 72 MovieClip {UI_fla.new_clickjogos_com_30} [UI_fla.new_clickjogos_com_30]Uses:69 71 38Used by:353
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClip {UI_fla.logo_giocaregratis_it_32} [UI_fla.logo_giocaregratis_it_32]Uses:73 38Used by:353
Symbol 75 GraphicUsed by:78
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClipUses:76Used by:78
Symbol 78 MovieClip {UI_fla.new_spel_se_33} [UI_fla.new_spel_se_33]Uses:75 77 38Used by:353
Symbol 79 GraphicUsed by:80
Symbol 80 MovieClip {UI_fla.logo_my_games_co_uk_35} [UI_fla.logo_my_games_co_uk_35]Uses:79 38Used by:353
Symbol 81 GraphicUsed by:84
Symbol 82 GraphicUsed by:83
Symbol 83 MovieClipUses:82Used by:84
Symbol 84 MovieClip {UI_fla.new_flashgames_ru_36} [UI_fla.new_flashgames_ru_36]Uses:81 83 38Used by:353
Symbol 85 GraphicUsed by:88
Symbol 86 GraphicUsed by:87
Symbol 87 MovieClipUses:86Used by:88
Symbol 88 MovieClip {UI_fla.new_game_co_in_38} [UI_fla.new_game_co_in_38]Uses:85 87 38Used by:353
Symbol 89 GraphicUsed by:92
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90Used by:92
Symbol 92 MovieClip {UI_fla.new_games_co_id_40} [UI_fla.new_games_co_id_40]Uses:89 91 38Used by:353
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClip {UI_fla.logo_minigry_pl_42} [UI_fla.logo_minigry_pl_42]Uses:93 38Used by:353
Symbol 95 GraphicUsed by:96
Symbol 96 MovieClip {UI_fla.logo_asoyun_com_43} [UI_fla.logo_asoyun_com_43]Uses:95 38Used by:353
Symbol 97 GraphicUsed by:98
Symbol 98 MovieClip {UI_fla.logo_game_com_my_44} [UI_fla.logo_game_com_my_44]Uses:97 38Used by:353
Symbol 99 GraphicUsed by:100
Symbol 100 MovieClipUses:99Used by:353
Symbol 101 GraphicUsed by:102
Symbol 102 MovieClipUses:101Used by:353
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClipUses:103Used by:353
Symbol 105 GraphicUsed by:106
Symbol 106 MovieClipUses:105Used by:353
Symbol 107 GraphicUsed by:108
Symbol 108 MovieClipUses:107Used by:353
Symbol 109 GraphicUsed by:110
Symbol 110 MovieClipUses:109Used by:353
Symbol 111 GraphicUsed by:112
Symbol 112 MovieClipUses:111Used by:353
Symbol 113 GraphicUsed by:114
Symbol 114 MovieClipUses:113Used by:353
Symbol 115 GraphicUsed by:116
Symbol 116 MovieClipUses:115Used by:353
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClipUses:117Used by:353
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClipUses:119Used by:353
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClip {UI_fla.logo_oyunlar123_com_56} [UI_fla.logo_oyunlar123_com_56]Uses:121 38Used by:353
Symbol 123 GraphicUsed by:124
Symbol 124 MovieClip {UI_fla.girlsgogames_57} [UI_fla.girlsgogames_57]Uses:123 38Used by:353
Symbol 125 GraphicUsed by:126
Symbol 126 MovieClip {UI_fla.girlsgogames_58} [UI_fla.girlsgogames_58]Uses:125 38Used by:353
Symbol 127 GraphicUsed by:128
Symbol 128 MovieClip {UI_fla.girlsgogames_59} [UI_fla.girlsgogames_59]Uses:127 38Used by:353
Symbol 129 GraphicUsed by:130
Symbol 130 MovieClip {UI_fla.girlsgogames_60} [UI_fla.girlsgogames_60]Uses:129 38Used by:353
Symbol 131 GraphicUsed by:132
Symbol 132 MovieClip {UI_fla.girlsgogames_61} [UI_fla.girlsgogames_61]Uses:131 38Used by:353
Symbol 133 GraphicUsed by:134
Symbol 134 MovieClip {UI_fla.girlsgogames_62} [UI_fla.girlsgogames_62]Uses:133 38Used by:353
Symbol 135 GraphicUsed by:136
Symbol 136 MovieClip {UI_fla.girlsgogames_63} [UI_fla.girlsgogames_63]Uses:135 38Used by:353
Symbol 137 GraphicUsed by:138
Symbol 138 MovieClip {UI_fla.juegosdechicas_64} [UI_fla.juegosdechicas_64]Uses:137 38Used by:353
Symbol 139 GraphicUsed by:140
Symbol 140 MovieClip {UI_fla.girlsgogames_65} [UI_fla.girlsgogames_65]Uses:139 38Used by:353
Symbol 141 GraphicUsed by:142
Symbol 142 MovieClip {UI_fla.girlsgogames_66} [UI_fla.girlsgogames_66]Uses:141 38Used by:353
Symbol 143 GraphicUsed by:144
Symbol 144 MovieClip {UI_fla.girlsgogames_67} [UI_fla.girlsgogames_67]Uses:143 38Used by:353
Symbol 145 GraphicUsed by:146
Symbol 146 MovieClip {UI_fla.girlsgogames_68} [UI_fla.girlsgogames_68]Uses:145 38Used by:353
Symbol 147 GraphicUsed by:148
Symbol 148 MovieClipUses:147Used by:353
Symbol 149 GraphicUsed by:150
Symbol 150 MovieClip {UI_fla.logo_laro_com_ph_70} [UI_fla.logo_laro_com_ph_70]Uses:149 38Used by:353
Symbol 151 GraphicUsed by:152
Symbol 152 MovieClipUses:151Used by:353
Symbol 153 GraphicUsed by:154
Symbol 154 MovieClip {UI_fla.a10_com_logo_72} [UI_fla.a10_com_logo_72]Uses:153 38Used by:353
Symbol 155 GraphicUsed by:156
Symbol 156 MovieClipUses:155Used by:353
Symbol 157 GraphicUsed by:160
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClipUses:158Used by:160
Symbol 160 MovieClip {UI_fla.newagame_co_uk_74} [UI_fla.newagame_co_uk_74]Uses:157 159 38Used by:353
Symbol 161 GraphicUsed by:163 166 173 175 180 218 221 243 245 250 252 256 290 293 308 336 339 343 348
Symbol 162 GraphicUsed by:163 243
Symbol 163 MovieClipUses:161 162Used by:164
Symbol 164 MovieClipUses:163Used by:166
Symbol 165 GraphicUsed by:166 245
Symbol 166 MovieClipUses:161 164 165Used by:234
Symbol 167 GraphicUsed by:169 247 304
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:167 168Used by:234
Symbol 170 GraphicUsed by:172 249
Symbol 171 GraphicUsed by:172
Symbol 172 MovieClipUses:170 171Used by:173
Symbol 173 MovieClipUses:161 172Used by:174
Symbol 174 MovieClipUses:173Used by:175
Symbol 175 MovieClipUses:161 174Used by:234
Symbol 176 GraphicUsed by:178 254 306
Symbol 177 GraphicUsed by:178
Symbol 178 MovieClipUses:176 177Used by:234
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClipUses:161 179Used by:234
Symbol 181 GraphicUsed by:183
Symbol 182 GraphicUsed by:183
Symbol 183 MovieClipUses:181 182Used by:234
Symbol 184 GraphicUsed by:186
Symbol 185 GraphicUsed by:186
Symbol 186 MovieClipUses:184 185Used by:234
Symbol 187 GraphicUsed by:189
Symbol 188 GraphicUsed by:189
Symbol 189 MovieClipUses:187 188Used by:234
Symbol 190 GraphicUsed by:192
Symbol 191 GraphicUsed by:192
Symbol 192 MovieClipUses:190 191Used by:234
Symbol 193 GraphicUsed by:195
Symbol 194 GraphicUsed by:195 269
Symbol 195 MovieClipUses:193 194Used by:234
Symbol 196 GraphicUsed by:198
Symbol 197 GraphicUsed by:198 267
Symbol 198 MovieClipUses:196 197Used by:234
Symbol 199 GraphicUsed by:201 274
Symbol 200 GraphicUsed by:201
Symbol 201 MovieClipUses:199 200Used by:234 352
Symbol 202 GraphicUsed by:204
Symbol 203 GraphicUsed by:204
Symbol 204 MovieClipUses:202 203Used by:234
Symbol 205 GraphicUsed by:207
Symbol 206 GraphicUsed by:207
Symbol 207 MovieClipUses:205 206Used by:234
Symbol 208 GraphicUsed by:210 282 330
Symbol 209 GraphicUsed by:210
Symbol 210 MovieClipUses:208 209Used by:234
Symbol 211 GraphicUsed by:213
Symbol 212 GraphicUsed by:213 332
Symbol 213 MovieClipUses:211 212Used by:234
Symbol 214 GraphicUsed by:216 334
Symbol 215 GraphicUsed by:216
Symbol 216 MovieClipUses:214 215Used by:234
Symbol 217 GraphicUsed by:218
Symbol 218 MovieClipUses:161 217Used by:219
Symbol 219 MovieClipUses:218Used by:221
Symbol 220 GraphicUsed by:221
Symbol 221 MovieClipUses:161 219 220Used by:234
Symbol 222 GraphicUsed by:224 295 341
Symbol 223 GraphicUsed by:224
Symbol 224 MovieClipUses:222 223Used by:234
Symbol 225 GraphicUsed by:227
Symbol 226 GraphicUsed by:227
Symbol 227 MovieClipUses:225 226Used by:234
Symbol 228 GraphicUsed by:230
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:228 229Used by:234
Symbol 231 GraphicUsed by:233
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClipUses:231 232Used by:234
Symbol 234 MovieClipUses:166 169 175 178 180 183 186 189 192 195 198 201 204 207 210 213 216 221 224 227 230 233Used by:353
Symbol 235 GraphicUsed by:236
Symbol 236 MovieClipUses:235Used by:353
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClipUses:237Used by:353
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClipUses:239Used by:353
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClipUses:241Used by:353
Symbol 243 MovieClipUses:161 162Used by:244
Symbol 244 MovieClipUses:243Used by:245
Symbol 245 MovieClipUses:161 244 165Used by:302 352
Symbol 246 GraphicUsed by:247
Symbol 247 MovieClipUses:167 246Used by:302
Symbol 248 GraphicUsed by:249
Symbol 249 MovieClipUses:170 248Used by:250
Symbol 250 MovieClipUses:161 249Used by:251
Symbol 251 MovieClipUses:250Used by:252
Symbol 252 MovieClipUses:161 251Used by:302 352
Symbol 253 GraphicUsed by:254
Symbol 254 MovieClipUses:176 253Used by:302
Symbol 255 GraphicUsed by:256
Symbol 256 MovieClipUses:161 255Used by:302
Symbol 257 GraphicUsed by:259
Symbol 258 GraphicUsed by:259
Symbol 259 MovieClipUses:257 258Used by:302
Symbol 260 GraphicUsed by:262 313
Symbol 261 GraphicUsed by:262
Symbol 262 MovieClipUses:260 261Used by:302
Symbol 263 GraphicUsed by:265 315
Symbol 264 GraphicUsed by:265
Symbol 265 MovieClipUses:263 264Used by:302
Symbol 266 GraphicUsed by:267 317
Symbol 267 MovieClipUses:266 197Used by:302
Symbol 268 GraphicUsed by:269
Symbol 269 MovieClipUses:268 194Used by:302
Symbol 270 GraphicUsed by:272
Symbol 271 GraphicUsed by:272
Symbol 272 MovieClipUses:270 271Used by:302
Symbol 273 GraphicUsed by:274
Symbol 274 MovieClipUses:199 273Used by:302
Symbol 275 GraphicUsed by:277 325
Symbol 276 GraphicUsed by:277
Symbol 277 MovieClipUses:275 276Used by:302
Symbol 278 GraphicUsed by:280
Symbol 279 GraphicUsed by:280
Symbol 280 MovieClipUses:278 279Used by:302
Symbol 281 GraphicUsed by:282
Symbol 282 MovieClipUses:208 281Used by:302
Symbol 283 GraphicUsed by:285
Symbol 284 GraphicUsed by:285
Symbol 285 MovieClipUses:283 284Used by:302
Symbol 286 GraphicUsed by:288
Symbol 287 GraphicUsed by:288
Symbol 288 MovieClipUses:286 287Used by:302
Symbol 289 GraphicUsed by:290
Symbol 290 MovieClipUses:161 289Used by:291
Symbol 291 MovieClipUses:290Used by:293
Symbol 292 GraphicUsed by:293
Symbol 293 MovieClipUses:161 291 292Used by:302
Symbol 294 GraphicUsed by:295
Symbol 295 MovieClipUses:222 294Used by:302
Symbol 296 GraphicUsed by:298
Symbol 297 GraphicUsed by:298
Symbol 298 MovieClipUses:296 297Used by:302
Symbol 299 GraphicUsed by:301
Symbol 300 GraphicUsed by:301
Symbol 301 MovieClipUses:299 300Used by:302
Symbol 302 MovieClipUses:245 247 252 254 256 259 262 265 267 269 272 274 277 280 282 285 288 293 295 298 301Used by:353
Symbol 303 GraphicUsed by:304
Symbol 304 MovieClipUses:167 303Used by:352
Symbol 305 GraphicUsed by:306
Symbol 306 MovieClipUses:176 305Used by:352
Symbol 307 GraphicUsed by:308
Symbol 308 MovieClipUses:161 307Used by:352
Symbol 309 GraphicUsed by:311
Symbol 310 GraphicUsed by:311
Symbol 311 MovieClipUses:309 310Used by:352
Symbol 312 GraphicUsed by:313
Symbol 313 MovieClipUses:260 312Used by:352
Symbol 314 GraphicUsed by:315
Symbol 315 MovieClipUses:263 314Used by:352
Symbol 316 GraphicUsed by:317
Symbol 317 MovieClipUses:266 316Used by:352
Symbol 318 GraphicUsed by:320
Symbol 319 GraphicUsed by:320
Symbol 320 MovieClipUses:318 319Used by:352
Symbol 321 GraphicUsed by:323
Symbol 322 GraphicUsed by:323
Symbol 323 MovieClipUses:321 322Used by:352
Symbol 324 GraphicUsed by:325
Symbol 325 MovieClipUses:275 324Used by:352
Symbol 326 GraphicUsed by:328
Symbol 327 GraphicUsed by:328
Symbol 328 MovieClipUses:326 327Used by:352
Symbol 329 GraphicUsed by:330
Symbol 330 MovieClipUses:208 329Used by:352
Symbol 331 GraphicUsed by:332
Symbol 332 MovieClipUses:331 212Used by:352
Symbol 333 GraphicUsed by:334
Symbol 334 MovieClipUses:214 333Used by:352
Symbol 335 GraphicUsed by:336
Symbol 336 MovieClipUses:161 335Used by:337
Symbol 337 MovieClipUses:336Used by:339
Symbol 338 GraphicUsed by:339
Symbol 339 MovieClipUses:161 337 338Used by:352
Symbol 340 GraphicUsed by:341
Symbol 341 MovieClipUses:222 340Used by:352
Symbol 342 GraphicUsed by:343
Symbol 343 MovieClipUses:161 342Used by:352
Symbol 344 GraphicUsed by:346
Symbol 345 GraphicUsed by:346
Symbol 346 MovieClipUses:344 345Used by:352
Symbol 347 GraphicUsed by:348
Symbol 348 MovieClipUses:161 347Used by:352
Symbol 349 GraphicUsed by:351
Symbol 350 GraphicUsed by:351
Symbol 351 MovieClipUses:349 350Used by:352
Symbol 352 MovieClipUses:245 304 252 306 308 311 313 315 317 320 323 201 325 328 330 332 334 339 341 343 346 348 351Used by:353
Symbol 353 MovieClip {Logo} [Logo]Uses:40 38 52 56 60 64 68 72 74 78 80 84 88 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 160 234 236 238 240 242 302 352Used by:354 817 942
Symbol 354 MovieClip {HyvesLoading} [HyvesLoading]Uses:30 33 353Used by:355
Symbol 355 MovieClip {loadingUI} [loadingUI]Uses:4 6 10 28 354
Symbol 356 GraphicUsed by:362 367 392 397 402 408 414 419 596 619 629 661 668
Symbol 357 GraphicUsed by:358
Symbol 358 MovieClipUses:357Used by:362 367 392 397 402 661 668
Symbol 359 GraphicUsed by:361
Symbol 360 TextUses:5Used by:361
Symbol 361 MovieClipUses:359 360Used by:362
Symbol 362 MovieClip {UI_fla.Timeline_295} [UI_fla.Timeline_295]Uses:356 358 361Used by:363
Symbol 363 MovieClip {billards10} [billards10]Uses:362
Symbol 364 GraphicUsed by:366
Symbol 365 TextUses:5Used by:366
Symbol 366 MovieClipUses:364 365Used by:367
Symbol 367 MovieClip {UI_fla.Timeline_282} [UI_fla.Timeline_282]Uses:356 358 366Used by:368
Symbol 368 MovieClip {billards11} [billards11]Uses:367
Symbol 369 TextUses:5Used by:387
Symbol 370 TextUses:5Used by:387
Symbol 371 TextUses:5Used by:387
Symbol 372 TextUses:5Used by:387
Symbol 373 TextUses:5Used by:387
Symbol 374 TextUses:5Used by:387
Symbol 375 TextUses:5Used by:387
Symbol 376 TextUses:5Used by:387
Symbol 377 TextUses:5Used by:387
Symbol 378 TextUses:5Used by:387
Symbol 379 TextUses:5Used by:387
Symbol 380 TextUsed by:387
Symbol 381 TextUses:5Used by:387
Symbol 382 FontUsed by:383 433 451 468 500 516 532 550 565 588 611 648 693 710 727 865 881 898 914 939 957 976 992
Symbol 383 TextUses:382Used by:387
Symbol 384 TextUses:25Used by:387
Symbol 385 TextUses:5Used by:387
Symbol 386 TextUses:5Used by:387
Symbol 387 MovieClip {player1vsc1} [player1vsc1]Uses:369 370 371 372 373 374 375 376 377 378 379 380 381 383 384 385 386Used by:733
Symbol 388 Sound {sound_opening} [sound_opening]
Symbol 389 GraphicUsed by:391
Symbol 390 TextUses:5Used by:391
Symbol 391 MovieClipUses:389 390Used by:392
Symbol 392 MovieClip {UI_fla.Timeline_301} [UI_fla.Timeline_301]Uses:356 358 391Used by:393
Symbol 393 MovieClip {billards12} [billards12]Uses:392
Symbol 394 GraphicUsed by:396
Symbol 395 TextUses:5Used by:396
Symbol 396 MovieClipUses:394 395Used by:397
Symbol 397 MovieClip {UI_fla.Timeline_286} [UI_fla.Timeline_286]Uses:356 358 396Used by:398
Symbol 398 MovieClip {billards13} [billards13]Uses:397
Symbol 399 GraphicUsed by:401
Symbol 400 TextUses:5Used by:401
Symbol 401 MovieClipUses:399 400Used by:402
Symbol 402 MovieClip {UI_fla.Timeline_298} [UI_fla.Timeline_298]Uses:356 358 401Used by:403
Symbol 403 MovieClip {billards14} [billards14]Uses:402
Symbol 404 GraphicUsed by:405
Symbol 405 MovieClipUses:404Used by:408
Symbol 406 TextUses:5Used by:407
Symbol 407 MovieClipUses:44 406Used by:408
Symbol 408 MovieClip {UI_fla.Timeline_270} [UI_fla.Timeline_270]Uses:356 405 407Used by:409
Symbol 409 MovieClip {billards15} [billards15]Uses:408
Symbol 410 GraphicUsed by:411
Symbol 411 MovieClipUses:410Used by:414
Symbol 412 TextUses:5Used by:413
Symbol 413 MovieClipUses:44 412Used by:414
Symbol 414 MovieClip {UI_fla.Timeline_274} [UI_fla.Timeline_274]Uses:356 411 413Used by:664
Symbol 415 GraphicUsed by:416
Symbol 416 MovieClipUses:415Used by:419 906
Symbol 417 TextUses:5Used by:418
Symbol 418 MovieClipUses:44 417Used by:419
Symbol 419 MovieClip {UI_fla.Timeline_278} [UI_fla.Timeline_278]Uses:356 416 418Used by:621
Symbol 420 GraphicUsed by:421
Symbol 421 MovieClip {shadow} [shadow]Uses:420
Symbol 422 GraphicUsed by:439 471 655 1007
Symbol 423 TextUses:5Used by:436
Symbol 424 TextUses:5Used by:436
Symbol 425 TextUses:5Used by:436
Symbol 426 TextUses:5Used by:436
Symbol 427 TextUses:5Used by:436
Symbol 428 TextUses:5Used by:436
Symbol 429 TextUses:5Used by:436
Symbol 430 TextUses:5Used by:436
Symbol 431 TextUsed by:436
Symbol 432 TextUses:5Used by:436
Symbol 433 TextUses:382Used by:436
Symbol 434 TextUses:25Used by:436
Symbol 435 TextUses:5Used by:436
Symbol 436 MovieClip {reset1} [reset1]Uses:423 424 425 426 427 428 429 430 431 432 433 434 435Used by:439
Symbol 437 GraphicUsed by:439 471 477 600 624 655 679 682 714 732 733 847 850 1007
Symbol 438 GraphicUsed by:439 471 655 1007
Symbol 439 MovieClip {reset} [reset]Uses:422 436 437 438Used by:568 1022
Symbol 440 TextUses:5Used by:455
Symbol 441 TextUses:5Used by:455
Symbol 442 TextUses:5Used by:455
Symbol 443 TextUses:5Used by:455
Symbol 444 TextUses:5Used by:455
Symbol 445 TextUses:5Used by:455
Symbol 446 TextUses:5Used by:455
Symbol 447 TextUses:5Used by:455
Symbol 448 TextUses:5Used by:455
Symbol 449 TextUsed by:455 695
Symbol 450 TextUses:5Used by:455
Symbol 451 TextUses:382Used by:455
Symbol 452 TextUses:25Used by:455
Symbol 453 TextUses:5Used by:455
Symbol 454 TextUses:5Used by:455
Symbol 455 MovieClip {eigthball} [eigthball]Uses:440 441 442 443 444 445 446 447 448 449 450 451 452 453 454Used by:568 817 942 997
Symbol 456 TextUses:5Used by:470
Symbol 457 TextUses:5Used by:470
Symbol 458 TextUses:5Used by:470
Symbol 459 TextUses:5Used by:470
Symbol 460 TextUses:5Used by:470
Symbol 461 TextUses:5Used by:470
Symbol 462 TextUses:5Used by:470
Symbol 463 TextUses:5Used by:470
Symbol 464 TextUses:5Used by:470
Symbol 465 TextUses:5Used by:470
Symbol 466 TextUsed by:470 614
Symbol 467 TextUses:5Used by:470
Symbol 468 TextUses:382Used by:470
Symbol 469 TextUses:25Used by:470
Symbol 470 MovieClip {back1} [back1]Uses:456 457 458 459 460 461 462 463 464 465 466 467 468 469Used by:471
Symbol 471 MovieClip {BACK} [BACK]Uses:422 470 437 438Used by:568 1001 1008 1015 1022
Symbol 472 BitmapUsed by:473
Symbol 473 GraphicUses:472Used by:474
Symbol 474 MovieClip {BGBit} [BGBit]Uses:473Used by:942
Symbol 475 GraphicUsed by:477
Symbol 476 GraphicUsed by:477
Symbol 477 MovieClip {how} [how]Uses:475 437 476Used by:942
Symbol 478 GraphicUsed by:483
Symbol 479 GraphicUsed by:480
Symbol 480 MovieClipUses:479Used by:483
Symbol 481 TextUses:5Used by:482
Symbol 482 MovieClipUses:44 481Used by:483
Symbol 483 MovieClip {UI_fla.Timeline_258} [UI_fla.Timeline_258]Uses:478 480 482Used by:632
Symbol 484 GraphicUsed by:568 1001 1008 1015 1022
Symbol 485 GraphicUsed by:486
Symbol 486 MovieClipUses:485Used by:568 1022
Symbol 487 EditableTextUses:5Used by:568 1022
Symbol 488 TextUses:5Used by:504
Symbol 489 TextUses:5Used by:504
Symbol 490 TextUses:5Used by:504
Symbol 491 TextUses:5Used by:504
Symbol 492 TextUses:5Used by:504
Symbol 493 TextUses:5Used by:504
Symbol 494 TextUses:5Used by:504
Symbol 495 TextUses:5Used by:504
Symbol 496 TextUses:5Used by:504
Symbol 497 TextUses:5Used by:504
Symbol 498 TextUsed by:504 520 534
Symbol 499 TextUses:5Used by:504
Symbol 500 TextUses:382Used by:504
Symbol 501 TextUses:25Used by:504
Symbol 502 TextUses:5Used by:504
Symbol 503 TextUses:5Used by:504
Symbol 504 MovieClip {win} [win]Uses:488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503Used by:568 1022
Symbol 505 TextUses:5Used by:520
Symbol 506 TextUses:5Used by:520
Symbol 507 TextUses:5Used by:520
Symbol 508 TextUses:5Used by:520
Symbol 509 TextUses:5Used by:520
Symbol 510 TextUses:5Used by:520
Symbol 511 TextUses:5Used by:520
Symbol 512 TextUses:5Used by:520
Symbol 513 TextUses:5Used by:520
Symbol 514 TextUses:5Used by:520
Symbol 515 TextUses:5Used by:520
Symbol 516 TextUses:382Used by:520
Symbol 517 TextUses:25Used by:520
Symbol 518 TextUses:5Used by:520
Symbol 519 TextUses:5Used by:520
Symbol 520 MovieClip {lose} [lose]Uses:505 506 507 508 509 510 511 512 513 514 498 515 516 517 518 519Used by:568 1022
Symbol 521 EditableTextUses:5Used by:568 1022
Symbol 522 TextUses:5Used by:534
Symbol 523 TextUses:5Used by:534
Symbol 524 TextUses:5Used by:534
Symbol 525 TextUses:5Used by:534
Symbol 526 TextUses:5Used by:534
Symbol 527 TextUses:5Used by:534
Symbol 528 TextUses:5Used by:534
Symbol 529 TextUses:5Used by:534
Symbol 530 TextUses:5Used by:534
Symbol 531 TextUses:5Used by:534
Symbol 532 TextUses:382Used by:534
Symbol 533 TextUses:25Used by:534
Symbol 534 MovieClip {PERCENTAGE} [PERCENTAGE]Uses:522 523 524 525 526 527 528 529 530 498 531 532 533Used by:568 1022
Symbol 535 EditableTextUses:5Used by:568 1022
Symbol 536 EditableTextUses:5Used by:568 1022
Symbol 537 EditableTextUses:5Used by:568 1022
Symbol 538 TextUses:5Used by:552
Symbol 539 TextUses:5Used by:552
Symbol 540 TextUses:5Used by:552
Symbol 541 TextUses:5Used by:552
Symbol 542 TextUses:5Used by:552
Symbol 543 TextUses:5Used by:552
Symbol 544 TextUses:5Used by:552
Symbol 545 TextUses:5Used by:552
Symbol 546 TextUses:5Used by:552
Symbol 547 TextUses:5Used by:552
Symbol 548 TextUsed by:552
Symbol 549 TextUses:5Used by:552
Symbol 550 TextUses:382Used by:552
Symbol 551 TextUses:25Used by:552
Symbol 552 MovieClip {play1} [play1]Uses:538 539 540 541 542 543 544 545 546 547 548 549 550 551Used by:568 1022
Symbol 553 TextUses:5Used by:567 918
Symbol 554 TextUses:5Used by:567 918
Symbol 555 TextUses:5Used by:567 918
Symbol 556 TextUses:5Used by:567 918
Symbol 557 TextUses:5Used by:567 918
Symbol 558 TextUses:5Used by:567 918
Symbol 559 TextUses:5Used by:567 918
Symbol 560 TextUses:5Used by:567 918
Symbol 561 TextUses:5Used by:567 918
Symbol 562 TextUses:5Used by:567 918
Symbol 563 TextUsed by:567 731 902 917 918 941
Symbol 564 TextUses:5Used by:567 918
Symbol 565 TextUses:382Used by:567 918
Symbol 566 TextUses:25Used by:567 918
Symbol 567 MovieClip {play2} [play2]Uses:553 554 555 556 557 558 559 560 561 562 563 564 565 566Used by:568 1022
Symbol 568 MovieClip {statisticeight} [statisticeight]Uses:484 486 455 487 504 520 521 534 535 536 537 471 439 552 567
Symbol 569 GraphicUsed by:574
Symbol 570 GraphicUsed by:571
Symbol 571 MovieClipUses:570Used by:574
Symbol 572 TextUses:5Used by:573
Symbol 573 MovieClipUses:44 572Used by:574
Symbol 574 MovieClip {UI_fla.Timeline_262} [UI_fla.Timeline_262]Uses:569 571 573Used by:633
Symbol 575 TextUses:5Used by:591
Symbol 576 TextUses:5Used by:591
Symbol 577 TextUses:5Used by:591
Symbol 578 TextUses:5Used by:591
Symbol 579 TextUses:5Used by:591
Symbol 580 TextUses:5Used by:591
Symbol 581 TextUses:5Used by:591
Symbol 582 TextUses:5Used by:591
Symbol 583 TextUses:5Used by:591
Symbol 584 TextUses:5Used by:591
Symbol 585 TextUses:5Used by:591
Symbol 586 TextUsed by:591
Symbol 587 TextUses:5Used by:591
Symbol 588 TextUses:382Used by:591
Symbol 589 TextUses:25Used by:591
Symbol 590 TextUses:5Used by:591
Symbol 591 MovieClip {retry1} [retry1]Uses:575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590Used by:624
Symbol 592 GraphicUsed by:593
Symbol 593 MovieClipUses:592Used by:596
Symbol 594 TextUses:5Used by:595
Symbol 595 MovieClipUses:44 594Used by:596
Symbol 596 MovieClip {UI_fla.Timeline_266} [UI_fla.Timeline_266]Uses:356 593 595Used by:631
Symbol 597 GraphicUsed by:600
Symbol 598 GraphicUsed by:600
Symbol 599 GraphicUsed by:600
Symbol 600 MovieClip {quality} [quality]Uses:597 437 598 599Used by:817 1008
Symbol 601 TextUses:5Used by:614
Symbol 602 TextUses:5Used by:614
Symbol 603 TextUses:5Used by:614
Symbol 604 TextUses:5Used by:614
Symbol 605 TextUses:5Used by:614
Symbol 606 TextUses:5Used by:614
Symbol 607 TextUses:5Used by:614
Symbol 608 TextUses:5Used by:614
Symbol 609 TextUses:5Used by:614
Symbol 610 TextUses:5Used by:614
Symbol 611 TextUses:382Used by:614
Symbol 612 TextUses:25Used by:614
Symbol 613 TextUses:5Used by:614
Symbol 614 MovieClip {restart1} [restart1]Uses:601 602 603 604 605 606 607 608 609 466 610 611 612 613Used by:655
Symbol 615 GraphicUsed by:616
Symbol 616 MovieClipUses:615Used by:619
Symbol 617 TextUses:5Used by:618
Symbol 618 MovieClipUses:44 617Used by:619
Symbol 619 MovieClip {UI_fla.Timeline_254} [UI_fla.Timeline_254]Uses:356 616 618Used by:620
Symbol 620 MovieClip {billards6} [billards6]Uses:619
Symbol 621 MovieClip {billards5} [billards5]Uses:419
Symbol 622 GraphicUsed by:624
Symbol 623 GraphicUsed by:624
Symbol 624 MovieClip {RETRY} [RETRY]Uses:622 591 437 623Used by:942
Symbol 625 GraphicUsed by:626
Symbol 626 MovieClipUses:625Used by:629
Symbol 627 TextUses:5Used by:628
Symbol 628 MovieClipUses:44 627Used by:629
Symbol 629 MovieClip {UI_fla.Timeline_250} [UI_fla.Timeline_250]Uses:356 626 628Used by:630
Symbol 630 MovieClip {billards4} [billards4]Uses:629
Symbol 631 MovieClip {billards3} [billards3]Uses:596
Symbol 632 MovieClip {billards2} [billards2]Uses:483
Symbol 633 MovieClip {billards1} [billards1]Uses:574
Symbol 634 TextUses:5Used by:652
Symbol 635 TextUses:5Used by:652
Symbol 636 TextUses:5Used by:652
Symbol 637 TextUses:5Used by:652
Symbol 638 TextUses:5Used by:652
Symbol 639 TextUses:5Used by:652
Symbol 640 TextUses:5Used by:652
Symbol 641 TextUses:5Used by:652
Symbol 642 TextUses:5Used by:652
Symbol 643 TextUses:5Used by:652
Symbol 644 TextUses:5Used by:652
Symbol 645 TextUses:5Used by:652
Symbol 646 TextUsed by:652
Symbol 647 TextUses:5Used by:652
Symbol 648 TextUses:382Used by:652
Symbol 649 TextUses:25Used by:652
Symbol 650 TextUses:5Used by:652
Symbol 651 TextUses:5Used by:652
Symbol 652 MovieClip {gamelose11} [gamelose11]Uses:634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651Used by:942
Symbol 653 Sound {sound_setBilliards} [sound_setBilliards]
Symbol 654 Sound {sound_lose} [sound_lose]
Symbol 655 MovieClip {RESTART} [RESTART]Uses:422 614 437 438Used by:1008
Symbol 656 GraphicUsed by:660
Symbol 657 TextUses:5Used by:660
Symbol 658 GraphicUsed by:660
Symbol 659 GraphicUsed by:660
Symbol 660 MovieClipUses:656 657 658 659Used by:661
Symbol 661 MovieClip {UI_fla.Timeline_289} [UI_fla.Timeline_289]Uses:356 358 660Used by:662
Symbol 662 MovieClip {billards9} [billards9]Uses:661
Symbol 663 Sound {sound_inmenu} [sound_inmenu]
Symbol 664 MovieClip {billards7} [billards7]Uses:414
Symbol 665 GraphicUsed by:667
Symbol 666 TextUses:5Used by:667
Symbol 667 MovieClipUses:665 666Used by:668
Symbol 668 MovieClip {UI_fla.Timeline_292} [UI_fla.Timeline_292]Uses:356 358 667Used by:669
Symbol 669 MovieClip {billards8} [billards8]Uses:668
Symbol 670 Sound {sound_win} [sound_win]
Symbol 671 GraphicUsed by:676
Symbol 672 GraphicUsed by:673
Symbol 673 MovieClipUses:672Used by:676
Symbol 674 GraphicUsed by:676
Symbol 675 GraphicUsed by:676
Symbol 676 MovieClip {Copyright} [Copyright]Uses:671 673 37 674 675Used by:817
Symbol 677 GraphicUsed by:679
Symbol 678 GraphicUsed by:679
Symbol 679 MovieClip {music} [music]Uses:677 437 678Used by:817 1008
Symbol 680 GraphicUsed by:682
Symbol 681 GraphicUsed by:682
Symbol 682 MovieClip {sound} [sound]Uses:680 437 681Used by:817 1008
Symbol 683 TextUses:5Used by:695
Symbol 684 TextUses:5Used by:695
Symbol 685 TextUses:5Used by:695
Symbol 686 TextUses:5Used by:695
Symbol 687 TextUses:5Used by:695
Symbol 688 TextUses:5Used by:695
Symbol 689 TextUses:5Used by:695
Symbol 690 TextUses:5Used by:695
Symbol 691 TextUses:5Used by:695
Symbol 692 TextUses:5Used by:695
Symbol 693 TextUses:382Used by:695
Symbol 694 TextUses:25Used by:695
Symbol 695 MovieClip {straight} [straight]Uses:683 684 685 686 687 688 689 690 691 449 692 693 694Used by:817 942 1000 1015 1022
Symbol 696 GraphicUsed by:714 732 733
Symbol 697 TextUses:5Used by:712
Symbol 698 TextUses:5Used by:712
Symbol 699 TextUses:5Used by:712
Symbol 700 TextUses:5Used by:712
Symbol 701 TextUses:5Used by:712
Symbol 702 TextUses:5Used by:712
Symbol 703 TextUses:5Used by:712
Symbol 704 TextUses:5Used by:712
Symbol 705 TextUses:5Used by:712
Symbol 706 TextUses:5Used by:712
Symbol 707 TextUses:5Used by:712
Symbol 708 TextUsed by:712 994
Symbol 709 TextUses:5Used by:712
Symbol 710 TextUses:382Used by:712
Symbol 711 TextUses:25Used by:712
Symbol 712 MovieClip {player11} [player11]Uses:697 698 699 700 701 702 703 704 705 706 707 708 709 710 711Used by:714
Symbol 713 GraphicUsed by:714 732 733
Symbol 714 MovieClip {player} [player]Uses:696 712 437 713Used by:817
Symbol 715 TextUses:5Used by:731
Symbol 716 TextUses:5Used by:731
Symbol 717 TextUses:5Used by:731
Symbol 718 TextUses:5Used by:731
Symbol 719 TextUses:5Used by:731
Symbol 720 TextUses:5Used by:731
Symbol 721 TextUses:5Used by:731
Symbol 722 TextUses:5Used by:731
Symbol 723 TextUses:5Used by:731
Symbol 724 TextUses:5Used by:731
Symbol 725 TextUses:5Used by:731
Symbol 726 TextUses:5Used by:731
Symbol 727 TextUses:382Used by:731
Symbol 728 TextUses:25Used by:731
Symbol 729 TextUses:5Used by:731
Symbol 730 TextUses:5Used by:731
Symbol 731 MovieClip {player1vs21} [player1vs21]Uses:715 716 717 718 719 720 721 722 723 724 725 563 726 727 728 729 730Used by:732
Symbol 732 MovieClip {playervsplayer} [playervsplayer]Uses:696 731 437 713Used by:817
Symbol 733 MovieClip {playervscomputer} [playervscomputer]Uses:696 387 437 713Used by:817
Symbol 734 FontUsed by:735
Symbol 735 TextUses:734Used by:736
Symbol 736 MovieClipUses:735Used by:817
Symbol 737 GraphicUsed by:738
Symbol 738 MovieClipUses:737Used by:816
Symbol 739 FontUsed by:740 741 743 744 745 746 747 749 750 751 752 753 754 755 756 757 758 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 806 808
Symbol 740 TextUses:739Used by:759
Symbol 741 TextUses:739Used by:759
Symbol 742 GraphicUsed by:759
Symbol 743 TextUses:739Used by:759
Symbol 744 TextUses:739Used by:759
Symbol 745 TextUses:739Used by:759
Symbol 746 TextUses:739Used by:759
Symbol 747 TextUses:739Used by:759
Symbol 748 GraphicUsed by:759
Symbol 749 TextUses:739Used by:759
Symbol 750 TextUses:739Used by:759
Symbol 751 TextUses:739Used by:759
Symbol 752 TextUses:739Used by:759
Symbol 753 TextUses:739Used by:759
Symbol 754 TextUses:739Used by:759
Symbol 755 TextUses:739Used by:759
Symbol 756 TextUses:739Used by:759
Symbol 757 TextUses:739Used by:759
Symbol 758 TextUses:739Used by:759
Symbol 759 MovieClipUses:740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758Used by:816
Symbol 760 GraphicUsed by:812 816
Symbol 761 GraphicUsed by:783 809
Symbol 762 GraphicUsed by:783 809
Symbol 763 GraphicUsed by:783 809
Symbol 764 GraphicUsed by:783 809
Symbol 765 GraphicUsed by:783 809
Symbol 766 GraphicUsed by:783 809
Symbol 767 GraphicUsed by:783 809
Symbol 768 GraphicUsed by:783 809
Symbol 769 GraphicUsed by:783 809
Symbol 770 GraphicUsed by:783 809
Symbol 771 GraphicUsed by:783 809
Symbol 772 GraphicUsed by:783 809
Symbol 773 GraphicUsed by:783 809
Symbol 774 GraphicUsed by:783 809
Symbol 775 GraphicUsed by:783 809
Symbol 776 GraphicUsed by:783 809
Symbol 777 GraphicUsed by:783 809
Symbol 778 GraphicUsed by:783 809
Symbol 779 GraphicUsed by:783 809
Symbol 780 GraphicUsed by:783 809
Symbol 781 GraphicUsed by:783
Symbol 782 GraphicUsed by:783
Symbol 783 MovieClipUses:761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782Used by:816
Symbol 784 GraphicUsed by:812
Symbol 785 TextUses:739Used by:809
Symbol 786 TextUses:739Used by:809
Symbol 787 TextUses:739Used by:809
Symbol 788 TextUses:739Used by:809
Symbol 789 TextUses:739Used by:809
Symbol 790 TextUses:739Used by:809
Symbol 791 TextUses:739Used by:809
Symbol 792 TextUses:739Used by:809
Symbol 793 TextUses:739Used by:809
Symbol 794 TextUses:739Used by:809
Symbol 795 TextUses:739Used by:809
Symbol 796 TextUses:739Used by:809
Symbol 797 TextUses:739Used by:809
Symbol 798 TextUses:739Used by:809
Symbol 799 TextUses:739Used by:809
Symbol 800 TextUses:739Used by:809
Symbol 801 TextUses:739Used by:809
Symbol 802 TextUses:739Used by:809
Symbol 803 TextUses:739Used by:809
Symbol 804 TextUses:739Used by:809
Symbol 805 GraphicUsed by:809
Symbol 806 TextUses:739Used by:809
Symbol 807 GraphicUsed by:809
Symbol 808 TextUses:739Used by:809
Symbol 809 MovieClipUses:761 785 762 786 763 787 764 788 765 789 766 790 767 791 768 792 769 793 770 794 771 795 772 796 773 797 774 798 775 799 776 800 777 801 778 802 779 803 780 804 805 806 807 808Used by:812
Symbol 810 GraphicUsed by:812
Symbol 811 GraphicUsed by:812
Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]Uses:784 760 809 810 811Used by:815
Symbol 813 GraphicUsed by:814
Symbol 814 MovieClipUses:813Used by:815
Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168]Uses:812 814Used by:816
Symbol 816 MovieClip {CountriesBox} [CountriesBox]Uses:738 759 760 783 815Used by:817
Symbol 817 MovieClip {mainMenuUI} [mainMenuUI]Uses:4 10 679 682 600 695 714 732 733 455 353 736 816 676
Symbol 818 Sound {sound_collideTable} [sound_collideTable]
Symbol 819 GraphicUsed by:820
Symbol 820 MovieClipUses:819Used by:837
Symbol 821 GraphicUsed by:822
Symbol 822 MovieClipUses:821Used by:837
Symbol 823 GraphicUsed by:824
Symbol 824 MovieClipUses:823Used by:837
Symbol 825 GraphicUsed by:837
Symbol 826 GraphicUsed by:827
Symbol 827 MovieClipUses:826Used by:837
Symbol 828 GraphicUsed by:829
Symbol 829 MovieClipUses:828Used by:837
Symbol 830 GraphicUsed by:831
Symbol 831 MovieClipUses:830Used by:837
Symbol 832 GraphicUsed by:833
Symbol 833 MovieClipUses:832Used by:837
Symbol 834 GraphicUsed by:837
Symbol 835 GraphicUsed by:836
Symbol 836 MovieClipUses:835Used by:837 844
Symbol 837 MovieClip {tablebitmap} [tablebitmap]Uses:820 822 824 825 827 829 831 833 834 836Used by:844
Symbol 838 GraphicUsed by:844
Symbol 839 GraphicUsed by:840
Symbol 840 MovieClipUses:839Used by:844
Symbol 841 GraphicUsed by:842
Symbol 842 MovieClipUses:841Used by:843
Symbol 843 MovieClip {poolcue} [poolcue]Uses:842Used by:844
Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176]Uses:837 838 840 843 836Used by:942
Symbol 845 GraphicUsed by:847
Symbol 846 GraphicUsed by:847
Symbol 847 MovieClip {backmain} [backmain]Uses:845 437 846Used by:942
Symbol 848 GraphicUsed by:850
Symbol 849 GraphicUsed by:850
Symbol 850 MovieClip {statistics} [statistics]Uses:848 437 849Used by:942
Symbol 851 TextUses:5Used by:868
Symbol 852 TextUses:5Used by:868
Symbol 853 TextUses:5Used by:868
Symbol 854 TextUses:5Used by:868
Symbol 855 TextUses:5Used by:868
Symbol 856 TextUses:5Used by:868
Symbol 857 TextUses:5Used by:868
Symbol 858 TextUses:5Used by:868
Symbol 859 TextUses:5Used by:868
Symbol 860 TextUses:5Used by:868
Symbol 861 TextUses:5Used by:868
Symbol 862 TextUses:5Used by:868
Symbol 863 TextUsed by:868 885
Symbol 864 TextUses:5Used by:868
Symbol 865 TextUses:382Used by:868
Symbol 866 TextUses:25Used by:868
Symbol 867 TextUses:5Used by:868
Symbol 868 MovieClip {gamewin11} [gamewin11]Uses:851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867Used by:942
Symbol 869 TextUses:5Used by:885
Symbol 870 TextUses:5Used by:885
Symbol 871 TextUses:5Used by:885
Symbol 872 TextUses:5Used by:885
Symbol 873 TextUses:5Used by:885
Symbol 874 TextUses:5Used by:885
Symbol 875 TextUses:5Used by:885
Symbol 876 TextUses:5Used by:885
Symbol 877 TextUses:5Used by:885
Symbol 878 TextUses:5Used by:885
Symbol 879 TextUses:5Used by:885
Symbol 880 TextUses:5Used by:885
Symbol 881 TextUses:382Used by:885
Symbol 882 TextUses:25Used by:885
Symbol 883 TextUses:5Used by:885
Symbol 884 TextUses:5Used by:885
Symbol 885 MovieClip {player1win} [player1win]Uses:869 870 871 872 873 874 875 876 877 878 879 863 880 881 882 883 884Used by:903
Symbol 886 TextUses:5Used by:902
Symbol 887 TextUses:5Used by:902
Symbol 888 TextUses:5Used by:902
Symbol 889 TextUses:5Used by:902
Symbol 890 TextUses:5Used by:902
Symbol 891 TextUses:5Used by:902
Symbol 892 TextUses:5Used by:902
Symbol 893 TextUses:5Used by:902
Symbol 894 TextUses:5Used by:902
Symbol 895 TextUses:5Used by:902
Symbol 896 TextUses:5Used by:902
Symbol 897 TextUses:5Used by:902
Symbol 898 TextUses:382Used by:902
Symbol 899 TextUses:25Used by:902
Symbol 900 TextUses:5Used by:902
Symbol 901 TextUses:5Used by:902
Symbol 902 MovieClip {player2win} [player2win]Uses:886 887 888 889 890 891 892 893 894 895 896 563 897 898 899 900 901Used by:903
Symbol 903 MovieClipUses:885 902Used by:942
Symbol 904 GraphicUsed by:942
Symbol 905 GraphicUsed by:906
Symbol 906 MovieClipUses:905 416Used by:942
Symbol 907 TextUses:5Used by:917
Symbol 908 TextUses:5Used by:917
Symbol 909 TextUses:5Used by:917
Symbol 910 TextUses:5Used by:917
Symbol 911 TextUses:5Used by:917
Symbol 912 TextUses:5Used by:917
Symbol 913 TextUses:5Used by:917
Symbol 914 TextUses:382Used by:917
Symbol 915 TextUses:25Used by:917
Symbol 916 TextUses:5Used by:917
Symbol 917 MovieClip {computer11} [computer11]Uses:907 908 909 910 911 912 913 563 914 915 916Used by:942
Symbol 918 MovieClip {player2111} [player2111]Uses:553 554 555 556 557 558 559 560 561 562 563 564 565 566Used by:942
Symbol 919 GraphicUsed by:920
Symbol 920 MovieClipUses:919Used by:942
Symbol 921 GraphicUsed by:922
Symbol 922 MovieClipUses:921Used by:926
Symbol 923 GraphicUsed by:924
Symbol 924 MovieClipUses:923Used by:925
Symbol 925 MovieClipUses:924Used by:926
Symbol 926 MovieClipUses:922 925Used by:942
Symbol 927 TextUses:5Used by:941
Symbol 928 TextUses:5Used by:941
Symbol 929 TextUses:5Used by:941
Symbol 930 TextUses:5Used by:941
Symbol 931 TextUses:5Used by:941
Symbol 932 TextUses:5Used by:941
Symbol 933 TextUses:5Used by:941
Symbol 934 TextUses:5Used by:941
Symbol 935 TextUses:5Used by:941
Symbol 936 TextUses:5Used by:941
Symbol 937 TextUses:5Used by:941
Symbol 938 TextUses:5Used by:941
Symbol 939 TextUses:382Used by:941
Symbol 940 TextUses:25Used by:941
Symbol 941 MovieClip {player1} [player1]Uses:927 928 929 930 931 932 933 934 935 936 937 563 938 939 940Used by:942
Symbol 942 MovieClip {ingameUI} [ingameUI]Uses:474 844 10 455 477 847 850 695 353 868 652 903 624 904 906 917 918 920 926 941
Symbol 943 TextUses:5Used by:961
Symbol 944 TextUses:5Used by:961
Symbol 945 TextUses:5Used by:961
Symbol 946 TextUses:5Used by:961
Symbol 947 TextUses:5Used by:961
Symbol 948 TextUses:5Used by:961
Symbol 949 TextUses:5Used by:961
Symbol 950 TextUses:5Used by:961
Symbol 951 TextUses:5Used by:961
Symbol 952 TextUses:5Used by:961
Symbol 953 TextUses:5Used by:961
Symbol 954 TextUses:5Used by:961
Symbol 955 TextUsed by:961
Symbol 956 TextUses:5Used by:961
Symbol 957 TextUses:382Used by:961
Symbol 958 TextUses:25Used by:961
Symbol 959 TextUses:5Used by:961
Symbol 960 TextUses:5Used by:961
Symbol 961 MovieClip {how8ball} [how8ball]Uses:943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960Used by:997
Symbol 962 TextUses:5Used by:980
Symbol 963 TextUses:5Used by:980
Symbol 964 TextUses:5Used by:980
Symbol 965 TextUses:5Used by:980
Symbol 966 TextUses:5Used by:980
Symbol 967 TextUses:5Used by:980
Symbol 968 TextUses:5Used by:980
Symbol 969 TextUses:5Used by:980
Symbol 970 TextUses:5Used by:980
Symbol 971 TextUses:5Used by:980
Symbol 972 TextUses:5Used by:980
Symbol 973 TextUses:5Used by:980
Symbol 974 TextUsed by:980
Symbol 975 TextUses:5Used by:980
Symbol 976 TextUses:382Used by:980
Symbol 977 TextUses:25Used by:980
Symbol 978 TextUses:5Used by:980
Symbol 979 TextUses:5Used by:980
Symbol 980 MovieClip {howstraight} [howstraight]Uses:962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979Used by:1000
Symbol 981 Sound {sound_ingame} [sound_ingame]
Symbol 982 TextUses:5Used by:994
Symbol 983 TextUses:5Used by:994
Symbol 984 TextUses:5Used by:994
Symbol 985 TextUses:5Used by:994
Symbol 986 TextUses:5Used by:994
Symbol 987 TextUses:5Used by:994
Symbol 988 TextUses:5Used by:994
Symbol 989 TextUses:5Used by:994
Symbol 990 TextUses:5Used by:994
Symbol 991 TextUses:5Used by:994
Symbol 992 TextUses:382Used by:994
Symbol 993 TextUses:25Used by:994
Symbol 994 MovieClip {menu1} [menu1]Uses:982 983 984 985 986 987 988 989 990 708 991 992 993Used by:1007
Symbol 995 GraphicUsed by:996
Symbol 996 MovieClipUses:995Used by:997
Symbol 997 MovieClipUses:455 996 961Used by:1001
Symbol 998 GraphicUsed by:999
Symbol 999 MovieClipUses:998Used by:1000 1015
Symbol 1000 MovieClipUses:695 999 980Used by:1001
Symbol 1001 MovieClip {howtoplay} [howtoplay]Uses:484 471 997 1000
Symbol 1002 GraphicUsed by:1003
Symbol 1003 MovieClip {bg} [bg]Uses:1002
Symbol 1004 Sound {sound_shotBall} [sound_shotBall]
Symbol 1005 GraphicUsed by:1006
Symbol 1006 MovieClipUses:1005Used by:1008
Symbol 1007 MovieClip {MENU} [MENU]Uses:422 994 437 438Used by:1008
Symbol 1008 MovieClip {menuUI} [menuUI]Uses:484 1006 1007 471 655 679 682 600
Symbol 1009 FontUsed by:1010
Symbol 1010 TextUses:1009Used by:1011
Symbol 1011 MovieClip {localization} [localization]Uses:1010
Symbol 1012 Sound {sound_collideLight} [sound_collideLight]
Symbol 1013 Sound {sound_menuTouch} [sound_menuTouch]
Symbol 1014 TextUses:5Used by:1015
Symbol 1015 MovieClip {howtoplaystraight} [howtoplaystraight]Uses:484 1014 471 695 999
Symbol 1016 GraphicUsed by:1017
Symbol 1017 MovieClipUses:1016Used by:1018
Symbol 1018 MovieClip {cueBall} [cueBall]Uses:1017
Symbol 1019 Sound {sound_inPocket} [sound_inPocket]
Symbol 1020 Sound {sound_collideNormal} [sound_collideNormal]
Symbol 1021 Sound {sound_collideHeavy} [sound_collideHeavy]
Symbol 1022 MovieClip {statisticstraight} [statisticstraight]Uses:484 486 695 471 487 504 520 521 534 535 536 537 439 552 567
Symbol 1023 Sound {sound_menuPress} [sound_menuPress]

Instance Names

"displayArea_mc"Symbol 39 MovieClip {UI_fla.new_agame_com_17} [UI_fla.new_agame_com_17] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 52 MovieClip {UI_fla.logo_game_20} [UI_fla.logo_game_20] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 56 MovieClip {UI_fla.new_zapjuegos_com_22} [UI_fla.new_zapjuegos_com_22] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 60 MovieClip {UI_fla.newspel_nl_24} [UI_fla.newspel_nl_24] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 64 MovieClip {UI_fla.new_jeu_fr_26} [UI_fla.new_jeu_fr_26] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 68 MovieClip {UI_fla.new_spielen_com_28} [UI_fla.new_spielen_com_28] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 72 MovieClip {UI_fla.new_clickjogos_com_30} [UI_fla.new_clickjogos_com_30] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 74 MovieClip {UI_fla.logo_giocaregratis_it_32} [UI_fla.logo_giocaregratis_it_32] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 78 MovieClip {UI_fla.new_spel_se_33} [UI_fla.new_spel_se_33] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 80 MovieClip {UI_fla.logo_my_games_co_uk_35} [UI_fla.logo_my_games_co_uk_35] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 84 MovieClip {UI_fla.new_flashgames_ru_36} [UI_fla.new_flashgames_ru_36] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 88 MovieClip {UI_fla.new_game_co_in_38} [UI_fla.new_game_co_in_38] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 92 MovieClip {UI_fla.new_games_co_id_40} [UI_fla.new_games_co_id_40] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 94 MovieClip {UI_fla.logo_minigry_pl_42} [UI_fla.logo_minigry_pl_42] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 96 MovieClip {UI_fla.logo_asoyun_com_43} [UI_fla.logo_asoyun_com_43] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 98 MovieClip {UI_fla.logo_game_com_my_44} [UI_fla.logo_game_com_my_44] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 122 MovieClip {UI_fla.logo_oyunlar123_com_56} [UI_fla.logo_oyunlar123_com_56] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 124 MovieClip {UI_fla.girlsgogames_57} [UI_fla.girlsgogames_57] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 126 MovieClip {UI_fla.girlsgogames_58} [UI_fla.girlsgogames_58] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 128 MovieClip {UI_fla.girlsgogames_59} [UI_fla.girlsgogames_59] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 130 MovieClip {UI_fla.girlsgogames_60} [UI_fla.girlsgogames_60] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 132 MovieClip {UI_fla.girlsgogames_61} [UI_fla.girlsgogames_61] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 134 MovieClip {UI_fla.girlsgogames_62} [UI_fla.girlsgogames_62] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 136 MovieClip {UI_fla.girlsgogames_63} [UI_fla.girlsgogames_63] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 138 MovieClip {UI_fla.juegosdechicas_64} [UI_fla.juegosdechicas_64] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 140 MovieClip {UI_fla.girlsgogames_65} [UI_fla.girlsgogames_65] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 142 MovieClip {UI_fla.girlsgogames_66} [UI_fla.girlsgogames_66] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 144 MovieClip {UI_fla.girlsgogames_67} [UI_fla.girlsgogames_67] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 146 MovieClip {UI_fla.girlsgogames_68} [UI_fla.girlsgogames_68] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 150 MovieClip {UI_fla.logo_laro_com_ph_70} [UI_fla.logo_laro_com_ph_70] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 154 MovieClip {UI_fla.a10_com_logo_72} [UI_fla.a10_com_logo_72] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 160 MovieClip {UI_fla.newagame_co_uk_74} [UI_fla.newagame_co_uk_74] Frame 1Symbol 38 MovieClip
"displayArea_mc"Symbol 353 MovieClip {Logo} [Logo] Frame 1Symbol 38 MovieClip
"wh"Symbol 353 MovieClip {Logo} [Logo] Frame 49Symbol 38 MovieClip
"wh"Symbol 353 MovieClip {Logo} [Logo] Frame 54Symbol 38 MovieClip
"hyves"Symbol 354 MovieClip {HyvesLoading} [HyvesLoading] Frame 1Symbol 30 MovieClip
"poweredby"Symbol 354 MovieClip {HyvesLoading} [HyvesLoading] Frame 1Symbol 33 MovieClip
"logohyves"Symbol 354 MovieClip {HyvesLoading} [HyvesLoading] Frame 1Symbol 353 MovieClip {Logo} [Logo]
"logo"Symbol 354 MovieClip {HyvesLoading} [HyvesLoading] Frame 1Symbol 353 MovieClip {Logo} [Logo]
"pertext"Symbol 355 MovieClip {loadingUI} [loadingUI] Frame 1Symbol 6 EditableText
"ball"Symbol 362 MovieClip {UI_fla.Timeline_295} [UI_fla.Timeline_295] Frame 1Symbol 358 MovieClip
"ball"Symbol 363 MovieClip {billards10} [billards10] Frame 1Symbol 362 MovieClip {UI_fla.Timeline_295} [UI_fla.Timeline_295]
"ball"Symbol 367 MovieClip {UI_fla.Timeline_282} [UI_fla.Timeline_282] Frame 1Symbol 358 MovieClip
"ball"Symbol 368 MovieClip {billards11} [billards11] Frame 1Symbol 367 MovieClip {UI_fla.Timeline_282} [UI_fla.Timeline_282]
"ball"Symbol 392 MovieClip {UI_fla.Timeline_301} [UI_fla.Timeline_301] Frame 1Symbol 358 MovieClip
"ball"Symbol 393 MovieClip {billards12} [billards12] Frame 1Symbol 392 MovieClip {UI_fla.Timeline_301} [UI_fla.Timeline_301]
"ball"Symbol 397 MovieClip {UI_fla.Timeline_286} [UI_fla.Timeline_286] Frame 1Symbol 358 MovieClip
"ball"Symbol 398 MovieClip {billards13} [billards13] Frame 1Symbol 397 MovieClip {UI_fla.Timeline_286} [UI_fla.Timeline_286]
"ball"Symbol 402 MovieClip {UI_fla.Timeline_298} [UI_fla.Timeline_298] Frame 1Symbol 358 MovieClip
"ball"Symbol 403 MovieClip {billards14} [billards14] Frame 1Symbol 402 MovieClip {UI_fla.Timeline_298} [UI_fla.Timeline_298]
"ball"Symbol 408 MovieClip {UI_fla.Timeline_270} [UI_fla.Timeline_270] Frame 1Symbol 405 MovieClip
"ball"Symbol 409 MovieClip {billards15} [billards15] Frame 1Symbol 408 MovieClip {UI_fla.Timeline_270} [UI_fla.Timeline_270]
"ball"Symbol 414 MovieClip {UI_fla.Timeline_274} [UI_fla.Timeline_274] Frame 1Symbol 411 MovieClip
"ball"Symbol 419 MovieClip {UI_fla.Timeline_278} [UI_fla.Timeline_278] Frame 1Symbol 416 MovieClip
"ball"Symbol 483 MovieClip {UI_fla.Timeline_258} [UI_fla.Timeline_258] Frame 1Symbol 480 MovieClip
"eplayeronewin"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 487 EditableText
"eplayeronelose"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 487 EditableText
"eplayeroneper"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 521 EditableText
"eplayertwowin"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 535 EditableText
"eplayertwolose"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 536 EditableText
"eplayertwoper"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 537 EditableText
"backBt"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 471 MovieClip {BACK} [BACK]
"resetBt"Symbol 568 MovieClip {statisticeight} [statisticeight] Frame 1Symbol 439 MovieClip {reset} [reset]
"ball"Symbol 574 MovieClip {UI_fla.Timeline_262} [UI_fla.Timeline_262] Frame 1Symbol 571 MovieClip
"ball"Symbol 596 MovieClip {UI_fla.Timeline_266} [UI_fla.Timeline_266] Frame 1Symbol 593 MovieClip
"ball"Symbol 619 MovieClip {UI_fla.Timeline_254} [UI_fla.Timeline_254] Frame 1Symbol 616 MovieClip
"ball"Symbol 620 MovieClip {billards6} [billards6] Frame 1Symbol 619 MovieClip {UI_fla.Timeline_254} [UI_fla.Timeline_254]
"ball"Symbol 621 MovieClip {billards5} [billards5] Frame 1Symbol 419 MovieClip {UI_fla.Timeline_278} [UI_fla.Timeline_278]
"ball"Symbol 629 MovieClip {UI_fla.Timeline_250} [UI_fla.Timeline_250] Frame 1Symbol 626 MovieClip
"ball"Symbol 630 MovieClip {billards4} [billards4] Frame 1Symbol 629 MovieClip {UI_fla.Timeline_250} [UI_fla.Timeline_250]
"ball"Symbol 631 MovieClip {billards3} [billards3] Frame 1Symbol 596 MovieClip {UI_fla.Timeline_266} [UI_fla.Timeline_266]
"ball"Symbol 632 MovieClip {billards2} [billards2] Frame 1Symbol 483 MovieClip {UI_fla.Timeline_258} [UI_fla.Timeline_258]
"ball"Symbol 633 MovieClip {billards1} [billards1] Frame 1Symbol 574 MovieClip {UI_fla.Timeline_262} [UI_fla.Timeline_262]
"ball"Symbol 661 MovieClip {UI_fla.Timeline_289} [UI_fla.Timeline_289] Frame 1Symbol 358 MovieClip
"ball"Symbol 662 MovieClip {billards9} [billards9] Frame 1Symbol 661 MovieClip {UI_fla.Timeline_289} [UI_fla.Timeline_289]
"ball"Symbol 664 MovieClip {billards7} [billards7] Frame 1Symbol 414 MovieClip {UI_fla.Timeline_274} [UI_fla.Timeline_274]
"ball"Symbol 668 MovieClip {UI_fla.Timeline_292} [UI_fla.Timeline_292] Frame 1Symbol 358 MovieClip
"ball"Symbol 669 MovieClip {billards8} [billards8] Frame 1Symbol 668 MovieClip {UI_fla.Timeline_292} [UI_fla.Timeline_292]
"flag"Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169] Frame 1Symbol 809 MovieClip
"l_cn"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_br"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_es"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_de"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_id"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_fr"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_it"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_in"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_my"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_jp"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_pl"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_nl"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_ru"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_pt"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_tr"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_se"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_en_us"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_en_uk"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_ph"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_ar"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"_blank"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 814 MovieClip
"l_arg"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"l_mx"Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168] Frame 1Symbol 812 MovieClip {UI_fla.label_169} [UI_fla.label_169]
"selectbox"Symbol 816 MovieClip {CountriesBox} [CountriesBox] Frame 1Symbol 738 MovieClip
"countryName"Symbol 816 MovieClip {CountriesBox} [CountriesBox] Frame 1Symbol 759 MovieClip
"flag"Symbol 816 MovieClip {CountriesBox} [CountriesBox] Frame 1Symbol 783 MovieClip
"popList"Symbol 816 MovieClip {CountriesBox} [CountriesBox] Frame 1Symbol 815 MovieClip {UI_fla.LanguageSelectPopup_168} [UI_fla.LanguageSelectPopup_168]
"music_button"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 679 MovieClip {music} [music]
"sound_button"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 682 MovieClip {sound} [sound]
"quality_button"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 600 MovieClip {quality} [quality]
"straightpBt"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 714 MovieClip {player} [player]
"straightpvspBt"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 732 MovieClip {playervsplayer} [playervsplayer]
"straightpvscBt"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 733 MovieClip {playervscomputer} [playervscomputer]
"eightpvscBt"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 733 MovieClip {playervscomputer} [playervscomputer]
"eightpvspBt"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 732 MovieClip {playervsplayer} [playervsplayer]
"__id1_"Symbol 817 MovieClip {mainMenuUI} [mainMenuUI] Frame 1Symbol 353 MovieClip {Logo} [Logo]
"downside"Symbol 837 MovieClip {tablebitmap} [tablebitmap] Frame 1Symbol 827 MovieClip
"upside"Symbol 837 MovieClip {tablebitmap} [tablebitmap] Frame 1Symbol 829 MovieClip
"rightside"Symbol 837 MovieClip {tablebitmap} [tablebitmap] Frame 1Symbol 831 MovieClip
"rightside"Symbol 837 MovieClip {tablebitmap} [tablebitmap] Frame 1Symbol 833 MovieClip
"hole4"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 840 MovieClip
"hole1"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 840 MovieClip
"hole6"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 840 MovieClip
"hole3"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 840 MovieClip
"hole2"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 840 MovieClip
"hole5"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 840 MovieClip
"poolCue"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 843 MovieClip {poolcue} [poolcue]
"rightside"Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176] Frame 1Symbol 836 MovieClip
"screenMc"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 844 MovieClip {UI_fla.table_176} [UI_fla.table_176]
"eightballtitle"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 455 MovieClip {eigthball} [eigthball]
"howBt"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 477 MovieClip {how} [how]
"gomenuBt"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 847 MovieClip {backmain} [backmain]
"statisticsBt"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 850 MovieClip {statistics} [statistics]
"straighttitile"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 695 MovieClip {straight} [straight]
"__id0_"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 353 MovieClip {Logo} [Logo]
"gamewin"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 868 MovieClip {gamewin11} [gamewin11]
"gamelose"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 652 MovieClip {gamelose11} [gamelose11]
"playerwin"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 903 MovieClip
"retryBt"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 624 MovieClip {RETRY} [RETRY]
"leftcolor"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 906 MovieClip
"rightcolor"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 906 MovieClip
"computer"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 917 MovieClip {computer11} [computer11]
"player2"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 918 MovieClip {player2111} [player2111]
"rightside"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 920 MovieClip
"leftlight"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 926 MovieClip
"rightlight"Symbol 942 MovieClip {ingameUI} [ingameUI] Frame 1Symbol 926 MovieClip
"backBt"Symbol 1001 MovieClip {howtoplay} [howtoplay] Frame 1Symbol 471 MovieClip {BACK} [BACK]
"howeight"Symbol 1001 MovieClip {howtoplay} [howtoplay] Frame 1Symbol 997 MovieClip
"howstraight"Symbol 1001 MovieClip {howtoplay} [howtoplay] Frame 1Symbol 1000 MovieClip
"menuBt"Symbol 1008 MovieClip {menuUI} [menuUI] Frame 1Symbol 1007 MovieClip {MENU} [MENU]
"backBt"Symbol 1008 MovieClip {menuUI} [menuUI] Frame 1Symbol 471 MovieClip {BACK} [BACK]
"restartBt"Symbol 1008 MovieClip {menuUI} [menuUI] Frame 1Symbol 655 MovieClip {RESTART} [RESTART]
"music_button"Symbol 1008 MovieClip {menuUI} [menuUI] Frame 1Symbol 679 MovieClip {music} [music]
"sound_button"Symbol 1008 MovieClip {menuUI} [menuUI] Frame 1Symbol 682 MovieClip {sound} [sound]
"quality_button"Symbol 1008 MovieClip {menuUI} [menuUI] Frame 1Symbol 600 MovieClip {quality} [quality]
"backBt"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 471 MovieClip {BACK} [BACK]
"splayeronewin"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 487 EditableText
"splayeronelose"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 487 EditableText
"splayeroneper"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 521 EditableText
"splayertwowin"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 535 EditableText
"splayertwolose"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 536 EditableText
"splayertwoper"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 537 EditableText
"resetBt"Symbol 1022 MovieClip {statisticstraight} [statisticstraight] Frame 1Symbol 439 MovieClip {reset} [reset]

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1558 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 355 as "loadingUI"
ExportAssets (56)Timeline Frame 2Symbol 28 as "LOADING"
ExportAssets (56)Timeline Frame 2Symbol 10 as "title"
ExportAssets (56)Timeline Frame 2Symbol 354 as "HyvesLoading"
ExportAssets (56)Timeline Frame 2Symbol 353 as "Logo"
ExportAssets (56)Timeline Frame 2Symbol 154 as "UI_fla.a10_com_logo_72"
ExportAssets (56)Timeline Frame 2Symbol 144 as "UI_fla.girlsgogames_67"
ExportAssets (56)Timeline Frame 2Symbol 146 as "UI_fla.girlsgogames_68"
ExportAssets (56)Timeline Frame 2Symbol 140 as "UI_fla.girlsgogames_65"
ExportAssets (56)Timeline Frame 2Symbol 142 as "UI_fla.girlsgogames_66"
ExportAssets (56)Timeline Frame 2Symbol 98 as "UI_fla.logo_game_com_my_44"
ExportAssets (56)Timeline Frame 2Symbol 136 as "UI_fla.girlsgogames_63"
ExportAssets (56)Timeline Frame 2Symbol 134 as "UI_fla.girlsgogames_62"
ExportAssets (56)Timeline Frame 2Symbol 132 as "UI_fla.girlsgogames_61"
ExportAssets (56)Timeline Frame 2Symbol 130 as "UI_fla.girlsgogames_60"
ExportAssets (56)Timeline Frame 2Symbol 78 as "UI_fla.new_spel_se_33"
ExportAssets (56)Timeline Frame 2Symbol 80 as "UI_fla.logo_my_games_co_uk_35"
ExportAssets (56)Timeline Frame 2Symbol 72 as "UI_fla.new_clickjogos_com_30"
ExportAssets (56)Timeline Frame 2Symbol 94 as "UI_fla.logo_minigry_pl_42"
ExportAssets (56)Timeline Frame 2Symbol 92 as "UI_fla.new_games_co_id_40"
ExportAssets (56)Timeline Frame 2Symbol 138 as "UI_fla.juegosdechicas_64"
ExportAssets (56)Timeline Frame 2Symbol 124 as "UI_fla.girlsgogames_57"
ExportAssets (56)Timeline Frame 2Symbol 126 as "UI_fla.girlsgogames_58"
ExportAssets (56)Timeline Frame 2Symbol 128 as "UI_fla.girlsgogames_59"
ExportAssets (56)Timeline Frame 2Symbol 64 as "UI_fla.new_jeu_fr_26"
ExportAssets (56)Timeline Frame 2Symbol 74 as "UI_fla.logo_giocaregratis_it_32"
ExportAssets (56)Timeline Frame 2Symbol 122 as "UI_fla.logo_oyunlar123_com_56"
ExportAssets (56)Timeline Frame 2Symbol 88 as "UI_fla.new_game_co_in_38"
ExportAssets (56)Timeline Frame 2Symbol 160 as "UI_fla.newagame_co_uk_74"
ExportAssets (56)Timeline Frame 2Symbol 96 as "UI_fla.logo_asoyun_com_43"
ExportAssets (56)Timeline Frame 2Symbol 84 as "UI_fla.new_flashgames_ru_36"
ExportAssets (56)Timeline Frame 2Symbol 60 as "UI_fla.newspel_nl_24"
ExportAssets (56)Timeline Frame 2Symbol 52 as "UI_fla.logo_game_20"
ExportAssets (56)Timeline Frame 2Symbol 150 as "UI_fla.logo_laro_com_ph_70"
ExportAssets (56)Timeline Frame 2Symbol 68 as "UI_fla.new_spielen_com_28"
ExportAssets (56)Timeline Frame 2Symbol 56 as "UI_fla.new_zapjuegos_com_22"
ExportAssets (56)Timeline Frame 3Symbol 39 as "UI_fla.new_agame_com_17"
ExportAssets (56)Timeline Frame 3Symbol 363 as "billards10"
ExportAssets (56)Timeline Frame 3Symbol 368 as "billards11"
ExportAssets (56)Timeline Frame 3Symbol 387 as "player1vsc1"
ExportAssets (56)Timeline Frame 3Symbol 388 as "sound_opening"
ExportAssets (56)Timeline Frame 3Symbol 393 as "billards12"
ExportAssets (56)Timeline Frame 3Symbol 398 as "billards13"
ExportAssets (56)Timeline Frame 3Symbol 403 as "billards14"
ExportAssets (56)Timeline Frame 3Symbol 409 as "billards15"
ExportAssets (56)Timeline Frame 3Symbol 414 as "UI_fla.Timeline_274"
ExportAssets (56)Timeline Frame 3Symbol 419 as "UI_fla.Timeline_278"
ExportAssets (56)Timeline Frame 3Symbol 421 as "shadow"
ExportAssets (56)Timeline Frame 3Symbol 439 as "reset"
ExportAssets (56)Timeline Frame 3Symbol 408 as "UI_fla.Timeline_270"
ExportAssets (56)Timeline Frame 3Symbol 455 as "eigthball"
ExportAssets (56)Timeline Frame 3Symbol 471 as "BACK"
ExportAssets (56)Timeline Frame 3Symbol 474 as "BGBit"
ExportAssets (56)Timeline Frame 3Symbol 477 as "how"
ExportAssets (56)Timeline Frame 3Symbol 483 as "UI_fla.Timeline_258"
ExportAssets (56)Timeline Frame 3Symbol 568 as "statisticeight"
ExportAssets (56)Timeline Frame 3Symbol 574 as "UI_fla.Timeline_262"
ExportAssets (56)Timeline Frame 3Symbol 591 as "retry1"
ExportAssets (56)Timeline Frame 3Symbol 596 as "UI_fla.Timeline_266"
ExportAssets (56)Timeline Frame 3Symbol 600 as "quality"
ExportAssets (56)Timeline Frame 3Symbol 392 as "UI_fla.Timeline_301"
ExportAssets (56)Timeline Frame 3Symbol 614 as "restart1"
ExportAssets (56)Timeline Frame 3Symbol 552 as "play1"
ExportAssets (56)Timeline Frame 3Symbol 567 as "play2"
ExportAssets (56)Timeline Frame 3Symbol 620 as "billards6"
ExportAssets (56)Timeline Frame 3Symbol 621 as "billards5"
ExportAssets (56)Timeline Frame 3Symbol 624 as "RETRY"
ExportAssets (56)Timeline Frame 3Symbol 630 as "billards4"
ExportAssets (56)Timeline Frame 3Symbol 631 as "billards3"
ExportAssets (56)Timeline Frame 3Symbol 632 as "billards2"
ExportAssets (56)Timeline Frame 3Symbol 633 as "billards1"
ExportAssets (56)Timeline Frame 3Symbol 652 as "gamelose11"
ExportAssets (56)Timeline Frame 3Symbol 653 as "sound_setBilliards"
ExportAssets (56)Timeline Frame 3Symbol 654 as "sound_lose"
ExportAssets (56)Timeline Frame 3Symbol 655 as "RESTART"
ExportAssets (56)Timeline Frame 3Symbol 402 as "UI_fla.Timeline_298"
ExportAssets (56)Timeline Frame 3Symbol 362 as "UI_fla.Timeline_295"
ExportAssets (56)Timeline Frame 3Symbol 662 as "billards9"
ExportAssets (56)Timeline Frame 3Symbol 663 as "sound_inmenu"
ExportAssets (56)Timeline Frame 3Symbol 664 as "billards7"
ExportAssets (56)Timeline Frame 3Symbol 669 as "billards8"
ExportAssets (56)Timeline Frame 3Symbol 670 as "sound_win"
ExportAssets (56)Timeline Frame 3Symbol 668 as "UI_fla.Timeline_292"
ExportAssets (56)Timeline Frame 3Symbol 676 as "Copyright"
ExportAssets (56)Timeline Frame 3Symbol 817 as "mainMenuUI"
ExportAssets (56)Timeline Frame 3Symbol 818 as "sound_collideTable"
ExportAssets (56)Timeline Frame 3Symbol 534 as "PERCENTAGE"
ExportAssets (56)Timeline Frame 3Symbol 942 as "ingameUI"
ExportAssets (56)Timeline Frame 3Symbol 868 as "gamewin11"
ExportAssets (56)Timeline Frame 3Symbol 961 as "how8ball"
ExportAssets (56)Timeline Frame 3Symbol 980 as "howstraight"
ExportAssets (56)Timeline Frame 3Symbol 397 as "UI_fla.Timeline_286"
ExportAssets (56)Timeline Frame 3Symbol 661 as "UI_fla.Timeline_289"
ExportAssets (56)Timeline Frame 3Symbol 367 as "UI_fla.Timeline_282"
ExportAssets (56)Timeline Frame 3Symbol 981 as "sound_ingame"
ExportAssets (56)Timeline Frame 3Symbol 844 as "UI_fla.table_176"
ExportAssets (56)Timeline Frame 3Symbol 994 as "menu1"
ExportAssets (56)Timeline Frame 3Symbol 918 as "player2111"
ExportAssets (56)Timeline Frame 3Symbol 714 as "player"
ExportAssets (56)Timeline Frame 3Symbol 731 as "player1vs21"
ExportAssets (56)Timeline Frame 3Symbol 1001 as "howtoplay"
ExportAssets (56)Timeline Frame 3Symbol 1003 as "bg"
ExportAssets (56)Timeline Frame 3Symbol 1004 as "sound_shotBall"
ExportAssets (56)Timeline Frame 3Symbol 712 as "player11"
ExportAssets (56)Timeline Frame 3Symbol 837 as "tablebitmap"
ExportAssets (56)Timeline Frame 3Symbol 1008 as "menuUI"
ExportAssets (56)Timeline Frame 3Symbol 1011 as "localization"
ExportAssets (56)Timeline Frame 3Symbol 1012 as "sound_collideLight"
ExportAssets (56)Timeline Frame 3Symbol 1013 as "sound_menuTouch"
ExportAssets (56)Timeline Frame 3Symbol 843 as "poolcue"
ExportAssets (56)Timeline Frame 3Symbol 682 as "sound"
ExportAssets (56)Timeline Frame 3Symbol 1015 as "howtoplaystraight"
ExportAssets (56)Timeline Frame 3Symbol 941 as "player1"
ExportAssets (56)Timeline Frame 3Symbol 1018 as "cueBall"
ExportAssets (56)Timeline Frame 3Symbol 812 as "UI_fla.label_169"
ExportAssets (56)Timeline Frame 3Symbol 733 as "playervscomputer"
ExportAssets (56)Timeline Frame 3Symbol 885 as "player1win"
ExportAssets (56)Timeline Frame 3Symbol 695 as "straight"
ExportAssets (56)Timeline Frame 3Symbol 1019 as "sound_inPocket"
ExportAssets (56)Timeline Frame 3Symbol 1020 as "sound_collideNormal"
ExportAssets (56)Timeline Frame 3Symbol 470 as "back1"
ExportAssets (56)Timeline Frame 3Symbol 850 as "statistics"
ExportAssets (56)Timeline Frame 3Symbol 815 as "UI_fla.LanguageSelectPopup_168"
ExportAssets (56)Timeline Frame 3Symbol 619 as "UI_fla.Timeline_254"
ExportAssets (56)Timeline Frame 3Symbol 436 as "reset1"
ExportAssets (56)Timeline Frame 3Symbol 629 as "UI_fla.Timeline_250"
ExportAssets (56)Timeline Frame 3Symbol 679 as "music"
ExportAssets (56)Timeline Frame 3Symbol 847 as "backmain"
ExportAssets (56)Timeline Frame 3Symbol 1021 as "sound_collideHeavy"
ExportAssets (56)Timeline Frame 3Symbol 902 as "player2win"
ExportAssets (56)Timeline Frame 3Symbol 732 as "playervsplayer"
ExportAssets (56)Timeline Frame 3Symbol 816 as "CountriesBox"
ExportAssets (56)Timeline Frame 3Symbol 1022 as "statisticstraight"
ExportAssets (56)Timeline Frame 3Symbol 504 as "win"
ExportAssets (56)Timeline Frame 3Symbol 1023 as "sound_menuPress"
ExportAssets (56)Timeline Frame 3Symbol 520 as "lose"
ExportAssets (56)Timeline Frame 3Symbol 1007 as "MENU"
ExportAssets (56)Timeline Frame 3Symbol 917 as "computer11"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$hk$dbX123tsOzQYB9N1Qw2xa/."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"Root"Frame 1
"loadingUI"Frame 2
"Main"Frame 3
"www.agame.com"Symbol 353 MovieClip {Logo} [Logo] Frame 1
"www.game.com.cn"Symbol 353 MovieClip {Logo} [Logo] Frame 2
"www.zapjuegos.com"Symbol 353 MovieClip {Logo} [Logo] Frame 3
"www.spel.nl"Symbol 353 MovieClip {Logo} [Logo] Frame 4
"www.jeu.fr"Symbol 353 MovieClip {Logo} [Logo] Frame 5
"www.spielen.com"Symbol 353 MovieClip {Logo} [Logo] Frame 6
"www.clickjogos.com"Symbol 353 MovieClip {Logo} [Logo] Frame 7
"www.giocaregratis.it"Symbol 353 MovieClip {Logo} [Logo] Frame 8
"www.spel.se"Symbol 353 MovieClip {Logo} [Logo] Frame 9
"www.mygames.co.uk"Symbol 353 MovieClip {Logo} [Logo] Frame 10
"www.flashgames.ru"Symbol 353 MovieClip {Logo} [Logo] Frame 11
"www.game.co.in"Symbol 353 MovieClip {Logo} [Logo] Frame 12
"www.games.co.id"Symbol 353 MovieClip {Logo} [Logo] Frame 13
"www.minigry.pl"Symbol 353 MovieClip {Logo} [Logo] Frame 14
"www.asoyun.com"Symbol 353 MovieClip {Logo} [Logo] Frame 15
"www.game.com.my"Symbol 353 MovieClip {Logo} [Logo] Frame 16
"www.gamesgames.com"Symbol 353 MovieClip {Logo} [Logo] Frame 17
"www.spelletjes.nl"Symbol 353 MovieClip {Logo} [Logo] Frame 18
"www.jeux.fr"Symbol 353 MovieClip {Logo} [Logo] Frame 19
"www.jetztspielen.de"Symbol 353 MovieClip {Logo} [Logo] Frame 20
"www.gry.pl"Symbol 353 MovieClip {Logo} [Logo] Frame 21
"www.spela.se"Symbol 353 MovieClip {Logo} [Logo] Frame 22
"www.gioco.it"Symbol 353 MovieClip {Logo} [Logo] Frame 23
"www.juegos.com"Symbol 353 MovieClip {Logo} [Logo] Frame 24
"www.ojogos.com.br"Symbol 353 MovieClip {Logo} [Logo] Frame 25
"www.ourgames.ru"Symbol 353 MovieClip {Logo} [Logo] Frame 26
"www.games.co.uk"Symbol 353 MovieClip {Logo} [Logo] Frame 27
"www.oyunlar123.com"Symbol 353 MovieClip {Logo} [Logo] Frame 28
"www.girlsgogames.com"Symbol 353 MovieClip {Logo} [Logo] Frame 29
"www.girlsgogames.nl"Symbol 353 MovieClip {Logo} [Logo] Frame 30
"www.girlsgogames.fr"Symbol 353 MovieClip {Logo} [Logo] Frame 31
"www.girlsgogames.es"Symbol 353 MovieClip {Logo} [Logo] Frame 32
"www.girlsgogames.de"Symbol 353 MovieClip {Logo} [Logo] Frame 33
"www.girlsgogames.pl"Symbol 353 MovieClip {Logo} [Logo] Frame 34
"www.girlsgogames.se"Symbol 353 MovieClip {Logo} [Logo] Frame 35
"www.juegosdechicas.com"Symbol 353 MovieClip {Logo} [Logo] Frame 36
"www.girlsgogames.it"Symbol 353 MovieClip {Logo} [Logo] Frame 37
"www.girlsgogames.co.uk"Symbol 353 MovieClip {Logo} [Logo] Frame 38
"www.girlsgogames.com.br"Symbol 353 MovieClip {Logo} [Logo] Frame 39
"www.girlsgogames.ru"Symbol 353 MovieClip {Logo} [Logo] Frame 40
"www.girlsgogames.in"Symbol 353 MovieClip {Logo} [Logo] Frame 41
"www.girlsgogamestr.com"Symbol 353 MovieClip {Logo} [Logo] Frame 42
"www.ojogos.pt"Symbol 353 MovieClip {Logo} [Logo] Frame 43
"www.laro.com.ph"Symbol 353 MovieClip {Logo} [Logo] Frame 44
"www.egames.jp"Symbol 353 MovieClip {Logo} [Logo] Frame 45
"www.a10.com"Symbol 353 MovieClip {Logo} [Logo] Frame 46
"www.dailygame.com"Symbol 353 MovieClip {Logo} [Logo] Frame 47
"www.agame.co.uk"Symbol 353 MovieClip {Logo} [Logo] Frame 48
"www.zapapa.com"Symbol 353 MovieClip {Logo} [Logo] Frame 49
"www.juegos.mx"Symbol 353 MovieClip {Logo} [Logo] Frame 50
"www.juegos.com.ar"Symbol 353 MovieClip {Logo} [Logo] Frame 51
"www.juegosdechicas.com.ar"Symbol 353 MovieClip {Logo} [Logo] Frame 52
"www.juegosdechicas.mx"Symbol 353 MovieClip {Logo} [Logo] Frame 53
"www.zapapa.nl"Symbol 353 MovieClip {Logo} [Logo] Frame 54
"www.zapapa.de"Symbol 353 MovieClip {Logo} [Logo] Frame 55
"best"Symbol 600 MovieClip {quality} [quality] Frame 1
"medium"Symbol 600 MovieClip {quality} [quality] Frame 2
"low"Symbol 600 MovieClip {quality} [quality] Frame 3
"br"Symbol 759 MovieClip Frame 1
"nl"Symbol 759 MovieClip Frame 2
"cn"Symbol 759 MovieClip Frame 3
"de"Symbol 759 MovieClip Frame 4
"es"Symbol 759 MovieClip Frame 5
"fr"Symbol 759 MovieClip Frame 6
"in"Symbol 759 MovieClip Frame 7
"it"Symbol 759 MovieClip Frame 8
"jp"Symbol 759 MovieClip Frame 9
"my"Symbol 759 MovieClip Frame 10
"ph"Symbol 759 MovieClip Frame 11
"pl"Symbol 759 MovieClip Frame 12
"pt"Symbol 759 MovieClip Frame 13
"ru"Symbol 759 MovieClip Frame 14
"se"Symbol 759 MovieClip Frame 15
"tr"Symbol 759 MovieClip Frame 16
"en_uk"Symbol 759 MovieClip Frame 17
"en_us"Symbol 759 MovieClip Frame 18
"id"Symbol 759 MovieClip Frame 19
"ar"Symbol 759 MovieClip Frame 20
"mx"Symbol 759 MovieClip Frame 21
"arg"Symbol 759 MovieClip Frame 22
"br"Symbol 783 MovieClip Frame 1
"nl"Symbol 783 MovieClip Frame 2
"cn"Symbol 783 MovieClip Frame 3
"de"Symbol 783 MovieClip Frame 4
"es"Symbol 783 MovieClip Frame 5
"fr"Symbol 783 MovieClip Frame 6
"in"Symbol 783 MovieClip Frame 7
"it"Symbol 783 MovieClip Frame 8
"jp"Symbol 783 MovieClip Frame 9
"my"Symbol 783 MovieClip Frame 10
"ph"Symbol 783 MovieClip Frame 11
"pl"Symbol 783 MovieClip Frame 12
"pt"Symbol 783 MovieClip Frame 13
"ru"Symbol 783 MovieClip Frame 14
"se"Symbol 783 MovieClip Frame 15
"tr"Symbol 783 MovieClip Frame 16
"en_uk"Symbol 783 MovieClip Frame 17
"en_us"Symbol 783 MovieClip Frame 18
"id"Symbol 783 MovieClip Frame 19
"ar"Symbol 783 MovieClip Frame 20
"mx"Symbol 783 MovieClip Frame 21
"arg"Symbol 783 MovieClip Frame 22
"br"Symbol 809 MovieClip Frame 1
"nl"Symbol 809 MovieClip Frame 2
"cn"Symbol 809 MovieClip Frame 3
"de"Symbol 809 MovieClip Frame 4
"es"Symbol 809 MovieClip Frame 5
"fr"Symbol 809 MovieClip Frame 6
"in"Symbol 809 MovieClip Frame 7
"it"Symbol 809 MovieClip Frame 8
"jp"Symbol 809 MovieClip Frame 9
"my"Symbol 809 MovieClip Frame 10
"ph"Symbol 809 MovieClip Frame 11
"pl"Symbol 809 MovieClip Frame 12
"pt"Symbol 809 MovieClip Frame 13
"ru"Symbol 809 MovieClip Frame 14
"se"Symbol 809 MovieClip Frame 15
"tr"Symbol 809 MovieClip Frame 16
"en_uk"Symbol 809 MovieClip Frame 17
"en_us"Symbol 809 MovieClip Frame 18
"id"Symbol 809 MovieClip Frame 19
"ar"Symbol 809 MovieClip Frame 20
"mx"Symbol 809 MovieClip Frame 21
"arg"Symbol 809 MovieClip Frame 22




http://swfchan.com/24/119794/info.shtml
Created: 5/3 -2019 16:46:03 Last modified: 5/3 -2019 16:46:03 Server time: 22/12 -2024 19:16:55