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

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

viralbilliards.swf

This is the info page for
Flash #5349

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


Text
GO

GO

GO

Click and hold normal balls to infect them.

Let them go to spread the infection.

Avoid "Cure" balls.

The game ends when you run out of shots.

Viral Billiards

by R. Hunter Gough

Collect stars for extra shots.

XX

XX

shots:

level:

XX

GAME OVER

ActionScript [AS1/AS2]

Frame 1
stop();
Frame 2
function absloc(target) { point = new Object(); point.x = target._x; point.y = target._y; target._parent.localToGlobal(point); return(point); } function ricochet(oldangle, impactangle) { return((impactangle * 2) - oldangle); } function whites_exist() { var _local2 = 0; i = 0; while (i < max_balls) { if (!_root["b" + i].state) { _local2 = 1; } i++; } return(_local2); } shots = 10; level = 0; spinny._rotation = 2; ballhit_sfx = new Sound(); ballhit_sfx.attachSound("ball_hit.wav"); sidehit_sfx = new Sound(); sidehit_sfx.attachSound("side_hit.wav"); bling_sfx = new Sound(); bling_sfx.attachSound("bling.wav"); root_ball._visible = 0; onMouseDown = function () { _root.firing = 1; }; onMouseUp = function () { _root.firing = 0; };
Frame 3
starting_balls = 2; max_balls = starting_balls + level; var i = 0; while (i < max_balls) { root_ball.duplicateMovieClip("b" + i, i); var f = 1; while (f) { f = 0; _root["b" + i]._x = (random(10) * 64) + 32; _root["b" + i]._y = (random(7.5) * 64) + 32; var j = 0; while (j < i) { if ((_root["b" + i]._x == _root["b" + j]._x) && (_root["b" + i]._y == _root["b" + j]._y)) { f = 1; j = i; } j++; } } _root["b" + i].stop(); if (!i) { _root["b" + i].gotoAndStop(4); _root["b" + i].state = 3; } else if (!(i % 4)) { _root["b" + i].gotoAndStop(3); _root["b" + i].state = 2; } else { _root["b" + i].state = 0; } i++; }
Frame 5
moving = 0; i = 1; while (i < max_balls) { ball = _root["b" + i]; if (ball.target._y) { ball.target._y = ball.target._y + 0.2; if (ball.target._y > 0) { ball.target._y = 0; } else { x = absloc(ball.target).x; y = absloc(ball.target).y; j = 0; while (j < max_balls) { if ((i != j) && (_root["b" + j].hitTest(x, y, true))) { startball = _root["b" + j]; if ((!j) && (ball.state == 1)) { _root["b" + j]._x = -80; shots++; bling_sfx.start(); } else if (j) { dx = _root["b" + i]._x - _root["b" + j]._x; dy = _root["b" + i]._y - _root["b" + j]._y; angle = (-Math.atan2(dx, dy)) / (Math.PI/180); ball._rotation = ricochet(ball._rotation, angle + 90); if ((!startball.state) && (ball.state == 1)) { startball.gotoAndStop(2); startball.state = 1; } else if ((!ball.state) && (startball.state == 1)) { ball.gotoAndStop(2); ball.state = 1; } else if ((ball.state == 2) && (startball.state == 1)) { startball.gotoAndStop(1); startball.state = 0; } else if ((startball.state == 2) && (ball.state == 1)) { ball.gotoAndStop(1); ball.state = 0; } startball.target._y = ball.target._y; startball._rotation = angle; ball.target._y = ball.target._y + 1; ballhit_sfx.start(); } } j++; } if ((x < 0) || (x > 640)) { ball._rotation = ricochet(ball._rotation, 0); x = absloc(ball.target).x; y = absloc(ball.target).y; sidehit_sfx.start(); } if ((y < 0) || (y > 480)) { ball._rotation = ricochet(ball._rotation, 90); x = absloc(ball.target).x; y = absloc(ball.target).y; sidehit_sfx.start(); } ball._x = x; ball._y = y; moving = 1; } } i++; } if ((!moving) && (shots)) { if (firing && (!cocked)) { i = 0; while (i < max_balls) { if (_root["b" + i].hitTest(_xmouse, _ymouse, true)) { startball = _root["b" + i]; if (!startball.state) { startball.gotoAndStop(2); startball.state = 1; } i = max_balls + 1; spinny._x = startball._x; spinny._y = startball._y; spinny._visible = 1; cocked = 1; } i++; } } else if (cocked && (!firing)) { moving = 1; cocked = 0; shots--; spinny._visible = 0; startball.target._y = -32; startball._rotation = spinny._rotation; } else if (firing) { spinny._rotation = spinny._rotation + 5; } } if ((!((moving || (cocked)) || (shots > 0))) && (whites_exist())) { i = 0; while (i < max_balls) { removeMovieClip(_root["b" + i]); i++; } gotoAndPlay ("game over"); } else if ((whites_exist() || (moving)) || (cocked)) { prevFrame(); play(); } else { shots++; level++; gotoAndPlay (3); }
Frame 6
stop();
Symbol 11 Button
on (release) { play(); }

