Section 1
//Kuzn_70 (SonicGarden_fla.Kuzn_70)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Kuzn_70 extends MovieClip {
public function Kuzn_70(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SonicGarden_fla
Section 2
//sprite1026_37 (SonicGarden_fla.sprite1026_37)
package SonicGarden_fla {
import flash.display.*;
public dynamic class sprite1026_37 extends MovieClip {
public function sprite1026_37(){
addFrameScript(22, frame23);
}
function frame23(){
gotoAndPlay(19);
}
}
}//package SonicGarden_fla
Section 3
//Symbol1_19 (SonicGarden_fla.Symbol1_19)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Symbol1_19 extends MovieClip {
public function Symbol1_19(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
}
}//package SonicGarden_fla
Section 4
//Symbol10g_64 (SonicGarden_fla.Symbol10g_64)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Symbol10g_64 extends MovieClip {
public function Symbol10g_64(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package SonicGarden_fla
Section 5
//Symbol11g_65 (SonicGarden_fla.Symbol11g_65)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Symbol11g_65 extends MovieClip {
public function Symbol11g_65(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package SonicGarden_fla
Section 6
//Symbol2_16 (SonicGarden_fla.Symbol2_16)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Symbol2_16 extends MovieClip {
public function Symbol2_16(){
addFrameScript(0, frame1, 4, frame5, 9, frame10, 14, frame15, 19, frame20, 24, frame25, 29, frame30, 34, frame35);
}
function frame25(){
gotoAndStop(1);
}
function frame15(){
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame5(){
gotoAndStop(1);
}
function frame30(){
gotoAndStop(1);
}
function frame20(){
gotoAndStop(1);
}
function frame10(){
gotoAndStop(1);
}
function frame35(){
gotoAndStop(1);
}
}
}//package SonicGarden_fla
Section 7
//Symbol3_17 (SonicGarden_fla.Symbol3_17)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Symbol3_17 extends MovieClip {
public function Symbol3_17(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SonicGarden_fla
Section 8
//Timeline_27 (SonicGarden_fla.Timeline_27)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Timeline_27 extends MovieClip {
public function Timeline_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SonicGarden_fla
Section 9
//Timeline_4 (SonicGarden_fla.Timeline_4)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Timeline_4 extends MovieClip {
public var pp:MovieClip;
public var ss:MovieClip;
public function Timeline_4(){
addFrameScript(0, frame1, 44, frame45, 69, frame70);
}
function frame1(){
stop();
}
function frame70(){
stop();
}
function frame45(){
stop();
}
}
}//package SonicGarden_fla
Section 10
//Timeline_41 (SonicGarden_fla.Timeline_41)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Timeline_41 extends MovieClip {
public function Timeline_41(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package SonicGarden_fla
Section 11
//Timeline_44 (SonicGarden_fla.Timeline_44)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Timeline_44 extends MovieClip {
public function Timeline_44(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package SonicGarden_fla
Section 12
//Timeline_7 (SonicGarden_fla.Timeline_7)
package SonicGarden_fla {
import flash.display.*;
public dynamic class Timeline_7 extends MovieClip {
public function Timeline_7(){
addFrameScript(0, frame1, 99, frame100);
}
function frame100(){
stop();
}
function frame1(){
stop();
}
}
}//package SonicGarden_fla
Section 13
//title_mc_20 (SonicGarden_fla.title_mc_20)
package SonicGarden_fla {
import flash.display.*;
public dynamic class title_mc_20 extends MovieClip {
public function title_mc_20(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SonicGarden_fla
Section 14
//Ant (Ant)
package {
import flash.display.*;
public class Ant extends Enemy {
public var body:MovieClip;
public var d:MovieClip;
public var u:MovieClip;
public function Ant(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 15
//Apple (Apple)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Apple extends MovieClip {
public var vx;
public var vy;
public var isMoveing:Boolean;// = true
public var dampCollision:Number;// = 0.7
public var numOfHit:int;// = 0
public var lmx;
public var lmy;
public var applehit:Sound;
public var Delete:Boolean;// = false
public static const dampK = 0.99;
public static const appleWidth = 5.5;
public static const gravK = 1;
public static const appleRadius = 2.75;
static var mcs = [];
private static var SW;
private static var SH;
public function Apple(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:String){
applehit = new hitpol();
super();
addFrameScript(0, frame1, 7, frame8);
SW = _arg1.stage.stageWidth;
SH = _arg1.stage.stageHeight;
x = _arg2;
y = (_arg3 - 40);
if (_arg4 == "lft"){
vx = -10;
vy = -25;
} else {
vx = 10;
vy = -25;
};
width = (appleRadius * 2);
height = (appleRadius * 2);
addEventListener(Event.ENTER_FRAME, this.moveBall);
mcs.push(this);
}
public function handleCollisions(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
if (isMoveing){
_local2 = (mcs.length - 1);
while (_local2 >= 1) {
if (((!((mcs[_local2] == null))) && ((mcs[_local2].Delete == false)))){
_local3 = mcs[_local2].x;
_local4 = mcs[_local2].y;
_local5 = (_local2 - 1);
while (_local5 >= 0) {
_local6 = (mcs[_local5].x - _local3);
_local7 = (mcs[_local5].y - _local4);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
if (_local8 < appleWidth){
_local9 = Math.sqrt(((mcs[_local2].vx * mcs[_local2].vx) + (mcs[_local2].vy * mcs[_local2].vy)));
_local10 = Math.sqrt(((mcs[_local5].vx * mcs[_local5].vx) + (mcs[_local5].vy * mcs[_local5].vy)));
mcs[_local5].vx = (((_local9 * _local6) / _local8) * dampCollision);
mcs[_local5].vy = (((_local9 * _local7) / _local8) * dampCollision);
mcs[_local2].vx = (-(((_local10 * _local6) / _local8)) * dampCollision);
mcs[_local2].vy = (-(((_local10 * _local7) / _local8)) * dampCollision);
};
_local5--;
};
};
_local2--;
};
};
}
function del(){
Delete = true;
removeEventListener(Event.ENTER_FRAME, this.moveBall);
SonicGarden.appleArray[SonicGarden.appleArray.indexOf(this)];
if (parent.contains(this)){
parent.removeChild(this);
};
}
function frame8(){
stop();
this.del();
}
function frame1(){
this.rotation++;
stop();
}
public function moveBall(_arg1:Event){
if (isMoveing){
vx = (vx * dampK);
vy = (vy * dampK);
this.rotation = (vx * -360);
if (dampCollision > 0){
vy = (vy + gravK);
};
if ((((((y + appleRadius) + vy) >= 340)) || ((((y - appleRadius) + vy) < 0)))){
if (dampCollision > 0){
numOfHit++;
applehit.play();
vy = (vy * -(dampCollision));
dampCollision = (dampCollision - 0.1);
} else {
y = 340;
};
};
if (int(y) >= 336){
this.alpha = (this.alpha - 0.1);
};
if (this.alpha <= 0){
del();
};
if ((((((x - appleRadius) + vx) <= 0)) || ((((x + appleRadius) + vx) >= SW)))){
numOfHit++;
applehit.play();
vx = (vx * -(dampCollision));
};
x = (x + vx);
y = (y + vy);
};
}
}
}//package
Section 16
//Bat (Bat)
package {
import flash.display.*;
public class Bat extends Enemy {
public var body:MovieClip;
public var d:MovieClip;
public var u:MovieClip;
public function Bat(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 17
//Bird (Bird)
package {
import flash.display.*;
public class Bird extends Enemy {
public var body:MovieClip;
public var d:MovieClip;
public var u:MovieClip;
public function Bird(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 18
//BirdKil (BirdKil)
package {
import flash.media.*;
public dynamic class BirdKil extends Sound {
}
}//package
Section 19
//bonpckup (bonpckup)
package {
import flash.media.*;
public dynamic class bonpckup extends Sound {
}
}//package
Section 20
//bonus (bonus)
package {
import flash.media.*;
public dynamic class bonus extends Sound {
}
}//package
Section 21
//Bonus (Bonus)
package {
import flash.media.*;
public dynamic class Bonus extends Sound {
}
}//package
Section 22
//Bullet (Bullet)
package {
import flash.display.*;
public class Bullet extends MovieClip {
public var Delete:Boolean;// = false
public function Bullet(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11);
}
public function del(){
Delete = true;
SonicGarden.bullets[SonicGarden.bullets.indexOf(this)] = null;
if (parent.contains(this)){
parent.removeChild(this);
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame11(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 23
//Enemy (Enemy)
package {
import flash.display.*;
import flash.events.*;
public class Enemy extends MovieClip {
private var fall_speed:Number;// = 0
private var speed:Number;
public var delay:int;
public var Delete:Boolean;// = false
public var time:int;// = 0
public var state:String;// = "fly"
public function Enemy(){
delay = int(((Math.random() * 100) + 50));
super();
speed = ((Math.random() * 1) + 1);
addEventListener(Event.ENTER_FRAME, moving);
}
private function checking():void{
if (this.x > 580){
this.x = -30;
} else {
if (this.x < -30){
this.x = 580;
};
};
}
public function del(){
Delete = true;
removeEventListener(Event.ENTER_FRAME, moving);
SonicGarden.enemyArray[SonicGarden.enemyArray.indexOf(this)] = null;
SonicGarden.EnemyNum--;
if (parent.contains(this)){
parent.removeChild(this);
};
}
private function moving(_arg1:Event):void{
if (state == "fly"){
if (this.scaleX > 0){
this.x = (this.x - speed);
} else {
if (this.scaleX < 0){
this.x = (this.x + speed);
};
};
checking();
} else {
if (state == "die"){
if (this.currentLabel == "die"){
this.y = (this.y + fall_speed);
fall_speed = (fall_speed + 0.2);
};
if ((((this.currentLabel == "die")) && ((this.y > 420)))){
state = "outOfScreen";
};
};
};
if ((((time == delay)) && ((state == "fly")))){
MovieClip(parent).addBullet(this);
time = 0;
delay = int(((Math.random() * 100) + 50));
} else {
time++;
};
}
}
}//package
Section 24
//fllsnd (fllsnd)
package {
import flash.media.*;
public dynamic class fllsnd extends Sound {
}
}//package
Section 25
//Ground (Ground)
package {
import flash.display.*;
public dynamic class Ground extends MovieClip {
}
}//package
Section 26
//Health (Health)
package {
import flash.display.*;
public dynamic class Health extends MovieClip {
public function Health(){
addFrameScript(39, frame40, 59, frame60);
}
function frame40(){
gotoAndPlay(2);
}
function frame60(){
stop();
}
}
}//package
Section 27
//hitpol (hitpol)
package {
import flash.media.*;
public dynamic class hitpol extends Sound {
}
}//package
Section 28
//jmpsnd (jmpsnd)
package {
import flash.media.*;
public dynamic class jmpsnd extends Sound {
}
}//package
Section 29
//Kuzn (Kuzn)
package {
import flash.display.*;
import flash.events.*;
public class Kuzn extends MovieClip {
private var jumpSpeedLimit:Number;// = 20
private var delay:int;// = 100
public var body:MovieClip;
public var splush;// = false
private var time:int;// = 0
public var state:String;// = "go"
public var Delete:Boolean;// = false
public var jumpSpeed:Number;// = 0
public var mainJumping:Boolean;// = false
public function Kuzn(){
addFrameScript(0, frame1);
addEventListener(Event.ENTER_FRAME, update);
}
public function Jump(_arg1:Event):void{
if (Delete == false){
if (this.scaleX == 1){
this.x = (this.x - 5);
} else {
if (this.scaleX == -1){
this.x = (this.x + 5);
};
};
if (int(jumpSpeed) == -17){
this.body.play();
};
if (!mainJumping){
mainJumping = true;
jumpSpeed = (jumpSpeedLimit * -1);
this.y = (this.y + jumpSpeed);
} else {
if (jumpSpeed < 0){
jumpSpeed = (jumpSpeed * (1 - (jumpSpeedLimit / 135)));
if (jumpSpeed > (-(jumpSpeedLimit) / 5)){
jumpSpeed = (jumpSpeed * -1);
};
};
if ((((jumpSpeed > 0)) && ((jumpSpeed <= jumpSpeedLimit)))){
jumpSpeed = (jumpSpeed * (1 + (jumpSpeedLimit / 100)));
};
this.y = (this.y + jumpSpeed);
if (this.y >= 340){
mainJumping = false;
removeEventListener(Event.ENTER_FRAME, Jump);
this.y = 340;
};
};
};
}
public function update(_arg1:Event):void{
if (Delete == false){
if (this.x > 570){
this.x = -20;
} else {
if (this.x < -20){
this.x = 570;
};
};
if (time == delay){
addEventListener(Event.ENTER_FRAME, Jump);
state = "jump";
time = 0;
} else {
time++;
};
if (splush){
this.scaleY = (this.scaleY - 0.1);
};
if (this.scaleY <= 0.1){
del();
};
};
}
function frame1(){
stop();
}
public function del(){
Delete = true;
removeEventListener(Event.ENTER_FRAME, update);
SonicGarden.enemyArray2[SonicGarden.enemyArray2.indexOf(this)] = null;
SonicGarden.EnemyNum--;
if (parent.contains(this)){
parent.removeChild(this);
};
}
}
}//package
Section 30
//MouseKil (MouseKil)
package {
import flash.media.*;
public dynamic class MouseKil extends Sound {
}
}//package
Section 31
//MusOver (MusOver)
package {
import flash.media.*;
public dynamic class MusOver extends Sound {
}
}//package
Section 32
//Osa (Osa)
package {
import flash.display.*;
import flash.events.*;
public class Osa extends MovieClip {
public var strawDegrees;
public var bullet:Bullet;
private var fall_speed:Number;// = 0
private var speed:Number;
public var delay:int;
public var strawRadians;
public var state:String;// = "fly"
public var Delete:Boolean;// = false
public var time:int;// = 0
public var dy:Number;
public var dx:Number;
public var d:MovieClip;
public var bullets:Array;
public var u:MovieClip;
public function Osa(){
bullets = new Array();
delay = ((Math.random() * 200) + 100);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = ((Math.random() * 1) + 1);
addEventListener(Event.ENTER_FRAME, moving);
}
private function checking():void{
if (this.x > 580){
this.x = -30;
} else {
if (this.x < -30){
this.x = 580;
};
};
}
public function del(){
Delete = true;
removeEventListener(Event.ENTER_FRAME, moving);
SonicGarden.enemyArray[SonicGarden.enemyArray.indexOf(this)] = null;
SonicGarden.EnemyNum--;
if (parent.contains(this)){
parent.removeChild(this);
};
}
function frame2(){
stop();
}
private function moving(_arg1:Event):void{
if (state == "fly"){
if (this.scaleX > 0){
this.x = (this.x - speed);
} else {
if (this.scaleX < 0){
this.x = (this.x + speed);
};
};
checking();
} else {
if (state == "die"){
if (this.currentLabel == "die"){
this.y = (this.y + fall_speed);
fall_speed = (fall_speed + 0.2);
};
if ((((this.currentLabel == "die")) && ((this.y > 420)))){
state = "outOfScreen";
};
} else {
if (state == "attack"){
if (this.currentLabel != "fire"){
this.gotoAndPlay("fire");
dx = (SonicGarden.sonic.x - this.x);
dy = (SonicGarden.sonic.y - this.y);
strawRadians = Math.atan2(dy, dx);
strawDegrees = (((360 * strawRadians) / (2 * Math.PI)) + 90);
this.rotation = (strawDegrees + 180);
};
this.x = (this.x + (Math.cos(strawRadians) * speed));
this.y = (this.y + (Math.sin(strawRadians) * speed));
speed = (speed + 0.5);
if (this.y > 550){
speed = 1;
if (this.y > 600){
this.x = -10;
this.y = 20;
speed = ((Math.random() * 1) + 1);
this.gotoAndStop("fly");
this.rotation = 0;
delay = ((Math.random() * 200) + 100);
state = "fly";
time = 0;
};
};
};
};
};
if ((((time == delay)) && ((state == "fly")))){
state = "attack";
} else {
time++;
};
if (((this.hitTestObject(SonicGarden.sonic)) && (!(MovieClip(parent).isHitHead)))){
MovieClip(parent).hitHead();
};
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 33
//pullSonic (pullSonic)
package {
import flash.media.*;
public dynamic class pullSonic extends Sound {
}
}//package
Section 34
//Rogo (Rogo)
package {
import flash.display.*;
import flash.events.*;
public class Rogo extends MovieClip {
public var body:MovieClip;
private var speed:int;// = 1
public var up:MovieClip;
public var Delete:Boolean;// = false
public var splush;// = false
public function Rogo(){
addFrameScript(0, frame1);
addEventListener(Event.ENTER_FRAME, update);
}
private function update(_arg1:Event):void{
if (Delete == false){
if (parent.contains(this)){
if (this.scaleX > 0){
this.x = (this.x - speed);
} else {
if (this.scaleX < 0){
this.x = (this.x + speed);
};
};
if (this.x < -50){
this.x = 600;
} else {
if (this.x > 600){
this.x = -50;
};
};
if (splush){
this.scaleY = (this.scaleY - 0.1);
};
if (this.scaleY <= 0.1){
del();
};
};
};
}
public function del(){
Delete = true;
removeEventListener(Event.ENTER_FRAME, update);
SonicGarden.enemyArray2[SonicGarden.enemyArray2.indexOf(this)] = null;
SonicGarden.EnemyNum--;
if (parent.contains(this)){
parent.removeChild(this);
};
}
function frame1(){
stop();
}
}
}//package
Section 35
//ScoreMc (ScoreMc)
package {
import flash.display.*;
import flash.events.*;
public class ScoreMc extends MovieClip {
public function ScoreMc(){
addFrameScript(29, frame30);
addEventListener(Event.ENTER_FRAME, update);
}
private function update(_arg1:Event):void{
if (this.currentFrame == 30){
del();
};
}
public function del(){
removeEventListener(Event.ENTER_FRAME, update);
parent.removeChild(this);
}
function frame30(){
stop();
}
}
}//package
Section 36
//Sonic (Sonic)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
public class Sonic extends MovieClip {
private var isFire:Boolean;// = false
private var jumpSpeedLimit:Number;// = 20
public var sonic_clip:MovieClip;
private var _speedX:Number;// = 0
private var _speedY:Number;// = 30
private var isRight:Boolean;// = false
private var this_stage;
public var body:MovieClip;
public var kil2:Boolean;// = false
public var sobonpckup:Sound;
public var jumpSpeed:Number;// = 0
private var _grav:Number;// = 0.5
private var imp;// = 20
public var kil:Boolean;// = false
private var isLeft:Boolean;// = false
public var soundFll:Sound;
public var soundJump:Sound;
public var d:MovieClip;
private var isUp:Boolean;// = false
public var l:MovieClip;
private var isDown:Boolean;// = false
public var soundPull:Sound;
public var u:MovieClip;
public var r:MovieClip;
public var mainJumping:Boolean;// = false
public var isSpace:Boolean;// = false
public function Sonic(){
this_stage = SonicGarden.stage;
soundJump = new jmpsnd();
soundFll = new fllsnd();
soundPull = new pullSonic();
sobonpckup = new bonpckup();
super();
addFrameScript(0, frame1, 7, frame8, 12, frame13, 18, frame19);
this_stage.addEventListener(KeyboardEvent.KEY_DOWN, onKD);
this_stage.addEventListener(KeyboardEvent.KEY_UP, onKU);
this_stage.addEventListener(Event.ENTER_FRAME, onUpdate);
}
public function onUpdate(_arg1:Event):void{
if (!kil){
moveSonic();
} else {
if (kil){
_speedX = 0;
if ((((SonicGarden.kuzn.scaleX == -1)) && ((SonicGarden.sonic.scaleX > 0)))){
if (imp > 0){
this.x = (this.x + imp);
trace(imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
} else {
if ((((SonicGarden.kuzn.scaleX == 1)) && ((SonicGarden.sonic.scaleX > 0)))){
if (imp > 0){
this.x = (this.x + imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
} else {
if ((((SonicGarden.kuzn.scaleX == -1)) && ((SonicGarden.sonic.scaleX < 0)))){
if (imp > 0){
this.x = (this.x - imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
} else {
if ((((SonicGarden.kuzn.scaleX == 1)) && ((SonicGarden.sonic.scaleX < 0)))){
if (imp > 0){
this.x = (this.x - imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
};
};
};
};
if (imp <= 0){
kil = false;
};
};
};
if (kil2){
_speedX = 0;
if ((((SonicGarden.rogo.scaleX == -1)) && ((SonicGarden.sonic.scaleX > 0)))){
if (imp > 0){
this.x = (this.x - imp);
trace(imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
} else {
if ((((SonicGarden.rogo.scaleX == 1)) && ((SonicGarden.sonic.scaleX > 0)))){
if (imp > 0){
this.x = (this.x - imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
} else {
if ((((SonicGarden.rogo.scaleX == -1)) && ((SonicGarden.sonic.scaleX < 0)))){
if (imp > 0){
this.x = (this.x + imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
} else {
if ((((SonicGarden.rogo.scaleX == 1)) && ((SonicGarden.sonic.scaleX < 0)))){
if (imp > 0){
this.x = (this.x + imp);
imp--;
} else {
if (imp == 0){
imp = 20;
};
};
};
};
};
};
if (imp <= 0){
kil2 = false;
};
};
}
public function onKU(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 37:
isLeft = false;
break;
case 39:
isRight = false;
break;
case 38:
isUp = false;
break;
case 40:
isDown = false;
break;
case 32:
isSpace = false;
break;
};
}
public function get SpaceKey():Boolean{
return (isSpace);
}
function frame1(){
stop();
}
public function pull():void{
soundPull.play();
}
public function Jump():void{
if (jumpSpeed < 0){
if (this.currentLabel != "jump"){
this.gotoAndStop("jump");
};
} else {
if (jumpSpeed > 0){
if (this.currentLabel != "fall"){
this.gotoAndStop("fall");
};
};
};
if (!mainJumping){
mainJumping = true;
jumpSpeed = (jumpSpeedLimit * -1);
this.y = (this.y + jumpSpeed);
} else {
if (jumpSpeed < 0){
jumpSpeed = (jumpSpeed * (1 - (jumpSpeedLimit / 135)));
if (jumpSpeed > (-(jumpSpeedLimit) / 5)){
jumpSpeed = (jumpSpeed * -1);
};
};
if ((((jumpSpeed > 0)) && ((jumpSpeed <= jumpSpeedLimit)))){
jumpSpeed = (jumpSpeed * (1 + (jumpSpeedLimit / 100)));
};
this.y = (this.y + jumpSpeed);
if (this.y >= 343){
soundFll.play();
mainJumping = false;
this.y = 343;
jumpSpeed = 0;
};
};
}
function frame13(){
stop();
}
private function moveSonic():void{
this.x = (this.x + _speedX);
if (isLeft){
if (this.currentLabel != "run"){
this.gotoAndStop("run");
};
_speedX--;
this.scaleX = -1.5;
} else {
if (isRight){
if (this.currentLabel != "run"){
this.gotoAndStop("run");
};
_speedX++;
this.scaleX = 1.5;
} else {
if ((((_speedX < 0)) && (!((_speedX == -1))))){
_speedX = (_speedX + 2);
} else {
if (_speedX > 0){
_speedX = (_speedX - 2);
} else {
_speedX = 0;
};
};
if (((!((this.currentLabel == "stand"))) && (!((this.currentLabel == "hit"))))){
this.gotoAndStop("stand");
};
};
};
if (_speedX > 10){
_speedX = 10;
} else {
if (_speedX < -10){
_speedX = -10;
};
};
if (((isUp) || (mainJumping))){
if (jumpSpeed == 0){
soundJump.play();
};
Jump();
};
if (this.x > 560){
this.x = -10;
} else {
if (this.x < -10){
this.x = 560;
};
};
}
public function sobonpckupfnct():void{
sobonpckup.play();
}
function frame19(){
stop();
}
function frame8(){
stop();
}
public function onKD(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 37:
isLeft = true;
break;
case 39:
isRight = true;
break;
case 38:
isUp = true;
break;
case 40:
isDown = true;
break;
case 32:
isSpace = true;
break;
};
}
}
}//package
Section 37
//SonicGarden (SonicGarden)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;
public class SonicGarden extends MovieClip {
public var bullet:Bullet;
private var numberOfRogo:int;
private var _lives:int;// = 10
private var bat:Bat;
private var islevelOk:Boolean;// = false
public var sponsor:SimpleButton;
private var numberOfBats:int;
public var sound_control:MovieClip;
private var timeForHealth:Number;// = 0
private var numberOfKuzn:int;
private var window2:MovieClip;
private var numberOfMay:int;
private var numberOfKomar:int;
private var health:MovieClip;
private var apple:Apple;
public var timeTxt:TextField;
private var k:int;// = 0
private var levels:Array;
public var scoreTxt:TextField;
public var score_text_info2:TextField;
public var overOrWin:Boolean;
public var ground:MovieClip;
public var isHitHead:Boolean;// = false
private var _level:int;// = 1
private var timeHealth:Number;// = 500
public var score:int;// = 0
public var score_text_info1:TextField;
public var scoremc:MovieClip;
public var livesbar:MovieClip;
private var totalScore:int;// = 0
public var play_again_btn:SimpleButton;
private var _time:int;// = 0
private var delayForApple:int;// = 15
public var submit_btn:SimpleButton;
private var bird:Bird;
private var totalKf:int;// = 50
private var time:int;// = 0
private var numberOfBird:int;
public var title_mc:MovieClip;
public var soundclip:MovieClip;
private var ant:Ant;
private var window:MovieClip;
private var osa:Osa;
public var preloader_mc:MovieClip;
public static var bullets:Array = new Array();
public static var enemyArray2:Array = new Array();
public static var rogo:Rogo;
public static var EnemyNum:int;
public static var sonic:MovieClip;
public static var kuzn:Kuzn;
public static var enemyArray:Array = new Array();
public static var stage:Stage;
public static var appleArray:Array = new Array();
public function SonicGarden(){
levels = new Array();
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function hitHead():void{
if (isHitHead == false){
_lives = (_lives - 1);
sound_control.gotoAndStop(5);
addEventListener(Event.ENTER_FRAME, animateHitting);
isHitHead = true;
};
}
private function updateLevelIndicate(_arg1:Event):void{
var _local2:*;
if (window2.currentFrame == 40){
for each (_local2 in appleArray) {
if (((!((_local2 == null))) && ((_local2.Delete == false)))){
_local2.del();
};
};
appleArray = [];
this.removeChild(window2);
removeEventListener(Event.ENTER_FRAME, updateLevelIndicate);
addEventListener(Event.ENTER_FRAME, onUpdate);
initLevel(_level);
};
}
public function addBullet(_arg1):void{
bullet = new Bullet();
addChild(bullet);
if (_arg1 == "[object Bird]"){
bullet.gotoAndStop(2);
} else {
if (_arg1 == "[object Bat]"){
bullet.gotoAndStop(1);
} else {
if (_arg1 == "[object Ant]"){
bullet.gotoAndStop(3);
};
};
};
bullet.x = _arg1.x;
bullet.y = _arg1.y;
bullets.push(bullet);
}
private function checkForHit():void{
var _local1:*;
var _local2:*;
for each (_local1 in appleArray) {
if (((!((_local1 == null))) && ((_local1.Delete == false)))){
if (((((_local1.hitTestObject(SonicGarden.sonic)) && (!(isHitHead)))) && ((_local1.numOfHit > 1)))){
if (_local1.hitTestObject(SonicGarden.sonic.u)){
_local1.numOfHit++;
_local1.isMoveing = false;
hitHead();
_local1.gotoAndPlay(2);
} else {
if (_local1.hitTestObject(SonicGarden.sonic.l)){
_local1.numOfHit++;
hitHead();
_local1.isMoveing = false;
_local1.gotoAndPlay(2);
} else {
if (_local1.hitTestObject(SonicGarden.sonic.r)){
_local1.numOfHit++;
_local1.isMoveing = false;
_local1.gotoAndPlay(2);
hitHead();
};
};
};
};
for each (_local2 in enemyArray) {
if (((!((_local2 == null))) && ((_local2.Delete == false)))){
if (((_local1.hitTestObject(_local2.u)) && (!((_local2.state == "die"))))){
if (_local2 == "[object Bird]"){
sound_control.gotoAndStop(10);
} else {
if (_local2 == "[object Bat]"){
sound_control.gotoAndStop(15);
} else {
if (_local2 == "[object Ant]"){
sound_control.gotoAndStop(30);
} else {
if (_local2 == "[object Osa]"){
sound_control.gotoAndStop(25);
};
};
};
};
_local1.vy = (_local1.vy * -1);
_local1.numOfHit++;
_local2.gotoAndPlay("die");
_local2.state = "die";
addScore(100, _local2.x, _local2.y);
} else {
if (((_local1.hitTestObject(_local2.d)) && (!((_local2.state == "die"))))){
if (_local2 == "[object Bird]"){
sound_control.gotoAndStop(10);
} else {
if (_local2 == "[object Bat]"){
sound_control.gotoAndStop(15);
} else {
if (_local2 == "[object Ant]"){
sound_control.gotoAndStop(30);
} else {
if (_local2 == "[object Osa]"){
sound_control.gotoAndStop(25);
};
};
};
};
_local1.vy = (_local1.vy * -1);
_local1.numOfHit++;
_local2.gotoAndPlay("die");
_local2.state = "die";
addScore(100, _local2.x, _local2.y);
};
};
if (_local2.state == "outOfScreen"){
destroyEnemy(_local2);
};
};
};
};
};
if (((!((rogo == null))) && ((rogo.Delete == false)))){
if (((sonic.hitTestObject(rogo.up)) && ((sonic.jumpSpeed > 0)))){
sonic.mainJumping = false;
sonic.Jump();
rogo.splush = true;
sound_control.gotoAndStop(35);
};
if (((((((sonic.hitTestObject(rogo.body.rog)) && ((!(sonic.jumpSpeed) > 0)))) && (!(sonic.hitTestObject(rogo.up))))) && (!(isHitHead)))){
sonic.kil2 = true;
hitHead();
};
if ((((rogo.scaleY <= 0.1)) && ((rogo.Delete == false)))){
addScore(100, rogo.x, rogo.y);
if ((((EnemyNum == 0)) && ((_lives > 0)))){
removeEventListener(Event.ENTER_FRAME, onUpdate);
showLevelIndicate2();
};
};
};
if (((!((kuzn == null))) && ((kuzn.Delete == false)))){
if (((sonic.d.hitTestObject(kuzn)) && ((sonic.jumpSpeed > 0)))){
sonic.mainJumping = false;
sonic.Jump();
kuzn.splush = true;
sound_control.gotoAndStop(35);
};
if (((((sonic.hitTestObject(kuzn)) && ((!(sonic.jumpSpeed) > 0)))) && (!(isHitHead)))){
sonic.kil = true;
hitHead();
if (kuzn.scaleX == 1){
sonic.scaleX = (sonic.scaleX * -1);
} else {
if (kuzn.scaleX == -1){
sonic.scaleX = (sonic.scaleX * -1);
};
};
};
if ((((kuzn.scaleY <= 0.1)) && ((kuzn.Delete == false)))){
addScore(100, kuzn.x, kuzn.y);
if ((((EnemyNum == 0)) && ((_lives > 0)))){
removeEventListener(Event.ENTER_FRAME, onUpdate);
showLevelIndicate2();
};
};
};
}
public function loading(_arg1:Event){
var _local2:* = stage.loaderInfo.bytesTotal;
var _local3:* = stage.loaderInfo.bytesLoaded;
preloader_mc.pp.bar.gotoAndStop(Math.round(((_local3 * 100) / _local2)));
if (_local3 >= _local2){
preloader_mc.gotoAndPlay(2);
removeEventListener(Event.ENTER_FRAME, loading);
addEventListener(Event.ENTER_FRAME, update);
preloader_mc.pp.sponsor.removeEventListener(MouseEvent.CLICK, onClick);
};
}
private function initLevel(_arg1:int){
numberOfBird = levels[(_arg1 - 1)][0];
numberOfBats = levels[(_arg1 - 1)][1];
numberOfMay = levels[(_arg1 - 1)][2];
numberOfKomar = levels[(_arg1 - 1)][3];
numberOfRogo = levels[(_arg1 - 1)][4];
numberOfKuzn = levels[(_arg1 - 1)][5];
EnemyNum = (((((numberOfBird + numberOfBats) + numberOfMay) + numberOfKomar) + numberOfRogo) + numberOfKuzn);
addEnemy(numberOfBird, numberOfBats, numberOfMay, numberOfKomar, numberOfRogo, numberOfKuzn);
}
public function addHealth(){
health = new Health();
addChild(health);
health.x = ((Math.random() * 450) + 50);
health.y = -30;
}
private function showLevelIndicate():void{
window2 = new Window2();
addChild(window2);
window2.showLevel_mc.level_text.text = _level;
window2.x = 165;
window2.y = 176.6;
addEventListener(Event.ENTER_FRAME, updateLevelIndicate);
}
function frame2(){
stop();
SonicGardenStart();
sponsor.addEventListener(MouseEvent.CLICK, onClick);
soundclip.addEventListener(MouseEvent.CLICK, clicksc);
}
function frame3(){
stop();
if (overOrWin == false){
title_mc.gotoAndStop(1);
} else {
if (overOrWin == true){
title_mc.gotoAndStop(2);
};
};
score_text_info1.text = String(score);
sponsor.addEventListener(MouseEvent.CLICK, onClick);
submit_btn.addEventListener(MouseEvent.CLICK, onClick1);
play_again_btn.addEventListener(MouseEvent.CLICK, onClick3);
}
public function addEnemy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){
var _local7:int;
while (_local7 < _arg3) {
ant = new Ant();
addChild(ant);
if (Math.random() > 0.5){
ant.x = (Math.random() * 550);
ant.scaleX = (ant.scaleX / -3);
} else {
ant.x = (Math.random() * 550);
ant.scaleX = (ant.scaleX / 3);
};
ant.y = ((Math.random() * 200) + 20);
ant.scaleY = (ant.scaleY / 3);
enemyArray.push(ant);
_local7++;
};
var _local8:int;
while (_local8 < _arg1) {
bird = new Bird();
addChild(bird);
if (Math.random() > 0.5){
bird.x = (Math.random() * 550);
bird.scaleX = (bird.scaleX / -3);
} else {
bird.x = (Math.random() * 550);
bird.scaleX = (bird.scaleX / 3);
};
bird.y = ((Math.random() * 200) + 20);
bird.scaleY = (bird.scaleY / 3);
enemyArray.push(bird);
_local8++;
};
var _local9:int;
while (_local9 < _arg2) {
bat = new Bat();
addChild(bat);
if (Math.random() > 0.5){
bat.x = (Math.random() * 550);
bat.scaleX = (bat.scaleX / -3);
} else {
bat.x = (Math.random() * 550);
bat.scaleX = (bat.scaleX / 3);
};
bat.y = ((Math.random() * 200) + 20);
bat.scaleY = (bat.scaleY / 3);
enemyArray.push(bat);
_local9++;
};
var _local10:int;
while (_local10 < numberOfKomar) {
osa = new Osa();
addChild(osa);
if (Math.random() > 0.5){
osa.x = (Math.random() * 550);
osa.scaleX = (osa.scaleX / -1.5);
} else {
osa.x = (Math.random() * 550);
osa.scaleX = (osa.scaleX / 1.5);
};
osa.y = 30;
osa.scaleY = (osa.scaleY / 1.5);
enemyArray.push(osa);
_local10++;
};
var _local11:int;
while (_local11 < _arg5) {
rogo = new Rogo();
addChild(rogo);
if (Math.random() > 0.5){
rogo.x = 0;
rogo.scaleX = (rogo.scaleX / -1);
} else {
rogo.x = 550;
rogo.scaleX = (rogo.scaleX / 1);
};
rogo.y = 340;
rogo.scaleY = (rogo.scaleY / 1);
enemyArray2.push(rogo);
_local11++;
};
var _local12:int;
while (_local12 < _arg6) {
kuzn = new Kuzn();
addChild(kuzn);
if (Math.random() > 0.5){
kuzn.x = 0;
kuzn.scaleX = (kuzn.scaleX / -1);
} else {
kuzn.x = 550;
kuzn.scaleX = (kuzn.scaleX / 1);
};
kuzn.y = 340;
kuzn.scaleY = (kuzn.scaleY / 1);
enemyArray2.push(kuzn);
_local12++;
};
islevelOk = true;
}
public function onClick1(_arg1:Event):void{
if ((((score_text_info2.text == "")) || ((score_text_info2.text == "Enter name")))){
score_text_info2.text = "Enter name";
} else {
navigateToURL(new URLRequest(((((("http://online-free-gaming.com/index.php?t=9&gameid=12&scrore=" + int(score_text_info1.text)) + "&name=") + String(score_text_info2.text)) + "&key=") + String((((int(score_text_info1.text) * int(score_text_info1.text)) + (5 * int(score_text_info1.text))) + 34)))), "_blank");
score = 0;
_lives = 10;
_time = 0;
_level = 1;
totalScore = 0;
timeForHealth = 0;
timeHealth = 500;
gotoAndStop(1);
};
}
public function onClick3(_arg1:Event):void{
score = 0;
_lives = 10;
_time = 0;
_level = 1;
totalScore = 0;
timeForHealth = 0;
timeHealth = 500;
gotoAndStop(1);
}
function frame1(){
stop();
addEventListener(Event.ENTER_FRAME, loading);
preloader_mc.pp.sponsor.addEventListener(MouseEvent.CLICK, onClick);
preloader_mc.ss.sponsor.addEventListener(MouseEvent.CLICK, onClick);
preloader_mc.ss.play_btn.addEventListener(MouseEvent.CLICK, onClick2);
}
public function checkForFire():void{
if ((((((sonic.SpaceKey == true)) && ((time >= delayForApple)))) && (!((sonic.currentLabel == "jump"))))){
if (sonic.scaleX == -1.5){
apple = new Apple(this, (sonic.x - 20), (sonic.y + 5), "lft");
} else {
if (sonic.scaleX == 1.5){
apple = new Apple(this, (sonic.x + 20), (sonic.y + 5), "rgh");
};
};
if ((((sonic.currentLabel == "stand")) || ((sonic.currentLabel == "run")))){
if (sonic.body.arm.currentFrame == 1){
sonic.body.arm.gotoAndPlay(2);
};
};
sonic.pull();
addChild(apple);
appleArray.push(apple);
apple.scaleX = (apple.scaleX * 2);
apple.scaleY = (apple.scaleY * 2);
time = 0;
} else {
time++;
};
}
public function onClick2(_arg1:Event):void{
preloader_mc.ss.sponsor.removeEventListener(MouseEvent.CLICK, onClick);
preloader_mc.ss.play_btn.removeEventListener(MouseEvent.CLICK, onClick2);
preloader_mc.gotoAndPlay(46);
}
public function destroyApple(_arg1:Apple):void{
_arg1.del();
}
public function SonicGardenStart(){
levels = [[0, 6, 0, 0, 0, 0], [6, 6, 0, 0, 0, 0], [6, 6, 0, 0, 0, 0], [6, 6, 0, 0, 1, 0], [7, 7, 0, 0, 1, 0], [7, 7, 1, 0, 1, 0], [7, 7, 1, 0, 1, 0], [7, 7, 2, 1, 1, 0], [8, 8, 2, 1, 1, 0], [8, 8, 3, 2, 1, 1], [8, 8, 3, 2, 1, 1], [8, 8, 4, 3, 1, 1], [9, 9, 4, 3, 1, 1], [9, 9, 5, 4, 1, 1], [10, 10, 5, 4, 1, 1]];
SonicGarden.stage = this.stage;
SonicGarden.sonic = new Sonic();
livesbar.gotoAndStop(10);
addChild(sonic);
sonic.y = 340;
sonic.x = (stage.width / 2);
sonic.scaleX = (sonic.scaleX * 1.5);
sonic.scaleY = (sonic.scaleY * 1.5);
showLevelIndicate();
addScore(0, 1000, 1000);
ground = new Ground();
addChild(ground);
ground.x = 0;
ground.y = 340;
}
public function onUpdate(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:int;
var _local5:*;
if ((((EnemyNum == 0)) && ((_lives > 0)))){
removeEventListener(Event.ENTER_FRAME, onUpdate);
showLevelIndicate2();
};
if (((!((this.getChildIndex(ground) == this.numChildren))) && (this.contains(ground)))){
addChild(ground);
ground.x = 0;
ground.y = 340;
};
if (_lives <= 0){
soundclip.gotoAndStop(2);
if (health != null){
removeChild(health);
health = null;
};
removeChild(sonic);
for each (_local2 in bullets) {
if (_local2 != null){
_local2.del();
};
};
for each (_local3 in enemyArray) {
if (_local3 != null){
_local3.del();
};
};
_local4 = 0;
while (_local4 < enemyArray2.length) {
if (((!((enemyArray2[_local4] == null))) && ((enemyArray2[_local4].Delete == false)))){
enemyArray2[_local4].del();
};
_local4++;
};
bullets = [];
enemyArray = [];
enemyArray2 = [];
overOrWin = false;
gotoAndStop(3);
removeEventListener(Event.ENTER_FRAME, onUpdate);
} else {
livesbar.gotoAndStop(_lives);
_time = (_time + (1 / 0.31));
if (this.x > 0){
this.x = (this.x / 2);
} else {
if (this.x < 0){
this.x = (this.x / 2);
} else {
if (this.y > 0){
this.y = (this.y / 2);
} else {
if (this.y < 0){
this.y = (this.y / 2);
} else {
this.y = 0;
this.x = 0;
};
};
};
};
checkForFire();
checkForHit();
for each (_local5 in bullets) {
if (((!((_local5 == null))) && ((_local5.Delete == false)))){
_local5.y = (_local5.y + 3);
if (_local5.y > 450){
_local5.del();
} else {
if (((_local5.hitTestObject(SonicGarden.sonic)) && ((isHitHead == false)))){
hitHead();
_local5.gotoAndPlay(6);
};
};
if (_local5.currentFrame == 11){
_local5.del();
};
};
};
if ((((timeForHealth == timeHealth)) && ((health == null)))){
if (Math.random() > 0.7){
sound_control.gotoAndStop(20);
addHealth();
};
timeForHealth = 0;
timeHealth = int(((Math.random() * 150) + 500));
} else {
timeForHealth++;
};
if (health != null){
if (health.y >= 330){
health.y = 330;
if (health.currentFrame < 41){
health.gotoAndPlay(41);
};
} else {
health.y++;
};
if (sonic.hitTestObject(health)){
sonic.sobonpckupfnct();
if (_lives < 10){
_lives = 10;
};
this.removeChild(health);
health = null;
};
};
};
}
public function gameWin(){
var _local1:*;
var _local2:*;
var _local3:*;
soundclip.gotoAndStop(2);
if (health != null){
removeChild(health);
health = null;
};
removeEventListener(Event.ENTER_FRAME, onUpdate);
removeChild(sonic);
for each (_local1 in enemyArray) {
if (((!((_local1 == null))) && ((_local1.Delete == false)))){
_local1.del();
};
};
for each (_local2 in bullets) {
if (((!((_local2 == null))) && ((_local2.Delete == false)))){
_local2.del();
};
};
for each (_local3 in enemyArray2) {
if (((!((_local3 == null))) && ((_local3.Delete == false)))){
_local3.del();
};
};
enemyArray = [];
bullets = [];
enemyArray2 = [];
overOrWin = true;
gotoAndStop(3);
}
public function addScore(_arg1:int, _arg2:Number, _arg3:Number):void{
score = (score + _arg1);
scoreTxt.text = String(score);
scoremc = new ScoreMc();
addChild(scoremc);
scoremc.scaleX = (scoremc.scaleX / 2);
scoremc.scaleY = (scoremc.scaleY / 2);
scoremc.x = _arg2;
scoremc.y = _arg3;
}
private function updateLevelIndicate2(_arg1:Event):void{
if (window.currentFrame == 124){
if (_level == 16){
this.removeChild(window);
removeEventListener(Event.ENTER_FRAME, updateLevelIndicate2);
gameWin();
} else {
this.removeChild(window);
removeEventListener(Event.ENTER_FRAME, updateLevelIndicate2);
showLevelIndicate();
};
};
}
private function removeBullet(_arg1):void{
_arg1.del();
}
private function clearStage():void{
var _local1:*;
for each (_local1 in bullets) {
if (((!((_local1 == null))) && ((_local1.Delete == false)))){
_local1.del();
};
};
bullets = [];
if (health != null){
removeChild(health);
health = null;
};
}
public function destroyEnemy(_arg1):void{
_arg1.del();
if ((((EnemyNum == 0)) && ((_lives > 0)))){
removeEventListener(Event.ENTER_FRAME, onUpdate);
showLevelIndicate2();
};
}
public function update(_arg1:Event){
if (preloader_mc.currentFrame == 70){
nextFrame();
removeEventListener(Event.ENTER_FRAME, update);
};
}
private function showLevelIndicate2():void{
clearStage();
window = new Window();
addChild(window);
window.okno.level_text.text = _level;
_level++;
window.x = 50.4;
window.y = 143.3;
addEventListener(Event.ENTER_FRAME, updateLevelIndicate2);
}
public function clicksc(_arg1:MouseEvent){
if (soundclip.currentFrame == 1){
soundclip.gotoAndStop(2);
} else {
if (soundclip.currentFrame == 2){
soundclip.gotoAndStop(1);
};
};
}
public function onClick(_arg1:Event):void{
navigateToURL(new URLRequest("http://free-arcade-palace.com/?from=SonicGardenSWF"), "_blank");
}
private function animateHitting(_arg1:Event):void{
k++;
if ((((((((((k == 10)) || ((k == 20)))) || ((k == 30)))) || ((k == 40)))) || ((k == 50)))){
sonic.visible = true;
} else {
if ((((((((((k == 0)) || ((k == 15)))) || ((k == 25)))) || ((k == 35)))) || ((k == 45)))){
sonic.visible = false;
};
};
if (k == totalKf){
isHitHead = false;
removeEventListener(Event.ENTER_FRAME, animateHitting);
k = 0;
};
}
public function distance(_arg1, _arg2){
var _local3:* = (_arg1.x - _arg2.x);
var _local4:* = (_arg1.y - _arg2.y);
return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4))));
}
}
}//package
Section 38
//Window (Window)
package {
import flash.display.*;
public dynamic class Window extends MovieClip {
public var okno:MovieClip;
public function Window(){
addFrameScript(124, frame125);
}
function frame125(){
stop();
}
}
}//package
Section 39
//Window2 (Window2)
package {
import flash.display.*;
public dynamic class Window2 extends MovieClip {
public var showLevel_mc:MovieClip;
public function Window2(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package