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

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

infiniteroad.swf

This is the info page for
Flash #58107

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


ActionScript [AS1/AS2]
Frame 1
maxtilt = 2; starspeed = 12; stagewidth = 550; ampl = 0.5; amplHor = 1; tril_hor_freq = 8; accelerationstep = 0.05; speed_back_to_middle = 0.8; backward_driving = 1; road._visible = false; function sign(n) { return(((n < 0) ? -1 : 1)); } function bias(p, factor) { var _local3 = factor / Math.abs(factor); factor = 1 + (0.05 * Math.min(100, Math.abs(factor))); var _local2 = ((_local3 == 1) ? (1 - Math.abs(Math.pow(1 - p, factor))) : (Math.pow(p, factor))); return(_local2); } function circleMc(point, r, r2, pen, nm, dpt) { var _local2 = _root.createEmptyMovieClip(nm, dpt); drawCircle(point, r, r2, pen, _local2); } function drawCircle(point, r, r2, pen, mc) { var x = point.x; var y = point.y; with (mc) { lineStyle(pen.thickness, pen.colour, pen.alpha); moveTo(x - r, y); var afw = 1.08; var hoek = -225; i = 0; while (i < 4) { var cx = (x + ((afw * r) * Math.cos(d2r(hoek + 22.5)))); var cy = (y - ((afw * r2) * Math.sin(d2r(hoek + 22.5)))); var px = (x + (r * Math.cos(d2r(hoek)))); var py = (y - (r2 * Math.sin(d2r(hoek)))); curveTo(cx, cy, px, py); hoek = hoek - 45; i++; } } } function d2r(deg) { return((deg / 180) * Math.PI); } function angle(xa, xb, ya, yb) { return((((-2 * (yb < ya)) + 1) * ((-2 * (xb > xa)) + 1)) * (((xb < xa) * 180) - (57.2957795130823 * Math.atan(Math.abs(yb - ya) / Math.abs(xb - xa))))); } function dist(xa, xb, ya, yb) { return(Math.sqrt(((xa - xb) * (xa - xb)) + ((ya - yb) * (ya - yb)))); } Pen = function (thickness, colour, alpha) { this.thickness = thickness; this.colour = colour; this.alpha = alpha; }; Point = function (x, y) { this.x = x; this.y = y; }; mid = new Point(0, 626 - road._y); small = new Point(227.5, 258.5); big = new Point(383.5, 430.5); thick = 22; thin = 0.5; ease = -200; OvalTween = function (mc, mid, small, big, thick, thin, fract, ease) { this.ovalmc = mc.createEmptyMovieClip("oval" + mc.getNextHighestDepth(), mc.getNextHighestDepth()); this.fract = fract; this.pos = mid; this.startsize = small; this.endsize = big; this.startthick = thick; this.endthick = thin; this.ease = ease; }; OvalTween.prototype.draw = function () { var _local6 = 1 - bias(this.fract, this.ease); var _local2 = 1 - bias(this.fract, this.ease); var _local3 = this.startthick + (_local6 * (this.endthick - this.startthick)); var _local5 = this.startsize.x + (_local2 * (this.endsize.x - this.startsize.x)); var _local4 = this.startsize.y + (_local2 * (this.endsize.y - this.startsize.y)); var _local7 = new Pen(_local3, 0, 100); this.ovalmc.clear(); drawCircle(this.pos, _local5, _local4, _local7, this.ovalmc); }; OvalTween.prototype.step = function (df) { this.fract = this.fract + df; if (this.fract < 0) { this.fract = this.fract + 1; } else if (this.fract > 1) { this.fract = this.fract - 1; } }; aaOvals = 20; ovallist = []; var i = 0; while (i < aaOvals) { var ov = new OvalTween(road.ovalsMc, mid, small, big, thick, thin, i / aaOvals, ease); ovallist.push(ov); i++; } function movestars(dx) { var _local1 = 0; while (_local1 < stars) { stars[_local1]._x = stars[_local1]._x + dx; _local1++; } rx = road._x; _local1 = 0; while (_local1 < 2) { s0 = stars[_local1]; s1 = stars[(_local1 + 1) % 2]; s0._x = s0._x + dx; if ((((dx > 0) and (s0._x > (-rx))) and (s0._x < (stagewidth - rx))) and (s1._x > s0._x)) { s1._x = s0._x - s1._width; s1.gotoAndStop(_local1 + 1); } if ((((dx < 0) and ((s0._x + s0._width) > (-rx))) and ((s0._x + s0._width) < (stagewidth - rx))) and (s1._x < s0._x)) { s1._x = s0._x + s0._width; } _local1++; } } road.stars0._x = (-road._x) - 2; road.stars1._x = road.stars0._x + road.stars0._width; stars = [road.stars0, road.stars1]; acceleration = 0; turndir = 0; curve = 0; speed = 0; turn = function (dir) { if (dir == 0) { if (Math.abs(curve) < 0.5) { dir = (0.5 * speed) * sign(curve); } else { dir = (speed_back_to_middle * speed) * sign(curve); } } curve = curve - ((speed * dir) * curvestep); curve = Math.max(-1, Math.min(1, curve)); var _local2 = 1 + int((0.5 * (curve + 1)) * totalframes); road.gotoAndStop(_local2); }; accelerate = function (dir) { if (dir == 0) { dir = -0.5 * sign(speed); } speed = speed + (dir * accelerationstep); speed = Math.min(Math.max(-backward_driving, speed), 1); if (Math.abs(speed) < 0.05) { speed = 0; } road._rotation = (curve * speed) * maxtilt; }; function tril(ampl) { if (road._y > roady) { road._y = roady - ampl; } else { road._y = roady + ampl; } } function trilHor(amplHor) { if (road._x > roadx) { road._x = roadx - amplHor; } else { road._x = roadx + amplHor; } } totalframes = road._totalframes; tiltstep = maxtilt / (totalframes / 2); midframe = int(0.5 + (totalframes / 2)); curvestep = 2 / totalframes; road.gotoAndStop(midframe); roady = road._y; roadx = road._x; counter = 0; keyListener = new Object(); keyListener.onKeyDown = function () { var _local1 = Key.getCode(); if (_local1 == 37) { turndir = -1; } if (_local1 == 39) { turndir = 1; } if (_local1 == 38) { acceleration = 1; } if (_local1 == 40) { acceleration = -1; } if (_local1 == 27) { fscommand ("quit", 0); } }; keyListener.onKeyUp = function () { var _local1 = Key.getCode(); if ((_local1 == 37) or (_local1 == 39)) { turndir = 0; } if ((_local1 == 38) or (_local1 == 40)) { acceleration = 0; } }; Key.addListener(keyListener); cross._visible = false; cursor._visible = false; onMouseDown = function () { startx = _xmouse; starty = _ymouse; mousedown = true; }; onMouseUp = function () { lijn.clear(); acceleration = 0; turndir = 0; mousedown = false; };
Frame 2
var j = 0; while (j < ovallist.length) { ovallist[j].draw(); j++; } road._visible = true;
Frame 3
var j = 0; while (j < ovallist.length) { ovallist[j].draw(); ovallist[j].step(speed / 48); j++; } if (mousedown) { acceleration = 1; if (Math.abs(startx - _xmouse) > 10) { if (startx > _xmouse) { turndir = -1; } else { turndir = 1; } } else { turndir = 0; } } accelerate(acceleration); turn(turndir); tril(ampl * speed); counter++; if ((counter % tril_hor_freq) == 0) { trilHor(amplHor * speed); } else { road._x = roadx; } movestars((curve * speed) * starspeed);
Frame 4
gotoAndPlay ("loop");
Symbol 7 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 1
function onSelectURLItem(obj, menuItem) { getURL (menuItem.url, "_blank"); } var items = []; items[0] = {label:"it will never be the same .com"}; items[1] = {label:"by Rafa\u00EBl Rozendaal, 2004", url:"http://www.newrafael.com"}; items[2] = {label:"programming by Reinier Feijen", url:"http://www.boxofchocolates.nl"}; var defaultItems = {zoom:true, quality:true, loop:false, play:false, print:true, rewind:false, forwardAndBack:false, save:true}; var enableTextItems = false; var myContextMenu = new ContextMenu(); var i = 0; while (i < items.length) { var item = new ContextMenuItem(items[i].label, function () { }); if (items[i].separatorBefore != null) { item.separatorBefore = items[i].separatorBefore; } if (items[i].url != null) { item.url = items[i].url; item.onSelect = onSelectURLItem; } else { item.enabled = enableTextItems; } myContextMenu.customItems.push(item); i++; } for (var s in defaultItems) { myContextMenu.builtInItems[s] = defaultItems[s]; } this._parent.menu = myContextMenu;