Library Items

Symbol 1 Sound [side_hit.wav]
Symbol 2 Sound [bling.wav]
Symbol 3 Sound [ball_hit.wav]
Symbol 4 GraphicUsed by:11
Symbol 5 FontUsed by:6 8 9 18 19 20 21 22 23 25 30 31 32 33 34 35
Symbol 6 TextUses:5Used by:11
Symbol 7 GraphicUsed by:11
Symbol 8 TextUses:5Used by:11
Symbol 9 TextUses:5Used by:11
Symbol 10 GraphicUsed by:11
Symbol 11 ButtonUses:4 6 7 8 9 10Used by:Timeline
Symbol 12 GraphicUsed by:27  Timeline
Symbol 13 GraphicUsed by:27  Timeline
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:27  Timeline
Symbol 16 GraphicUsed by:27  Timeline
Symbol 17 GraphicUsed by:27  Timeline
Symbol 18 TextUses:5Used by:Timeline
Symbol 19 TextUses:5Used by:Timeline
Symbol 20 TextUses:5Used by:Timeline
Symbol 21 TextUses:5Used by:Timeline
Symbol 22 TextUses:5Used by:Timeline
Symbol 23 TextUses:5Used by:Timeline
Symbol 24 GraphicUsed by:27  Timeline
Symbol 25 TextUses:5Used by:Timeline
Symbol 26 GraphicUsed by:Timeline
Symbol 27 MovieClipUses:12 13 15 16 17 24Used by:Timeline
Symbol 28 GraphicUsed by:29
Symbol 29 MovieClipUses:28Used by:Timeline
Symbol 30 EditableTextUses:5Used by:Timeline
Symbol 31 EditableTextUses:5Used by:Timeline
Symbol 32 TextUses:5Used by:Timeline
Symbol 33 TextUses:5Used by:Timeline
Symbol 34 EditableTextUses:5Used by:Timeline
Symbol 35 TextUses:5Used by:Timeline

Instance Names

"target"Frame 1Symbol 15 MovieClip
"target"Frame 1Symbol 15 MovieClip
"target"Frame 1Symbol 15 MovieClip
"root_ball"Frame 2Symbol 27 MovieClip
"spinny"Frame 2Symbol 29 MovieClip
"target"Symbol 27 MovieClip Frame 1Symbol 15 MovieClip

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 1 as "side_hit.wav"
ExportAssets (56)Timeline Frame 1Symbol 2 as "bling.wav"
ExportAssets (56)Timeline Frame 1Symbol 3 as "ball_hit.wav"

Dynamic Text Variables

shotsSymbol 30 EditableText"XX"
levelSymbol 31 EditableText"XX"
levelSymbol 34 EditableText"XX"




http://swfchan.com/2/5349/info.shtml
Created: 15/6 -2019 18:23:13 Last modified: 15/6 -2019 18:23:13 Server time: 01/05 -2024 23:56:20