Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("b6ca3d65", this, 10301, true);
_root.kongregateServices.connect();
stop();
preloader.loadIt = true;
Stage.showMenu = false;
seenInstructions = false;
currentDomain = _root._url.split("/");
currentDomain = currentDomain[2];
if (!((currentDomain == "kongregate.com") || (currentDomain == "www.kongregate.com"))) {
}
Instance of Symbol 11 MovieClip "preloader" in Frame 1
onClipEvent (enterFrame) {
if (loadIt) {
var perc = ((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
this._xscale = perc;
if (perc >= 100) {
this._alpha = this._alpha - 10;
if (this._alpha <= 10) {
_parent.gotoAndStop("menu");
}
}
}
}
Frame 31
stop();
var controller = (new chicken.ChickenController(this));
controller.PlayMusic();
fx._visible = false;
Instance of Symbol 240 MovieClip "music" in Frame 31
on (release) {
trace(this._parent.controller);
this._parent.controller.PlayMusic();
}
Instance of Symbol 243 MovieClip "fx" in Frame 31
on (release) {
this._parent.controller.PlayFX();
}
Frame 38
stop();
seenInstructions = true;
Frame 48
fx._visible = true;
controller.nextLevel();
stop();
Frame 55
_root.kongregateScores.submit(controller.score);
stop();
Symbol 8 MovieClip [Chicken] Frame 1
#initclip 10
Object.registerClass("Chicken", chicken.Chicken);
#endinitclip
stop();
Symbol 8 MovieClip [Chicken] Frame 2
stop();
Symbol 8 MovieClip [Chicken] Frame 3
stop();
InnerChicken.gotoAndStop(3);
Symbol 8 MovieClip [Chicken] Frame 4
stop();
Symbol 8 MovieClip [Chicken] Frame 5
stop();
Symbol 21 Button
on (release) {
getURL ("http://www.shockwood.com", "_self");
}
Symbol 299 MovieClip [__Packages.chicken.BaseObject] Frame 0
class chicken.BaseObject extends MovieClip
{
function BaseObject () {
super();
}
function get WorldX() {
return(_worldX);
}
function get WorldY() {
return(_worldY);
}
function get FrictionX() {
return(Math.abs(_frictionX - 1));
}
function set FrictionX(value) {
_frictionX = value;
//return(FrictionX);
}
function get FrictionY() {
return(Math.abs(_frictionY - 1));
}
function set FrictionY(value) {
_frictionY = value;
//return(FrictionY);
}
function get DistanceFromGround() {
return(Math.max(_distanceFromGround, 0));
}
function set DistanceFromGround(value) {
_distanceFromGround = value;
//return(DistanceFromGround);
}
function collision(collider) {
}
var _worldX = 0;
var _worldY = 0;
var _frictionX = 0;
var _frictionY = 0;
var _distanceFromGround = 0;
}
Symbol 300 MovieClip [__Packages.chicken.Collider] Frame 0
class chicken.Collider extends chicken.BaseObject
{
var _parent, _alpha;
function Collider () {
super();
}
function onLoad() {
chicken.Level(_parent).Controller.RegisterCollider(this);
_alpha = 0;
}
static var CHICKEN_FADE_LEFT = 1;
static var CHICKEN_SPLAT_LEFT = 2;
static var CHICKEN_SPLAT_DOWN = 3;
static var CHICKEN_FADE_DOWN = 4;
static var CHICKEN_LAND = 5;
static var CHICKEN_JUMP_UP = 6;
static var CHICKEN_SOFT_LAND = 7;
static var CHICKEN_COW_ARSE = 8;
static var CHICKEN_ELECTROCUTE = 9;
static var CHICKEN_SPLASH = 10;
static var CHICKEN_FADE = 11;
}
Symbol 301 MovieClip [__Packages.chicken.Level] Frame 0
class chicken.Level extends MovieClip
{
function Level () {
super();
}
function initialise() {
}
}
Symbol 302 MovieClip [__Packages.chicken.ChickenController] Frame 0
class chicken.ChickenController
{
var _scope, _chicken, _achievements, _music, _effect, _playerName, _currentLevelClip, _currentLevelAnims, _currentCollisionFrame, _colliders;
function ChickenController (scope) {
_scope = scope;
_chicken = chicken.Chicken(_scope.attachMovie("Chicken", "_chicken", 1000, {Controller:this}));
_chicken._visible = false;
_achievements = [];
_music = new Sound();
_music.onSoundComplete = function () {
this.start();
};
_effect = new Sound();
_effect.onSoundComplete = mx.utils.Delegate.create(this, function () {
});
}
function get playerName() {
return(_playerName);
}
function get score() {
return(_score);
}
function PlayFX() {
_playSoundEffects = !_playSoundEffects;
if (_playSoundEffects) {
_scope.fx.gotoAndStop(1);
} else {
_scope.fx.gotoAndStop(2);
}
}
function get PlaySoundEffects() {
return(_playSoundEffects);
}
function PlaySingleFX(fx, overide) {
if (_playSoundEffects && ((!_effectPlaying) || (overide))) {
_effect.attachSound(fx);
_effect.start();
_effectPlaying = true;
}
}
function PlayMusic() {
_playMusic = !_playMusic;
if (_playMusic) {
_music.attachSound("SoundTrack");
_music.start();
_scope.music.gotoAndStop(1);
} else {
_music.stop();
_scope.music.gotoAndStop(2);
}
}
function get CurrentLevelClip() {
return(_currentLevelClip);
}
function showLevelAnim(frame) {
if (!_animShowing) {
_animShowing = true;
trace("ANIM :: " + _currentLevelAnims);
_scope.LevelBoard.PowerAngle._visible = false;
_currentLevelAnims.scope = this;
_currentLevelAnims.endAnim = function () {
this.scope.endAnim();
};
_currentLevelAnims.gotoAndStop(frame);
_currentLevelAnims.anim.scope = this;
_currentLevelAnims.anim.endAnim = function () {
this.scope.endAnim();
};
_currentLevelAnims.anim.playSound = function () {
this.scope.playSound();
};
_currentLevelAnims._visible = true;
_currentLevelAnims.anim.gotoAndPlay(2);
_currentLevelAnims.levelScore._visible = false;
_currentCollisionFrame = frame;
}
}
function endAnim() {
trace("endAnim");
_currentLevelAnims.levelScore.onPress = function () {
};
_currentLevelAnims.levelScore.useHandCursor = false;
gs.TweenFilterLite.from(_currentLevelAnims.levelScore, 1, {_alpha:0, delay:1.5, onStart:animEnded, onStartScope:this});
_currentLevelAnims.levelScore._visible = true;
scoring(_currentCollisionFrame);
setLives();
initAchievements();
}
function playSound() {
var _local2 = chicken.Data.getColliderByName(_currentCollisionFrame);
PlaySingleFX(_local2.FX);
}
function animEnded() {
delete _currentLevelAnims.levelScore.onPress;
}
function scoring(frame) {
if (frame == "none") {
_currentLevelAnims.levelScore.gotoAndStop("ok");
} else {
var _local6 = chicken.Data.getColliderByName(frame);
if (_local6.DropLife) {
_currentLevelAnims.levelScore.gotoAndStop("lose");
_lives++;
} else {
PlaySingleFX("goal.wav", true);
_currentLevelAnims.levelScore.gotoAndStop("great");
var _local3 = chicken.Data.getAchievementByName(frame).Id;
trace("achievement :: " + _local3);
var _local4 = true;
for (var _local5 in _achievements) {
if (_achievements[_local5] == _local3) {
_local4 = false;
break;
}
}
if (_local4) {
_root.kongregateStats.submit(chicken.Data.getAchievementByName(frame).AchievementName, 1);
_achievements.push(_local3);
}
}
var _local8 = _local6.Score * achievementMultiplier;
_scoreAdd = _scoreAdd + _local8;
_currentLevelAnims.levelScore.achievementBonus = _local8 + " PTS";
}
if (!_local6.DropLife) {
var _local10 = _currentHeight * heightMultiplier;
_scoreAdd = _scoreAdd + _local10;
_currentLevelAnims.levelScore.heightBonus = _local10 + " PTS";
var _local9 = _currentDistance * distanceMultiplier;
_scoreAdd = _scoreAdd + _local9;
_currentLevelAnims.levelScore.distanceBonus = _local9 + " PTS";
_currentLevelAnims.levelScore.achievementFrame = chicken.Data.getAchievementByName(frame).Id;
_score = _score + _scoreAdd;
_root.kongregateStats.submit("Height", _currentHeight);
_root.kongregateStats.submit("Distance", _currentDistance);
}
_tries--;
_root.kongregateStats.submit("Tries", 12 - _tries);
_currentLevelAnims.levelScore.score = _score + " PTS";
_currentLevelAnims.levelScore.scope = this;
_currentLevelAnims.levelScore.playAgain = function () {
this.scope.playAgain();
};
_currentLevelAnims.levelScore.restart = function () {
this.scope.restart();
};
_scope.LevelBoard.score = _score;
_scope.LevelBoard.tries = _tries;
}
function restart() {
clearLevel();
_scope.gotoAndStop("menu");
}
function clearLevel() {
_chicken.removeMe();
_music.stop();
delete _music;
_effect.stop();
delete _effect;
_scope.LevelBoard.removeMovieClip();
_currentLevelClip.removeMovieClip();
_currentLevelAnims.removeMovieClip();
}
function playAgain() {
_effectPlaying = false;
if ((_lives == _maxLives) || (_tries == 0)) {
_currentLevelAnims.levelScore.gotoAndStop("gameOver");
var _local3 = _tries * triesMultiplier;
_score = _score + _local3;
_currentLevelAnims.levelScore.score = _score + " PTS";
_currentLevelAnims.levelScore.triesBonus = _local3 + " PTS";
} else if (_achievements.length == chicken.Data.__get__Achievements().length) {
_root.kongregateStats.submit("LivesIntact", _lives);
_currentLevelAnims.levelScore.gotoAndStop("gameComplete");
var _local3 = _tries * triesMultiplier;
_score = _score + _local3;
_currentLevelAnims.levelScore.triesBonus = _local3 + " PTS";
_currentLevelAnims.levelScore.score = _score + " PTS";
} else {
_currentLevelAnims._visible = false;
_currentLevelClip._x = ((-_currentLevelClip._width) / 2) + Stage.width;
_currentLevelClip._y = 0;
_chicken._x = _currentLevelClip.ChickenStartX;
_chicken._y = _currentLevelClip.ChickenStartY;
_currentHeight = 0;
_currentDistance = 0;
_currentCollisionFrame = null;
_animShowing = false;
_scope.LevelBoard.PowerAngle._visible = true;
_scope.LevelBoard.PowerAngle.angle.text = "0\u00B0";
_scope.LevelBoard.PowerAngle.power.text = "0%";
_scope.LevelBoard.PowerAngle.height.text = "0m";
_scope.LevelBoard.PowerAngle.distance.text = "0m";
_chicken.reset();
_currentLevelAnims.gotoAndStop(1);
_currentLevelAnims.levelScore.gotoAndStop("none");
}
_scope.LevelBoard.arrowRight._visible = true;
_scope.LevelBoard.arrowLeft._visible = true;
}
function submitScore(playName) {
clearLevel();
_playerName = playName;
trace("_playerName :: " + playName);
_scope.gotoAndStop("score");
}
function completeTween() {
_currentLevelAnims._visible = false;
}
function nextLevel() {
_chicken._visible = true;
_colliders = new Array();
_currentLevel++;
_currentLevelClip.removeMovieClip();
_currentLevelAnims.removeMovieClip();
_currentLevelClip = chicken.Level(_scope.attachMovie(chicken.Data.__get__Levels()[_currentLevel - 1].Background, "_currentLevelClip", _currentLevel, {Controller:this}));
_currentLevelAnims = _scope.attachMovie(chicken.Data.__get__Levels()[_currentLevel - 1].Anims, "_currentLevelAnims", _currentLevel + 1000);
_currentLevelAnims._x = 317;
_currentLevelAnims._y = 260;
_currentLevelAnims._visible = false;
for (var _local2 in chicken.Data.__get__Levels()[_currentLevel - 1]) {
_currentLevelClip[_local2] = chicken.Data.__get__Levels()[_currentLevel - 1][_local2];
}
_currentLevelClip.initialise();
_currentLevelClip._x = ((-_currentLevelClip._width) / 2) + Stage.width;
_chicken._x = _currentLevelClip.ChickenStartX;
_chicken._y = _currentLevelClip.ChickenStartY;
_scope.LevelBoard.swapDepths(_currentLevel + 2000);
_scope.LevelBoard.tries = _tries;
_scope.LevelBoard.score = _score;
_scope.music.swapDepths(_currentLevel + 3000);
_scope.fx.swapDepths(_currentLevel + 3001);
_scope.LevelBoard.onEnterFrame = mx.utils.Delegate.create(this, leaderBoardEnterFrame);
_scope.LevelBoard.arrowLeft.onPress = mx.utils.Delegate.create(this, arrowLeftPress);
_scope.LevelBoard.arrowLeft.onRelease = mx.utils.Delegate.create(this, arrowLeftRelease);
_scope.LevelBoard.arrowRight.onPress = mx.utils.Delegate.create(this, arrowRightPress);
_scope.LevelBoard.arrowRight.onRelease = mx.utils.Delegate.create(this, arrowRightRelease);
initAchievements();
}
function arrowLeftPress() {
_leftDown = true;
}
function arrowLeftRelease() {
_leftDown = false;
}
function arrowRightPress() {
_rightDown = true;
}
function arrowRightRelease() {
_rightDown = false;
}
function leaderBoardEnterFrame() {
trace("_leftDown : " + _leftDown);
if (_leftDown) {
if (_currentLevelClip._x < 2400) {
_currentLevelClip._x = _currentLevelClip._x + 25;
_chicken._x = _chicken._x + 25;
} else {
_currentLevelClip._x = 2400;
}
}
if (_rightDown) {
if (_currentLevelClip._x > -2700) {
_currentLevelClip._x = _currentLevelClip._x - 25;
_chicken._x = _chicken._x - 25;
} else {
_currentLevelClip._x = -2700;
}
}
}
function initAchievements() {
var _local2 = 0;
while (_local2 < chicken.Data.__get__Achievements().length) {
_scope.LevelBoard["achievement" + chicken.Data.__get__Achievements()[_local2].Id].gotoAndStop(chicken.Data.__get__Achievements()[_local2].Id);
_scope.LevelBoard["achievement" + chicken.Data.__get__Achievements()[_local2].Id]._alpha = 50;
_local2++;
}
_local2 = 0;
while (_local2 < _achievements.length) {
if (_achievements[_local2]) {
_scope.LevelBoard["achievement" + _achievements[_local2]]._alpha = 100;
}
_local2++;
}
}
function setLives() {
var _local2 = 1;
while (_local2 <= _lives) {
_scope.LevelBoard["life" + _local2].gotoAndStop(3);
_local2++;
}
}
function MoveObject(object, x, y) {
if (object.__get__WorldY() >= _currentLevelClip.GroundLevel) {
object.__set__FrictionY(1);
object.__set__FrictionX(0.07);
PlaySingleFX("skid.wav");
showLevelAnim("none");
}
if (!checkCollision(object)) {
_currentLevelClip._x = _currentLevelClip._x + x;
_currentLevelClip._y = _currentLevelClip._y + y;
_scope.LevelBoard.arrowRight._visible = false;
_scope.LevelBoard.arrowLeft._visible = false;
}
}
function RegisterCollider(collider) {
var _local2 = chicken.Data.getColliderByName(collider._name);
for (var _local4 in _local2) {
collider[_local4] = _local2[_local4];
}
_colliders.push(collider);
}
function checkCollision(object) {
for (var _local3 in _colliders) {
if (_colliders[_local3].hitTest(object._x, object._y, true)) {
object.collision(_colliders[_local3]);
trace("collide");
showLevelAnim(_colliders[_local3].Name);
return(true);
}
}
return(false);
}
function angleChanged(angle) {
_scope.LevelBoard.PowerAngle.angle.text = angle + "\u00B0";
}
function powerChanged(power) {
_scope.LevelBoard.PowerAngle.power.text = power + "%";
}
function heightChanged(height) {
_currentHeight = height;
_scope.LevelBoard.PowerAngle.height.text = height + "m";
}
function distanceChanged(distance) {
_currentDistance = distance;
_scope.LevelBoard.PowerAngle.distance.text = distance + "m";
}
var _currentLevel = 0;
var _score = 0;
var _scoreAdd = 0;
var _tries = 12;
var _lives = 0;
var _maxLives = 5;
var _currentHeight = 0;
var _currentDistance = 0;
var achievementMultiplier = 1300;
var distanceMultiplier = 10;
var heightMultiplier = 10;
var triesMultiplier = 1000;
var _name = "";
var _animShowing = false;
static var GRAVITY = 0.75;
static var WIND = 0.992;
var _playMusic = false;
var _playSoundEffects = true;
var _effectPlaying = false;
var _leftDown = false;
var _rightDown = false;
}
Symbol 303 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 304 MovieClip [__Packages.gs.TweenLite] Frame 0
class gs.TweenLite
{
static var _e, _classInitted, _curTime, _gc, _listening;
var tweenID, endTargetID, vars, duration, delay, target, tweens, _subTweens, _hst, _initted, _active, initTime, startTime;
function TweenLite ($target, $duration, $vars) {
_cnt++;
tweenID = "tw" + _cnt;
endTargetID = getID($target, true);
if (($vars.overwrite != false) && ($target != undefined)) {
delete _all[endTargetID];
_all[endTargetID] = {info:[$target, endTargetID]};
}
_all[endTargetID][tweenID] = this;
vars = $vars;
duration = $duration || 0.001;
delay = $vars.delay || 0;
target = $target;
if (typeof(vars.ease) != "function") {
vars.ease = defaultEase;
}
if (vars.easeParams != undefined) {
vars.proxiedEase = vars.ease;
vars.ease = easeProxy;
}
if (typeof(vars.autoAlpha) == "number") {
vars._alpha = vars.autoAlpha;
}
tweens = [];
_subTweens = [];
_hst = (_initted = false);
_active = ($duration == 0) && (delay == 0);
if ((_e._visible != false) || (!_classInitted)) {
_curTime = getTimer();
_e = _root.createEmptyMovieClip("_tweenLite_mc", _root.getNextHighestDepth() || 9999);
_e.swapDepths(-1);
_e._visible = false;
clearInterval(_gc);
_gc = setInterval(killGarbage, 2000);
_e.onEnterFrame = executeAll;
_classInitted = true;
}
initTime = _curTime;
if (_active || ((vars.runBackwards == true) && (vars.renderOnStart != true))) {
initTweenVals();
startTime = _curTime;
if (_active) {
render(startTime + 1);
} else {
render(startTime);
}
}
if ((!_active) && (!_listening)) {
_listening = true;
}
}
function initTweenVals($hrp, $reservedProps) {
var _local6 = typeof(target) == "movieclip";
var _local8;
var _local5;
if (target instanceof Array) {
var _local9 = vars.endArray || ([]);
_local5 = 0;
while (_local5 < _local9.length) {
if ((target[_local5] != _local9[_local5]) && (target[_local5] != undefined)) {
tweens.push({o:target, p:_local5.toString(), s:target[_local5], c:_local9[_local5] - target[_local5]});
}
_local5++;
}
} else {
for (_local8 in vars) {
if ((((((((((((((((((_local8 == "ease") || (_local8 == "delay")) || (_local8 == "overwrite")) || (_local8 == "onComplete")) || (_local8 == "onCompleteParams")) || (_local8 == "onCompleteScope")) || (_local8 == "runBackwards")) || (_local8 == "onUpdate")) || (_local8 == "onUpdateParams")) || (_local8 == "onUpdateScope")) || (_local8 == "autoAlpha")) || (_local8 == "onStart")) || (_local8 == "onStartParams")) || (_local8 == "onStartScope")) || (_local8 == "renderOnStart")) || (_local8 == "proxiedEase")) || (_local8 == "easeParams")) || ($hrp && ($reservedProps.indexOf((" " + _local8) + " ") != -1))) {
} else if ((_local8 == "tint") && (_local6 || (target instanceof TextField))) {
var _local3 = new Color(target);
var _local2 = vars._alpha;
if (_local2 != undefined) {
delete vars._alpha;
_local5 = tweens.length - 1;
while (_local5 > -1) {
if (tweens[_local5].p == "_alpha") {
tweens.splice(_local5, 1);
break;
}
_local5--;
}
} else {
_local2 = target._alpha;
}
if ((vars[_local8] == null) || (vars[_local8] == "")) {
addSubTween(tintProxy, _local3.getTransform(), {rb:0, gb:0, bb:0, ab:0, ra:_local2, ga:_local2, ba:_local2, aa:_local2}, {color:_local3});
} else {
addSubTween(tintProxy, _local3.getTransform(), {rb:vars[_local8] >> 16, gb:(vars[_local8] >> 8) & 255, bb:vars[_local8] & 255, ra:0, ga:0, ba:0, aa:_local2}, {color:_local3});
}
} else if ((_local8 == "frame") && (_local6)) {
addSubTween(frameProxy, {frame:target._currentframe}, {frame:vars[_local8]}, {mc:target});
} else if ((_local8 == "volume") && (_local6 || (target instanceof Sound))) {
var _local4;
if (_local6) {
_local4 = new Sound(target);
} else {
_local4 = Sound(target);
}
addSubTween(volumeProxy, {volume:_local4.getVolume()}, {volume:vars[_local8]}, {sound:_local4});
} else if (target[_local8] != undefined) {
if (typeof(vars[_local8]) == "number") {
tweens.push({o:target, p:_local8, s:target[_local8], c:vars[_local8] - target[_local8]});
} else {
tweens.push({o:target, p:_local8, s:target[_local8], c:Number(vars[_local8])});
}
}
}
}
if (vars.runBackwards == true) {
var _local7;
_local5 = tweens.length - 1;
while (_local5 > -1) {
_local7 = tweens[_local5];
_local7.s = _local7.s + _local7.c;
_local7.c = _local7.c * -1;
_local5--;
}
}
if (typeof(vars.autoAlpha) == "number") {
target._visible = !((vars.runBackwards == true) && (target._alpha == 0));
}
_initted = true;
}
function addSubTween($proxy, $target, $props, $info) {
var _local5 = {proxy:$proxy, target:$target, info:$info};
_subTweens.push(_local5);
for (var _local8 in $props) {
if ($target[_local8] != undefined) {
if (typeof($props[_local8]) == "number") {
tweens.push({o:$target, p:_local8, s:$target[_local8], c:$props[_local8] - $target[_local8], sub:_local5});
} else {
tweens.push({o:$target, p:_local8, s:$target[_local8], c:Number($props[_local8]), sub:_local5});
}
}
}
_hst = true;
}
static function to($target, $duration, $vars) {
return(new gs.TweenLite($target, $duration, $vars));
}
static function from($target, $duration, $vars) {
$vars.runBackwards = true;
return(new gs.TweenLite($target, $duration, $vars));
}
static function delayedCall($delay, $onComplete, $onCompleteParams, $onCompleteScope) {
return(new gs.TweenLite($onComplete, 0, {delay:$delay, onComplete:$onComplete, onCompleteParams:$onCompleteParams, onCompleteScope:$onCompleteScope, overwrite:false}));
}
function render($t) {
var _local5 = ($t - startTime) / 1000;
if (_local5 > duration) {
_local5 = duration;
}
var _local3;
var _local2;
var _local4 = vars.ease(_local5, 0, 1, duration);
_local2 = tweens.length - 1;
while (_local2 > -1) {
_local3 = tweens[_local2];
_local3.o[_local3.p] = _local3.s + (_local4 * _local3.c);
_local2--;
}
if (_hst) {
_local2 = _subTweens.length - 1;
while (_local2 > -1) {
_subTweens[_local2].proxy(_subTweens[_local2]);
_local2--;
}
}
if (vars.onUpdate != undefined) {
vars.onUpdate.apply(vars.onUpdateScope, vars.onUpdateParams);
}
if (_local5 == duration) {
complete(true);
}
}
static function executeAll() {
var _local5 = (_curTime = getTimer());
if (_listening) {
var _local2 = _all;
var _local1;
var _local4;
var _local3;
for (_local3 in _local2) {
for (_local4 in _local2[_local3]) {
_local1 = _local2[_local3][_local4];
if (_local1.active) {
_local1.render(_local5);
}
}
}
}
}
static function removeTween($t) {
_all[$t.endTargetID][$t.tweenID] = {active:false};
delete _all[$t.endTargetID][$t.tweenID];
}
static function killTweensOf($tg, $complete) {
var _local3 = getID($tg, true);
if ($complete) {
var _local1 = _all[_local3];
for (var _local2 in _local1) {
_local1[_local2].complete(false);
}
}
delete _all[_local3];
}
function complete($skipRender) {
if ($skipRender != true) {
if (!_initted) {
initTweenVals();
}
startTime = _curTime - (duration * 1000);
render(_curTime);
return(undefined);
}
if ((typeof(vars.autoAlpha) == "number") && (target._alpha == 0)) {
target._visible = false;
}
if (vars.onComplete) {
vars.onComplete.apply(vars.onCompleteScope, vars.onCompleteParams);
}
removeTween(this);
}
static function getID($tg, $lookup) {
var _local3;
if ($lookup) {
var _local1 = _all;
if (typeof($tg) == "movieclip") {
if (_local1[String($tg)] != undefined) {
return(String($tg));
}
_local3 = String($tg);
_all[_local3] = {info:[$tg, _local3]};
return(_local3);
}
for (var _local4 in _local1) {
if (_local1[_local4].info[0] == $tg) {
return(_local4);
}
}
}
_cnt++;
_local3 = "t" + _cnt;
_all[_local3] = {info:[$tg, _local3]};
return(_local3);
}
static function killGarbage() {
if (_listening) {
var _local1 = _all;
var _local2;
var _local3;
var _local5;
var _local6 = 0;
var _local4 = 0;
for (_local3 in _local1) {
_local4 = 0;
for (_local5 in _local1[_local3]) {
_local2 = _local1[_local3][_local5];
if (_local2.tweens == undefined) {
} else {
_local4++;
}
}
if (_local4 == 0) {
delete _local1[_local3];
} else {
_local6++;
}
}
if (_local6 == 0) {
_listening = false;
}
}
}
static function defaultEase($t, $b, $c, $d) {
$t = $t / $d;
return((((-$c) * $t) * ($t - 2)) + $b);
}
function easeProxy($t, $b, $c, $d) {
var _local3 = this;
return(_local3.proxiedEase.apply(null, arguments.concat(_local3.easeParams)));
}
static function tintProxy($o) {
$o.info.color.setTransform($o.target);
}
static function frameProxy($o) {
$o.info.mc.gotoAndStop(Math.round($o.target.frame));
}
static function volumeProxy($o) {
$o.info.sound.setVolume($o.target.volume);
}
function get active() {
if (_active) {
return(true);
}
if (((_curTime - initTime) / 1000) > delay) {
_active = true;
startTime = initTime + (delay * 1000);
if (!_initted) {
initTweenVals();
} else if (typeof(vars.autoAlpha) == "number") {
target._visible = true;
}
if (duration == 0.001) {
startTime = startTime - 1;
}
if (vars.onStart != undefined) {
vars.onStart.apply(vars.onStartScope, vars.onStartParams);
}
return(true);
}
return(false);
}
static var version = 6.2;
static var killDelayedCallsTo = killTweensOf;
static var _all = new Object();
static var _cnt = -16000;
static var _hrp = false;
}
Symbol 305 MovieClip [__Packages.gs.TweenFilterLite] Frame 0
class gs.TweenFilterLite extends gs.TweenLite
{
var _clrsa, _filters, _matrix, target, vars, _cmf, _endMatrix, tweens, startTime, duration, _hst, _subTweens;
function TweenFilterLite ($target, $duration, $vars) {
super($target, $duration, $vars);
if ((gs.TweenLite.version < 6.2) || (gs.TweenLite.version == undefined)) {
trace("TweenFilterLite error: Please update your TweenLite class. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com.");
}
if ($vars.type != undefined) {
trace(("TweenFilterLite warning: " + $target) + " appears to be using deprecated syntax. Please update to the new syntax. See http://www.TweenFilterLite.com for details.");
}
}
static function to($target, $duration, $vars) {
return(new gs.TweenFilterLite($target, $duration, $vars));
}
static function from($target, $duration, $vars) {
$vars.runBackwards = true;
return(new gs.TweenFilterLite($target, $duration, $vars));
}
function initTweenVals($hrp, $reservedProps) {
_clrsa = [];
_filters = [];
_matrix = _idMatrix.slice();
$reservedProps = $reservedProps || "";
$reservedProps = $reservedProps + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter ";
if ((typeof(target) == "movieclip") || (target instanceof TextField)) {
var _local4;
if (vars.blurFilter != undefined) {
_local4 = vars.blurFilter;
addFilter("blur", _local4, flash.filters.BlurFilter, ["blurX", "blurY", "quality"], new flash.filters.BlurFilter(0, 0, _local4.quality || 2));
}
if (vars.glowFilter != undefined) {
_local4 = vars.glowFilter;
addFilter("glow", _local4, flash.filters.GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new flash.filters.GlowFilter(16777215, 0, 0, 0, _local4.strength || 1, _local4.quality || 2, _local4.inner, _local4.knockout));
}
if (vars.colorMatrixFilter != undefined) {
_local4 = vars.colorMatrixFilter;
var _local11 = addFilter("colorMatrix", _local4, flash.filters.ColorMatrixFilter, [], new flash.filters.ColorMatrixFilter(_matrix));
_cmf = _local11.filter;
_matrix = _cmf.matrix;
if ((_local4.matrix != undefined) && (_local4.matrix instanceof Array)) {
_endMatrix = _local4.matrix;
} else {
if (_local4.relative == true) {
_endMatrix = _matrix.slice();
} else {
_endMatrix = _idMatrix.slice();
}
_endMatrix = setBrightness(_endMatrix, _local4.brightness);
_endMatrix = setContrast(_endMatrix, _local4.contrast);
_endMatrix = setHue(_endMatrix, _local4.hue);
_endMatrix = setSaturation(_endMatrix, _local4.saturation);
_endMatrix = setThreshold(_endMatrix, _local4.threshold);
if (!isNaN(_local4.colorize)) {
_endMatrix = colorize(_endMatrix, _local4.colorize, _local4.amount);
} else if (!isNaN(_local4.color)) {
_endMatrix = colorize(_endMatrix, _local4.color, _local4.amount);
}
}
var _local5 = 0;
while (_local5 < _endMatrix.length) {
if ((_matrix[_local5] != _endMatrix[_local5]) && (_matrix[_local5] != undefined)) {
tweens.push({o:_matrix, p:_local5.toString(), s:_matrix[_local5], c:_endMatrix[_local5] - _matrix[_local5]});
}
_local5++;
}
}
if (vars.dropShadowFilter != undefined) {
_local4 = vars.dropShadowFilter;
addFilter("dropShadow", _local4, flash.filters.DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new flash.filters.DropShadowFilter(0, 45, 0, 0, 0, 0, 1, _local4.quality || 2, _local4.inner, _local4.knockout, _local4.hideObject));
}
if (vars.bevelFilter != undefined) {
_local4 = vars.bevelFilter;
addFilter("bevel", _local4, flash.filters.BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new flash.filters.BevelFilter(0, 0, 16777215, 0.5, 0, 0.5, 2, 2, 0, _local4.quality || 2));
}
if (vars.runBackwards == true) {
var _local3;
var _local5 = 0;
while (_local5 < _clrsa.length) {
_local3 = _clrsa[_local5];
_local3.sr = _local3.sr + _local3.cr;
_local3.cr = _local3.cr * -1;
_local3.sg = _local3.sg + _local3.cg;
_local3.cg = _local3.cg * -1;
_local3.sb = _local3.sb + _local3.cb;
_local3.cb = _local3.cb * -1;
_local3.f[_local3.p] = ((_local3.sr << 16) | (_local3.sg << 8)) | _local3.sb;
_local5++;
}
}
super.initTweenVals(true, $reservedProps);
} else {
super.initTweenVals($hrp, $reservedProps);
}
}
function addFilter($name, $fv, $filterType, $props, $defaultFilter) {
var _local5 = {type:$filterType};
var _local8 = target.filters;
var _local3;
_local3 = 0;
while (_local3 < _local8.length) {
if (_local8[_local3] instanceof $filterType) {
_local5.filter = _local8[_local3];
break;
}
_local3++;
}
if (_local5.filter == undefined) {
_local5.filter = $defaultFilter;
_local8.push(_local5.filter);
target.filters = _local8;
}
var _local2;
var _local9;
var _local4;
var _local7;
_local3 = 0;
while (_local3 < $props.length) {
_local2 = $props[_local3];
if ($fv[_local2] != undefined) {
if (((_local2 == "color") || (_local2 == "highlightColor")) || (_local2 == "shadowColor")) {
_local4 = HEXtoRGB(_local5.filter[_local2]);
_local7 = HEXtoRGB($fv[_local2]);
_clrsa.push({f:_local5.filter, p:_local2, sr:_local4.rb, cr:_local7.rb - _local4.rb, sg:_local4.gb, cg:_local7.gb - _local4.gb, sb:_local4.bb, cb:_local7.bb - _local4.bb});
} else if ((((_local2 == "quality") || (_local2 == "inner")) || (_local2 == "knockout")) || (_local2 == "hideObject")) {
_local5.filter[_local2] = $fv[_local2];
} else {
if (typeof($fv[_local2]) == "number") {
_local9 = $fv[_local2] - _local5.filter[_local2];
} else {
_local9 = Number($fv[_local2]);
}
tweens.push({o:_local5.filter, p:_local2, s:_local5.filter[_local2], c:_local9});
}
}
_local3++;
}
_filters.push(_local5);
_hf = true;
return(_local5);
}
function render($t) {
var _local11 = ($t - startTime) / 1000;
if (_local11 > duration) {
_local11 = duration;
}
var _local7 = vars.ease(_local11, 0, 1, duration);
var _local4;
var _local3;
var _local5;
var _local9;
var _local10;
var _local8;
_local3 = tweens.length - 1;
while (_local3 > -1) {
_local4 = tweens[_local3];
_local4.o[_local4.p] = _local4.s + (_local7 * _local4.c);
_local3--;
}
if (_hf) {
_local3 = _clrsa.length - 1;
while (_local3 > -1) {
_local4 = _clrsa[_local3];
_local9 = _local4.sr + (_local7 * _local4.cr);
_local10 = _local4.sg + (_local7 * _local4.cg);
_local8 = _local4.sb + (_local7 * _local4.cb);
_local4.f[_local4.p] = ((_local9 << 16) | (_local10 << 8)) | _local8;
_local3--;
}
if (_cmf) {
_cmf.matrix = _matrix;
}
var _local6 = target.filters;
_local3 = 0;
while (_local3 < _filters.length) {
_local5 = _local6.length - 1;
while (_local5 > -1) {
if (_local6[_local5] instanceof _filters[_local3].type) {
_local6.splice(_local5, 1, _filters[_local3].filter);
break;
}
_local5--;
}
_local3++;
}
target.filters = _local6;
}
if (_hst) {
_local3 = _subTweens.length - 1;
while (_local3 > -1) {
_subTweens[_local3].proxy(_subTweens[_local3]);
_local3--;
}
}
if (vars.onUpdate != undefined) {
vars.onUpdate.apply(null, vars.onUpdateParams);
}
if (_local11 == duration) {
super.complete(true);
}
}
function HEXtoRGB($n) {
return({rb:$n >> 16, gb:($n >> 8) & 255, bb:$n & 255});
}
static function colorize($m, $color, $amount) {
if (($color == undefined) || (isNaN($color))) {
return($m);
}
if ($amount == undefined) {
$amount = 1;
}
var _local3 = (($color >> 16) & 255) / 255;
var _local5 = (($color >> 8) & 255) / 255;
var _local2 = ($color & 255) / 255;
var _local4 = 1 - $amount;
var _local7 = [_local4 + (($amount * _local3) * _lumR), ($amount * _local3) * _lumG, ($amount * _local3) * _lumB, 0, 0, ($amount * _local5) * _lumR, _local4 + (($amount * _local5) * _lumG), ($amount * _local5) * _lumB, 0, 0, ($amount * _local2) * _lumR, ($amount * _local2) * _lumG, _local4 + (($amount * _local2) * _lumB), 0, 0, 0, 0, 0, 1, 0];
return(applyMatrix(_local7, $m));
}
static function setThreshold($m, $n) {
if (($n == undefined) || (isNaN($n))) {
return($m);
}
var _local2 = [_lumR * 256, _lumG * 256, _lumB * 256, 0, -256 * $n, _lumR * 256, _lumG * 256, _lumB * 256, 0, -256 * $n, _lumR * 256, _lumG * 256, _lumB * 256, 0, -256 * $n, 0, 0, 0, 1, 0];
return(applyMatrix(_local2, $m));
}
static function setHue($m, $n) {
if (($n == undefined) || (isNaN($n))) {
return($m);
}
$n = $n * (Math.PI/180);
var _local1 = Math.cos($n);
var _local2 = Math.sin($n);
var _local4 = [(_lumR + (_local1 * (1 - _lumR))) + (_local2 * (-_lumR)), (_lumG + (_local1 * (-_lumG))) + (_local2 * (-_lumG)), (_lumB + (_local1 * (-_lumB))) + (_local2 * (1 - _lumB)), 0, 0, (_lumR + (_local1 * (-_lumR))) + (_local2 * 0.143), (_lumG + (_local1 * (1 - _lumG))) + (_local2 * 0.14), (_lumB + (_local1 * (-_lumB))) + (_local2 * -0.283), 0, 0, (_lumR + (_local1 * (-_lumR))) + (_local2 * (-(1 - _lumR))), (_lumG + (_local1 * (-_lumG))) + (_local2 * _lumG), (_lumB + (_local1 * (1 - _lumB))) + (_local2 * _lumB), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return(applyMatrix(_local4, $m));
}
static function setBrightness($m, $n) {
if (($n == undefined) || (isNaN($n))) {
return($m);
}
$n = ($n * 100) - 100;
return(applyMatrix([1, 0, 0, 0, $n, 0, 1, 0, 0, $n, 0, 0, 1, 0, $n, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], $m));
}
static function setSaturation($m, $n) {
if (($n == undefined) || (isNaN($n))) {
return($m);
}
var _local4 = 1 - $n;
var _local3 = _local4 * _lumR;
var _local5 = _local4 * _lumG;
var _local2 = _local4 * _lumB;
var _local6 = [_local3 + $n, _local5, _local2, 0, 0, _local3, _local5 + $n, _local2, 0, 0, _local3, _local5, _local2 + $n, 0, 0, 0, 0, 0, 1, 0];
return(applyMatrix(_local6, $m));
}
static function setContrast($m, $n) {
if (($n == undefined) || (isNaN($n))) {
return($m);
}
$n = $n + 0.01;
var _local2 = [$n, 0, 0, 0, 128 * (1 - $n), 0, $n, 0, 0, 128 * (1 - $n), 0, 0, $n, 0, 128 * (1 - $n), 0, 0, 0, 1, 0];
return(applyMatrix(_local2, $m));
}
static function applyMatrix($m, $m2) {
if (((($m == undefined) || (!($m instanceof Array))) || ($m2 == undefined)) || (!($m2 instanceof Array))) {
return($m2);
}
var _local7 = [];
var _local2 = 0;
var _local5 = 0;
var _local6 = 0;
while (_local6 < 4) {
var _local1 = 0;
while (_local1 < 5) {
if (_local1 == 4) {
_local5 = $m[_local2 + 4];
} else {
_local5 = 0;
}
_local7[_local2 + _local1] = (((($m[_local2] * $m2[_local1]) + ($m[_local2 + 1] * $m2[_local1 + 5])) + ($m[_local2 + 2] * $m2[_local1 + 10])) + ($m[_local2 + 3] * $m2[_local1 + 15])) + _local5;
_local1++;
}
_local2 = _local2 + 5;
_local6++;
}
return(_local7);
}
static var version = 7.1;
static var delayedCall = gs.TweenLite.delayedCall;
static var killTweensOf = gs.TweenLite.killTweensOf;
static var killDelayedCallsTo = gs.TweenLite.killDelayedCallsTo;
static var _idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
static var _lumR = 0.212671;
static var _lumG = 0.71516;
static var _lumB = 0.072169;
var _hf = false;
}
Symbol 306 MovieClip [__Packages.chicken.Data] Frame 0
class chicken.Data
{
static var _levels, _colliders, _achievements;
function Data () {
}
static function get Levels() {
if (!_levels) {
createLevels();
}
return(_levels);
}
static function get Colliders() {
if (!_colliders) {
createColliders();
}
return(_colliders);
}
static function get Achievements() {
if (!_achievements) {
createAchievements();
}
return(_achievements);
}
static function createLevels() {
_levels = new Array();
_levels.push({Id:1, ChickenStartX:340, ChickenStartY:200, Direction:"left", Background:"FarmyardLevelBackground", Anims:"FarmyardAnims", GroundLevel:450});
}
static function createAchievements() {
_achievements = new Array();
_achievements.push({Id:1, AchievementName:"Cow", Achievement:["ColliderCow2"]});
_achievements.push({Id:2, AchievementName:"Hay", Achievement:["ColliderHay1", "ColliderHay2", "ColliderSty"]});
_achievements.push({Id:3, AchievementName:"Trailer", Achievement:["ColliderTrailer"]});
_achievements.push({Id:4, AchievementName:"Jetty", Achievement:["ColliderJetty"]});
_achievements.push({Id:5, AchievementName:"Barn", Achievement:["ColliderBarn1", "ColliderBarn2"]});
}
static function createColliders() {
_colliders = new Array();
_colliders.push({Id:1, LevelId:1, Name:"ColliderBarn1", Action:chicken.Collider.CHICKEN_FADE_LEFT, Score:8, DropLife:false, FX:"Cluck2.wav"});
_colliders.push({Id:2, LevelId:1, Name:"ColliderBarn2", Action:chicken.Collider.CHICKEN_FADE_LEFT, Score:9, DropLife:false, FX:"Cluck.wav"});
_colliders.push({Id:3, LevelId:1, Name:"ColliderBarn3", Action:chicken.Collider.CHICKEN_SPLAT_LEFT, Score:0, DropLife:true, FX:"thud2.wav"});
_colliders.push({Id:4, LevelId:1, Name:"ColliderBillboard", Action:chicken.Collider.CHICKEN_SPLAT_DOWN, Score:0, DropLife:true, FX:"thud2.wav"});
_colliders.push({Id:5, LevelId:1, Name:"ColliderRocks2", Action:chicken.Collider.CHICKEN_SPLAT_LEFT, Score:0, DropLife:true, FX:"splat.wav"});
_colliders.push({Id:6, LevelId:1, Name:"ColliderCliff", Action:chicken.Collider.CHICKEN_FADE_DOWN, Score:0, DropLife:true, FX:"drop.wav"});
_colliders.push({Id:7, LevelId:1, Name:"ColliderSty", Action:chicken.Collider.CHICKEN_LAND, Score:6, DropLife:false, FX:"skid.wav"});
_colliders.push({Id:8, LevelId:1, Name:"ColliderPig", Action:chicken.Collider.CHICKEN_JUMP_UP, Score:0, DropLife:true, FX:"Pig.wav"});
_colliders.push({Id:9, LevelId:1, Name:"ColliderHay2", Action:chicken.Collider.CHICKEN_SOFT_LAND, Score:3, DropLife:false, FX:"Cluck.wav"});
_colliders.push({Id:10, LevelId:1, Name:"ColliderFork", Action:chicken.Collider.CHICKEN_JUMP_UP, Score:0, DropLife:true, FX:"squelch.wav"});
_colliders.push({Id:11, LevelId:1, Name:"ColliderHay1", Action:chicken.Collider.CHICKEN_SOFT_LAND, Score:2, DropLife:false, FX:"Cluck.wav"});
_colliders.push({Id:12, LevelId:1, Name:"ColliderCow1", Action:chicken.Collider.CHICKEN_COW_ARSE, Score:0, DropLife:true, FX:"Cow.wav"});
_colliders.push({Id:13, LevelId:1, Name:"ColliderCow2", Action:chicken.Collider.CHICKEN_JUMP_UP, Score:8, DropLife:false, FX:"Cluck.wav"});
_colliders.push({Id:14, LevelId:1, Name:"ColliderTrailer", Action:chicken.Collider.CHICKEN_LAND, Score:5, DropLife:false, FX:"skid.wav"});
_colliders.push({Id:15, LevelId:1, Name:"ColliderWires", Action:chicken.Collider.CHICKEN_ELECTROCUTE, Score:0, DropLife:true, FX:"electric.wav"});
_colliders.push({Id:16, LevelId:1, Name:"ColliderRocks1", Action:chicken.Collider.CHICKEN_SPLAT_DOWN, Score:0, DropLife:true, FX:"splat.wav"});
_colliders.push({Id:17, LevelId:1, Name:"ColliderWater", Action:chicken.Collider.CHICKEN_SPLASH, Score:0, DropLife:true, FX:"splash.wav"});
_colliders.push({Id:18, LevelId:1, Name:"ColliderJetty", Action:chicken.Collider.CHICKEN_LAND, Score:7, DropLife:false, FX:"skid.wav"});
}
static function getColliderByName(name) {
for (var _local2 in Colliders) {
if (Colliders[_local2].Name == name) {
return(Colliders[_local2]);
}
}
}
static function getAchievementByName(name) {
for (var _local3 in Achievements) {
for (var _local2 in Achievements[_local3].Achievement) {
if (Achievements[_local3].Achievement[_local2] == name) {
return(Achievements[_local3]);
}
}
}
}
}
Symbol 307 MovieClip [__Packages.chicken.Chicken] Frame 0
class chicken.Chicken extends chicken.BaseObject
{
var _shadow, _parent, _arrow, _worldX, _x, _worldY, _y, sound, removeMovieClip, _centerX, _centerY, gotoAndStop, Controller, _rotation, __set__FrictionX, __set__FrictionY, _pressed, enabled, __set__DistanceFromGround, __get__WorldY, startDrag, stopDrag, _height, __get__DistanceFromGround, localToGlobal, FrictionX, FrictionY;
function Chicken () {
super();
}
function onLoad() {
_shadow = _parent.attachMovie("ChickenShadow", "_shadow", _parent.getNextHighestDepth());
_arrow = _parent.createEmptyMovieClip("_arrow", _parent.getNextHighestDepth());
_worldX = _x;
_worldY = _y;
sound = new Sound();
}
function removeMe() {
sound.stop();
delete sound;
_shadow.removeMovieClip();
_arrow.removeMovieClip();
removeMovieClip();
}
function onPress() {
_centerX = _x;
_centerY = _y;
_mouseDown = true;
gotoAndStop(2);
}
function onRelease() {
_mouseDown = false;
if (Controller.__get__PlaySoundEffects()) {
sound.attachSound("launch.wav");
sound.start(0, 1);
}
}
function onReleaseOutside() {
_mouseDown = false;
if (Controller.__get__PlaySoundEffects()) {
sound.attachSound("launch.wav");
sound.start(0, 1);
}
}
function reset() {
_worldX = _x;
_worldY = _y;
gotoAndStop(1);
_prevX = 0;
_prevY = 0;
_xSpeed = 0;
_ySpeed = 0;
_rotation = 0;
__set__FrictionX(0);
__set__FrictionY(0);
_mouseDown = false;
_pressed = false;
_maxHeight = 0;
_maxDistance = 0;
enabled = true;
}
function onEnterFrame() {
__set__DistanceFromGround(Controller.__get__CurrentLevelClip().GroundLevel - __get__WorldY());
if (_mouseDown) {
_pressed = true;
startDrag(true, _centerX + 20, _centerY - 100, _centerX + _xMaxPower, _centerY + _yMaxPower);
_rotation = getAngleToOrigin();
Controller.angleChanged(getAngleToOrigin());
Controller.powerChanged(getPowerToOrigin());
_xSpeed = 0;
_ySpeed = 0;
drawLinesToOrigin();
calcMoveSpeed();
_worldX = _x;
_worldY = _y;
_pressed = true;
} else if (_pressed) {
enabled = false;
calcGravityWind();
calcFriction();
stopDrag();
_arrow.clear();
_prevX = _worldX;
_prevY = _worldY;
_worldX = _worldX - _xSpeed;
_worldY = _worldY - _ySpeed;
Controller.MoveObject(this, _xSpeed, _ySpeed);
_rotation = getAngleToWayPoint();
reposition();
Controller.heightChanged(calcMaxHeight());
Controller.distanceChanged(calcMaxDistance());
}
_shadow._y = (_y + __get__DistanceFromGround()) + _height;
_shadow._x = _x;
_shadow._xscale = (_shadow._yscale = Math.max(50, Math.min((_y - __get__DistanceFromGround()) * 2, 200)));
}
function get Exhaustion() {
return(_exhaustion);
}
function set Exhaustion(value) {
_exhaustion = value;
//return(Exhaustion);
}
function getAngleToOrigin() {
var _local2 = Math.atan2(_y - _centerY, _x - _centerX);
return(Math.round((_local2 * 180) / Math.PI));
}
function calcMaxHeight() {
_maxHeight = Math.max(_maxHeight, Math.round(Math.max(0, _centerY - _worldY) / 50));
return(_maxHeight);
}
function calcMaxDistance() {
_maxDistance = Math.round(Math.max(0, _centerX - _worldX) / 50);
return(_maxDistance);
}
function getPowerToOrigin() {
var _local4 = (-_x) + _centerX;
var _local5 = (-_y) + _centerY;
var _local7 = Math.sqrt((_local4 * _local4) + (_local5 * _local5));
var _local3 = (-(_centerX + _xMaxPower)) + _centerX;
var _local2 = (-(_centerY + _yMaxPower)) + _centerY;
var _local6 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
return(Math.round((_local7 / _local6) * 100));
}
function drawLinesToOrigin() {
var _local3 = (-_x) + _centerX;
var _local4 = (-_y) + _centerY;
var _local5 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
_arrow.clear();
_arrow.beginFill(16777215, 50);
_arrow.lineStyle(1, 16777215, 25);
_arrow.moveTo(_centerX, _centerY);
var _local2 = {x:0, y:-(0.25 * _local5)};
localToGlobal(_local2);
_arrow.lineTo(_local2.x, _local2.y);
_local2 = {x:0, y:0.25 * _local5};
localToGlobal(_local2);
_arrow.lineTo(_local2.x, _local2.y);
_arrow.lineTo(_centerX, _centerY);
_arrow.endFill();
}
function calcMoveSpeed() {
var _local3 = (-_x) + _centerX;
var _local2 = (-_y) + _centerY;
_xSpeed = (-_local3) * 0.24;
_ySpeed = (-_local2) * 0.24;
}
function calcGravityWind() {
_xSpeed = _xSpeed * chicken.ChickenController.WIND;
_ySpeed = _ySpeed - chicken.ChickenController.GRAVITY;
}
function calcFriction() {
_xSpeed = _xSpeed * FrictionX;
_ySpeed = _ySpeed * FrictionY;
}
function getAngleToWayPoint() {
var _local2 = Math.atan2(_prevY - _worldY, _prevX - _worldX);
return(Math.round((_local2 * 180) / Math.PI));
}
function reposition() {
var _local2 = (-_x) + _centerX;
_x = _x - ((-_local2) * 0.1);
}
function collision(collider) {
__set__FrictionX(1);
__set__FrictionY(1);
_pressed = false;
}
var _mouseDown = false;
var _xSpeed = 0;
var _ySpeed = 0;
var _xMaxPower = 300;
var _yMaxPower = 200;
var _prevX = 0;
var _prevY = 0;
var _exhaustion = 0;
var _maxHeight = 0;
var _maxDistance = 0;
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
stop();
Symbol 68 MovieClip [ColliderBarn1] Frame 1
#initclip 29
Object.registerClass("ColliderBarn1", chicken.Collider);
#endinitclip
Symbol 70 MovieClip [ColliderBarn2] Frame 1
#initclip 11
Object.registerClass("ColliderBarn2", chicken.Collider);
#endinitclip
Symbol 72 MovieClip [ColliderBarn3] Frame 1
#initclip 12
Object.registerClass("ColliderBarn3", chicken.Collider);
#endinitclip
Symbol 74 MovieClip [ColliderFork] Frame 1
#initclip 13
Object.registerClass("ColliderFork", chicken.Collider);
#endinitclip
Symbol 76 MovieClip [ColliderCow1] Frame 1
#initclip 14
Object.registerClass("ColliderCow1", chicken.Collider);
#endinitclip
Symbol 78 MovieClip [ColliderCow2] Frame 1
#initclip 15
Object.registerClass("ColliderCow2", chicken.Collider);
#endinitclip
Symbol 80 MovieClip [ColliderTrailer] Frame 1
#initclip 16
Object.registerClass("ColliderTrailer", chicken.Collider);
#endinitclip
Symbol 82 MovieClip [ColliderWires] Frame 1
#initclip 17
Object.registerClass("ColliderWires", chicken.Collider);
#endinitclip
Symbol 84 MovieClip [ColliderJetty] Frame 1
#initclip 18
Object.registerClass("ColliderJetty", chicken.Collider);
#endinitclip
Symbol 86 MovieClip [ColliderWater] Frame 1
#initclip 19
Object.registerClass("ColliderWater", chicken.Collider);
#endinitclip
Symbol 88 MovieClip [ColliderRocks1] Frame 1
#initclip 20
Object.registerClass("ColliderRocks1", chicken.Collider);
#endinitclip
Symbol 90 MovieClip [ColliderHay1] Frame 1
#initclip 21
Object.registerClass("ColliderHay1", chicken.Collider);
#endinitclip
Symbol 92 MovieClip [ColliderSty] Frame 1
#initclip 22
Object.registerClass("ColliderSty", chicken.Collider);
#endinitclip
Symbol 94 MovieClip [ColliderPig] Frame 1
#initclip 23
Object.registerClass("ColliderPig", chicken.Collider);
#endinitclip
Symbol 96 MovieClip [ColliderRocks2] Frame 1
#initclip 24
Object.registerClass("ColliderRocks2", chicken.Collider);
#endinitclip
Symbol 98 MovieClip [ColliderCliff] Frame 1
#initclip 25
Object.registerClass("ColliderCliff", chicken.Collider);
#endinitclip
Symbol 100 MovieClip [ColliderHay2] Frame 1
#initclip 26
Object.registerClass("ColliderHay2", chicken.Collider);
#endinitclip
Symbol 101 MovieClip [FarmyardLevelBackground] Frame 1
#initclip 27
Object.registerClass("FarmyardLevelBackground", chicken.Level);
#endinitclip
Symbol 103 MovieClip [DummyLevel] Frame 1
#initclip 28
Object.registerClass("DummyLevel", chicken.Level);
#endinitclip
Symbol 119 Button
on (release) {
playAgain();
}
Symbol 122 Button
on (release) {
getURL ("http://www.shockwood.com", "_blank");
}
Symbol 139 Button
on (release) {
gotoAndStop ("score");
}
Symbol 142 Button
on (release) {
restart();
}
Symbol 154 Button
on (release) {
trace(playerName);
_level0.controller.submitScore(playerName);
}
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 2
stop();
achievement.gotoAndStop(achievementFrame);
Symbol 155 MovieClip Frame 3
stop();
Symbol 155 MovieClip Frame 4
stop();
Symbol 155 MovieClip Frame 5
stop();
Symbol 155 MovieClip Frame 6
stop();
Symbol 155 MovieClip Frame 7
stop();
Symbol 155 MovieClip Frame 8
_level0.controller.submitScore(playerName);
stop();
Symbol 160 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 160 MovieClip Frame 23
playSound();
Symbol 160 MovieClip Frame 27
stop();
endAnim();
Symbol 161 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 161 MovieClip Frame 22
playSound();
Symbol 161 MovieClip Frame 27
stop();
endAnim();
Symbol 162 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 162 MovieClip Frame 25
Chicken.gotoAndStop(3);
playSound();
Symbol 162 MovieClip Frame 35
stop();
endAnim();
Symbol 163 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 163 MovieClip Frame 26
Chicken.gotoAndStop(3);
playSound();
Symbol 163 MovieClip Frame 43
stop();
endAnim();
Symbol 164 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 164 MovieClip Frame 28
Chicken.gotoAndStop(3);
playSound();
Symbol 164 MovieClip Frame 29
stop();
Chicken.gotoAndStop(4);
endAnim();
Symbol 166 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 166 MovieClip Frame 32
Chicken.gotoAndStop(1);
Symbol 166 MovieClip Frame 43
playSound();
Symbol 166 MovieClip Frame 55
stop();
endAnim();
Symbol 167 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 167 MovieClip Frame 23
Chicken.gotoAndStop(1);
playSound();
Symbol 167 MovieClip Frame 46
stop();
endAnim();
Symbol 169 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 169 MovieClip Frame 31
pig.play();
playSound();
Symbol 169 MovieClip Frame 38
stop();
endAnim();
Symbol 170 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 170 MovieClip Frame 14
Chicken.gotoAndStop(1);
Symbol 170 MovieClip Frame 32
Chicken.gotoAndStop(2);
playSound();
Symbol 170 MovieClip Frame 34
stop();
_level0.controller.endAnim();
Symbol 176 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 176 MovieClip Frame 26
playSound();
Symbol 176 MovieClip Frame 32
Chicken.gotoAndStop(5);
stop();
endAnim();
Symbol 177 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 177 MovieClip Frame 19
Chicken.gotoAndStop(1);
Symbol 177 MovieClip Frame 31
playSound();
Symbol 177 MovieClip Frame 39
stop();
Chicken.gotoAndStop(2);
endAnim();
Symbol 180 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 180 MovieClip Frame 14
Chicken.gotoAndStop(1);
Symbol 180 MovieClip Frame 27
cow.play();
playSound();
Symbol 180 MovieClip Frame 34
stop();
Chicken.gotoAndStop(2);
endAnim();
Symbol 181 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 181 MovieClip Frame 20
Chicken.gotoAndStop(1);
Symbol 181 MovieClip Frame 32
playSound();
Symbol 181 MovieClip Frame 42
stop();
Chicken.gotoAndStop(2);
endAnim();
Symbol 182 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 182 MovieClip Frame 24
Chicken.gotoAndStop(1);
Symbol 182 MovieClip Frame 33
playSound();
Symbol 182 MovieClip Frame 53
stop();
Chicken.gotoAndStop(2);
endAnim();
Symbol 185 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 185 MovieClip Frame 27
playSound();
Symbol 185 MovieClip Frame 48
stop();
endAnim();
Symbol 186 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 186 MovieClip Frame 32
Chicken.gotoAndStop(3);
playSound();
Symbol 186 MovieClip Frame 33
stop();
Chicken.gotoAndStop(4);
endAnim();
Symbol 198 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 198 MovieClip Frame 34
Chicken.gotoAndStop(1);
Symbol 198 MovieClip Frame 36
playSound();
Symbol 198 MovieClip Frame 54
stop();
Chicken.gotoAndStop(2);
endAnim();
Symbol 199 MovieClip Frame 1
Chicken.gotoAndStop(2);
Symbol 199 MovieClip Frame 20
Chicken.gotoAndStop(1);
Symbol 199 MovieClip Frame 32
playSound();
Symbol 199 MovieClip Frame 45
stop();
Chicken.gotoAndStop(2);
endAnim();
Symbol 200 MovieClip [FarmyardAnims] Frame 1
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 2
stop();
endAnim();
Symbol 200 MovieClip [FarmyardAnims] Frame 3
stop();
playSound();
Symbol 200 MovieClip [FarmyardAnims] Frame 4
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 5
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 6
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 7
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 8
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 9
stop();
InnerChicken.gotoAndStop(1);
Symbol 200 MovieClip [FarmyardAnims] Frame 10
stop();
InnerChicken.gotoAndStop(2);
Symbol 200 MovieClip [FarmyardAnims] Frame 11
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 12
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 13
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 14
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 15
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 16
stop();
InnerChicken.gotoAndStop(2);
Symbol 200 MovieClip [FarmyardAnims] Frame 17
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 18
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 19
stop();
Symbol 200 MovieClip [FarmyardAnims] Frame 20
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 227 Button
on (release) {
if (seenInstructions) {
gotoAndStop ("game");
} else {
gotoAndStop ("instructions");
}
}
Symbol 230 Button
on (release) {
gotoAndStop ("instructions");
}
Symbol 233 Button
on (release) {
getURL ("http://www.shockwood.com/score.aspx?gameId=d6ab80f6965eb5a8", "_blank");
}
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 2
stop();
Symbol 271 Button
on (release) {
_parent.gotoAndStop("game");
}
Symbol 272 MovieClip Frame 1
stop();
Symbol 298 Button
on (release) {
gotoAndStop ("menu");
}