Library Items

Symbol 1 GraphicUsed by:68
Symbol 2 MovieClipUsed by:68
Symbol 3 GraphicUsed by:68
Symbol 4 GraphicUsed by:68
Symbol 5 GraphicUsed by:7
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:5 6Used by:68
Symbol 8 GraphicUsed by:68
Symbol 9 GraphicUsed by:68
Symbol 10 GraphicUsed by:68
Symbol 11 GraphicUsed by:68
Symbol 12 GraphicUsed by:68
Symbol 13 GraphicUsed by:68
Symbol 14 GraphicUsed by:68
Symbol 15 GraphicUsed by:68
Symbol 16 GraphicUsed by:68
Symbol 17 GraphicUsed by:68
Symbol 18 GraphicUsed by:68
Symbol 19 GraphicUsed by:68
Symbol 20 GraphicUsed by:68
Symbol 21 GraphicUsed by:68
Symbol 22 GraphicUsed by:68
Symbol 23 GraphicUsed by:68
Symbol 24 GraphicUsed by:68
Symbol 25 GraphicUsed by:68
Symbol 26 GraphicUsed by:68
Symbol 27 GraphicUsed by:68
Symbol 28 GraphicUsed by:68
Symbol 29 GraphicUsed by:68
Symbol 30 GraphicUsed by:68
Symbol 31 GraphicUsed by:68
Symbol 32 GraphicUsed by:68
Symbol 33 GraphicUsed by:68
Symbol 34 GraphicUsed by:68
Symbol 35 GraphicUsed by:68
Symbol 36 GraphicUsed by:68
Symbol 37 GraphicUsed by:68
Symbol 38 GraphicUsed by:68
Symbol 39 GraphicUsed by:68
Symbol 40 GraphicUsed by:68
Symbol 41 GraphicUsed by:68
Symbol 42 GraphicUsed by:68
Symbol 43 GraphicUsed by:68
Symbol 44 GraphicUsed by:68
Symbol 45 GraphicUsed by:68
Symbol 46 GraphicUsed by:68
Symbol 47 GraphicUsed by:68
Symbol 48 GraphicUsed by:68
Symbol 49 GraphicUsed by:68
Symbol 50 GraphicUsed by:68
Symbol 51 GraphicUsed by:68
Symbol 52 GraphicUsed by:68
Symbol 53 GraphicUsed by:68
Symbol 54 GraphicUsed by:68
Symbol 55 GraphicUsed by:68
Symbol 56 GraphicUsed by:68
Symbol 57 GraphicUsed by:68
Symbol 58 GraphicUsed by:68
Symbol 59 GraphicUsed by:68
Symbol 60 GraphicUsed by:68
Symbol 61 GraphicUsed by:68
Symbol 62 GraphicUsed by:68
Symbol 63 GraphicUsed by:68
Symbol 64 GraphicUsed by:68
Symbol 65 GraphicUsed by:68
Symbol 66 GraphicUsed by:68
Symbol 67 GraphicUsed by:68
Symbol 68 MovieClipUses:1 2 3 4 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67Used by:Timeline
Symbol 69 MovieClipUsed by:Timeline

Instance Names

"road"Frame 1Symbol 68 MovieClip
"ovalsMc"Symbol 68 MovieClip Frame 1Symbol 2 MovieClip
"stars0"Symbol 68 MovieClip Frame 1Symbol 7 MovieClip
"stars1"Symbol 68 MovieClip Frame 1Symbol 7 MovieClip

Labels

"loop"Frame 3




http://swfchan.com/12/58107/info.shtml
Created: 17/4 -2019 11:54:20 Last modified: 17/4 -2019 11:54:20 Server time: 18/04 -2024 12:15:10