Frame 1
function enterRank() {
if (!alreadySentRecord) {
waiting_mc._visible = true;
delete enterRanking_mc.send_btn.onRelease;
enterRanking_mc._visible = false;
alreadySentRecord = true;
serverRank.nameuser = _root.nomeUsuario;
serverRank.scorecoco = Jogo.pontos;
serverRank.sendAndLoad(serverAddress, serverRank, "POST");
}
}
function redireciona(target_mc, obj) {
getURL ("http://www.ruyadorno.com", "_blank");
}
function goAdorninho() {
getURL ("http://www.adorninho.com", "_blank");
}
function stopSounds() {
mainVolume_num = 0;
var _local1 = 0;
while (_local1 < sounds_arr.length) {
sounds_arr[_local1].setVolume(mainVolume_num);
_local1++;
}
stopAllSounds();
}
function playSounds() {
mainVolume_num = 100;
var _local1 = 0;
while (_local1 < sounds_arr.length) {
sounds_arr[_local1].setVolume(mainVolume_num);
_local1++;
}
sounds_arr[0].setVolume(mainVolume_num * 0.5);
currentMusic.setVolume(mainVolume_num);
currentMusic.start(0, 99999);
}
function changeSound() {
if (main_mc.isPlaying) {
main_mc.isPlaying = false;
this.gotoAndStop("off");
main_mc.stopSounds();
} else {
main_mc.isPlaying = true;
this.gotoAndStop("on");
main_mc.playSounds();
}
}
System.security.allowDomain("*");
System.security.loadPolicyFile("http://www.adorninho.com/crossdomain.xml");
stop();
carregador.stop();
System.useCodepage = true;
Stage.align = "T";
Stage.scaleMode = "noScale";
var main_mc = this;
var topRanking_mc;
var enterRanking_mc;
var waiting_mc;
var menu_cm = new ContextMenu();
var mainVolume_num = 100;
var sounds_arr = new Array();
var currentMusic;
var isPlaying = true;
var storeInfo = SharedObject.getLocal("adorninhoCoconutGame");
var serverRank = new LoadVars();
var serverAddress = "http://www.adorninho.com/games/rankings/rankingadorninhococonutgame.php";
var alreadySentRecord;
menu_cm.customItems.push(new ContextMenuItem("www.ruyadorno.com", redireciona));
menu_cm.hideBuiltInItems();
this.menu = menu_cm;
carregador.onEnterFrame = function () {
var _local2 = Math.round((main_mc.getBytesLoaded() * 100) / main_mc.getBytesTotal());
var _local4 = this._totalframes;
var _local3 = Math.round((_local2 * _local4) / 100);
if (_local2 >= 100) {
main_mc.gotoAndPlay("abertura");
delete this.onEnterFrame;
} else {
this.gotoAndStop(_local3);
main_mc.carrega.text = ("CARREGANDO " + _local2) + "%";
}
};
serverRank.onLoad = function () {
waiting_mc._visible = false;
if (serverRank.isRanking == 1) {
main_mc.enterRanking_mc._visible = true;
main_mc.enterRanking_mc.send_btn.onRelease = function () {
enterRank();
};
main_mc.topRanking_mc._visible = false;
serverRank.isRanking = null;
} else {
main_mc.topRanking_mc._visible = true;
main_mc.topRanking_mc.lideres.html = true;
main_mc.topRanking_mc.lideres.htmlText = serverRank.top;
delete main_mc.enterRanking_mc.send_btn.onRelease;
main_mc.enterRanking_mc._visible = false;
}
};
logo_mc.onRelease = function () {
goAdorninho();
};
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__("288dc5ca", this, 10301, true);
Frame 10
onEnterFrame = Adorninho.movimenta;
Frame 70
stop();
var som_level = new Sound();
som_level.attachSound("som_level");
som_level.setVolume(mainVolume_num * 0.5);
var som_pontos = new Sound();
som_pontos.attachSound("som_pontos");
som_pontos.setVolume(mainVolume_num);
var som_pegacoco = new Sound();
som_pegacoco.attachSound("som_pegacoco");
som_pegacoco.setVolume(mainVolume_num);
var som_coco = new Sound();
som_coco.attachSound("som_coco");
som_coco.setVolume(mainVolume_num);
var som_bate = new Sound();
som_bate.attachSound("som_batecoco");
som_bate.setVolume(mainVolume_num);
var som_lanca = new Sound();
som_lanca.attachSound("som_lancacoco");
som_lanca.setVolume(mainVolume_num);
var som_jogo = new Sound();
som_jogo.attachSound("som_Jogo");
som_jogo.setVolume(mainVolume_num);
var som_gameover = new Sound();
som_gameover.attachSound("som_gameover");
som_gameover.setVolume(mainVolume_num);
var som_menu = new Sound();
som_menu.attachSound("som_menu");
som_menu.setVolume(mainVolume_num);
som_menu.start(0, 9999);
som_menu.setVolume(mainVolume_num * 2.5);
sounds_arr.splice(0);
sounds_arr.push(som_level);
sounds_arr.push(som_pontos);
sounds_arr.push(som_pegacoco);
sounds_arr.push(som_coco);
sounds_arr.push(som_bate);
sounds_arr.push(som_lanca);
currentMusic = som_menu;
controleSom_mc.isPlaying = true;
controleSom_mc.onRelease = main_mc.changeSound;
Frame 71
som_menu.stop();
if (main_mc.isPlaying) {
som_jogo.start(0, 99999);
som_jogo.setVolume(mainVolume_num);
} else {
controleSom_mc.gotoAndStop("off");
}
currentMusic = som_jogo;
controleSom_mc.enabled = true;
controleSom_mc.onRelease = main_mc.changeSound;
Instance of Symbol 247 MovieClip "painel" in Frame 71
onClipEvent (load) {
this.swapDepths(1600);
}
Frame 86
controleSom_mc.enabled = true;
if (!storeInfo.data.isGameVisited) {
stop();
_root.isInstructing = true;
instruction_mc.onInstructionFinish = function () {
main_mc.nextFrame();
delete this.onInstructionFinish;
};
}
Frame 87
stop();
_root.isInstructing = false;
var iniciaCocos = new Coco();
var iniciaCaixa = new Caixa();
var iniciaJogo = new Jogo();
storeInfo.data.isGameVisited = true;
storeInfo.flush();
Frame 88
delete iniciaCocos;
painel.removeMovieClip();
stop();
som_jogo.stop();
som_gameover.start();
currentMusic = som_gameover;
controleSom_mc.enabled = false;
Frame 89
topRanking_mc = ranking.topRanking_mc;
enterRanking_mc = ranking.enterRanking_mc;
waiting_mc = ranking.timing_mc;
serverRank.scorecoco = Jogo.pontos;
serverRank.nameuser = "=== Empty Field";
serverRank.sendAndLoad(serverAddress, serverRank, "POST");
ranking.resultadofinal.text = Jogo.pontos;
ranking.topRanking_mc._visible = false;
ranking.enterRanking_mc._visible = false;
alreadySentRecord = false;
Frame 103
stop();
currentMusic = null;
topRanking_mc = ranking.topRanking_mc;
enterRanking_mc = ranking.enterRanking_mc;
Symbol 72 MovieClip [personagem] Frame 1
#initclip 10
Object.registerClass("personagem", Adorninho);
#endinitclip
Symbol 72 MovieClip [personagem] Frame 49
gotoAndPlay ("inicio");
Symbol 72 MovieClip [personagem] Frame 52
Symbol 72 MovieClip [personagem] Frame 56
gotoAndPlay ("inicio");
Symbol 72 MovieClip [personagem] Frame 59
Symbol 72 MovieClip [personagem] Frame 63
gotoAndPlay ("inicio");
Symbol 72 MovieClip [personagem] Frame 67
gotoAndPlay ("inicio");
Symbol 72 MovieClip [personagem] Frame 72
gotoAndPlay ("inicio");
Symbol 79 MovieClip [coco] Frame 1
stop();
Symbol 79 MovieClip [coco] Frame 4
stop();
Symbol 301 MovieClip [__Packages.Jogo] Frame 0
class Jogo
{
function Jogo () {
_root.painel.conta.text = pontos;
_root.contador_level.mostra.contador.text = "Level " + level;
}
static function adiciona_pontos(quantos) {
pontos = pontos + quantos;
_root.painel.conta.text = pontos;
}
static function passaLevel() {
adiciona_pontos(level * 1000);
level++;
_root.contador_level.mostra.contador.text = "Level " + level;
_root.contador_level.gotoAndPlay(1);
}
static var pontos = 0;
static var level = 1;
}
Symbol 302 MovieClip [__Packages.Adorninho] Frame 0
class Adorninho extends MovieClip
{
static var _lastPos;
function Adorninho () {
super();
var _local7 = new Object();
Key.addListener(_local7);
_local7.onKeyDown = function () {
if (Key.isDown(32)) {
if (((Adorninho._cocos > 0) && (_root["cococaido" + Coco.quantidade]._y < 200)) && (!_root.cocoarremessado)) {
Adorninho.lancar();
var _local3 = new Array();
var _local2 = 0;
while (_local2 < (Coco.quantidade + 1)) {
if (_root["cococaido" + _local2] && (_root["cococaido" + _local2]._y < 225)) {
_local3.push({__y:_root["cococaido" + _local2]._y, coco:_local2});
} else {
_local3.push({__y:-20, coco:-1});
}
_local2++;
}
_local3.sortOn(["__y", "coco"], [16, 16]);
_local3.reverse();
Coco.arremessaCoco(_local3[0].coco);
}
}
};
_root.painel.coconut.text = _cocos;
_root.painel.contavidas.text = _vidas;
}
static function movimenta() {
if (Key.isDown(37)) {
if (_root.personagem._currentframe < 50) {
_root.personagem.gotoAndPlay("esquerda");
if ((_root.personagem._x != _lastPos) && (_root.isInstructing == false)) {
Jogo.adiciona_pontos(1);
}
_lastPos = _root.personagem._x;
}
if (_root.personagem._x > 100) {
_root.personagem._x = _root.personagem._x - 7;
}
if (_root.personagem._x < 90) {
_root.personagem._x = 90;
}
}
if (Key.isDown(39)) {
if (_root.personagem._currentframe < 57) {
_root.personagem.gotoAndPlay("direita");
if ((_root.personagem._x != _lastPos) && (_root.isInstructing == false)) {
Jogo.adiciona_pontos(1);
}
_lastPos = _root.personagem._x;
}
if (_root.personagem._x < 320) {
_root.personagem._x = _root.personagem._x + 7;
}
if (_root.personagem._x > 320) {
_root.personagem._x = 320;
}
if (_root.personagem.hitTest(_root.caixa) && (_cocos > 0)) {
Caixa.cocosAdd();
_root.contador_caixa.mostra.contador.text = "+" + _cocos;
_cocos = 0;
_root.painel.coconut.text = _cocos;
_root.painel.coconut.textColor = 0;
}
}
}
static function lancar() {
_root.personagem.gotoAndPlay("lancar");
_root.som_lanca.start();
}
static function cocos(quantos) {
var _local2;
_cocos = _cocos + quantos;
if (_cocos > 8) {
_local2 = 16711680 /* 0xFF0000 */;
} else if (_cocos > 6) {
_local2 = 16737792 /* 0xFF6600 */;
} else if (_cocos > 4) {
_local2 = 16763904 /* 0xFFCC00 */;
} else if (_cocos > 2) {
_local2 = 4478208 /* 0x445500 */;
} else {
_local2 = 0;
}
_root.painel.coconut.text = _cocos;
_root.painel.coconut.textColor = _local2;
_root.som_pegacoco.start();
}
static function vidas(quantas) {
_vidas = _vidas + quantas;
if (_vidas >= 0) {
var _local3;
if (_vidas < 2) {
_local3 = 16711680 /* 0xFF0000 */;
} else if (_vidas < 3) {
_local3 = 16737792 /* 0xFF6600 */;
} else if (_vidas < 4) {
_local3 = 16763904 /* 0xFFCC00 */;
} else if (_vidas < 5) {
_local3 = 4478208 /* 0x445500 */;
} else {
_local3 = 0;
}
_root.som_coco.start();
_root.painel.contavidas.text = _vidas;
_root.painel.contavidas.textColor = _local3;
} else {
var _local2 = 0;
while (_local2 < (Coco.quantidade + 10)) {
_root["cococaido" + _local2].removeMovieClip();
delete _root["cococaido" + _local2];
delete _root.cocoarremessado;
_local2++;
}
_root.nextFrame();
}
}
static var _cocos = 0;
static var _vidas = 5;
}
Symbol 303 MovieClip [__Packages.Coco] Frame 0
class Coco
{
static var xinicio, xfinal, yfinal;
var cocoLoop_num;
function Coco () {
clearInterval(cocoLoop_num);
cocoLoop_num = setInterval(this, "geraCoco", 2000 - (250 * Jogo.level));
}
function geraCoco() {
if ((Math.random() * 10) > 5) {
xinicio = 50;
} else {
xinicio = 350;
}
geraPosicao(xinicio, -25);
}
static function geraPosicao(valordex, valordey) {
quantidade++;
criaCoco(valordex, valordey);
}
static function arremessaCoco(idCoco) {
Adorninho.cocos(-1);
_root.attachMovie("coco", "cocoarremessado", _root.getNextHighestDepth(), {_x:_root.personagem._x, _y:235});
xfinal = _root["cococaido" + idCoco]._x;
yfinal = _root["cococaido" + idCoco]._y;
_root.cocoarremessado.startCount = 0;
_root.cocoarremessado.onEnterFrame = function () {
this.startCount++;
Coco.animaArremesso(idCoco);
if (this.startCount > 24) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
static function animaArremesso(idCoco) {
_root.cocoarremessado._x = _root.cocoarremessado._x + ((xfinal - _root.cocoarremessado._x) / 1.5);
_root.cocoarremessado._y = _root.cocoarremessado._y + ((yfinal - _root.cocoarremessado._y) / 1.5);
if (_root.cocoarremessado.hitTest(_root["cococaido" + idCoco])) {
_root.som_bate.start(0.1);
bate_coco(idCoco, xfinal, yfinal);
}
}
static function bate_coco(idCoco, posicaox, posicaoy) {
delete _root.cocoarremessado.onEnterFrame;
_root.cocoarremessado.removeMovieClip();
delete _root.cocoarremessado;
geraPosicao(_root["cococaido" + idCoco]._x, _root["cococaido" + idCoco]._y);
delete _root["cococaido" + idCoco].onEnterFrame;
_root["cococaido" + idCoco].removeMovieClip();
delete _root["cococaido" + idCoco];
quantidade++;
criaCoco(posicaox, posicaoy);
Jogo.adiciona_pontos(25);
}
static function criaCoco(xinicio, yinicio) {
_root.attachMovie("coco", "cococaido" + quantidade, quantidade, {_x:xinicio, _y:yinicio});
_root["cococaido" + quantidade].idCoco = quantidade;
new mx.transitions.Tween(_root["cococaido" + quantidade], "_y", mx.transitions.easing.Regular.easeIn, _root["cococaido" + quantidade]._y, 300, 3 - (Jogo.level / 10), true);
new mx.transitions.Tween(_root["cococaido" + quantidade], "_x", mx.transitions.easing.Strong.easeOut, _root["cococaido" + quantidade]._x, Math.floor(Math.random() * 220) + 100, 10, true);
_root["cococaido" + quantidade].onEnterFrame = function () {
if (this.hitTest(_root.personagem) && (Adorninho._cocos < 10)) {
delete this.onEnterFrame;
this.removeMovieClip();
Jogo.adiciona_pontos(5);
Adorninho.cocos(1);
_root.personagem.gotoAndPlay("pegou");
} else if (this.hitTest(_root.fim)) {
delete this.onEnterFrame;
this.removeMovieClip();
Adorninho.vidas(-1);
}
};
_root["cococaido" + quantidade].onPress = function () {
if (((Adorninho._cocos > 0) && (this._y < 200)) && (!_root.cocoarremessado)) {
Adorninho.lancar();
Coco.arremessaCoco(this.idCoco);
}
};
}
static var conta_arremesso = 0;
static var quantidade = 0;
}
Symbol 304 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 305 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 306 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 307 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 308 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 309 MovieClip [__Packages.Caixa] Frame 0
class Caixa
{
function Caixa () {
}
static function cocosCaixa() {
if (quantidade_cocos >= 15) {
_root.caixa.gotoAndStop(4);
} else if (quantidade_cocos >= 12) {
_root.caixa.gotoAndStop(3);
} else if (quantidade_cocos >= 9) {
_root.caixa.gotoAndStop(2);
} else if (quantidade_cocos < 5) {
_root.caixa.gotoAndStop(1);
}
}
static function cocosAdd() {
Jogo.adiciona_pontos(100 * Adorninho._cocos);
quantidade_cocos = quantidade_cocos + Adorninho._cocos;
cocosCaixa();
level();
_root.contador_caixa.gotoAndPlay(1);
_root.som_pontos.start();
}
static function level() {
if ((Jogo.pontos * quantidade_cocos) > (20000 * Math.pow(Jogo.level, 2))) {
_root.caixa.gotoAndStop(1);
quantidade_cocos = 0;
Jogo.passaLevel();
delete _root.iniciaCocos;
_root.iniciaCocos = new Coco();
_root.som_level.start();
}
}
static var quantidade_cocos = 0;
}
Symbol 114 Button
on (release) {
gotoAndPlay ("ranking");
}
Symbol 118 Button
on (release) {
play();
}
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 2
stop();
Symbol 233 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 2
stop();
Symbol 233 MovieClip Frame 3
stop();
Symbol 233 MovieClip Frame 4
stop();
Symbol 236 MovieClip Frame 49
stop();
Symbol 239 MovieClip Frame 128
stop();
Symbol 247 MovieClip Frame 1
var main_mc = this._parent;
logo_mc.onRelease = function () {
main_mc.goAdorninho();
};
Symbol 271 MovieClip Frame 7
stop();
Instance of Symbol 256 MovieClip in Symbol 271 MovieClip Frame 7
on (release) {
_parent.play();
}
Symbol 271 MovieClip Frame 21
stop();
Symbol 271 MovieClip Frame 35
stop();
Symbol 271 MovieClip Frame 50
stop();
Symbol 271 MovieClip Frame 64
stop();
Symbol 271 MovieClip Frame 73
onInstructionFinish();
Symbol 276 MovieClip Frame 82
_root.personagem._visible = false;
Symbol 276 MovieClip Frame 125
stop();
_root.play();
Symbol 295 MovieClip Frame 11
gotoAndPlay (1);
Symbol 296 MovieClip Frame 1
var main_mc = this._parent;
logo_mc.onRelease = function () {
main_mc.goAdorninho();
};
Symbol 299 Button
on (press) {
delete _root.iniciaCocos;
delete _root.iniciaCaixa;
delete _root.iniciaJogo;
Adorninho._cocos = 0;
Adorninho._vidas = 5;
Jogo.pontos = 0;
Jogo.level = 1;
Caixa.quantidade_cocos = 0;
_root.gotoAndPlay("inicio");
}