Section 1
//PlaySheepFinalNormal_18 (PacFlockNG_fla.PlaySheepFinalNormal_18)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class PlaySheepFinalNormal_18 extends MovieClip {
public var body:MovieClip;
public function PlaySheepFinalNormal_18(){
addFrameScript(14, frame15);
}
function frame15(){
gotoAndPlay(1);
}
}
}//package PacFlockNG_fla
Section 2
//PlaySheepFinalSuper_28 (PacFlockNG_fla.PlaySheepFinalSuper_28)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class PlaySheepFinalSuper_28 extends MovieClip {
public var body:MovieClip;
public function PlaySheepFinalSuper_28(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(1);
}
}
}//package PacFlockNG_fla
Section 3
//SheepFinalNormal_20 (PacFlockNG_fla.SheepFinalNormal_20)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class SheepFinalNormal_20 extends MovieClip {
public function SheepFinalNormal_20(){
addFrameScript(15, frame16);
}
function frame16(){
gotoAndPlay(1);
}
}
}//package PacFlockNG_fla
Section 4
//SheepFinalSuper_31 (PacFlockNG_fla.SheepFinalSuper_31)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class SheepFinalSuper_31 extends MovieClip {
public function SheepFinalSuper_31(){
addFrameScript(15, frame16);
}
function frame16(){
gotoAndPlay(1);
}
}
}//package PacFlockNG_fla
Section 5
//Timeline_1 (PacFlockNG_fla.Timeline_1)
package PacFlockNG_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class Timeline_1 extends MovieClip {
public const FRAME_RATE_ADJUST:Boolean = true;
public const LOADER_FRAME_RATE:Number = 30;
public const AUTO_PLAY:Boolean = false;
public var bar:MovieClip;
public var ngButton:SimpleButton;
public var playButton:SimpleButton;
public var movieFrameRate:Number;
public var loadingComplete:Boolean;
public var initialized:Boolean;
public function Timeline_1(){
addFrameScript(0, frame1, 50, frame51);
}
public function init():void{
if (initialized){
return;
};
movieFrameRate = 0;
if (((FRAME_RATE_ADJUST) && (stage))){
movieFrameRate = stage.frameRate;
stage.frameRate = LOADER_FRAME_RATE;
};
initialized = true;
stop();
if (((root) && ((root is MovieClip)))){
MovieClip(root).stop();
};
loadingComplete = false;
ngButton.addEventListener(MouseEvent.CLICK, ngButtonClickHandler, false, 0, true);
addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true);
if (meetsVersion([9, 0, 28, 0])){
addEventListener(Event.REMOVED_FROM_STAGE, cleanup, false, 0, true);
};
enterFrameHandler();
}
public function enterFrameHandler(_arg1:Event=null):void{
var _local2:Number;
if (((((!(movieFrameRate)) && (FRAME_RATE_ADJUST))) && (stage))){
movieFrameRate = stage.frameRate;
stage.frameRate = LOADER_FRAME_RATE;
};
if (!loadingComplete){
_local2 = 0;
if (loaderInfo){
_local2 = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
};
if (bar){
bar.scaleX = _local2;
};
if (_local2 == 1){
loadingComplete = true;
if (AUTO_PLAY){
startMovie();
} else {
gotoAndPlay("loaded");
};
};
};
}
public function meetsVersion(_arg1:Array):Boolean{
var _local2:Array;
var _local3:uint;
_local2 = String(Capabilities.version.split(" ")[1]).split(",");
_local3 = 0;
while (_local3 < _arg1.length) {
if (uint(_local2[_local3]) > _arg1[_local3]){
return (true);
};
if (uint(_local2[_local3]) < _arg1[_local3]){
return (false);
};
_local3++;
};
return (true);
}
public function playButtonClickHandler(_arg1:Event=null):void{
startMovie();
}
function frame1(){
initialized = false;
init();
}
public function ngButtonClickHandler(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com"), "_blank");
}
public function cleanup(_arg1:Event=null){
if (initialized){
ngButton.removeEventListener(MouseEvent.CLICK, ngButtonClickHandler);
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
if (meetsVersion([9, 0, 28, 0])){
removeEventListener(Event.REMOVED_FROM_STAGE, cleanup);
};
if (movieFrameRate){
stage.frameRate = movieFrameRate;
movieFrameRate = 0;
};
};
initialized = false;
}
function frame51(){
stop();
if (((playButton) && (!(playButton.hasEventListener(MouseEvent.CLICK))))){
playButton.addEventListener(MouseEvent.CLICK, playButtonClickHandler, false, 0, true);
};
}
public function startMovie():void{
cleanup();
if (((root) && ((root is MovieClip)))){
MovieClip(root).play();
};
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package PacFlockNG_fla
Section 6
//Timeline_7 (PacFlockNG_fla.Timeline_7)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class Timeline_7 extends MovieClip {
public function Timeline_7(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package PacFlockNG_fla
Section 7
//WulfFinalNormal_21 (PacFlockNG_fla.WulfFinalNormal_21)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class WulfFinalNormal_21 extends MovieClip {
public var tail:MovieClip;
public var rightEye:WulfRightEye;
public var upJaws:MovieClip;
public var body:MovieClip;
public var leftEye:WulfRightEye;
public var lowJaws:MovieClip;
}
}//package PacFlockNG_fla
Section 8
//WulfFinalScared_32 (PacFlockNG_fla.WulfFinalScared_32)
package PacFlockNG_fla {
import flash.display.*;
public dynamic class WulfFinalScared_32 extends MovieClip {
public var tail:MovieClip;
public var rightEye:WulfRightEye;
public var upJaws:MovieClip;
public var body:MovieClip;
public var leftEye:WulfRightEye;
public var lowJaws:MovieClip;
}
}//package PacFlockNG_fla
Section 9
//BasePacman (BasePacman)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.ui.*;
public class BasePacman extends MovieClip {
public var maxSpeed:Number;// = 8
public var v1;
public var v2;
var startSize:Number;// = 0.3
public var v3:Point;
var dirx:Number;
var diry:Number;
var noDots:uint;
var growth:Number;// = 0.1
var looksLeft:Boolean;// = true
public function BasePacman():void{
looksLeft = true;
maxSpeed = 8;
growth = 0.1;
startSize = 0.3;
super();
}
function switchOrientation():void{
if ((((((rotation > 90)) || ((rotation < -90)))) && (looksLeft))){
scaleY = (scaleY * -1);
looksLeft = false;
};
if ((((((rotation < 90)) && ((rotation > -90)))) && (!(looksLeft)))){
scaleY = (scaleY * -1);
looksLeft = true;
};
}
function dotEat():void{
var _local1:Point;
var _local2:Point;
var _local3:Sprite;
var _local4:uint;
var _local5:Number;
var _local6:Number;
_local1 = new Point(x, y);
_local4 = 0;
for (;_local4 < PacFlock.dots.numChildren;PacFlock.dots.removeChildAt(_local4), noDots++, (_local6 = (growth / noDots)), (scaleX = (scaleX + _local6)), (scaleY = (scaleY + (looksLeft) ? _local6 : -(_local6))), break, _local4++) {
_local3 = Sprite(PacFlock.dots.getChildAt(_local4));
//unresolved if
_local2 = new Point(_local3.x, _local3.y);
_local5 = Point.distance(_local1, _local2);
_local5 = ((_local3.height / 2) / _local5);
_local2 = Point.interpolate(_local1, _local2, _local5);
//unresolved if
if ((PacFlock.dots.getChildAt(_local4) is Special)){
PacFlock.sound.superMusic(PacFlock.maxChaseTimer);
PacFlock.chase = true;
PacFlock.chaseTimer = getTimer();
};
if ((Math.random() < 0.75)){
PacFlock.sound.eatGrass();
continue;
};
};
}
function turn(){
var _local1:Number;
_local1 = Math.atan2(diry, dirx);
rotation = ((_local1 * 180) / Math.PI);
}
function regenerate():void{
var _local1:Pacman;
if (noDots > 20){
_local1 = new Pacman(this.x, this.y);
PacFlock.pacFlock.addChildAt(_local1, 0);
scaleX = startSize;
scaleY = (looksLeft) ? startSize : (-1 * startSize);
noDots = 0;
};
}
function flocking():void{
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:uint;
var _local5:Point;
var _local6:Point;
var _local7:Point;
var _local8:uint;
var _local9:Point;
var _local10:MovieClip;
v1 = new Point();
v2 = new Point();
v3 = new Point();
_local1 = new Point(x, y);
_local2 = new Point();
_local3 = new Point();
_local4 = 0;
_local5 = new Point();
_local6 = new Point(dirx, diry);
_local7 = new Point();
_local8 = 0;
while (_local8 < parent.numChildren) {
if (parent.getChildIndex(this) != _local8){
_local9 = new Point(parent.getChildAt(_local8).x, parent.getChildAt(_local8).y);
if (Point.distance(_local1, _local9) < 100){
_local4++;
_local2 = _local2.add(_local9);
_local10 = MovieClip(parent.getChildAt(_local8));
_local7 = _local7.add(new Point(_local10.dirx, _local10.diry));
};
if (Point.distance(_local9, _local1) < (15 + (height / 2))){
_local5 = _local5.add(_local1.subtract(_local9));
};
};
_local8++;
};
if (_local4 > 0){
_local2.normalize((_local2.length / _local4));
_local3 = _local2.subtract(_local1);
_local3.normalize((_local3.length / 100));
_local7.normalize((_local7.length / _local4));
var _temp1 = _local7.subtract(_local6);
_local7 = _local7.subtract(_local6);
_temp1.normalize((_local7.length / 100));
};
v1 = _local3;
_local5.normalize((_local5.length / 8));
v2 = _local5;
v3 = _local7;
}
function bounding():void{
var _local1:uint;
var _local2:uint;
_local1 = stage.stageWidth;
_local2 = stage.stageHeight;
if (x < (0 + (width / 2))){
x = (width / 2);
} else {
if (x > (_local1 - (width / 2))){
x = (_local1 - (width / 2));
};
};
if (y < (0 + (height / 2))){
y = (height / 2);
} else {
if (y > (_local2 - (height / 2))){
y = (_local2 - (height / 2));
};
};
}
function walk():void{
var _local1:Point;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Point;
var _local7:Point;
maximize();
this.x = (this.x + dirx);
this.y = (this.y + diry);
bounding();
_local1 = new Point(x, y);
_local2 = (stage.stageWidth / 2);
_local3 = (stage.stageHeight / 2);
_local4 = 0;
_local5 = 0;
_local6 = checkWalk(_local1);
while (((!((_local6.x == 0))) && (!((_local6.y == 0))))) {
_local7 = _local1.subtract(_local6);
_local7.normalize(1);
while (this.hitTestPoint(_local6.x, _local6.y, false)) {
x = (x + _local7.x);
y = (y + _local7.y);
_local5++;
};
_local4++;
_local1 = new Point(x, y);
_local6 = ((_local4 < 3)) ? checkWalk(_local1) : new Point();
};
switchOrientation();
if ((((_local5 > 8)) && ((this is Player)))){
PacFlock.sound.collision();
};
}
function maximize():void{
var _local1:Point;
var _local2:Point;
_local1 = new Point(dirx, diry);
_local2 = _local1.clone();
_local2.normalize(maxSpeed);
if (_local2.length < _local1.length){
dirx = _local2.x;
diry = _local2.y;
};
}
function checkWalk(_arg1:Point):Point{
var _local2:Point;
var _local3:Number;
var _local4:uint;
var _local5:uint;
var _local6:Number;
var _local7:Sprite;
var _local8:Point;
var _local9:uint;
var _local10:uint;
var _local11:Number;
_local2 = new Point();
_local3 = 1000;
_local4 = (stage.stageWidth / 2);
_local5 = (stage.stageHeight / 2);
_local9 = 0;
while (_local9 < PacFlock.obstacle.numChildren) {
_local7 = Sprite(PacFlock.obstacle.getChildAt(_local9));
if (this.hitTestObject(_local7)){
_local8 = new Point((_local7.x + _local4), (_local7.y + _local5));
_local6 = Point.distance(_arg1, _local8);
if (_local6 < _local3){
_local10 = 20;
_local11 = (_local10 / _local6);
_local2 = Point.interpolate(_arg1, _local8, _local11);
_local3 = _local6;
};
};
_local9++;
};
return (_local2);
}
}
}//package
Section 10
//BasicButton (BasicButton)
package {
import flash.display.*;
public dynamic class BasicButton extends SimpleButton {
}
}//package
Section 11
//bij_ss_muziek_nowolf (bij_ss_muziek_nowolf)
package {
import flash.media.*;
public dynamic class bij_ss_muziek_nowolf extends Sound {
}
}//package
Section 12
//bijSSmuz_bangewolf1 (bijSSmuz_bangewolf1)
package {
import flash.media.*;
public dynamic class bijSSmuz_bangewolf1 extends Sound {
}
}//package
Section 13
//bijSSmuz_bangewolf2 (bijSSmuz_bangewolf2)
package {
import flash.media.*;
public dynamic class bijSSmuz_bangewolf2 extends Sound {
}
}//package
Section 14
//collision1 (collision1)
package {
import flash.media.*;
public dynamic class collision1 extends Sound {
}
}//package
Section 15
//collision10 (collision10)
package {
import flash.media.*;
public dynamic class collision10 extends Sound {
}
}//package
Section 16
//collision11 (collision11)
package {
import flash.media.*;
public dynamic class collision11 extends Sound {
}
}//package
Section 17
//collision12 (collision12)
package {
import flash.media.*;
public dynamic class collision12 extends Sound {
}
}//package
Section 18
//collision13 (collision13)
package {
import flash.media.*;
public dynamic class collision13 extends Sound {
}
}//package
Section 19
//collision14 (collision14)
package {
import flash.media.*;
public dynamic class collision14 extends Sound {
}
}//package
Section 20
//collision15 (collision15)
package {
import flash.media.*;
public dynamic class collision15 extends Sound {
}
}//package
Section 21
//collision16 (collision16)
package {
import flash.media.*;
public dynamic class collision16 extends Sound {
}
}//package
Section 22
//collision2 (collision2)
package {
import flash.media.*;
public dynamic class collision2 extends Sound {
}
}//package
Section 23
//collision3 (collision3)
package {
import flash.media.*;
public dynamic class collision3 extends Sound {
}
}//package
Section 24
//collision4 (collision4)
package {
import flash.media.*;
public dynamic class collision4 extends Sound {
}
}//package
Section 25
//collision5 (collision5)
package {
import flash.media.*;
public dynamic class collision5 extends Sound {
}
}//package
Section 26
//collision6 (collision6)
package {
import flash.media.*;
public dynamic class collision6 extends Sound {
}
}//package
Section 27
//collision7 (collision7)
package {
import flash.media.*;
public dynamic class collision7 extends Sound {
}
}//package
Section 28
//collision8 (collision8)
package {
import flash.media.*;
public dynamic class collision8 extends Sound {
}
}//package
Section 29
//collision9 (collision9)
package {
import flash.media.*;
public dynamic class collision9 extends Sound {
}
}//package
Section 30
//ControlToggleBtn (ControlToggleBtn)
package {
import flash.events.*;
import flash.display.*;
public class ControlToggleBtn extends MovieClip {
public var act:Boolean;
public function ControlToggleBtn(){
this.addEventListener(MouseEvent.MOUSE_OVER, over);
this.addEventListener(MouseEvent.MOUSE_OUT, out);
this.addEventListener(MouseEvent.MOUSE_DOWN, down);
this.addEventListener(MouseEvent.MOUSE_UP, alter);
}
public function alter(_arg1:MouseEvent):void{
this.gotoAndStop("out");
act = true;
ToggleControl(this.parent).switchActive(this);
}
public function out(_arg1:MouseEvent):void{
if (act){
this.gotoAndStop("out");
} else {
this.gotoAndStop("inactive");
};
}
public function down(_arg1:MouseEvent):void{
this.gotoAndStop("down");
}
public function over(_arg1:MouseEvent):void{
this.gotoAndStop("over");
}
}
}//package
Section 31
//DeadEye (DeadEye)
package {
import flash.display.*;
public class DeadEye extends MovieClip {
public function DeadEye(_arg1:Number=0, _arg2:Number=0, _arg3:Number=1){
x = _arg1;
y = _arg2;
scaleX = _arg3;
scaleY = _arg3;
}
}
}//package
Section 32
//DyingSheep (DyingSheep)
package {
import flash.display.*;
public class DyingSheep extends MovieClip {
public function DyingSheep(_arg1:uint, _arg2:uint, _arg3:Number=1, _arg4:Number=0){
addFrameScript(27, frame28);
x = _arg1;
y = _arg2;
scaleX = _arg3;
scaleY = ((((_arg4 < 90)) && ((_arg4 > -90)))) ? _arg3 : -(_arg3);
rotation = _arg4;
}
function frame28(){
newWulfHere();
stop();
}
public function newWulfHere():void{
PacFlock.newWulf(x, y, scaleX, rotation);
parent.removeChild(this);
}
public function removeSelf():void{
parent.removeChild(this);
stop();
}
}
}//package
Section 33
//Enemy (Enemy)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
public class Enemy extends BasePacman {
public var tail:MovieClip;
public var rightEye:WulfRightEye;
public var upJaws:MovieClip;
public var body:MovieClip;
var rotSpeed:uint;// = 1
public var leftEye:WulfRightEye;
var pacFlok:Sprite;
public var lowJaws:MovieClip;
public function Enemy(_arg1:Number, _arg2:Number, _arg3:Number=0.5, _arg4:Number=0){
pacFlok = PacFlock.pacFlock;
rotSpeed = 1;
super();
scaleX = _arg3;
scaleY = _arg3;
rotation = _arg4;
x = _arg1;
y = _arg2;
dirx = 0;
diry = 0;
addEventListener(Event.ENTER_FRAME, renderEnemy);
maxSpeed = Math.min((3.5 + (PacFlock.level / 2)), 7.2);
PacFlock.sound.newWulf();
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener(Event.ENTER_FRAME, renderEnemy);
removeEventListener(Event.ENTER_FRAME, rotate);
removeEventListener(Event.ENTER_FRAME, fadeOut);
}
public function colorChange():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
if ((getTimer() - PacFlock.chaseTimer) < (PacFlock.maxChaseTimer - 1500)){
_local1 = ((getTimer() - PacFlock.chaseTimer) / 4);
_local2 = _local1;
_local3 = -(_local1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local3, 0, _local2, 0);
} else {
if ((getTimer() - PacFlock.chaseTimer) > (PacFlock.maxChaseTimer - 1500)){
_local4 = -(Math.sin((((getTimer() - PacFlock.chaseTimer) - PacFlock.maxChaseTimer) / 100)));
_local5 = (-120 * _local4);
_local6 = (120 * _local4);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, _local6, 0, _local5, 0);
};
};
}
public function fadeOut(_arg1:Event){
if (alpha > 0){
alpha = (alpha - 0.07);
} else {
removeSelf();
};
}
function chasePacman():Point{
var _local1:Point;
var _local2:Point;
var _local3:uint;
var _local4:Point;
var _local5:Point;
_local1 = new Point(PacFlock.player.x, PacFlock.player.y);
_local2 = new Point(x, y);
_local3 = 0;
while (_local3 < pacFlok.numChildren) {
_local5 = new Point(pacFlok.getChildAt(_local3).x, pacFlok.getChildAt(_local3).y);
if (Point.distance(_local5, _local2) < Point.distance(_local1, _local2)){
_local1 = _local5.clone();
};
_local3++;
};
_local4 = new Point();
if (PacFlock.chase){
_local4 = _local2.subtract(_local1);
} else {
_local4 = _local1.subtract(_local2);
};
_local4.normalize(2);
return (_local4);
}
public function dyingEnemy():void{
var _local1:DeadEye;
var _local2:DeadEye;
stop();
_local1 = new DeadEye(leftEye.x, leftEye.y, leftEye.scaleX);
_local2 = new DeadEye(rightEye.x, rightEye.y, rightEye.scaleX);
addChild(_local1);
addChild(_local2);
removeChild(leftEye);
removeChild(rightEye);
removeEventListener(Event.ENTER_FRAME, renderEnemy);
addEventListener(Event.ENTER_FRAME, rotate);
}
public function renderEnemy(_arg1:Event){
var _local2:Point;
_local2 = chasePacman();
flocking();
dirx = (dirx + (((v1.x + v2.x) + v3.x) + _local2.x));
diry = (diry + (((v1.y + v2.y) + v3.y) + _local2.y));
walk();
turn();
if (PacFlock.chase){
colorChange();
};
}
public function rotate(_arg1:Event){
if (rotation < 155){
rotation = (rotation + rotSpeed);
rotSpeed = (rotSpeed + 1);
} else {
addEventListener(Event.ENTER_FRAME, fadeOut);
removeEventListener(Event.ENTER_FRAME, rotate);
};
}
}
}//package
Section 34
//EnemyDies (EnemyDies)
package {
import flash.display.*;
public class EnemyDies extends MovieClip {
public function EnemyDies(_arg1:Number=286.4, _arg2:Number=300, _arg3:Number=1){
addFrameScript(25, frame26);
x = _arg1;
y = _arg2;
scaleX = _arg3;
scaleY = _arg3;
}
function frame26(){
stop();
parent.removeChild(this);
}
}
}//package
Section 35
//EnemyEyes (EnemyEyes)
package {
import flash.display.*;
public dynamic class EnemyEyes extends MovieClip {
}
}//package
Section 36
//Gate (Gate)
package {
import flash.events.*;
import flash.display.*;
public class Gate extends MovieClip {
var halfH:uint;// = 200
var halfW:uint;// = 275
public function Gate(){
halfH = 200;
halfW = 275;
super();
}
public function comehere(_arg1:MouseEvent){
startDrag(true);
}
public function stay(_arg1:MouseEvent){
stopDrag();
}
}
}//package
Section 37
//Grass (Grass)
package {
import flash.display.*;
public class Grass extends MovieClip {
public function Grass(_arg1:uint=0, _arg2:uint=0, _arg3:Number=2){
x = _arg1;
y = _arg2;
scaleX = ((Math.random() < 0.5)) ? -(_arg3) : _arg3;
scaleY = _arg3;
gotoAndPlay(Math.floor((Math.random() * 20)));
}
}
}//package
Section 38
//grass01 (grass01)
package {
import flash.media.*;
public dynamic class grass01 extends Sound {
}
}//package
Section 39
//grass02 (grass02)
package {
import flash.media.*;
public dynamic class grass02 extends Sound {
}
}//package
Section 40
//grass03 (grass03)
package {
import flash.media.*;
public dynamic class grass03 extends Sound {
}
}//package
Section 41
//grass04 (grass04)
package {
import flash.media.*;
public dynamic class grass04 extends Sound {
}
}//package
Section 42
//grass05 (grass05)
package {
import flash.media.*;
public dynamic class grass05 extends Sound {
}
}//package
Section 43
//grass06 (grass06)
package {
import flash.media.*;
public dynamic class grass06 extends Sound {
}
}//package
Section 44
//grass07 (grass07)
package {
import flash.media.*;
public dynamic class grass07 extends Sound {
}
}//package
Section 45
//grass08 (grass08)
package {
import flash.media.*;
public dynamic class grass08 extends Sound {
}
}//package
Section 46
//grass09 (grass09)
package {
import flash.media.*;
public dynamic class grass09 extends Sound {
}
}//package
Section 47
//grass10 (grass10)
package {
import flash.media.*;
public dynamic class grass10 extends Sound {
}
}//package
Section 48
//grass11 (grass11)
package {
import flash.media.*;
public dynamic class grass11 extends Sound {
}
}//package
Section 49
//grass12 (grass12)
package {
import flash.media.*;
public dynamic class grass12 extends Sound {
}
}//package
Section 50
//grass13 (grass13)
package {
import flash.media.*;
public dynamic class grass13 extends Sound {
}
}//package
Section 51
//grass14 (grass14)
package {
import flash.media.*;
public dynamic class grass14 extends Sound {
}
}//package
Section 52
//grass15 (grass15)
package {
import flash.media.*;
public dynamic class grass15 extends Sound {
}
}//package
Section 53
//grass16 (grass16)
package {
import flash.media.*;
public dynamic class grass16 extends Sound {
}
}//package
Section 54
//grass17 (grass17)
package {
import flash.media.*;
public dynamic class grass17 extends Sound {
}
}//package
Section 55
//grass18 (grass18)
package {
import flash.media.*;
public dynamic class grass18 extends Sound {
}
}//package
Section 56
//grass19 (grass19)
package {
import flash.media.*;
public dynamic class grass19 extends Sound {
}
}//package
Section 57
//grass20 (grass20)
package {
import flash.media.*;
public dynamic class grass20 extends Sound {
}
}//package
Section 58
//grass21 (grass21)
package {
import flash.media.*;
public dynamic class grass21 extends Sound {
}
}//package
Section 59
//grass22 (grass22)
package {
import flash.media.*;
public dynamic class grass22 extends Sound {
}
}//package
Section 60
//grass23 (grass23)
package {
import flash.media.*;
public dynamic class grass23 extends Sound {
}
}//package
Section 61
//grass24 (grass24)
package {
import flash.media.*;
public dynamic class grass24 extends Sound {
}
}//package
Section 62
//grass25 (grass25)
package {
import flash.media.*;
public dynamic class grass25 extends Sound {
}
}//package
Section 63
//grass26 (grass26)
package {
import flash.media.*;
public dynamic class grass26 extends Sound {
}
}//package
Section 64
//grass27 (grass27)
package {
import flash.media.*;
public dynamic class grass27 extends Sound {
}
}//package
Section 65
//grass28 (grass28)
package {
import flash.media.*;
public dynamic class grass28 extends Sound {
}
}//package
Section 66
//grass29 (grass29)
package {
import flash.media.*;
public dynamic class grass29 extends Sound {
}
}//package
Section 67
//grass30 (grass30)
package {
import flash.media.*;
public dynamic class grass30 extends Sound {
}
}//package
Section 68
//grass31 (grass31)
package {
import flash.media.*;
public dynamic class grass31 extends Sound {
}
}//package
Section 69
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("core.mochibot.com");
Security.allowInsecureDomain("core.mochibot.com");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 70
//MuziekNeutraal1 (MuziekNeutraal1)
package {
import flash.media.*;
public dynamic class MuziekNeutraal1 extends Sound {
}
}//package
Section 71
//MuziekNeutraal2 (MuziekNeutraal2)
package {
import flash.media.*;
public dynamic class MuziekNeutraal2 extends Sound {
}
}//package
Section 72
//MuziekNeutraal3 (MuziekNeutraal3)
package {
import flash.media.*;
public dynamic class MuziekNeutraal3 extends Sound {
}
}//package
Section 73
//MuziekNeutraal4 (MuziekNeutraal4)
package {
import flash.media.*;
public dynamic class MuziekNeutraal4 extends Sound {
}
}//package
Section 74
//neut1 (neut1)
package {
import flash.media.*;
public dynamic class neut1 extends Sound {
}
}//package
Section 75
//neut10 (neut10)
package {
import flash.media.*;
public dynamic class neut10 extends Sound {
}
}//package
Section 76
//neut2 (neut2)
package {
import flash.media.*;
public dynamic class neut2 extends Sound {
}
}//package
Section 77
//neut3 (neut3)
package {
import flash.media.*;
public dynamic class neut3 extends Sound {
}
}//package
Section 78
//neut4 (neut4)
package {
import flash.media.*;
public dynamic class neut4 extends Sound {
}
}//package
Section 79
//neut5 (neut5)
package {
import flash.media.*;
public dynamic class neut5 extends Sound {
}
}//package
Section 80
//neut6 (neut6)
package {
import flash.media.*;
public dynamic class neut6 extends Sound {
}
}//package
Section 81
//neut7 (neut7)
package {
import flash.media.*;
public dynamic class neut7 extends Sound {
}
}//package
Section 82
//neut8 (neut8)
package {
import flash.media.*;
public dynamic class neut8 extends Sound {
}
}//package
Section 83
//neut9 (neut9)
package {
import flash.media.*;
public dynamic class neut9 extends Sound {
}
}//package
Section 84
//Obstacle (Obstacle)
package {
import flash.display.*;
public class Obstacle extends MovieClip {
public function Obstacle(_arg1:uint){
gotoAndStop(_arg1);
}
}
}//package
Section 85
//PacFlock (PacFlock)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
import flash.filters.*;
public class PacFlock extends MovieClip {
public var nextLevelButton:SimpleButton;
public var playAgainButton1:SimpleButton;
public var endTimer:Timer;
public var startButton:SimpleButton;
public var toggle:ToggleControl;
public var endGame:Sprite;
var scale:Number;// = 0.5
public var levelNo:TextField;
public var playAgainButton:SimpleButton;
public static var level:uint;
public static var dificulty:Number = 3;
public static var dots:Sprite;
public static var maxWulfSpeed:Number;
public static var sound:soundtrack;
public static var obstacle:Sprite;
public static var deadSheep:Sprite;
public static var control:Boolean = true;
public static var pacFlock:Sprite;
public static var player:Player;
public static var enemies:Sprite;
public static var chase:Boolean;
public static var chaseTimer:uint;
public static var maxChaseTimer:uint;
public function PacFlock(){
scale = 0.5;
super();
addFrameScript(0, frame1, 1, frame2, 25, frame26, 38, frame39, 51, frame52, 53, frame54, 57, frame58, 64, frame65, 993, frame994);
}
public function destroy(_arg1:DisplayObject):void{
var kill = _arg1;
try {
removeChild(kill);
} catch(e:Error) {
};
}
function frame65(){
levelNo.text = String((PacFlock.level + 1));
stop();
}
function untiltRight(_arg1:Event):void{
player.rightArrow = false;
}
public function deadPacman(_arg1:Enemy, _arg2:Pacman):void{
var _local3:DyingSheep;
sound.deadSheep();
_arg1.dirx = (_arg1.dirx * -1);
_arg1.diry = (_arg1.diry * -1);
_local3 = new DyingSheep(_arg2.x, _arg2.y, _arg2.scaleX, _arg2.rotation);
deadSheep.addChild(_local3);
_arg2.removeSelf();
}
function untiltUp(_arg1:Event):void{
player.upArrow = false;
}
public function againKey1(_arg1:KeyboardEvent){
if (((((((!((_arg1.keyCode == Keyboard.UP))) && (!((_arg1.keyCode == Keyboard.DOWN))))) && (!((_arg1.keyCode == Keyboard.LEFT))))) && (!((_arg1.keyCode == Keyboard.RIGHT))))){
removeEventListener(KeyboardEvent.KEY_DOWN, againKey1);
gotoAndStop("play");
};
}
function tiltUp(_arg1:Event):void{
player.upArrow = true;
player.downArrow = false;
}
public function newPacman(_arg1:uint, _arg2:uint):void{
var _local3:Pacman;
_local3 = new Pacman(_arg1, _arg2);
pacFlock.addChild(_local3);
}
public function endEndFader(_arg1:TimerEvent):void{
destroy(endGame);
}
function tiltRight(_arg1:Event):void{
player.rightArrow = true;
player.leftArrow = false;
}
public function nextLevel(_arg1:KeyboardEvent){
if (((((((!((_arg1.keyCode == Keyboard.UP))) && (!((_arg1.keyCode == Keyboard.DOWN))))) && (!((_arg1.keyCode == Keyboard.LEFT))))) && (!((_arg1.keyCode == Keyboard.RIGHT))))){
removeEventListener(KeyboardEvent.KEY_DOWN, nextLevel);
PacFlock.level++;
gotoAndStop("play");
};
}
public function endFader(_arg1:TimerEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:BlurFilter;
var _local5:Array;
_local2 = (endTimer.currentCount / endTimer.repeatCount);
if (_local2 > 0.2){
endGame.alpha = (endGame.alpha - 0.05);
_local3 = (_local2 * 2);
_local4 = new BlurFilter(_local3, _local3);
_local5 = new Array();
_local5.push(_local4);
endGame.filters = _local5;
};
}
function tiltLeft(_arg1:Event):void{
player.leftArrow = true;
player.rightArrow = false;
}
function frame26(){
stop();
newGame();
}
function frame1(){
}
public function deadEnemy(_arg1:Enemy):void{
_arg1.dyingEnemy();
deadSheep.addChild(_arg1);
sound.deadWulf();
}
public function addOneEnemy():void{
var _local1:uint;
var _local2:uint;
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Enemy;
_local1 = (stage.stageWidth / 2);
_local2 = (stage.stageHeight / 2);
_local3 = new Point(_local1, _local2);
_local4 = new Point(player.x, player.y);
_local5 = _local3.subtract(_local4);
if ((_local5.x + _local5.y) > 0){
if (_local5.x > _local5.y){
newWulf(stage.stageWidth, (_local5.y + _local2));
} else {
newWulf((_local5.x + _local1), stage.stageHeight);
};
} else {
if (_local5.x > _local5.y){
newWulf((_local5.x + _local1), 0);
} else {
newWulf(0, (_local5.y + _local2));
};
};
}
public function playerWins():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:MovieClip;
removeEventListener(Event.ENTER_FRAME, checkCaught);
endGame = new Sprite();
_local1 = (pacFlock.numChildren - 1);
while (_local1 >= 0) {
_local4 = MovieClip(pacFlock.getChildAt(_local1));
_local4.stop();
_local4.removeSelf();
endGame.addChild(_local4);
_local1--;
};
_local2 = (enemies.numChildren - 1);
while (_local2 >= 0) {
Enemy(enemies.getChildAt(_local2)).removeSelf();
_local2--;
};
_local3 = (deadSheep.numChildren - 1);
while (_local3 >= 0) {
MovieClip(deadSheep.getChildAt(_local3)).removeSelf();
_local3--;
};
destroy(deadSheep);
destroy(dots);
destroy(pacFlock);
destroy(enemies);
destroy(obstacle);
addChild(endGame);
gotoAndPlay("playerWins");
sound.playerWins();
startEndFader();
}
public function again(_arg1:MouseEvent){
gotoAndStop("play");
}
function frame39(){
stop();
playAgainButton1.addEventListener(MouseEvent.CLICK, again1);
addEventListener(KeyboardEvent.KEY_DOWN, againKey1);
}
function untiltDown(_arg1:Event):void{
player.downArrow = false;
}
public function grassPlant(_arg1:MovieClip){
var _local2:uint;
_local2 = 0;
while (_local2 < obstacle.numChildren) {
if (_arg1.hitTestObject(obstacle.getChildAt(_local2))){
dots.removeChild(_arg1);
return;
};
_local2++;
};
}
public function checkCaught(_arg1:Event):void{
var _local2:int;
var _local3:int;
if ((getTimer() - chaseTimer) > maxChaseTimer){
chase = false;
};
if (((!(chase)) && ((enemies.numChildren == 0)))){
addOneEnemy();
};
if (dots.numChildren == 0){
playerWins();
};
_local2 = (enemies.numChildren - 1);
while (_local2 >= 0) {
_local3 = (pacFlock.numChildren - 1);
while (_local3 >= 0) {
if (hitTest(MovieClip(enemies.getChildAt(_local2)), player)){
if (!chase){
gameOver(Enemy(enemies.getChildAt(_local2)));
break;
} else {
deadEnemy(Enemy(enemies.getChildAt(_local2)));
if (enemies.numChildren == 0){
sound.wulvesDead();
};
break;
};
} else {
if (hitTest(MovieClip(enemies.getChildAt(_local2)), MovieClip(pacFlock.getChildAt(_local3)))){
if (!chase){
deadPacman(Enemy(enemies.getChildAt(_local2)), Pacman(pacFlock.getChildAt(_local3)));
break;
} else {
deadEnemy(Enemy(enemies.getChildAt(_local2)));
if (enemies.numChildren == 0){
sound.wulvesDead();
};
break;
};
};
};
_local3--;
};
_local2--;
};
}
public function newGame():void{
var _local1:Enemy;
while (this.numChildren > 0) {
this.removeChildAt(0);
};
maxChaseTimer = Math.max((6000 - (1000 * Math.floor((level / 3)))), 4000);
chase = false;
pacFlock = new Sprite();
enemies = new Sprite();
dots = new Sprite();
deadSheep = new Sprite();
player = new Player((stage.stageWidth / 2), (stage.stageHeight / 2));
pacFlock.addChild(player);
sound = new soundtrack();
sound.neutralMusic();
newLevel();
_local1 = new Enemy(stage.stageWidth, (stage.stageHeight / 2));
enemies.addChild(_local1);
addChild(dots);
addChild(pacFlock);
addChild(enemies);
addChild(deadSheep);
addEventListener(KeyboardEvent.KEY_UP, keyReleased);
addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
addEventListener(Event.ENTER_FRAME, checkCaught);
}
public function clickStart(_arg1:MouseEvent){
play();
MochiBot.track(this, "bece7f6e");
PacFlock.level = 1;
}
public function hitTest(_arg1:MovieClip, _arg2:MovieClip):Boolean{
var _local3:Point;
var _local4:Point;
var _local5:Point;
var _local6:Boolean;
if (_arg1.hitTestObject(_arg2)){
_local3 = new Point(_arg1.x, _arg1.y);
_local4 = new Point(_arg2.x, _arg2.y);
_local5 = Point.interpolate(_local3, _local4, 0.5);
_local6 = ((_arg1.hitTestPoint(_local5.x, _local5.y, true)) && (_arg2.hitTestPoint(_local5.x, _local5.y, true)));
return (_local6);
};
return (false);
}
function frame54(){
if (PacFlock.level == 10){
gotoAndPlay("winner");
};
nextLevelButton.addEventListener(MouseEvent.CLICK, clickPlayNext);
addEventListener(KeyboardEvent.KEY_DOWN, nextLevel);
}
function frame58(){
levelNo.text = String((PacFlock.level + 1));
}
public function again1(_arg1:MouseEvent){
gotoAndStop("play");
}
function keyPressed(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.RIGHT:
player.rightArrow = true;
break;
case Keyboard.LEFT:
player.leftArrow = true;
break;
case Keyboard.UP:
player.upArrow = true;
break;
case Keyboard.DOWN:
player.downArrow = true;
break;
default:
break;
};
}
function newLevel():void{
var _local1:Number;
var _local2:uint;
var _local3:uint;
var _local4:MovieClip;
obstacle = null;
obstacle = new Obstacle(level);
obstacle.x = (stage.stageWidth / 2);
obstacle.y = (stage.stageHeight / 2);
addChild(obstacle);
_local1 = (50 * scale);
_local2 = _local1;
while (_local2 < stage.stageWidth) {
_local3 = _local1;
while (_local3 < stage.stageHeight) {
if ((((((_local2 == _local1)) || ((_local2 == (stage.stageWidth - _local1))))) && ((((_local3 == _local1)) || ((_local3 == (stage.stageHeight - _local1))))))){
_local4 = new Special(_local2, _local3, scale);
dots.addChild(_local4);
grassPlant(_local4);
} else {
if (Math.random() < 5){
_local4 = new Grass(_local2, _local3, scale);
dots.addChild(_local4);
grassPlant(_local4);
};
};
_local3 = (_local3 + _local1);
};
_local2 = (_local2 + _local1);
};
}
function keyReleased(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.RIGHT:
player.rightArrow = false;
break;
case Keyboard.LEFT:
player.leftArrow = false;
break;
case Keyboard.UP:
player.upArrow = false;
break;
case Keyboard.DOWN:
player.downArrow = false;
break;
default:
break;
};
}
function frame52(){
stop();
playAgainButton.addEventListener(MouseEvent.CLICK, again);
addEventListener(KeyboardEvent.KEY_DOWN, againKey);
}
function frame994(){
gotoAndPlay("boringLoop");
}
public function startEndFader():void{
endTimer = new Timer(100, 30);
endTimer.addEventListener(TimerEvent.TIMER, endFader);
endTimer.addEventListener(TimerEvent.TIMER_COMPLETE, endEndFader);
endTimer.start();
}
public function againKey(_arg1:KeyboardEvent){
if (((((((!((_arg1.keyCode == Keyboard.UP))) && (!((_arg1.keyCode == Keyboard.DOWN))))) && (!((_arg1.keyCode == Keyboard.LEFT))))) && (!((_arg1.keyCode == Keyboard.RIGHT))))){
removeEventListener(KeyboardEvent.KEY_DOWN, againKey);
gotoAndStop("play");
};
}
function frame2(){
startButton.addEventListener(MouseEvent.CLICK, clickStart);
stop();
}
public function gameOver(_arg1:Enemy):void{
var _local2:int;
var _local3:int;
var _local4:int;
removeEventListener(Event.ENTER_FRAME, checkCaught);
endGame = new Sprite();
player.removeSelf();
_arg1.removeSelf();
_local2 = (pacFlock.numChildren - 1);
while (_local2 >= 0) {
Pacman(pacFlock.getChildAt(_local2)).removeSelf();
_local2--;
};
_local3 = (enemies.numChildren - 1);
while (_local3 >= 0) {
Enemy(enemies.getChildAt(_local3)).removeSelf();
_local3--;
};
_local4 = (deadSheep.numChildren - 1);
while (_local4 >= 0) {
MovieClip(deadSheep.getChildAt(_local4)).removeSelf();
_local4--;
};
destroy(deadSheep);
destroy(dots);
destroy(pacFlock);
destroy(enemies);
destroy(obstacle);
player.stop();
_arg1.stop();
endGame.addChild(player);
endGame.addChild(_arg1);
addChild(endGame);
sound.playerDies();
if (level > 1){
gotoAndPlay("gameOver");
} else {
gotoAndPlay("gameOver1");
};
startEndFader();
}
public function clickPlayNext(_arg1:MouseEvent){
PacFlock.level++;
gotoAndStop("play");
}
function untiltLeft(_arg1:Event):void{
player.leftArrow = false;
}
function tiltDown(_arg1:Event):void{
player.downArrow = true;
player.upArrow = false;
}
public static function newWulf(_arg1:uint, _arg2:uint, _arg3:Number=0.5, _arg4:Number=0):void{
var _local5:Enemy;
_local5 = new Enemy(_arg1, _arg2, _arg3, _arg4);
enemies.addChild(_local5);
}
}
}//package
Section 86
//Pacman (Pacman)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.ui.*;
public class Pacman extends BasePacman {
var lastChase:Boolean;
var followPlayerFactor:uint;// = 40
public function Pacman(_arg1:Number, _arg2:Number){
followPlayerFactor = 40;
super();
addFrameScript(15, frame16, 31, frame32);
x = _arg1;
y = _arg2;
addEventListener(Event.ENTER_FRAME, render);
scaleX = startSize;
scaleY = (looksLeft) ? startSize : (-1 * startSize);
dirx = 0;
diry = 0;
noDots = 0;
lastChase = PacFlock.chase;
if (PacFlock.chase){
gotoAndPlay(17);
} else {
gotoAndPlay(1);
};
PacFlock.sound.newSheep();
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener(Event.ENTER_FRAME, render);
}
function frame16(){
gotoAndPlay(1);
}
public function render(_arg1:Event):void{
var _local2:Point;
flocking();
_local2 = followPlayer();
dirx = (dirx + (((v1.x + v2.x) + v3.x) + _local2.x));
diry = (diry + (((v1.y + v2.y) + v3.y) + _local2.y));
dotEat();
walk();
turn();
regenerate();
if (PacFlock.chase != lastChase){
if (PacFlock.chase){
gotoAndPlay(17);
} else {
gotoAndPlay(1);
};
};
lastChase = PacFlock.chase;
}
function frame32(){
gotoAndPlay(17);
}
function followPlayer():Point{
var _local1:Point;
var _local2:Point;
var _local3:Point;
_local1 = new Point(PacFlock.player.x, PacFlock.player.y);
_local3 = new Point(x, y);
_local2 = _local1.subtract(_local3);
_local2.normalize((_local2.length / followPlayerFactor));
return (_local2);
}
}
}//package
Section 87
//Player (Player)
package {
import flash.events.*;
import flash.display.*;
public class Player extends BasePacman {
var lastChase:Boolean;
var upArrow:Boolean;
var downArrow:Boolean;
var rightArrow:Boolean;
public var body:MovieClip;
var leftArrow:Boolean;
var switchSteering:Boolean;
public function Player(_arg1:uint, _arg2:uint){
addFrameScript(14, frame15, 27, frame28);
this.x = _arg1;
this.y = _arg2;
dirx = 0;
diry = 0;
noDots = 0;
scaleX = startSize;
scaleY = startSize;
leftArrow = false;
rightArrow = false;
upArrow = false;
downArrow = false;
switchSteering = !(PacFlock.control);
lastChase = PacFlock.chase;
addEventListener(Event.ENTER_FRAME, renderPlayer);
}
public function removeSelf():void{
parent.removeChild(this);
this.removeEventListener(Event.ENTER_FRAME, renderPlayer);
}
public function renderPlayer(_arg1:Event){
acceleration();
dotEat();
regenerate();
if (PacFlock.chase != lastChase){
if (PacFlock.chase){
gotoAndPlay(16);
} else {
gotoAndPlay(1);
};
if (PacFlock.chase){
this.maxSpeed = 10;
} else {
this.maxSpeed = 8;
};
};
lastChase = PacFlock.chase;
}
function moveBack(){
var _local1:Number;
var _local2:Number;
_local1 = (maxSpeed * 0.5);
_local2 = ((2 * Math.PI) * (rotation / 360));
dirx = ((_local1 * Math.cos(_local2)) * -1);
diry = ((_local1 * Math.sin(_local2)) * -1);
walk();
}
function frame15(){
gotoAndPlay(1);
}
function acceleration():void{
var _local1:Number;
if (switchSteering){
if (leftArrow){
dirx = (dirx - 2);
};
if (rightArrow){
dirx = (dirx + 2);
};
if (((!(leftArrow)) && (!(rightArrow)))){
dirx = (dirx * 0.7);
};
if (upArrow){
diry = (diry - 2);
};
if (downArrow){
diry = (diry + 2);
};
if (((!(upArrow)) && (!(downArrow)))){
diry = (diry * 0.7);
};
if (((((((leftArrow) || (rightArrow))) || (upArrow))) || (downArrow))){
_local1 = Math.atan2(diry, dirx);
rotation = ((_local1 * 180) / Math.PI);
};
walk();
} else {
if (leftArrow){
rotation = (rotation - (PacFlock.chase) ? 12 : 8);
};
if (rightArrow){
rotation = (rotation + (PacFlock.chase) ? 12 : 8);
};
if (upArrow){
moveForward();
};
if (downArrow){
moveBack();
};
};
}
function moveForward(){
var _local1:Number;
var _local2:Number;
_local1 = maxSpeed;
_local2 = ((2 * Math.PI) * (rotation / 360));
dirx = (_local1 * Math.cos(_local2));
diry = (_local1 * Math.sin(_local2));
walk();
}
function frame28(){
gotoAndPlay(16);
}
}
}//package
Section 88
//sd_veelwolvendichtbij1 (sd_veelwolvendichtbij1)
package {
import flash.media.*;
public dynamic class sd_veelwolvendichtbij1 extends Sound {
}
}//package
Section 89
//sd_veelwolvendichtbij2 (sd_veelwolvendichtbij2)
package {
import flash.media.*;
public dynamic class sd_veelwolvendichtbij2 extends Sound {
}
}//package
Section 90
//sd_veelwolvenverweg1 (sd_veelwolvenverweg1)
package {
import flash.media.*;
public dynamic class sd_veelwolvenverweg1 extends Sound {
}
}//package
Section 91
//sd_veelwolvenverweg2 (sd_veelwolvenverweg2)
package {
import flash.media.*;
public dynamic class sd_veelwolvenverweg2 extends Sound {
}
}//package
Section 92
//sd_weinigwolvendichtbij1 (sd_weinigwolvendichtbij1)
package {
import flash.media.*;
public dynamic class sd_weinigwolvendichtbij1 extends Sound {
}
}//package
Section 93
//sd_weinigwolvendichtbij2 (sd_weinigwolvendichtbij2)
package {
import flash.media.*;
public dynamic class sd_weinigwolvendichtbij2 extends Sound {
}
}//package
Section 94
//sd_weinigwolvenverweg1 (sd_weinigwolvenverweg1)
package {
import flash.media.*;
public dynamic class sd_weinigwolvenverweg1 extends Sound {
}
}//package
Section 95
//sd_weinigwolvenverweg2 (sd_weinigwolvenverweg2)
package {
import flash.media.*;
public dynamic class sd_weinigwolvenverweg2 extends Sound {
}
}//package
Section 96
//sheepborn (sheepborn)
package {
import flash.media.*;
public dynamic class sheepborn extends Sound {
}
}//package
Section 97
//sheepdie (sheepdie)
package {
import flash.media.*;
public dynamic class sheepdie extends Sound {
}
}//package
Section 98
//soundtrack (soundtrack)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.utils.*;
public class soundtrack {
var SDSheep;
var noRepSS_SD:uint;// = 3
var noRepWulfDead:uint;// = 4
var noRepSup:uint;// = 11
var musicChannel;
var noRepEnd:uint;// = 12
var playCheck:Boolean;
var noRepCol:uint;// = 17
var SDWulf;
var noRepNeut:uint;// = 8
var SDneutral:SoundChannel;
var secondSuper;
var fadeTime;
var SDNeutTime:Timer;
var superTime;
var noRepGrass:uint;// = 4
public function soundtrack(){
noRepNeut = 8;
noRepSup = 11;
noRepEnd = 12;
noRepWulfDead = 4;
noRepGrass = 4;
noRepCol = 17;
noRepSS_SD = 3;
super();
superTime = new Timer(1);
playCheck = true;
}
public function endMusic():void{
var _local1:uint;
var _local2:Sound;
_local1 = noRepeat(noRepEnd, 10);
noRepEnd = _local1;
}
public function wulvesDead(){
var _local1:SoundTransform;
_local1 = new SoundTransform(0);
SDWulf.soundTransform = _local1;
_local1 = new SoundTransform(1);
SDSheep.soundTransform = _local1;
}
public function newSheep():void{
var _local1:Sound;
var _local2:SoundChannel;
_local1 = new sheepborn();
_local2 = _local1.play();
}
public function playerWins():void{
clearChannels();
}
public function neutralMusic():void{
var _local1:uint;
var _local2:Sound;
if (!playCheck){
return;
};
_local1 = noRepeat(noRepNeut, 4);
noRepNeut = _local1;
switch (_local1){
case 1:
_local2 = new MuziekNeutraal1();
break;
case 2:
_local2 = new MuziekNeutraal2();
break;
case 3:
_local2 = new MuziekNeutraal3();
break;
case 4:
_local2 = new MuziekNeutraal4();
break;
};
musicChannel = _local2.play();
musicChannel.addEventListener(Event.SOUND_COMPLETE, neutralAgain);
SDNeutTime = new Timer(2500, 1);
SDNeutTime.addEventListener(TimerEvent.TIMER_COMPLETE, neutralSD);
SDNeutTime.start();
}
public function newWulf():void{
var _local1:Sound;
var _local2:SoundChannel;
_local1 = new wolfborn();
_local2 = _local1.play();
}
public function collision():void{
var _local1:*;
var _local2:Sound;
var _local3:SoundChannel;
_local1 = noRepeat(noRepCol, 16);
noRepCol = _local1;
switch (_local1){
case 1:
_local2 = new collision1();
break;
case 2:
_local2 = new collision2();
break;
case 3:
_local2 = new collision3();
break;
case 4:
_local2 = new collision4();
break;
case 5:
_local2 = new collision5();
break;
case 6:
_local2 = new collision6();
break;
case 7:
_local2 = new collision7();
break;
case 8:
_local2 = new collision8();
break;
case 9:
_local2 = new collision9();
break;
case 10:
_local2 = new collision10();
break;
case 11:
_local2 = new collision11();
break;
case 12:
_local2 = new collision12();
break;
case 13:
_local2 = new collision13();
break;
case 14:
_local2 = new collision14();
break;
case 15:
_local2 = new collision15();
break;
case 16:
_local2 = new collision16();
break;
};
_local3 = _local2.play();
}
public function switchSound(_arg1:TimerEvent){
var _local2:SoundTransform;
musicChannel.stop();
musicChannel = secondSuper;
_local2 = new SoundTransform();
musicChannel.soundTransform = _local2;
}
public function clearChannels():void{
playCheck = false;
if (SDneutral != null){
SDneutral.stop();
};
if (((!((SDNeutTime == null))) && (SDNeutTime.running))){
SDNeutTime.stop();
};
if (SDWulf != null){
SDWulf.stop();
};
if (musicChannel != null){
musicChannel.stop();
};
if (secondSuper != null){
secondSuper.stop();
};
if (((!((superTime == null))) && (superTime.running))){
superTime.stop();
};
}
public function eatGrass():void{
var _local1:uint;
var _local2:Sound;
var _local3:SoundChannel;
_local1 = noRepeat(noRepGrass, 31);
noRepGrass = _local1;
switch (_local1){
case 1:
_local2 = new grass01();
break;
case 2:
_local2 = new grass02();
break;
case 3:
_local2 = new grass03();
break;
case 4:
_local2 = new grass04();
break;
case 5:
_local2 = new grass05();
break;
case 6:
_local2 = new grass06();
break;
case 7:
_local2 = new grass07();
break;
case 8:
_local2 = new grass08();
break;
case 9:
_local2 = new grass09();
break;
case 10:
_local2 = new grass10();
break;
case 11:
_local2 = new grass11();
break;
case 12:
_local2 = new grass12();
break;
case 13:
_local2 = new grass13();
break;
case 14:
_local2 = new grass14();
break;
case 15:
_local2 = new grass15();
break;
case 16:
_local2 = new grass16();
break;
case 17:
_local2 = new grass17();
break;
case 18:
_local2 = new grass18();
break;
case 19:
_local2 = new grass19();
break;
case 20:
_local2 = new grass20();
break;
case 21:
_local2 = new grass21();
break;
case 22:
_local2 = new grass22();
break;
case 23:
_local2 = new grass23();
break;
case 24:
_local2 = new grass24();
break;
case 25:
_local2 = new grass25();
break;
case 26:
_local2 = new grass26();
break;
case 27:
_local2 = new grass27();
break;
case 28:
_local2 = new grass28();
break;
case 29:
_local2 = new grass29();
break;
case 30:
_local2 = new grass30();
break;
case 31:
_local2 = new grass31();
break;
};
_local3 = _local2.play();
}
public function noRepeat(_arg1:uint, _arg2:uint):uint{
var _local3:uint;
_local3 = Math.ceil((Math.random() * _arg2));
while (_local3 == _arg1) {
_local3 = Math.ceil((Math.random() * _arg2));
};
return (_local3);
}
public function deadSheep():void{
var _local1:Sound;
var _local2:SoundChannel;
_local1 = new sheepdie();
_local2 = _local1.play();
}
public function neutralSD(_arg1:TimerEvent):void{
var _local2:Sprite;
var _local3:Boolean;
var _local4:Point;
var _local5:Point;
var _local6:uint;
var _local7:Boolean;
var _local8:Sound;
var _local9:Point;
if (!playCheck){
return;
};
_local2 = PacFlock.enemies;
_local3 = (_local2.numChildren >= PacFlock.pacFlock.numChildren);
_local4 = new Point(PacFlock.player.x, PacFlock.player.y);
_local5 = new Point(-1000, -1000);
_local6 = 0;
while (_local6 < _local2.numChildren) {
_local9 = new Point(_local2.getChildAt(_local6).x, _local2.getChildAt(_local6).y);
if (Point.distance(_local4, _local5) > Point.distance(_local4, _local9)){
_local5 = _local9.clone();
};
_local6++;
};
_local7 = (Point.distance(_local4, _local9) < 200);
if (_local3){
if (_local7){
if (Math.random() < 0.5){
_local8 = new sd_veelwolvendichtbij1();
} else {
_local8 = new sd_veelwolvendichtbij2();
};
} else {
if (Math.random() < 0.5){
_local8 = new sd_veelwolvenverweg1();
} else {
_local8 = new sd_veelwolvenverweg2();
};
};
} else {
if (_local7){
if (Math.random() < 0.5){
_local8 = new sd_weinigwolvendichtbij1();
} else {
_local8 = new sd_weinigwolvendichtbij2();
};
} else {
if (Math.random() < 0.5){
_local8 = new sd_weinigwolvenverweg1();
} else {
_local8 = new sd_weinigwolvenverweg1();
};
};
};
SDneutral = _local8.play();
}
public function neutralAgain(_arg1:Event):void{
neutralMusic();
}
public function deadWulf():void{
var _local1:uint;
var _local2:Sound;
var _local3:SoundChannel;
_local1 = noRepeat(noRepWulfDead, 3);
noRepWulfDead = _local1;
switch (_local1){
case 1:
_local2 = new wolfdie();
break;
case 2:
_local2 = new wolfdie2();
break;
case 3:
_local2 = new wolfdie3();
break;
};
_local3 = _local2.play();
}
public function endSuper(_arg1:TimerEvent):void{
var _local2:Sound;
if (SDWulf != null){
SDWulf.stop();
};
SDSheep.stop();
_local2 = new ssStopt();
musicChannel.stop();
musicChannel = _local2.play(0, 0, new SoundTransform());
musicChannel.addEventListener(Event.SOUND_COMPLETE, neutralAgain);
}
public function superMusic(_arg1:uint):void{
var _local2:uint;
var _local3:Sound;
var _local4:Sound;
var _local5:SoundTransform;
var _local6:Sound;
var _local7:SoundTransform;
if (!playCheck){
return;
};
SDNeutTime.stop();
SDNeutTime.removeEventListener(TimerEvent.TIMER_COMPLETE, neutralSD);
if (SDneutral != null){
SDneutral.stop();
};
_local2 = noRepeat(noRepSup, 10);
noRepSup = _local2;
switch (_local2){
case 1:
_local3 = new ssMuziek1();
break;
case 2:
_local3 = new ssMuziek2();
break;
case 3:
_local3 = new ssMuziek3();
break;
case 4:
_local3 = new ssMuziek4();
break;
case 5:
_local3 = new ssMuziek5();
break;
case 6:
_local3 = new ssMuziek6();
break;
case 7:
_local3 = new ssMuziek7();
break;
case 8:
_local3 = new ssMuziek8();
break;
case 9:
_local3 = new ssMuziek9();
break;
case 10:
_local3 = new ssMuziek10();
break;
};
if (PacFlock.chase){
_local5 = new SoundTransform(0);
secondSuper = _local3.play(0, 0, _local5);
fadeTime = new Timer(100, 10);
fadeTime.addEventListener(TimerEvent.TIMER, fade);
fadeTime.addEventListener(TimerEvent.TIMER_COMPLETE, switchSound);
fadeTime.start();
superTime.removeEventListener(TimerEvent.TIMER_COMPLETE, endSuper);
superTime.stop();
} else {
musicChannel.stop();
musicChannel = _local3.play();
};
_local4 = new bij_ss_muziek_nowolf();
if (PacFlock.enemies.numChildren > 0){
_local2 = noRepeat(noRepSS_SD, 2);
switch (_local2){
case 1:
_local6 = new bijSSmuz_bangewolf1();
break;
case 2:
_local6 = new bijSSmuz_bangewolf2();
break;
};
SDWulf = _local6.play();
_local7 = new SoundTransform(0);
SDSheep = _local4.play(0, 0, _local7);
} else {
SDSheep = _local4.play();
};
musicChannel.removeEventListener(Event.SOUND_COMPLETE, neutralAgain);
superTime = new Timer((_arg1 - 500), 1);
superTime.start();
superTime.addEventListener(TimerEvent.TIMER_COMPLETE, endSuper);
}
public function playerDies():void{
var _local1:Sound;
var _local2:SoundChannel;
var _local3:SoundTransform;
clearChannels();
if (SDSheep != null){
SDSheep.stop();
};
_local1 = new SpelerDood();
musicChannel.stop();
if (superTime.running){
superTime.stop();
};
_local2 = _local1.play();
_local3 = new SoundTransform(0.5);
_local2.soundTransform = _local3;
}
public function fade(_arg1:TimerEvent){
var _local2:Number;
var _local3:SoundTransform;
var _local4:SoundTransform;
_local2 = (fadeTime.currentCount / fadeTime.repeatCount);
_local3 = new SoundTransform(_local2);
_local4 = new SoundTransform((1 - _local2));
secondSuper.soundTransform = _local3;
musicChannel.soundTransform = _local4;
}
}
}//package
Section 99
//Special (Special)
package {
import flash.display.*;
public class Special extends MovieClip {
public function Special(_arg1:uint=0, _arg2:uint=0, _arg3:Number=2){
x = _arg1;
y = _arg2;
scaleX = ((Math.random() < 0.5)) ? -(_arg3) : _arg3;
scaleY = _arg3;
gotoAndPlay(Math.floor((Math.random() * 20)));
}
}
}//package
Section 100
//SpelerDood (SpelerDood)
package {
import flash.media.*;
public dynamic class SpelerDood extends Sound {
}
}//package
Section 101
//ssMuziek1 (ssMuziek1)
package {
import flash.media.*;
public dynamic class ssMuziek1 extends Sound {
}
}//package
Section 102
//ssMuziek10 (ssMuziek10)
package {
import flash.media.*;
public dynamic class ssMuziek10 extends Sound {
}
}//package
Section 103
//ssMuziek2 (ssMuziek2)
package {
import flash.media.*;
public dynamic class ssMuziek2 extends Sound {
}
}//package
Section 104
//ssMuziek3 (ssMuziek3)
package {
import flash.media.*;
public dynamic class ssMuziek3 extends Sound {
}
}//package
Section 105
//ssMuziek4 (ssMuziek4)
package {
import flash.media.*;
public dynamic class ssMuziek4 extends Sound {
}
}//package
Section 106
//ssMuziek5 (ssMuziek5)
package {
import flash.media.*;
public dynamic class ssMuziek5 extends Sound {
}
}//package
Section 107
//ssMuziek6 (ssMuziek6)
package {
import flash.media.*;
public dynamic class ssMuziek6 extends Sound {
}
}//package
Section 108
//ssMuziek7 (ssMuziek7)
package {
import flash.media.*;
public dynamic class ssMuziek7 extends Sound {
}
}//package
Section 109
//ssMuziek8 (ssMuziek8)
package {
import flash.media.*;
public dynamic class ssMuziek8 extends Sound {
}
}//package
Section 110
//ssMuziek9 (ssMuziek9)
package {
import flash.media.*;
public dynamic class ssMuziek9 extends Sound {
}
}//package
Section 111
//ssStopt (ssStopt)
package {
import flash.media.*;
public dynamic class ssStopt extends Sound {
}
}//package
Section 112
//ToggleControl (ToggleControl)
package {
import flash.display.*;
import flash.text.*;
public class ToggleControl extends MovieClip {
public var explain:TextField;
public var ArcadeBtn:ControlToggleBtn;
public var NormalBtn:ControlToggleBtn;
public function ToggleControl(){
explain.text = "";
if (PacFlock.control){
this.NormalBtn.gotoAndStop("out");
NormalBtn.act = true;
this.ArcadeBtn.gotoAndStop("inactive");
ArcadeBtn.act = false;
} else {
this.ArcadeBtn.gotoAndStop("out");
NormalBtn.act = false;
this.NormalBtn.gotoAndStop("inactive");
ArcadeBtn.act = true;
};
}
public function initActive(_arg1:ControlToggleBtn):void{
if (PacFlock.control){
if (_arg1 == NormalBtn){
_arg1.gotoAndStop("out");
} else {
_arg1.gotoAndStop("inactive");
};
} else {
if (_arg1 == NormalBtn){
_arg1.gotoAndStop("inactive");
} else {
_arg1.gotoAndStop("out");
};
};
}
public function switchActive(_arg1:ControlToggleBtn){
var _local2:Boolean;
_local2 = ((_arg1)==NormalBtn) ? true : false;
PacFlock.control = _local2;
if (_local2){
ArcadeBtn.gotoAndStop("inactive");
ArcadeBtn.act = false;
explain.text = "Up to accelerate,\n Left & Right to steer";
} else {
NormalBtn.gotoAndStop("inactive");
NormalBtn.act = false;
explain.text = "Up to go up, Left \n to go left, etcetera";
};
}
public function explainText(_arg1:ControlToggleBtn):void{
}
}
}//package
Section 113
//wolfborn (wolfborn)
package {
import flash.media.*;
public dynamic class wolfborn extends Sound {
}
}//package
Section 114
//wolfdie (wolfdie)
package {
import flash.media.*;
public dynamic class wolfdie extends Sound {
}
}//package
Section 115
//wolfdie2 (wolfdie2)
package {
import flash.media.*;
public dynamic class wolfdie2 extends Sound {
}
}//package
Section 116
//wolfdie3 (wolfdie3)
package {
import flash.media.*;
public dynamic class wolfdie3 extends Sound {
}
}//package
Section 117
//WulfRightEye (WulfRightEye)
package {
import flash.display.*;
public dynamic class WulfRightEye extends MovieClip {
}
}//package