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

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

falling_snow v3.1.swf

This is the info page for
Flash #167576

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


ActionScript [AS3]
Section 1
//MainTimeline (falling_snowv3_fla.MainTimeline) package falling_snowv3_fla { import flash.events.*; import flash.media.*; import flash.display.*; import flash.ui.*; import flash.filters.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.text.*; import flash.utils.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var xd:Number; public var yd:Number; public var distance:Number; public var my_menu:ContextMenu; public var impulse:Number; public var impulseY:Number; public var tempo; public var mouseIsOver; public var bandcamp; public var impulseX:Number; public var flakeData:Array; public var sc:SoundChannel; public var goingright; public var more; public var snowglow:GlowFilter; public var soundcloud; public var maxheight; public var cpu; public var opp:Number; public var flakeShape:Array; public var icount; public var adj:Number; public var mus:music; public var angle:Number; public var mouseMode; public var maxwidth; public var credit; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } public function returnHandler(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_MOVE, returnHandler); mouseIsOver = true; } public function initphys(_arg1:Number){ flakeData[_arg1].velocityX = ((Math.random() - 0.5) * flakeData[_arg1].flakeRadius); flakeData[_arg1].velocityY = (1 + (Math.random() * 2)); flakeShape[_arg1].x = 0; flakeShape[_arg1].y = 0; } public function randomix(_arg1:Number){ flakeShape[_arg1].x = Math.round((Math.random() * maxwidth)); flakeShape[_arg1].y = Math.round((Math.random() * maxheight)); } public function openSCLink(_arg1:ContextMenuEvent):void{ navigateToURL(new URLRequest("https://soundcloud.com/9c5")); } public function populate(_arg1){ var _local2:*; var _local3:*; _local2 = flakeShape.length; _local3 = 0; while (_local3 < _arg1) { flakeShape.push(new Shape()); flakeData.push(new FlakeData2()); initialize((_local2 + _local3)); _local3++; }; } public function updatephys(_arg1:Number){ if (mouseIsOver){ xd = (flakeShape[_arg1].x - stage.mouseX); yd = (flakeShape[_arg1].y - stage.mouseY); distance = Math.sqrt((Math.pow(xd, 2) + Math.pow(yd, 2))); if (distance > 0){ opp = yd; if (opp == 0){ opp = 0.01; }; adj = xd; angle = Math.atan(Math.abs((opp / adj))); impulse = (30 / (distance * flakeData[_arg1].flakeRadius)); impulseX = (impulse * Math.cos(angle)); impulseY = (impulse * Math.sin(angle)); if (flakeShape[_arg1].x < stage.mouseX){ impulseX = (-1 * impulseX); }; if (flakeShape[_arg1].y < stage.mouseY){ impulseY = (-1 * impulseY); }; if (mouseMode){ impulseY = (-1 * impulseY); impulseX = (-1 * impulseX); }; flakeData[_arg1].velocityX = (flakeData[_arg1].velocityX + impulseX); flakeData[_arg1].velocityY = (flakeData[_arg1].velocityY + impulseY); }; }; if (Math.abs(flakeData[_arg1].velocityX) > flakeData[_arg1].flakeRadius){ flakeData[_arg1].velocityX = (flakeData[_arg1].velocityX * 0.8); } else { if (Math.random() < 0.3){ flakeData[_arg1].velocityX = ((flakeData[_arg1].velocityX + Math.random()) - 0.5); }; }; if (((((goingright * flakeData[_arg1].velocityX) < 0)) && ((Math.random() < 0.7)))){ flakeData[_arg1].velocityX = (-1 * flakeData[_arg1].velocityX); }; if (Math.abs(flakeData[_arg1].velocityY) > 4){ flakeData[_arg1].velocityY = (flakeData[_arg1].velocityY * 0.8); } else { if (flakeData[_arg1].velocityY < 4){ flakeData[_arg1].velocityY = (flakeData[_arg1].velocityY + (Math.random() * (0.3 / flakeData[_arg1].flakeRadius))); }; }; flakeShape[_arg1].y = Math.round((flakeShape[_arg1].y + flakeData[_arg1].velocityY)); flakeShape[_arg1].x = Math.round((flakeShape[_arg1].x + flakeData[_arg1].velocityX)); if (flakeShape[_arg1].y > maxheight){ flakeShape[_arg1].y = 0; flakeShape[_arg1].x = (Math.random() * maxwidth); } else { if (flakeShape[_arg1].x > maxwidth){ flakeShape[_arg1].x = 0; flakeShape[_arg1].y = (Math.random() * maxheight); } else { if (flakeShape[_arg1].x < 0){ flakeShape[_arg1].x = maxwidth; flakeShape[_arg1].y = (Math.random() * maxheight); }; }; }; } public function initdraw(_arg1:Number){ flakeShape[_arg1].graphics.beginFill(0xFFFFFF, (0.3 + (Math.random() * 0.7))); flakeShape[_arg1].graphics.drawCircle(flakeShape[_arg1].x, flakeShape[_arg1].y, flakeData[_arg1].flakeRadius); flakeShape[_arg1].graphics.endFill(); stage.addChild(flakeShape[_arg1]); flakeShape[_arg1].filters = [snowglow]; } function frame3(){ updateAll(Math.floor((flakeShape.length / 2)), flakeShape.length); gotoAndPlay(2); } function frame1(){ my_menu = new ContextMenu(); my_menu.hideBuiltInItems(); credit = new ContextMenuItem("Rubber NAND 2015"); credit.enabled = false; soundcloud = new ContextMenuItem("Soundcloud"); soundcloud.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openSCLink); soundcloud.separatorBefore = true; bandcamp = new ContextMenuItem("Bandcamp"); bandcamp.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openBCLink); cpu = new ContextMenuItem("Help! My CPU can't handle this!"); cpu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, cpusaver); cpu.separatorBefore = true; more = new ContextMenuItem("I've got cycles to spare! Bring it on!"); more.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, morepain); my_menu.customItems.push(credit, soundcloud, bandcamp, cpu, more); contextMenu = my_menu; sc = new SoundChannel(); mus = new music(); sc = mus.play(0, int.MAX_VALUE); tempo = 500; maxwidth = stage.stageWidth; maxheight = stage.stageHeight; mouseIsOver = false; stage.addEventListener(Event.MOUSE_LEAVE, leaveHandler); stage.addEventListener(MouseEvent.MOUSE_MOVE, returnHandler); mouseMode = false; stage.addEventListener(MouseEvent.CLICK, clickHandler); goingright = 1; snowglow = new GlowFilter(); snowglow.color = 0xFFFFFF; snowglow.alpha = 0.7; snowglow.blurX = 10; snowglow.blurY = 10; snowglow.quality = BitmapFilterQuality.LOW; flakeShape = new Array(); flakeData = new Array(); populate(5000); gotoAndPlay(2); } function frame2(){ updateAll(0, Math.floor((flakeShape.length / 2))); } public function initialize(_arg1:Number){ flakeData[_arg1].flakeRadius = Math.round((Math.random() * 3)); if (flakeData[_arg1].flakeRadius == 0){ flakeData[_arg1].flakeRadius = 1; }; initphys(_arg1); initdraw(_arg1); randomix(_arg1); } public function clickHandler(_arg1:MouseEvent){ mouseMode = !(mouseMode); } public function openBCLink(_arg1:ContextMenuEvent):void{ navigateToURL(new URLRequest("https://jamesjerram.bandcamp.com/")); } public function leaveHandler(_arg1:Event):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, returnHandler); mouseIsOver = false; } public function morepain(_arg1:ContextMenuEvent):void{ populate(flakeShape.length); } public function updateAll(_arg1, _arg2){ icount = _arg1; while (icount < _arg2) { updatephys(icount); icount++; }; } public function cpusaver(_arg1:ContextMenuEvent):void{ var _local2:*; var _local3:*; var _local4:*; _local2 = Math.round((flakeShape.length / 2)); _local3 = flakeShape.splice(0, _local2); _local4 = 0; while (_local4 < _local3.length) { stage.removeChild(_local3[_local4]); _local4++; }; flakeData.splice(0, _local2); } } }//package falling_snowv3_fla
Section 2
//FlakeData2 (FlakeData2) package { public class FlakeData2 { public var velocityX:Number; public var velocityY:Number; public var flakeRadius:Number; } }//package
Section 3
//music (music) package { import flash.media.*; public dynamic class music extends Sound { } }//package

Library Items

Symbol 1 Sound {music}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.




http://swfchan.com/34/167576/info.shtml
Created: 18/10 -2018 11:19:26 Last modified: 18/10 -2018 11:19:26 Server time: 21/12 -2024 18:09:38