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

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

Comet Game.swf

This is the info page for
Flash #113642

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


ActionScript [AS1/AS2]
Combined Code
movieClip 22 explosion { #initclip Object.registerClass('explosion', explosion); #endinitclip frame 10 { this.removeMovieClip(); } } movieClip 25 { } movieClip 26 cometTail { #initclip Object.registerClass('cometTail', cometTail); #endinitclip frame 20 { _root.Comet.tailArray.splice(0, 1); this.removeMovieClip(); } } movieClip 29 { } movieClip 30 Comet { #initclip Object.registerClass('Comet', comet); #endinitclip } movieClip 33 bomb { #initclip Object.registerClass('bomb', bomb); #endinitclip } movieClip 35 variableContainer { #initclip Object.registerClass('variableContainer', variableContainer); #endinitclip } frame 1 { stop(); _root.variableContainer.music = new Sound(); } // unknown tag 88 length 139 button 40 { on (release) { gotoAndStop(10); } } button 42 { on (release) { if (_root.variableContainer.musicPlaying == true) { _root.variableContainer.music.stop(); _root.variableContainer.musicPlaying = false; } else { if (_root.variableContainer.musicPlaying == false) { _root.variableContainer.music.start(0, 9999999); _root.variableContainer.musicPlaying = true; } else { trace('musicPlaying =/= false and =/= true.'); } } } } instance variableContainer of movieClip 35 variableContainer { onClipEvent (load) { trace('loaded'); var musicPlaying = true; _root.variableContainer.music.attachSound('music'); _root.variableContainer.music.start(0, 99999999); } } movieClip 59 __Packages.cometTail { #initclip if (!_global.cometTail) { var v1 = function () { super(); }; _global.cometTail = v1; _global.cometTail extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this._visible = false; }; v2.onEnterFrame = function () { this._rotation = 57 * (Math.atan2(_root.Comet._y - this._y, _root.Comet._x - this._x) + 90); if (this._x < _root.Comet._x - 10 || this._x > _root.Comet._x + 10 || this._y < _root.Comet._y - 10 || this._y > _root.Comet._y + 10) { this._visible = true; } }; ASSetPropFlags(_global.cometTail.prototype, null, 1); } #endinitclip } movieClip 60 __Packages.comet { #initclip if (!_global.comet) { var v1 = function () { super(); }; _global.comet = v1; _global.comet extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { _root.explosion = new Sound(); _root.explosion.attachSound('boom'); _global.kongregate.services.connect(); this.healTimer = 0; this.worldHP = 1000; this.difficulty = 50; this.tailArray = []; this.HP = 100; this.score = 0; this.bombTimer = 0; }; v2.lose = function () { _root.kongregateStats.submit('score', this.score); _root.gotoAndStop(20); _root.scoreCounter.text = this.score; this._visible = false; }; v2.attachTail = function () { var v3 = _root.attachMovie('cometTail', 'cometTail' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); v3._x = this._x - 5; v3._y = this._y - 5; v3._yscale = 5 * Math.sqrt(this.xSpeed * this.xSpeed + this.ySpeed * this.ySpeed) + (this._xscale - 100); v3._xscale = 100 - (100 - this._xscale); this.tailArray.push(v3); }; v2.Move = function () { this.ySpeed = (_root._ymouse - this._y) / 7; this.xSpeed = (_root._xmouse - this._x) / 7; this._y += this.ySpeed; this._x += this.xSpeed; }; v2.attachBomb = function () { this.bombTimer += 1; if (this.bombTimer >= this.difficulty) { var v3 = _root.attachMovie('bomb', 'bomb' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); this.bombTimer = 0; v3._x = Math.random() * 400 + 100; v3._y = 0; } }; v2.onEnterFrame = function () { this.healTimer += 1; this.difficulty -= 0.01000000001; if (this.healTimer > 30) { if (this.worldHP < 1000) { this.worldHP += 1; this.healTimer = 0; } } if (this.HP > 100) { this.HP = 100; } if (this.HP > 50) { this._xscale = this.HP; this._yscale = this.HP; } if (this._visible == true) { this.attachBomb(); this.Move(); this.timer += 15 * Math.sqrt(this.xSpeed * this.xSpeed + this.ySpeed * this.ySpeed); if (this.timer >= 100) { this.attachTail(); this.timer = 0; } if (this.HP <= 0 || this.worldHP <= 0) { this.lose(); } } }; v2.timer = 0; v2.tailArray = []; ASSetPropFlags(_global.comet.prototype, null, 1); } #endinitclip } movieClip 61 __Packages.bomb { #initclip if (!_global.bomb) { var v1 = function () { super(); }; _global.bomb = v1; _global.bomb extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this.HP = 100; this.xSpeed = Math.random() * 10 - 5; this.ySpeed = Math.random() * 1; }; v2.move = function () { this._x += this.xSpeed; this._y += this.ySpeed; if (this._x <= 20) { this.xSpeed *= -1; } if (this._x >= 680) { this.xSpeed *= -1; } if (this._y >= 350) { this.explode(0, 0); _root.Comet.worldHP -= 100; trace(_root.Comet.worldHP); } }; v2.explode = function (points, healing) { _root.explosion.start(); _root.Comet.score += points; _root.Comet.HP += healing; var v3 = _root.attachMovie('explosion', 'explosion' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); v3._x = this._x; v3._y = this._y; this.removeMovieClip(); }; v2.onEnterFrame = function () { this.ySpeed += 0.25; this.move(); this._rotation += 10; if (this.hitTest(_root.Comet)) { this.explode(0, 0); } else { for (var v3 in _root.Comet.tailArray) { if (this.hitTest(_root.Comet.tailArray[v3])) { this.explode(10, 5); } } } }; ASSetPropFlags(_global.bomb.prototype, null, 1); } #endinitclip } movieClip 62 __Packages.variableContainer { #initclip if (!_global.variableContainer) { var v1 = function () { super(); }; _global.variableContainer = v1; _global.variableContainer extends MovieClip; var v2 = v1.prototype; ASSetPropFlags(_global.variableContainer.prototype, null, 1); } #endinitclip } movieClip 63 __Packages.explosion { #initclip if (!_global.explosion) { var v1 = function () { super(); }; _global.explosion = v1; _global.explosion extends MovieClip; var v2 = v1.prototype; v2.onLoad = function () { this._xscale = 33; this._yscale = 33; }; v2.onEnterFrame = function () { this._yscale += 9; this._xscale += 9; this._rotation += 22.5; if (this.hitTest(_root.Comet)) { _root.Comet.HP -= 2; } }; ASSetPropFlags(_global.explosion.prototype, null, 1); } #endinitclip } frame 10 { stop(); _root.attachMovie('Comet', 'Comet', _root.getNextHighestDepth()); } // unknown tag 88 length 73 button 56 { on (release) { _root.Comet.removeMovieClip(); gotoAndStop(10); } }




http://swfchan.com/23/113642/info.shtml
Created: 11/3 -2019 11:50:35 Last modified: 11/3 -2019 11:50:35 Server time: 05/11 -2024 12:35:48