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

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

magic.swf

This is the info page for
Flash #31490

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


ActionScript [AS3]
Section 1
//MainTimeline (Particles_fla.MainTimeline) package Particles_fla { import flash.display.*; import flash.events.*; import flash.utils.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.printing.*; import flash.system.*; import flash.text.*; import flash.ui.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var particleTimer:Timer; public var particles:Array; public var mouseIsDown:Boolean; public function MainTimeline(){ addFrameScript(0, frame1); } public function randRange(_arg1:Number, _arg2:Number){ return (((Math.random() * (_arg2 - _arg1)) + _arg1)); } public function startMagic(_arg1:MouseEvent){ mouseIsDown = true; } function frame1(){ mouseIsDown = false; particles = new Array(); particleTimer = new Timer(5); Mouse.hide(); particleTimer.start(); stage.addEventListener(MouseEvent.MOUSE_DOWN, startMagic); stage.addEventListener(MouseEvent.MOUSE_UP, finishMagic); particleTimer.addEventListener(TimerEvent.TIMER, frameLoop); } public function frameLoop(_arg1:TimerEvent){ var _local2:Particle; var _local3:int; _local3 = 0; while (_local3 < particles.length) { particles[_local3].update(); _local3++; }; if (mouseIsDown){ _local2 = new Particle(Spark, this, mouseX, mouseY); _local2.xVel = randRange(-3, -3.1); _local2.yVel = randRange(-5, -5.2); _local2.drag = 0.99; _local2.gravity = 0.08; _local2.clip.scaleX = (_local2.clip.scaleY = randRange(0.2, 1)); _local2.shrink = 0.99; _local2.fade = 0.001; particles.push(_local2); }; while (particles.length > 200) { _local2 = particles.shift(); _local2.destroy(); }; } public function finishMagic(_arg1:MouseEvent){ mouseIsDown = false; } } }//package Particles_fla
Section 2
//Particle (Particle) package { import flash.display.*; public class Particle { public var fade:Number;// = 0 public var yVel:Number;// = 0 public var xVel:Number;// = 0 public var shrink:Number;// = 1 public var gravity:Number;// = 0 public var clip:DisplayObject; public var drag:Number;// = 1 public function Particle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number){ xVel = 0; yVel = 0; drag = 1; gravity = 0; shrink = 1; fade = 0; super(); clip = new (_arg1); _arg2.addChild(clip); clip.x = _arg3; clip.y = _arg4; } public function update():void{ clip.x = (clip.x + xVel); clip.y = (clip.y + yVel); xVel = (xVel * drag); yVel = (yVel * drag); yVel = (yVel + gravity); clip.scaleX = (clip.scaleX * shrink); clip.scaleY = (clip.scaleY * shrink); clip.alpha = (clip.alpha - fade); } public function destroy():void{ clip.parent.removeChild(clip); } } }//package
Section 3
//Spark (Spark) package { import flash.display.*; public dynamic class Spark extends MovieClip { } }//package

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip {Spark}Uses:1
Symbol 3 BitmapUsed by:4
Symbol 4 GraphicUses:3Used by:Timeline

Special Tags

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




http://swfchan.com/7/31490/info.shtml
Created: 18/5 -2019 14:27:41 Last modified: 18/5 -2019 14:27:41 Server time: 22/12 -2024 08:53:05