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

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

Picking-Banana.swf

This is the info page for
Flash #113971

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


Text
Track Name:

Saved Tracks:

.com

1400+ free games

1400+ free games

add this game to
your blog / site

add this game to
your blog / site

ActionScript [AS3]

Section 1
//fgjpre_as3_bomb_preloader_2 (_fla.fgjpre_as3_bomb_preloader_2) package _fla { import flash.display.*; public dynamic class fgjpre_as3_bomb_preloader_2 extends MovieClip { public var loaderbar:MovieClip; public function fgjpre_as3_bomb_preloader_2(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 2
//Timeline_23 (_fla.Timeline_23) package _fla { import flash.display.*; public dynamic class Timeline_23 extends MovieClip { public function Timeline_23(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 3
//Timeline_26 (_fla.Timeline_26) package _fla { import flash.display.*; public dynamic class Timeline_26 extends MovieClip { public var replayBut:MovieClip; public var mgBut:MovieClip; } }//package _fla
Section 4
//Timeline_27 (_fla.Timeline_27) package _fla { import flash.display.*; import flash.events.*; public dynamic class Timeline_27 extends MovieClip { public function Timeline_27(){ addFrameScript(0, frame1); } function frame1(){ stop(); this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandle); } public function mouseOverHandle(_arg1:MouseEvent){ SoundManager.PlaySound("鼠标经过"); } } }//package _fla
Section 5
//Timeline_29 (_fla.Timeline_29) package _fla { import flash.display.*; public dynamic class Timeline_29 extends MovieClip { public function Timeline_29(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 6
//Timeline_32 (_fla.Timeline_32) package _fla { import flash.display.*; import flash.events.*; import flash.net.*; public dynamic class Timeline_32 extends MovieClip { public function Timeline_32(){ addFrameScript(0, frame1); } function frame1(){ this.addEventListener(MouseEvent.CLICK, clickHandle); } public function clickHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.freegamesjungle.com"), "_blank"); } } }//package _fla
Section 7
//Timeline_35 (_fla.Timeline_35) package _fla { import flash.display.*; import flash.events.*; public dynamic class Timeline_35 extends MovieClip { public function Timeline_35(){ addFrameScript(0, frame1); } function frame1(){ stop(); this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandle); } public function mouseOverHandle(_arg1:MouseEvent){ SoundManager.PlaySound("鼠标经过"); } } }//package _fla
Section 8
//Timeline_36 (_fla.Timeline_36) package _fla { import flash.display.*; import flash.events.*; public dynamic class Timeline_36 extends MovieClip { public function Timeline_36(){ addFrameScript(0, frame1); } function frame1(){ stop(); this.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandle); } public function mouseOverHandle(_arg1:MouseEvent){ SoundManager.PlaySound("鼠标经过"); } } }//package _fla
Section 9
//Timeline_37 (_fla.Timeline_37) package _fla { import flash.display.*; import flash.events.*; import flash.net.*; public dynamic class Timeline_37 extends MovieClip { public function Timeline_37(){ addFrameScript(0, frame1); } function frame1(){ this.addEventListener(MouseEvent.CLICK, clickHandle); } public function clickHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.flashgamesforwebsites.com"), "_blank"); } } }//package _fla
Section 10
//Timeline_52 (_fla.Timeline_52) package _fla { import flash.display.*; public dynamic class Timeline_52 extends MovieClip { public function Timeline_52(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 11
//Timeline_65 (_fla.Timeline_65) package _fla { import flash.display.*; public dynamic class Timeline_65 extends MovieClip { public function Timeline_65(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 12
//Timeline_84 (_fla.Timeline_84) package _fla { import flash.display.*; public dynamic class Timeline_84 extends MovieClip { public function Timeline_84(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 13
//Timeline_94 (_fla.Timeline_94) package _fla { import flash.display.*; public dynamic class Timeline_94 extends MovieClip { public function Timeline_94(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package _fla
Section 14
//CollisionData (com.fileitup.fisixengine.collisions.CollisionData) package com.fileitup.fisixengine.collisions { import com.fileitup.fisixengine.core.*; public class CollisionData { public var normal:Vector; public var penetration:Number; public var used:Boolean; public var object:CollisionObject; public function CollisionData(){ used = true; super(); } public function dispose():void{ object = null; normal = null; } public function setInfo(_arg1:CollisionObject, _arg2:Vector, _arg3:Number):void{ object = _arg1; penetration = _arg3; normal = _arg2; used = false; } } }//package com.fileitup.fisixengine.collisions
Section 15
//CollisionReaction (com.fileitup.fisixengine.collisions.CollisionReaction) package com.fileitup.fisixengine.collisions { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; public final class CollisionReaction { public static function solveParticleSurface(_arg1:Particle, _arg2:Surface, _arg3:Vector, _arg4:Number):void{ var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Vector; var _local12:Vector; var _local13:Vector; _local5 = _arg1.velocity.clone(); _local6 = _local5.dot(_arg3); _local7 = -(_local5.perp(_arg3)); _local8 = ((_local7 < 0)) ? -1 : 1; _local9 = calcBounce(_arg1, _arg2); _local10 = calcFriction(_arg1, _arg2); _local6 = (_local6 * _local9); _local7 = (_local7 * (1 - _local10)); _local11 = _arg3.clone().times(-(_local6)); _local12 = _arg3.clone().getNormal().times(_local7); _local13 = _local11.add(_local12); _arg1.setVelocity(_local13); } public static function calcTraction(_arg1:CollisionObject, _arg2:CollisionObject):Number{ return (Math.min(_arg1.traction, _arg2.traction)); } public static function solveWheelStatic(_arg1:WheelParticle, _arg2:CollisionObject, _arg3:Vector, _arg4:Number):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; _local5 = -(_arg1.rim.pos.y); _local6 = _arg1.rim.pos.x; _local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6))); _local5 = (_local5 / _local7); _local6 = (_local6 / _local7); _local8 = (_local5 * _arg1.rim.speed); _local9 = (_local6 * _arg1.rim.speed); _local10 = (_arg1.pos.x - _arg1.old.x); _local11 = (_arg1.pos.y - _arg1.old.y); _local12 = (_local10 + _local8); _local13 = (_local11 + _local9); _local14 = ((-(_arg3.y) * _local12) + (_arg3.x * _local13)); _local15 = calcTraction(_arg1, _arg2); _arg1.rim.old.x = (_arg1.rim.pos.x - ((_local14 * _local5) * _local15)); _arg1.rim.old.y = (_arg1.rim.pos.y - ((_local14 * _local6) * _local15)); _arg1.accel.x = (_arg1.accel.x + ((_local15 * _arg1.rim.speed) * -(_arg3.y))); _arg1.accel.y = (_arg1.accel.y + ((_local15 * _arg1.rim.speed) * _arg3.x)); _arg1.rim.speed = (_arg1.rim.speed * (1 - _local15)); _arg1.velocity.x = (_arg1.pos.x - _arg1.old.x); _arg1.velocity.y = (_arg1.pos.y - _arg1.old.y); } public static function solveParticleParticle(_arg1:Particle, _arg2:Particle):void{ } public static function calcBounce(_arg1:CollisionObject, _arg2:CollisionObject):Number{ return (Math.max(_arg1.bounce, _arg2.bounce)); } public static function solveDynamicStatic(_arg1:Particle, _arg2:CollisionObject, _arg3:Vector, _arg4:Number):void{ var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:int; var _local9:Number; var _local10:Number; var _local11:Vector; var _local12:Vector; var _local13:Vector; _arg1.velocity.x = (_arg1.pos.x - _arg1.old.x); _arg1.velocity.y = (_arg1.pos.y - _arg1.old.y); _local5 = _arg1.velocity.clone(); _local6 = _local5.dot(_arg3); _local7 = -(_local5.perp(_arg3)); _local8 = ((_local7 < 0)) ? -1 : 1; _local9 = calcBounce(_arg1, _arg2); _local10 = calcFriction(_arg1, _arg2); _local6 = (_local6 * _local9); _local7 = (_local7 * (1 - _local10)); _local11 = _arg3.clone().times(-(_local6)); _local12 = _arg3.clone().getNormal().times(_local7); _local13 = _local11.add(_local12); _arg1.setVelocity(_local13); } public static function calcFriction(_arg1:CollisionObject, _arg2:CollisionObject):Number{ var _local3:Number; var _local4:Number; var _local5:Number; _local3 = Math.min(_arg1.friction, _arg2.friction); if ((((_arg1 is WheelParticle)) || ((_arg2 is WheelParticle)))){ _local4 = calcTraction(_arg1, _arg2); _local5 = 0; return (((1 - (_local4 * (1 - _local5))) * _local3)); }; return (_local3); } } }//package com.fileitup.fisixengine.collisions
Section 16
//DetectionBroadPhase (com.fileitup.fisixengine.collisions.DetectionBroadPhase) package com.fileitup.fisixengine.collisions { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; public final class DetectionBroadPhase { public static function updateListBoundingBox(_arg1:Array):void{ var _local2:int; _local2 = 0; while (_local2 < _arg1.length) { CollisionObject(_arg1[_local2]).updateBoundingBox(); _local2++; }; } public static function findParticleParticle(_arg1:Array):void{ findBroadCollisions(_arg1, DetectionNarrowPhase.solveParticleParticle); } public static function findFisixFisix(_arg1:Array):void{ findBroadCollisions(_arg1, DetectionNarrowPhase.solveFisixObjects); } public static function findBroadCollisions(_arg1:Array, _arg2:Function):void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:CollisionObject; var _local8:CollisionObject; if (_arg1.length == 0){ return; }; updateListBoundingBox(_arg1); sortList(_arg1); _local5 = _arg1.length; _local3 = 0; while (_local3 < _local5) { _local7 = _arg1[_local3]; if (((_local7.collidable) && (_local7.active))){ _local4 = (_local3 + 1); while (_local4 < _local5) { _local8 = _arg1[_local4]; if (((_local8.collidable) && (_local8.active))){ if (_local7.maxX < _local8.minX){ break; }; if ((((_local7.minY < _local8.maxY)) && ((_local7.maxY > _local8.minY)))){ _arg2(_local7, _local8); }; }; _local4++; }; }; _local3++; }; } public static function findPolygonsPolygons(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solvePolygonPolygon, _arg3, _arg4); } public static function findSurfacesSurfaces(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solveSurfaceSurface, _arg3, _arg4); } public static function findParticlesPolygons(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solveParticlePolygon, _arg3, _arg4); } public static function findFisixObjects(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solveFisixObjects, _arg3, _arg4); } public static function findBroadCollisions2(_arg1:Array, _arg2:Array, _arg3:Function, _arg4:Boolean, _arg5:Boolean):void{ var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:CollisionObject; var _local11:CollisionObject; if ((((_arg1.length == 0)) || ((_arg2.length == 0)))){ return; }; if (!_arg4){ updateListBoundingBox(_arg1); sortList(_arg1); }; if (!_arg5){ updateListBoundingBox(_arg2); sortList(_arg2); }; _local8 = _arg1.length; _local9 = _arg2.length; _local6 = 0; while (_local6 < _local8) { _local10 = _arg1[_local6]; if (((_local10.collidable) && (_local10.active))){ _local7 = 0; while (_local7 < _local9) { _local11 = _arg2[_local7]; if (((_local11.collidable) && (_local11.active))){ if (_local10.maxX < _local11.minX){ break; }; if ((((_local10.minY < _local11.maxY)) && ((_local10.maxY > _local11.minY)))){ _arg3(_local10, _local11); }; }; _local7++; }; }; _local6++; }; if (!_arg4){ updateListBoundingBox(_arg1); sortList(_arg1); }; if (!_arg5){ updateListBoundingBox(_arg2); sortList(_arg2); }; _local6 = 0; while (_local6 < _local9) { _local10 = _arg2[_local6]; if (((_local10.collidable) && (_local10.active))){ _local7 = 0; while (_local7 < _local8) { _local11 = _arg1[_local7]; if (((_local11.collidable) && (_local11.active))){ if (_local10.maxX < _local11.minX){ break; }; if ((((_local10.minY < _local11.maxY)) && ((_local10.maxY > _local11.minY)))){ _arg3(_local11, _local10); }; }; _local7++; }; }; _local6++; }; } public static function findSurfaceSurface(_arg1:Array):void{ findBroadCollisions(_arg1, DetectionNarrowPhase.solveSurfaceSurface); } public static function objectSorter(_arg1:CollisionObject, _arg2:CollisionObject):int{ if (_arg1.minX > _arg2.minX){ return (1); }; if (_arg1.minX < _arg2.minX){ return (-1); }; return (0); } public static function findPolygonsSurfaces(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solvePolygonSurface, _arg3, _arg4); } public static function findPolygonPolygon(_arg1:Array):void{ findBroadCollisions(_arg1, DetectionNarrowPhase.solvePolygonPolygon); } public static function findParticlesSurfaces(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solveParticleSurface, _arg3, _arg4); } public static function findParticlesParticles(_arg1:Array, _arg2:Array, _arg3:Boolean, _arg4:Boolean):void{ findBroadCollisions2(_arg1, _arg2, DetectionNarrowPhase.solveParticleParticle, _arg3, _arg4); } public static function sortList(_arg1:Array):void{ Sorter.bubbleSort(_arg1, objectSorter); } } }//package com.fileitup.fisixengine.collisions
Section 17
//DetectionModes (com.fileitup.fisixengine.collisions.DetectionModes) package com.fileitup.fisixengine.collisions { public final class DetectionModes { public static const LIMIT_VELOCITY:int = 1; public static const RAYCAST:int = 2; public static const PENETRATION:int = 0; public static const HYBRID_RAYCAST:int = 3; } }//package com.fileitup.fisixengine.collisions
Section 18
//DetectionNarrowPhase (com.fileitup.fisixengine.collisions.DetectionNarrowPhase) package com.fileitup.fisixengine.collisions { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.constraints.*; import com.fileitup.fisixengine.surfaces.*; import com.fileitup.fisixengine.*; public final class DetectionNarrowPhase { public static function solveSurfaceInsideParticle(_arg1:Surface, _arg2:CircleParticle):void{ var _local3:Number; var _local4:Number; var _local5:Vector; var _local6:Number; var _local7:Vector; var _local8:Number; var _local9:Number; _local3 = (_arg2.radius - _arg1.radius); _local4 = (_local3 * _local3); _local5 = _arg1.vectorA; _local6 = _arg2.pos.distanceSquaredTo(_local5); if (_local6 > _local3){ _local7 = Vector.vectorBetween(_local5, _arg2.pos); _local8 = Math.sqrt(_local6); _local9 = (_local8 - _local3); _local7.times((_local9 / _local8)); _local5.add(_local7); }; _local5 = _arg1.vectorB; _local6 = _arg2.pos.distanceSquaredTo(_local5); if (_local6 > _local3){ _local7 = Vector.vectorBetween(_local5, _arg2.pos); _local8 = Math.sqrt(_local6); _local9 = (_local8 - _local3); _local7.times((_local9 / _local8)); _local5.add(_local7); }; } public static function solveParticleSurfaceRaycast(_arg1:CircleParticle, _arg2:Surface):void{ var _local3:int; var _local4:int; if ((((_arg1 == null)) || ((_arg2 == null)))){ return; }; if (!_arg2.fixed){ solveParticleSurface(_arg1, _arg2, true); return; }; _local3 = MathEngine.pointToLineDirection(_arg1.old2, _arg2.vectorA, _arg2.vectorB); _local4 = MathEngine.pointToLineDirection(_arg1.pos, _arg2.vectorA, _arg2.vectorB); if (_local3 == _local4){ solveParticleSurface(_arg1, _arg2, true); return; }; newRaycast(_arg1, _arg2); } public static function solveFisixObjects(_arg1:FisixObject, _arg2:FisixObject):void{ var _local3:int; if (((_arg1.fixed) && (_arg2.fixed))){ return; }; _arg2.solveFisixObject(_arg1); _local3 = 0; while (_local3 < _arg2.fisixObjects.length) { solveFisixObjects(_arg1, _arg2.fisixObjects[_local3]); _local3++; }; } public static function solveParticlePolygon(_arg1:Particle, _arg2:PolygonParticle, _arg3:Boolean=false):void{ } public static function solvePolygonPolygon(_arg1:PolygonParticle, _arg2:PolygonParticle, _arg3:Boolean=false):void{ } public static function solveParticleInsideParticle(_arg1:CircleParticle, _arg2:CircleParticle, _arg3:Boolean):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Vector; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Vector; var _local13:Number; _local4 = _arg2.distanceSquaredTo(_arg1); _local5 = (_arg2.radius - _arg1.radius); _local6 = ((_arg2.radius - _arg1.radius) * _local5); if (_local4 > (_local5 * _local5)){ _local7 = Vector.vectorBetween(_arg1.pos, _arg2.pos); _local8 = Math.sqrt(_local4); _local9 = (_local8 - _local5); _local10 = 0.5; _local11 = 0.5; if (!_arg3){ _local10 = 0; _local11 = 1; } else { if (((_arg2.fixed) || (_arg1.fixed))){ _local10 = 1; _local11 = 1; } else { if (_arg2.mass != _arg1.mass){ _local13 = (_arg2.mass + _arg1.mass); _local10 = (_arg1.mass / _local13); _local11 = (_arg2.mass / _local13); }; }; }; _local12 = _local7.clone().divide(_local8); _local7.times((_local9 / _local8)); _arg1.thrust((_local7.x * _local11), (_local7.y * _local11)); _arg2.thrust((-(_local7.x) * _local10), (-(_local7.y) * _local10)); if (!_arg3){ _arg1.lastCollision.setInfo(_arg2, _local12, _local9); }; }; } public static function solveParticleSurface(_arg1:CircleParticle, _arg2:Surface, _arg3:Boolean=false):void{ var _local4:Number; var _local5:Number; var _local6:Vector; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Vector; var _local12:Vector; var _local13:Number; var _local14:Number; var _local15:DynamicSurface; var _local16:Number; var _local17:Number; if ((((_arg1.pos == _arg2.vectorA)) || ((_arg1.pos == _arg2.vectorB)))){ return; }; if ((((_arg1 == null)) || ((_arg2 == null)))){ return; }; if (((_arg1.raycast) && (!(_arg3)))){ solveParticleSurfaceRaycast(_arg1, _arg2); return; }; if (((_arg1.fixed) && (_arg2.fixed))){ return; }; _local4 = (_arg1.radius + _arg2.radius); _local5 = MathEngine.closestPointOnLine(_arg1.pos, _arg2.line); _local6 = _arg2.line.pointOnLine(_local5); _local7 = _local6.distanceTo(_arg1.pos); if (_local7 < _local4){ _local8 = (_local4 - _local7); if (_local7 == 0){ _local13 = 0; _local14 = 0; } else { _local13 = ((_arg1.pos.x - _local6.x) / _local7); _local14 = ((_arg1.pos.y - _local6.y) / _local7); }; _local9 = 0.5; _local10 = 0.5; if (((_arg1.fixed) || (_arg2.fixed))){ _local9 = 1; _local10 = 1; } else { _local15 = (_arg2 as DynamicSurface); _local16 = _local15.massOnSurface(_local5); if (_arg1.mass != _local16){ _local17 = (_arg1.mass + _local16); _local9 = (_local16 / _local17); _local10 = (_arg1.mass / _local17); }; }; _local11 = new Vector((_local13 * _local8), (_local14 * _local8)); _arg1.thrust((_local11.x * _local9), (_local11.y * _local9)); _arg2.thrustAt((-(_local11.x) * _local10), (-(_local11.y) * _local10), _local5); _local12 = new Vector(_local13, _local14); _arg1.lastCollision.setInfo(_arg2, _local12, _local8); _arg2.lastCollision.setInfo(_arg1, _local12.clone().reverse(), _local8); }; } private static function newRaycast(_arg1:CircleParticle, _arg2:Surface):void{ var _local3:Number; var _local4:Number; var _local5:Line; var _local6:Line; var _local7:Vector; var _local8:Object; var _local9:Vector; var _local10:Vector; var _local11:Vector; var _local12:Vector; var _local13:Vector; var _local14:Vector; var _local15:Vector; var _local16:Number; var _local17:Vector; var _local18:Vector; var _local19:Vector; var _local20:Number; _local3 = (_arg1.radius + _arg2.radius); _local4 = (_local3 * _local3); _local5 = new Line(_arg1.old2, _arg1.pos); _local6 = _arg2.line; _local7 = _local5.vector; _local8 = MathEngine.closestPointsOnLines(_local6, _local5); _local9 = _local8.c1; _local10 = _local8.c2; _local11 = new Vector(0, 0); _local12 = _arg1.pos; if (_local9 != _local10){ _local14 = _local9; _local15 = _local10; _local16 = _local9.distanceSquaredTo(_local10); if (_local16 > _local4){ return; }; _local17 = _local14.vectorTo(_local15); _local17.normalize(); _local13 = _local17.clone(); _local17.times(_local3); _local12 = _local14.clone().add(_local17); } else { _local18 = MathEngine.closestPointOnLineVector(_arg1.pos, _local6, false); _local19 = _arg1.pos.vectorTo(_local18); _local20 = _local19.getMagnitude(); _local19.divide(_local20); _local13 = _local19.clone(); _local19.times(_local3); _local12 = _local9.clone().add(_local19); }; _arg1.thrustTo(_local12.x, _local12.y); _arg1.lastCollision.setInfo(_arg2, _local13, 0); _arg2.lastCollision.setInfo(_arg1, _local13.clone().reverse(), 0); } public static function solvePolygonSurface(_arg1:PolygonParticle, _arg2:Surface, _arg3:Boolean=false):void{ } public static function solveParticleParticle(_arg1:CircleParticle, _arg2:CircleParticle):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Vector; var _local13:Number; var _local14:Number; var _local15:Number; if ((((_arg1 == null)) || ((_arg2 == null)))){ return; }; if (((_arg1.fixed) && (_arg2.fixed))){ return; }; _local3 = (_arg1.radius + _arg2.radius); _local4 = (_local3 * _local3); _local5 = (_arg1.pos.x - _arg2.pos.x); _local6 = (_arg1.pos.y - _arg2.pos.y); _local7 = ((_local5 * _local5) + (_local6 * _local6)); if (_local7 < _local4){ _local8 = Math.sqrt(_local7); _local9 = (_local3 - _local8); if (_local8 == 0){ _local13 = 0; _local14 = 0; } else { _local13 = (_local5 / _local8); _local14 = (_local6 / _local8); }; _local10 = 0.5; _local11 = 0.5; if (((_arg1.fixed) || (_arg2.fixed))){ _local10 = 1; _local11 = 1; } else { if (_arg1.mass != _arg2.mass){ _local15 = (_arg1.mass + _arg2.mass); _local10 = (_arg2.mass / _local15); _local11 = (_arg1.mass / _local15); }; }; if (!_arg1.fixed){ _arg1.thrust(((_local13 * _local9) * _local10), ((_local14 * _local9) * _local10)); }; if (!_arg2.fixed){ _arg2.thrust(((-(_local13) * _local9) * _local11), ((-(_local14) * _local9) * _local11)); }; _local12 = new Vector(_local13, _local14); _arg1.lastCollision.setInfo(_arg2, _local12, _local8); _arg2.lastCollision.setInfo(_arg1, _local12.clone().reverse(), _local8); }; } public static function solveSurfaceSurface(_arg1:Surface, _arg2:Surface, _arg3:Boolean=false):void{ var _local4:Object; var _local5:Vector; var _local6:Vector; var _local7:Number; var _local8:Number; var _local9:Vector; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Surface; var _local21:Surface; var _local22:Number; var _local23:Vector; var _local24:Number; var _local25:Vector; var _local26:Number; var _local27:Number; var _local28:Number; if (((_arg1.fixed) && (_arg2.fixed))){ return; }; if (_arg1.vectorA == _arg2.vectorA){ return; }; if (_arg1.vectorA == _arg2.vectorB){ return; }; if (_arg1.vectorB == _arg2.vectorA){ return; }; if (_arg1.vectorB == _arg2.vectorB){ return; }; _local4 = MathEngine.closestPointsOnLines(_arg1.line, _arg2.line); if (_local4 == null){ return; }; _local5 = _local4.c1; _local6 = _local4.c2; _local10 = (_arg1.radius + _arg2.radius); _local11 = ((_arg1.radius + _arg2.radius) * _local10); if (_local5 != _local6){ _local9 = Vector.vectorBetween(_local6, _local5); _local15 = _local9.getMagnitudeSquared(); if (_local15 < _local11){ _local12 = Math.sqrt(_local15); _local9.divide(_local12); _local9.times((_local10 - _local12)); _local7 = MathEngine.closestPointOnLine(_local5, _arg1.line, true); _local8 = MathEngine.closestPointOnLine(_local6, _arg2.line, true); } else { return; }; } else { _local16 = _arg1.vectorA.distanceSquaredTo(_local5); _local17 = _arg1.vectorB.distanceSquaredTo(_local5); _local18 = _arg2.vectorA.distanceSquaredTo(_local5); _local19 = _arg2.vectorB.distanceSquaredTo(_local5); if ((((((_local16 <= _local17)) && ((_local16 <= _local18)))) && ((_local16 <= _local19)))){ _local22 = 0; _local20 = _arg2; _local21 = _arg1; } else { if ((((((_local17 <= _local16)) && ((_local17 <= _local18)))) && ((_local17 <= _local19)))){ _local22 = 1; _local20 = _arg2; _local21 = _arg1; } else { if ((((((_local18 <= _local19)) && ((_local18 <= _local16)))) && ((_local18 <= _local17)))){ _local22 = 0; _local20 = _arg1; _local21 = _arg2; } else { if ((((((_local19 <= _local18)) && ((_local19 <= _local16)))) && ((_local19 <= _local17)))){ _local22 = 1; _local20 = _arg1; _local21 = _arg2; }; }; }; }; _local23 = _local21.line.pointOnLine(_local22); _local24 = MathEngine.closestPointOnLine(_local23, _local20.line); _local25 = _local20.line.pointOnLine(_local24); _local9 = Vector.vectorBetween(_local23, _local25); _local12 = _local9.getMagnitude(); _local9.divide(_local12); _local9.times((_local12 + _local10)); if (_local20 == _arg1){ _local7 = _local24; _local8 = _local22; } else { _local8 = _local24; _local7 = _local22; }; }; _local13 = 0.5; _local14 = 0.5; if (((_arg1.fixed) || (_arg2.fixed))){ _local13 = 1; _local14 = 1; } else { _local26 = _arg1.massOnSurface(_local7); _local27 = _arg2.massOnSurface(_local8); if (_local26 != _local27){ _local28 = (_local26 + _local27); _local13 = (_local27 / _local28); _local14 = (_local26 / _local28); }; }; _arg1.thrustAt((_local9.x * _local13), (_local9.y * _local13), _local7); _arg2.thrustAt((-(_local9.x) * _local14), (-(_local9.y) * _local14), _local8); } } }//package com.fileitup.fisixengine.collisions
Section 19
//ReactionModes (com.fileitup.fisixengine.collisions.ReactionModes) package com.fileitup.fisixengine.collisions { public final class ReactionModes { public static const NONE:int = 0; public static const PHYSICAL:int = 1; } }//package com.fileitup.fisixengine.collisions
Section 20
//AngularConstraint (com.fileitup.fisixengine.constraints.AngularConstraint) package com.fileitup.fisixengine.constraints { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; public class AngularConstraint extends Constraint { public var particleA:Particle; public var particleB:Particle; public var particleC:Particle; public function AngularConstraint(_arg1:Particle, _arg2:Particle, _arg3:Particle, _arg4:Number=-1, _arg5:Number=-1, _arg6:Number=0){ var _local7:Number; super(); particleA = _arg1; particleB = _arg2; particleC = _arg3; stiffness = 1; breakPoint = _arg6; if ((((_arg4 == -1)) && ((_arg5 == -1)))){ _local7 = getAngle(); min = _local7; max = _local7; restLength = _local7; } else { min = _arg4; max = _arg5; }; } override protected function solveConstraint(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Vector; var _local6:Vector; var _local7:Vector; var _local8:Vector; _local3 = getAngle(); _local4 = (_arg1 - _local3); if (breakPoint != 0){ if (Math.abs(_local4) > breakPoint){ breakConstraint(); mBroken = true; return; }; mBroken = false; }; _local5 = getCenter(); _local6 = particleB.pos.vectorTo(particleA.pos); _local6.rotate(((-(_local4) / 2) * stiff)); particleA.thrustTo((particleB.pos.x + _local6.x), (particleB.pos.y + _local6.y)); _local6 = particleB.pos.vectorTo(particleC.pos); _local6.rotate(((_local4 / 2) * stiff)); particleC.thrustTo((particleB.pos.x + _local6.x), (particleB.pos.y + _local6.y)); _local7 = getCenter(); _local8 = Vector.vectorBetween(getCenter(), _local5); particleA.thrustVector(_local8); particleB.thrustVector(_local8); particleC.thrustVector(_local8); } override public function render(_arg1:Graphics):void{ var _local2:Vector; var _local3:Vector; if (mBroken){ return; }; _local2 = particleB.pos.vectorTo(particleA.pos); _local2.normalize(20); if (restLen >= 0){ } else { if (restMin != -1){ _arg1.lineStyle(1, 0xFF00); _local3 = _local2.clone().rotate(restMin); drawVector(_local3, particleB.pos, _arg1); }; if (restMax != -1){ _arg1.lineStyle(1, 0xFF0000); _local3 = _local2.clone().rotate(restMax); drawVector(_local3, particleB.pos, _arg1); }; }; } public function getAngle():Number{ var _local1:Vector; var _local2:Vector; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = particleB.pos.vectorTo(particleA.pos); _local2 = particleB.pos.vectorTo(particleC.pos); _local3 = _local1.perp(_local2); _local4 = _local1.normalize().dot(_local2.normalize()); _local5 = ((Math.acos(_local4) * 180) / Math.PI); if (_local3 < 0){ _local5 = (-(_local5) + 360); }; return (_local5); } override public function dispose():void{ super.dispose(); particleA = null; particleB = null; particleC = null; } private function drawVector(_arg1:Vector, _arg2:Vector, _arg3:Graphics):void{ _arg3.moveTo(_arg2.x, _arg2.y); _arg3.lineTo((_arg2.x + _arg1.x), (_arg2.y + _arg1.y)); } override public function solve():void{ var _local1:Number; if (restLen >= 0){ solveConstraint(restLen, 0); } else { _local1 = getAngle(); if ((((_local1 < restMin)) && ((restMin >= 0)))){ solveConstraint(restMin, 0); } else { if ((((_local1 > restMax)) && ((restMax >= 0)))){ solveConstraint(restMax, 0); }; }; }; } public function getCenter():Vector{ return (new Vector((((particleA.pos.x + particleB.pos.x) + particleC.pos.x) / 3), (((particleA.pos.y + particleB.pos.y) + particleC.pos.y) / 3))); } private function flipAngle(_arg1:Number):Number{ return ((-(_arg1) + 360)); } public function flip():void{ var _local1:Number; if (restLength >= 0){ restLength = flipAngle(restLength); } else { _local1 = min; min = max; max = _local1; if (min >= 0){ min = flipAngle(min); }; if (max >= 0){ max = flipAngle(max); }; }; } } }//package com.fileitup.fisixengine.constraints
Section 21
//SpringConstraint (com.fileitup.fisixengine.constraints.SpringConstraint) package com.fileitup.fisixengine.constraints { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; public class SpringConstraint extends Constraint { protected var restLengthSquared:Number; protected var restMinSquared:Number; protected var restMaxSquared:Number; public var particleA:Particle; public var particleB:Particle; public function SpringConstraint(_arg1:Particle, _arg2:Particle, _arg3:Number=0.5, _arg4:Number=-1){ particleA = _arg1; particleB = _arg2; if (_arg4 < 0){ _arg4 = _arg1.distanceTo(_arg2); restLength = _arg4; } else { restLength = _arg4; }; stiffness = _arg3; } override protected function solveConstraint(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Boolean; var _local12:Number; if ((((particleA == null)) || ((particleB == null)))){ unload(); } else { if ((((particleA.parent == null)) || ((particleB.parent == null)))){ unload(); }; }; _local3 = (particleA.pos.x - particleB.pos.x); _local4 = (particleA.pos.y - particleB.pos.y); if (_arg1 != 0){ _local5 = (_arg1 - ((_arg2 - ((_local3 * _local3) + (_local4 * _local4))) / (_arg1 * 2))); } else { _local5 = (_arg1 - (_arg2 - ((_local3 * _local3) + (_local4 * _local4)))); }; _local6 = (_arg1 - _local5); if (mBreakPoint > 0){ if (Math.abs((_local6 / _arg1)) > (breakPoint - 1)){ breakConstraint(); mBroken = true; return; }; mBroken = false; }; if (_local5 != 0){ _local7 = ((_local3 / _local5) * (_local6 * stiff)); _local8 = ((_local4 / _local5) * (_local6 * stiff)); } else { _local7 = 0; _local8 = 0; }; _local9 = 0.5; _local10 = 0.5; if (((particleA.fixed) || (particleB.fixed))){ _local9 = 1; _local10 = 1; } else { if (particleA.mass != particleB.mass){ _local12 = (particleA.mass + particleB.mass); _local9 = (particleB.mass / _local12); _local10 = (particleA.mass / _local12); }; }; _local11 = true; if (particleA.parent == particleB.parent){ _local11 = false; }; particleA.thrust((_local7 * _local9), (_local8 * _local9), _local11); particleB.thrust((-(_local7) * _local10), (-(_local8) * _local10), _local11); } override public function render(_arg1:Graphics):void{ if (mBroken){ return; }; _arg1.lineStyle(2, 15058555); _arg1.moveTo(particleA.pos.x, particleA.pos.y); _arg1.lineTo(particleB.pos.x, particleB.pos.y); } public function getAngle():Number{ return (MathEngine.getAngle(particleA.pos.x, particleA.pos.y, particleB.pos.x, particleB.pos.y)); } override public function dispose():void{ particleA = null; particleB = null; } override public function set min(_arg1:Number):void{ super.min = _arg1; restMinSquared = (_arg1 * _arg1); } override public function set restLength(_arg1:Number):void{ super.restLength = _arg1; restLengthSquared = (_arg1 * _arg1); } override public function solve():void{ var _local1:Number; if (restLen >= 0){ solveConstraint(restLen, restLengthSquared); } else { _local1 = particleA.distanceSquaredTo(particleB); if ((((_local1 < restMinSquared)) && ((restMin >= 0)))){ solveConstraint(restMin, restMinSquared); } else { if ((((_local1 > restMaxSquared)) && ((restMax >= 0)))){ solveConstraint(restMax, restMaxSquared); }; }; }; } override public function set max(_arg1:Number):void{ super.max = _arg1; restMaxSquared = (_arg1 * _arg1); } override public function get restLength():Number{ return (super.restLength); } public static function constraintAll(_arg1:FisixObject, _arg2:Array, _arg3:Number=0.5, _arg4:Number=0):void{ var _local5:SpringConstraint; var _local6:int; var _local7:int; _local6 = 0; while (_local6 < _arg2.length) { _local7 = (_local6 + 1); while (_local7 < _arg2.length) { _local5 = _arg1.newSpringConstraint(_arg2[_local6], _arg2[_local7]); _local5.stiffness = _arg3; _local5.breakPoint = _arg4; _local7++; }; _local6++; }; } public static function constraintChain(_arg1:FisixObject, _arg2:Array, _arg3:Number=0.5, _arg4:Number=0):void{ var _local5:SpringConstraint; var _local6:int; _local6 = 0; while (_local6 < (_arg2.length - 1)) { _local5 = _arg1.newSpringConstraint(_arg2[_local6], _arg2[(_local6 + 1)]); _local5.stiffness = _arg3; _local5.breakPoint = _arg4; _local6++; }; } public static function constraintTwoLists(_arg1:FisixObject, _arg2:Array, _arg3:Array, _arg4:Number=0.5, _arg5:Number=0):void{ var _local6:SpringConstraint; var _local7:int; var _local8:int; _local7 = 0; while (_local7 < _arg2.length) { _local8 = 0; while (_local8 < _arg3.length) { _local6 = _arg1.newSpringConstraint(_arg2[_local7], _arg3[_local8]); _local6.stiffness = _arg4; _local6.breakPoint = _arg5; _local8++; }; _local7++; }; } } }//package com.fileitup.fisixengine.constraints
Section 22
//StickConstraint (com.fileitup.fisixengine.constraints.StickConstraint) package com.fileitup.fisixengine.constraints { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; public class StickConstraint extends SpringConstraint { public function StickConstraint(_arg1:Particle, _arg2:Particle, _arg3:Number=-1){ super(_arg1, _arg2, _arg3); stiff = 1; } override public function set stiffness(_arg1:Number):void{ } public static function constraintAll(_arg1:FisixObject, _arg2:Array, _arg3:Number=0):void{ var _local4:StickConstraint; var _local5:int; var _local6:int; _local5 = 0; while (_local5 < _arg2.length) { _local6 = (_local5 + 1); while (_local6 < _arg2.length) { _local4 = _arg1.newStickConstraint(_arg2[_local5], _arg2[_local6]); _local4.breakPoint = _arg3; _local6++; }; _local5++; }; } public static function constraintChain(_arg1:FisixObject, _arg2:Array, _arg3:Number=0):void{ var _local4:StickConstraint; var _local5:int; _local5 = 0; while (_local5 < (_arg2.length - 1)) { _local4 = _arg1.newStickConstraint(_arg2[_local5], _arg2[(_local5 + 1)]); _local4.breakPoint = _arg3; _local5++; }; } public static function constraintTwoLists(_arg1:FisixObject, _arg2:Array, _arg3:Array, _arg4:Number=0):void{ var _local5:StickConstraint; var _local6:int; var _local7:int; _local6 = 0; while (_local6 < _arg2.length) { _local7 = 0; while (_local7 < _arg3.length) { _local5 = _arg1.newStickConstraint(_arg2[_local6], _arg3[_local7]); _local5.breakPoint = _arg4; _local7++; }; _local6++; }; } } }//package com.fileitup.fisixengine.constraints
Section 23
//CircleContainer (com.fileitup.fisixengine.containers.CircleContainer) package com.fileitup.fisixengine.containers { import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.collisions.*; public class CircleContainer extends FisixContainer { protected var object:CircleParticle; public function CircleContainer(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=true){ super(new CircleParticle(_arg1, _arg2, _arg3), _arg4); object = (collisionObject as CircleParticle); } override public function solveContainment(_arg1:Boolean=false):void{ var _local2:int; _local2 = 0; while (_local2 < objects.particles.length) { DetectionNarrowPhase.solveParticleInsideParticle(objects.particles[_local2], object, ((innerDynamics) && (!(_arg1)))); _local2++; }; _local2 = 0; while (_local2 < objects.surfaces.length) { DetectionNarrowPhase.solveSurfaceInsideParticle(objects.surfaces[_local2], object); _local2++; }; } } }//package com.fileitup.fisixengine.containers
Section 24
//WheelContainer (com.fileitup.fisixengine.containers.WheelContainer) package com.fileitup.fisixengine.containers { import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.collisions.*; public class WheelContainer extends FisixContainer { protected var object:WheelParticle; public function WheelContainer(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=true){ super(new WheelParticle(_arg1, _arg2, _arg3), _arg4); object = (collisionObject as WheelParticle); } override public function solveContainment(_arg1:Boolean=false):void{ var _local2:int; _local2 = 0; while (_local2 < objects.particles.length) { DetectionNarrowPhase.solveParticleInsideParticle(objects.particles[_local2], object, ((innerDynamics) && (!(_arg1)))); _local2++; }; _local2 = 0; while (_local2 < objects.surfaces.length) { DetectionNarrowPhase.solveSurfaceInsideParticle(objects.surfaces[_local2], object); _local2++; }; } } }//package com.fileitup.fisixengine.containers
Section 25
//CollisionObject (com.fileitup.fisixengine.core.CollisionObject) package com.fileitup.fisixengine.core { import flash.display.*; import flash.events.*; import flash.geom.*; import com.fileitup.fisixengine.materials.*; import com.fileitup.fisixengine.collisions.*; public class CollisionObject extends EventDispatcher implements EngineObject { public var maxX:Number; public var magnetic:Boolean; public var name:String; protected var mFixed:Boolean; public var bounce:Number; public var active:Boolean; protected var myType:String; public var parent:FisixObject; public var inheritAttributesOnAdd:Boolean; public var traction:Number; protected var mStatic:Boolean; public var lastCollision:CollisionData; protected var mMaterial:String; protected var detectionMode:int; public var minY:Number; protected var useRaycasting:Boolean; public var minX:Number; public var collidable:Boolean; public var color:int; protected var reactionMode:int; public var maxY:Number; public var friction:Number; public var dynamicObjectCollisions:Boolean; public function CollisionObject(){ name = ""; collidable = true; active = true; mFixed = false; mStatic = false; magnetic = true; dynamicObjectCollisions = false; friction = 0; bounce = 0.5; traction = 1; color = -1; inheritAttributesOnAdd = true; detectionMode = 0; reactionMode = 0; useRaycasting = false; myType = ""; super(); myType = "CollidableObject"; lastCollision = new CollisionData(); } protected function afterUnload():void{ this.dispatchEvent(new Event("afterUnload")); } public function updateBoundingBox():void{ } public function aabbIntersection(_arg1:CollisionObject):Boolean{ if (minX > _arg1.maxX){ return (false); }; if (minY > _arg1.maxY){ return (false); }; if (maxX < _arg1.minX){ return (false); }; if (maxY < _arg1.minY){ return (false); }; return (true); } public function set fixed(_arg1:Boolean):void{ if (mStatic){ return; }; mFixed = _arg1; } public function renderBoundingBox(_arg1:Graphics):void{ _arg1.lineStyle(1, 43263); _arg1.moveTo(minX, minY); _arg1.lineTo(maxX, minY); _arg1.lineTo(maxX, maxY); _arg1.lineTo(minX, maxY); _arg1.lineTo(minX, minY); } public function getDetectionMode():int{ return (detectionMode); } public function thrustPoint(_arg1:Number, _arg2:Number, _arg3:Vector):void{ } protected function onCollision(_arg1:CollisionData):void{ } public function fix(_arg1:Boolean=true):void{ fixed = _arg1; } public function applyForcePoint(_arg1:Vector, _arg2:Vector):void{ } public function getMaterial():String{ return (mMaterial); } public function render(_arg1:Graphics):void{ } public function dispose():void{ lastCollision = null; mMaterial = null; parent = null; } public function onInit():void{ } public function setMaterial(_arg1:String):void{ var _local2:Material; _local2 = MaterialFactory.getMaterial(_arg1); if (_local2 != null){ bounce = _local2.bounce; friction = _local2.friction; traction = _local2.traction; if (_local2.color >= 0){ color = _local2.color; }; mMaterial = _arg1; }; } public function unload():void{ onUnload(); if (parent != null){ parent.removeObject(this); }; dispose(); afterUnload(); } public function get fixed():Boolean{ return (mFixed); } public function fireAfterCollision():void{ afterCollision(lastCollision); if (parent != null){ parent.fireAfterChildCollision(this); }; } public function applyForce(_arg1:Vector, _arg2:Boolean=true):void{ } protected function afterCollision(_arg1:CollisionData):void{ } public function get type():String{ return (myType); } protected function onUnload():void{ this.dispatchEvent(new Event("beforeUnload")); } public function isStatic():Boolean{ return (mStatic); } public function getNormalAngleAt(_arg1:Vector):Number{ var _local2:Vector; _local2 = getNormalAt(_arg1); if (_local2 == null){ return (0); }; return ((-(_local2.getAngle()) + 180)); } public function setDetectionMode(_arg1:int):void{ _arg1 = ((_arg1 < 0)) ? 0 : _arg1; _arg1 = ((_arg1 > 3)) ? 3 : _arg1; useRaycasting = false; if (_arg1 == DetectionModes.RAYCAST){ useRaycasting = true; }; detectionMode = _arg1; } public function pointForce(_arg1:Vector, _arg2:Number):void{ } public function thrust(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{ } public function getReactionMode():int{ return (reactionMode); } public function hitTestMouse(_arg1:Stage, _arg2:Rectangle):Boolean{ var _local3:Rectangle; _local3 = new Rectangle((_arg1.mouseX - (_arg2.width / 2)), (_arg1.mouseY - (_arg2.height / 2)), _arg2.width, _arg2.height); if (minX > _local3.right){ return (false); }; if (minY > _local3.bottom){ return (false); }; if (maxX < _local3.left){ return (false); }; if (maxY < _local3.top){ return (false); }; return (true); } public function get raycast():Boolean{ return (useRaycasting); } public function solveReactions():void{ if (!lastCollision.used){ if (lastCollision.object == null){ return; }; fireOnCollision(); fireAfterCollision(); }; } public function setReactionMode(_arg1:int):void{ _arg1 = ((_arg1 < 0)) ? 0 : _arg1; _arg1 = ((_arg1 > 1)) ? 1 : _arg1; reactionMode = _arg1; } public function getNormalAt(_arg1:Vector, _arg2:Vector=null):Vector{ return (null); } public function makeStatic():void{ mStatic = true; mFixed = true; } public function fireOnCollision():void{ onCollision(lastCollision); if (parent != null){ parent.fireOnChildCollision(this); }; } } }//package com.fileitup.fisixengine.core
Section 26
//EngineObject (com.fileitup.fisixengine.core.EngineObject) package com.fileitup.fisixengine.core { public interface EngineObject { function unload():void; function dispose():void; } }//package com.fileitup.fisixengine.core
Section 27
//FisixEngine (com.fileitup.fisixengine.core.FisixEngine) package com.fileitup.fisixengine.core { import flash.display.*; import flash.events.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.constraints.*; import com.fileitup.fisixengine.surfaces.*; import com.fileitup.fisixengine.graphics.*; import flash.utils.*; public final class FisixEngine extends FisixObject { private var deltaMill:int; private var engineTimer:Timer; private var renderOutlines:Boolean; private var renderGraphics:Graphics; public var gravity:Vector; private var newTime:int; private var accumulator:Number; private var deltaTime:Number; private var lastDelta:Number; private var FPS:int; private var invFPS:Number; private var timeStart:int; public var mouseAttachers:Array; public static var graphics:Graphics; public function FisixEngine(){ renderOutlines = false; lastDelta = 0; FPS = 30; invFPS = (1 / 30); accumulator = 0; super(null); mouseAttachers = new Array(); iterations = 3; innerCollisions = true; bounds = new BoundingBox(0, 0, 700, 500); gravity = this.newThrust(0, 1); engineTimer = new Timer((1000 / (FPS + 20)), 0); engineTimer.addEventListener("timer", perFrame); } override public function dispose():void{ var _local1:int; super.dispose(); _local1 = 0; while (_local1 < mouseAttachers.length) { mouseAttachers[_local1].dispose; delete mouseAttachers[_local1]; _local1++; }; mouseAttachers = null; engineTimer = null; renderGraphics = null; gravity = null; } public function mainLoop(_arg1:Number=1):void{ var _local2:Number; newTime = getTimer(); deltaMill = (newTime - timeStart); timeStart = newTime; lastDelta = deltaTime; deltaTime = ((deltaMill / 1000) * FPS); _local2 = (Math.abs((deltaTime - lastDelta)) / lastDelta); updateMice(); timestep(_arg1); if (renderOutlines){ renderGraphics.clear(); renderAll(); }; } public function renderAll(_arg1:Graphics=null):void{ if (_arg1 == null){ _arg1 = renderGraphics; }; if (renderGraphics == null){ return; }; super.render(_arg1); } public function getRealFPS():Number{ return ((1000 / deltaMill)); } private function perFrame(_arg1:TimerEvent):void{ mainLoop(invFPS); } public function addMouseAttacher(_arg1:MouseAttacher):MouseAttacher{ mouseAttachers.push(_arg1); _arg1.parent = this; return (_arg1); } public function setRender(_arg1:Boolean):void{ renderOutlines = _arg1; } public function stopEngine():void{ engineTimer.stop(); } public function timestep(_arg1:Number):void{ integrate(_arg1); solve(); updateDisplays(); } public function setFPS(_arg1:int):void{ if (_arg1 < 0){ _arg1 = (_arg1 * -1); }; FPS = _arg1; invFPS = (1 / FPS); engineTimer.delay = (invFPS * 1000); } public function setRenderGraphics(_arg1:Graphics):void{ renderGraphics = _arg1; FisixEngine.graphics = graphics; } public function startEngine(_arg1:int=30):void{ setFPS(_arg1); timeStart = getTimer(); engineTimer.start(); } public function removeMouseAttacher(_arg1:MouseAttacher):MouseAttacher{ _arg1.parent = null; return ((ArrayUtils.popItem(mouseAttachers, _arg1) as MouseAttacher)); } public function updateMice():void{ var _local1:int; _local1 = 0; while (_local1 < mouseAttachers.length) { mouseAttachers[_local1].update(); _local1++; }; } public function setGravity(_arg1:Number, _arg2:Number):void{ gravity.x = _arg1; gravity.y = _arg2; } public function newMouseAttacher(_arg1:Particle, _arg2:DisplayObject, _arg3:Number=1):MouseAttacher{ return (addMouseAttacher(new MouseAttacher(_arg1, _arg2, _arg3))); } } }//package com.fileitup.fisixengine.core
Section 28
//FisixObject (com.fileitup.fisixengine.core.FisixObject) package com.fileitup.fisixengine.core { import flash.display.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.collisions.*; import com.fileitup.fisixengine.constraints.*; import com.fileitup.fisixengine.surfaces.*; import com.fileitup.fisixengine.graphics.*; import com.fileitup.fisixengine.containers.*; public class FisixObject extends CollisionObject { public var boundsCollisions:Boolean; public var containers:Array; public var constraints:Array; public var magnets:Array; public var displayAttachers:Array; public var innerCollisions:Boolean; public var polygons:Array; public var renderBoundingBoxes:Boolean; public var particles:Array; protected var bounds:BoundingBox; public var fisixObjects:Array; public var guides:Array; public var thrusts:Array; public var drag:Number; protected var iterations:int; public var surfaces:Array; public var axisAligned:Boolean; public function FisixObject(_arg1:FisixObject=null){ innerCollisions = true; renderBoundingBoxes = false; drag = 0; axisAligned = false; boundsCollisions = false; iterations = 3; super(); particles = new Array(); guides = new Array(); constraints = new Array(); surfaces = new Array(); polygons = new Array(); fisixObjects = new Array(); thrusts = new Array(); containers = new Array(); magnets = new Array(); displayAttachers = new Array(); parent = _arg1; } override public function makeStatic():void{ var _local1:int; super.makeStatic(); staticUpdate(); _local1 = 0; while (_local1 < particles.length) { particles[_local1].makeStatic(); _local1++; }; _local1 = 0; while (_local1 < guides.length) { guides[_local1].makeStatic(); _local1++; }; _local1 = 0; while (_local1 < surfaces.length) { surfaces[_local1].makeStatic(); _local1++; }; _local1 = 0; while (_local1 < polygons.length) { polygons[_local1].makeStatic(); _local1++; }; _local1 = 0; while (_local1 < fisixObjects.length) { fisixObjects[_local1].makeStatic(); _local1++; }; } override public function applyForce(_arg1:Vector, _arg2:Boolean=true):void{ var _local3:int; if (((mStatic) || (!(active)))){ return; }; if (((_arg2) && (!((parent == null))))){ if (parent.axisAligned){ parent.applyForce(_arg1); return; }; }; _local3 = 0; while (_local3 < particles.length) { particles[_local3].applyForce(_arg1, false); _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].applyForce(_arg1, false); _local3++; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].applyForce(_arg1, false); _local3++; }; } override public function dispose():void{ var _local1:int; super.dispose(); _local1 = 0; while (_local1 < particles.length) { particles[_local1].dispose(); delete particles[_local1]; _local1++; }; _local1 = 0; while (_local1 < guides.length) { guides[_local1].dispose(); delete guides[_local1]; _local1++; }; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].dispose(); delete constraints[_local1]; _local1++; }; _local1 = 0; while (_local1 < surfaces.length) { surfaces[_local1].dispose(); delete surfaces[_local1]; _local1++; }; _local1 = 0; while (_local1 < magnets.length) { magnets[_local1].dispose(); delete magnets[_local1]; _local1++; }; _local1 = 0; while (_local1 < fisixObjects.length) { fisixObjects[_local1].dispose(); delete fisixObjects[_local1]; _local1++; }; _local1 = 0; while (_local1 < displayAttachers.length) { displayAttachers[_local1].dispose; delete displayAttachers[_local1]; _local1++; }; displayAttachers = null; bounds = null; } public function newThrust(_arg1:Number, _arg2:Number):Vector{ return (addThrust(new Vector(_arg1, _arg2))); } public function renderGuides(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < guides.length) { guides[_local2].render(_arg1); if (renderBoundingBoxes){ guides[_local2].renderBoundingBox(_arg1); }; _local2++; }; } public function renderPolygons(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < polygons.length) { polygons[_local2].render(_arg1); if (renderBoundingBoxes){ polygons[_local2].renderBoundingBox(_arg1); }; _local2++; }; } public function newParticleAttacher(_arg1:DisplayObject, _arg2:Particle, _arg3:Number=0, _arg4:Number=0):ParticleAttacher{ return ((addDisplayAttacher(new ParticleAttacher(_arg1, _arg2, _arg3, _arg4)) as ParticleAttacher)); } public function setFixed(_arg1:Boolean, _arg2:Boolean=true):void{ var _local3:int; _local3 = 0; while (_local3 < particles.length) { particles[_local3].fix(_arg1); _local3++; }; _local3 = 0; while (_local3 < guides.length) { guides[_local3].fix(_arg1); _local3++; }; _local3 = 0; while (_local3 < surfaces.length) { surfaces[_local3].fix(_arg1); _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].fix(_arg1); _local3++; }; if (!_arg2){ return; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].fixAll(_arg1, true); _local3++; }; } private function getArrayByObject(_arg1:CollisionObject):Array{ if ((_arg1 is GuideParticle)){ return (guides); }; if ((_arg1 is WheelParticle)){ return (particles); }; if ((_arg1 is CircleParticle)){ return (particles); }; if ((_arg1 is Particle)){ return (null); }; if ((_arg1 is Surface)){ return (surfaces); }; if ((_arg1 is PolygonParticle)){ return (polygons); }; if ((_arg1 is FisixObject)){ return (fisixObjects); }; return (null); } private function solveInnerCollisions():void{ var _local1:int; DetectionBroadPhase.findParticleParticle(particles); DetectionBroadPhase.findParticlesSurfaces(particles, surfaces, true, true); DetectionBroadPhase.findParticlesPolygons(particles, polygons, true, true); DetectionBroadPhase.findPolygonPolygon(polygons); DetectionBroadPhase.findPolygonsSurfaces(polygons, surfaces, true, true); DetectionBroadPhase.findSurfaceSurface(surfaces); if (fisixObjects.length < 1){ return; }; _local1 = 0; while (_local1 < fisixObjects.length) { solveFisixObject(fisixObjects[_local1], true); _local1++; }; DetectionBroadPhase.findFisixFisix(fisixObjects); } public function rotationalForce(_arg1:Number, _arg2:Vector=null):void{ var _local3:int; var _local4:Vector; if (_arg2 == null){ _arg2 = getCenter(); }; _local3 = 0; while (_local3 < particles.length) { particles[_local3].rotationalForce(_arg1, _arg2); _local3++; }; _local3 = 0; while (_local3 < guides.length) { guides[_local3].rotationalForce(_arg1, _arg2); _local3++; }; } public function rotateAll(_arg1:Number, _arg2:Vector=null):void{ var _local3:int; var _local4:Vector; var _local5:Vector; var _local6:Number; if (_arg2 == null){ _arg2 = getCenter(); }; _local3 = 0; while (_local3 < particles.length) { _local4 = particles[_local3].pos; _local5 = Vector.vectorBetween(_arg2, _local4); _local6 = (_local5.getAngle() + _arg1); _local5.setAngle(_local6); _local4.x = (_arg2.x + _local5.x); _local4.y = (_arg2.y + _local5.y); _local3++; }; _local3 = 0; while (_local3 < guides.length) { _local4 = guides[_local3].pos; _local5 = Vector.vectorBetween(_arg2, _local4); _local6 = (_local5.getAngle() + _arg1); _local5.setAngle(_local6); _local4.x = (_arg2.x + _local5.x); _local4.y = (_arg2.y + _local5.y); _local3++; }; } public function solve():void{ var _local1:int; var _local2:int; if (((mStatic) || (!(active)))){ return; }; _local1 = 0; while (_local1 < fisixObjects.length) { fisixObjects[_local1].solve(); _local1++; }; _local2 = 0; while (_local2 < iterations) { solveConstraints(); solveCollisions(); _local2++; }; _local1 = 0; while (_local1 < containers.length) { containers[_local1].solveContainment(true); _local1++; }; solveReactions(); } override public function thrust(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{ var _local4:int; if (((mStatic) || (!(active)))){ return; }; if (((_arg3) && (!((parent == null))))){ if (parent.axisAligned){ parent.thrust(_arg1, _arg2); return; }; }; _local4 = 0; while (_local4 < particles.length) { particles[_local4].thrust(_arg1, _arg2, false); _local4++; }; _local4 = 0; while (_local4 < guides.length) { guides[_local4].thrust(_arg1, _arg2, false); _local4++; }; _local4 = 0; while (_local4 < polygons.length) { polygons[_local4].thrust(_arg1, _arg2, false); _local4++; }; _local4 = 0; while (_local4 < fisixObjects.length) { fisixObjects[_local4].thrust(_arg1, _arg2, false); _local4++; }; } public function addThrust(_arg1:Vector):Vector{ if (_arg1 == null){ return (null); }; thrusts.push(_arg1); return (_arg1); } public function fireAfterChildCollision(_arg1:CollisionObject):void{ afterChildCollision(_arg1, _arg1.lastCollision); } public function removeContainer(_arg1:FisixContainer, _arg2:Boolean=false):FisixContainer{ if (_arg1 == null){ return (null); }; ArrayUtils.popItem(containers, _arg1); removeObject(_arg1.objects); _arg1.parent = null; if (_arg2){ _arg1.dispose(); }; return (_arg1); } private function sortAllDynamics():void{ var _local1:int; _local1 = 0; _local1 = 0; while (_local1 < particles.length) { Sorter.bubbleSort(particles, Sorter.collidableObjectSorter); _local1++; }; _local1 = 0; while (_local1 < surfaces.length) { Sorter.bubbleSort(surfaces, Sorter.collidableObjectSorter); _local1++; }; _local1 = 0; while (_local1 < polygons.length) { Sorter.bubbleSort(polygons, Sorter.collidableObjectSorter); _local1++; }; } public function newWheelAttacher(_arg1:DisplayObject, _arg2:WheelParticle, _arg3:Number=0, _arg4:Number=1):WheelAttacher{ return ((addDisplayAttacher(new WheelAttacher(_arg1, _arg2, _arg3, _arg4)) as WheelAttacher)); } protected function afterChildCollision(_arg1:CollisionObject, _arg2:CollisionData):void{ } protected function solveBoundsCollisions(_arg1:BoundingBox):void{ var _local2:int; _local2 = 0; while (_local2 < particles.length) { particles[_local2].solveBoundsCollisions(_arg1); _local2++; }; _local2 = 0; while (_local2 < polygons.length) { polygons[_local2].solveBoundsCollisions(_arg1); _local2++; }; _local2 = 0; while (_local2 < fisixObjects.length) { fisixObjects[_local2].solveBoundsCollisions(_arg1); _local2++; }; } public function newConstraintAttacher(_arg1:DisplayObject, _arg2:SpringConstraint, _arg3:Number=0, _arg4:Number=1):ConstraintAttacher{ return ((addDisplayAttacher(new ConstraintAttacher(_arg1, _arg2, _arg3, _arg4)) as ConstraintAttacher)); } public function constraintAllParticles(_arg1:Number=1, _arg2:Number=0):void{ if (_arg1 == 1){ StickConstraint.constraintAll(this, particles, _arg2); } else { SpringConstraint.constraintAll(this, particles, _arg1, _arg2); }; } public function setMagnetic(_arg1:Boolean, _arg2:Boolean=true):void{ var _local3:int; magnetic = _arg1; _local3 = 0; while (_local3 < particles.length) { particles[_local3].magnetic = _arg1; _local3++; }; _local3 = 0; while (_local3 < surfaces.length) { surfaces[_local3].magnetic = _arg1; _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].magnetic = _arg1; _local3++; }; if (!_arg2){ return; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].setMagnetic(_arg1, true); _local3++; }; } public function solveConstraints():void{ var _local1:int; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].solve(); _local1++; }; } public function setTraction(_arg1:Number, _arg2:Boolean=true):void{ var _local3:int; _local3 = 0; while (_local3 < particles.length) { particles[_local3].traction = _arg1; _local3++; }; _local3 = 0; while (_local3 < surfaces.length) { surfaces[_local3].traction = _arg1; _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].traction = _arg1; _local3++; }; if (!_arg2){ return; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].setTraction(_arg1, true); _local3++; }; } public function renderConstraints(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < constraints.length) { constraints[_local2].render(_arg1); _local2++; }; } public function setDrag(_arg1:Number, _arg2:Boolean=true):void{ var _local3:int; drag = _arg1; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].setDrag(_arg1, _arg2); _local3++; }; } public function newStickConstraint(_arg1:Particle, _arg2:Particle, _arg3:Number=-1):StickConstraint{ return (StickConstraint(addConstraint(new StickConstraint(_arg1, _arg2, _arg3)))); } public function newDisplayAttacher(_arg1:DisplayObject, _arg2:Vector, _arg3:Number=0, _arg4:Number=0):DisplayAttacher2{ return ((addDisplayAttacher(new DisplayAttacher(_arg1, _arg2, _arg3, _arg4)) as DisplayAttacher2)); } protected function staticUpdate():void{ updateBoundingBox(); sortAllDynamics(); updateBoundingBox(); } public function removeObject(_arg1:CollisionObject, _arg2:Boolean=false):CollisionObject{ var _local3:Array; if (_arg1 == null){ return (null); }; _local3 = getArrayByObject(_arg1); if (_local3 != null){ ArrayUtils.popItem(_local3, _arg1); _arg1.parent = null; if (_arg2){ _arg1.dispose(); }; return (_arg1); }; return (null); } public function addContainer(_arg1:FisixContainer):FisixContainer{ if (_arg1 == null){ return (null); }; addObject(_arg1.collisionObject); _arg1.parent = this; containers.push(_arg1); return (_arg1); } public function setAllReactionModes(_arg1:int, _arg2:Boolean=true):void{ var _local3:int; var _local4:int; super.setReactionMode(_arg1); _local3 = getReactionMode(); _local4 = 0; while (_local4 < particles.length) { particles[_local4].setReactionMode(_local3); _local4++; }; _local4 = 0; while (_local4 < surfaces.length) { surfaces[_local4].setReactionMode(_local3); _local4++; }; _local4 = 0; while (_local4 < polygons.length) { polygons[_local4].setReactionMode(_local3); _local4++; }; if (!_arg2){ return; }; _local4 = 0; while (_local4 < fisixObjects.length) { fisixObjects[_local4].setReactionMode(_local3, true); _local4++; }; } public function newSurface(_arg1:Vector, _arg2:Vector, _arg3:Number=0):Surface{ return ((addObject(new Surface(_arg1, _arg2, _arg3)) as Surface)); } public function explode(_arg1:Vector, _arg2:Number, _arg3:Boolean=true):void{ var _local4:int; var _local5:Vector; if (((mStatic) || (!(active)))){ return; }; _local4 = 0; while (_local4 < particles.length) { particles[_local4].pointForce(_arg1, _arg2); _local4++; }; _local4 = 0; while (_local4 < polygons.length) { polygons[_local4].pointForce(_arg1, _arg2); _local4++; }; _local4 = 0; while (_local4 < surfaces.length) { surfaces[_local4].pointForce(_arg1, _arg2); _local4++; }; if (!_arg3){ return; }; _local4 = 0; while (_local4 < fisixObjects.length) { fisixObjects[_local4].explode(_arg1, _arg2, true); _local4++; }; } override public function updateBoundingBox():void{ var _local1:int; var _local2:Particle; var _local3:PolygonParticle; var _local4:Surface; var _local5:FisixObject; minX = 10000; maxX = -10000; minY = 10000; maxY = -10000; _local1 = 0; while (_local1 < particles.length) { _local2 = particles[_local1]; _local2.updateBoundingBox(); if (_local2.minX < minX){ minX = _local2.minX; }; if (_local2.minY < minY){ minY = _local2.minY; }; if (_local2.maxX > maxX){ maxX = _local2.maxX; }; if (_local2.maxY > maxY){ maxY = _local2.maxY; }; _local1++; }; _local1 = 0; while (_local1 < polygons.length) { _local3 = polygons[_local1]; _local3.updateBoundingBox(); if (_local3.minX < minX){ minX = _local3.minX; }; if (_local3.minY < minY){ minY = _local3.minY; }; if (_local3.maxX > maxX){ maxX = _local3.maxX; }; if (_local3.maxY > maxY){ maxY = _local3.maxY; }; _local1++; }; _local1 = 0; while (_local1 < surfaces.length) { _local4 = surfaces[_local1]; _local4.updateBoundingBox(); if (_local4.minX < minX){ minX = _local4.minX; }; if (_local4.minY < minY){ minY = _local4.minY; }; if (_local4.maxX > maxX){ maxX = _local4.maxX; }; if (_local4.maxY > maxY){ maxY = _local4.maxY; }; _local1++; }; _local1 = 0; while (_local1 < fisixObjects.length) { _local5 = fisixObjects[_local1]; _local5.updateBoundingBox(); if (_local5.minX < minX){ minX = _local5.minX; }; if (_local5.minY < minY){ minY = _local5.minY; }; if (_local5.maxX > maxX){ maxX = _local5.maxX; }; if (_local5.maxY > maxY){ maxY = _local5.maxY; }; _local1++; }; } public function renderSurfaces(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < surfaces.length) { surfaces[_local2].render(_arg1); if (renderBoundingBoxes){ surfaces[_local2].renderBoundingBox(_arg1); }; _local2++; }; } public function removeMagnet(_arg1:Magnet, _arg2:Boolean=false):Magnet{ if (_arg1 == null){ return (null); }; ArrayUtils.popItem(magnets, _arg1); _arg1.parent = null; if (_arg2){ _arg1.dispose(); }; return (_arg1); } public function solveCollisions():void{ if (innerCollisions){ solveInnerCollisions(); }; if (boundsCollisions){ solveBoundsCollisions(bounds); }; } public function newWheelContainer(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=true):WheelContainer{ return ((addContainer(new WheelContainer(_arg1, _arg2, _arg3, _arg4)) as WheelContainer)); } public function newMagnet(_arg1:Number, _arg2:Number, _arg3:Number):Magnet{ return (addMagnet(new Magnet(_arg1, new Vector(_arg2, _arg3)))); } public function getIterations():int{ return (iterations); } public function newDynamicSurface(_arg1:Particle, _arg2:Particle, _arg3:Number=0):DynamicSurface{ return ((addObject(new DynamicSurface(_arg1, _arg2, _arg3)) as DynamicSurface)); } public function integrate(_arg1:Number=1):void{ var _local2:int; if (((mStatic) || (!(active)))){ return; }; _local2 = 0; while (_local2 < thrusts.length) { applyForce(thrusts[_local2]); _local2++; }; _local2 = 0; while (_local2 < magnets.length) { magnets[_local2].integrate(_arg1); _local2++; }; _local2 = 0; while (_local2 < particles.length) { particles[_local2].integrate(_arg1); _local2++; }; _local2 = 0; while (_local2 < guides.length) { guides[_local2].integrate(_arg1); _local2++; }; _local2 = 0; while (_local2 < polygons.length) { polygons[_local2].integrate(_arg1); _local2++; }; _local2 = 0; while (_local2 < fisixObjects.length) { fisixObjects[_local2].integrate(_arg1); _local2++; }; _local2 = 0; while (_local2 < containers.length) { containers[_local2].integrate(_arg1); _local2++; }; } protected function onChildCollision(_arg1:CollisionObject, _arg2:CollisionData):void{ } public function setIterations(_arg1:int):void{ if (_arg1 < 1){ _arg1 = 1; }; iterations = _arg1; } public function newCircleParticle(_arg1:Number, _arg2:Number, _arg3:Number):CircleParticle{ return (CircleParticle(addObject(new CircleParticle(_arg1, _arg2, _arg3)))); } public function addObject(_arg1:CollisionObject):CollisionObject{ var _local2:Array; if (_arg1 == null){ return (null); }; initChild(_arg1); _local2 = getArrayByObject(_arg1); if (_local2 != null){ _local2.push(_arg1); if (mStatic){ staticUpdate(); }; return (_arg1); }; return (null); } public function newWheelParticle(_arg1:Number, _arg2:Number, _arg3:Number):WheelParticle{ return (WheelParticle(addObject(new WheelParticle(_arg1, _arg2, _arg3)))); } override public function pointForce(_arg1:Vector, _arg2:Number):void{ var _local3:int; var _local4:Vector; if (((mStatic) || (!(active)))){ return; }; _local3 = 0; while (_local3 < particles.length) { particles[_local3].pointForce(_arg1, _arg2); _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].pointForce(_arg1, _arg2); _local3++; }; _local3 = 0; while (_local3 < surfaces.length) { surfaces[_local3].pointForce(_arg1, _arg2); _local3++; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].pointForce(_arg1, _arg2); _local3++; }; } public function getCenter():Vector{ updateBoundingBox(); return (new Vector(((minX + maxX) / 2), ((minY + maxY) / 2))); } public function setCenter(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{ var _local4:Vector; _local4 = getCenter(); if (!_arg3){ move((_arg1 - _local4.x), (_arg2 - _local4.y)); } else { thrust((_arg1 - _local4.x), (_arg2 - _local4.y)); }; } public function scale(_arg1:Number, _arg2:Number, _arg3:Boolean=false, _arg4:Vector=null):void{ var _local5:int; var _local6:Vector; var _local7:Number; var _local8:CircleParticle; var _local9:GuideParticle; var _local10:Constraint; var _local11:Surface; if (_arg4 == null){ _arg4 = getCenter(); }; _local7 = 1; if (Math.abs(_arg1) == Math.abs(_arg2)){ _local7 = Math.abs(_arg1); }; _local5 = 0; while (_local5 < particles.length) { _local8 = particles[_local5]; _local6 = _arg4.vectorTo(_local8.pos); _arg4.vectorTo(_local8.pos).x = (_local6.x * _arg1); _local6.y = (_local6.y * _arg2); _local8.setPosition((_arg4.x + _local6.x), (_arg4.y + _local6.y)); _local8.setRadius((_local8.radius * _local7)); _local5++; }; _local5 = 0; while (_local5 < guides.length) { _local9 = guides[_local5]; _local6 = _arg4.vectorTo(_local9.pos); _arg4.vectorTo(_local9.pos).x = (_local6.x * _arg1); _local6.y = (_local6.y * _arg2); _local9.setPosition((_arg4.x + _local6.x), (_arg4.y + _local6.y)); _local5++; }; _local5 = 0; while (_local5 < constraints.length) { _local10 = constraints[_local5]; if ((_local10 is AngularConstraint)){ if (_arg3){ (_local10 as AngularConstraint).flip(); }; } else { if (_local10.restLength == -1){ if (_local10.min > 0){ _local10.min = (_local10.min * _local7); }; if (_local10.max > 0){ _local10.max = (_local10.max * _local7); }; } else { _local10.restLength = (_local10.restLength * _local7); }; }; _local5++; }; _local5 = 0; while (_local5 < surfaces.length) { _local11 = surfaces[_local5]; surfaces[_local5].radius = (_local11.radius * _local7); _local5++; }; _local5 = 0; while (_local5 < fisixObjects.length) { fisixObjects[_local5].scale(_arg1, _arg2, _arg4); _local5++; }; } public function addConstraint(_arg1:Constraint):Constraint{ if (_arg1 == null){ return (null); }; constraints.push(_arg1); _arg1.parent = this; sortConstraints(); return (_arg1); } public function setVelocity(_arg1:Vector, _arg2:Boolean=true):void{ var _local3:int; if (((_arg2) && (!((parent == null))))){ if (parent.axisAligned){ parent.setVelocity(_arg1); return; }; }; _local3 = 0; while (_local3 < particles.length) { particles[_local3].setVelocity(_arg1, false); _local3++; }; _local3 = 0; while (_local3 < guides.length) { guides[_local3].setVelocity(_arg1, false); _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].setVelocity(_arg1, false); _local3++; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].setVelocity(_arg1, false); _local3++; }; } public function addMagnet(_arg1:Magnet):Magnet{ if (_arg1 == null){ return (null); }; _arg1.parent = this; magnets.push(_arg1); return (_arg1); } public function removeDisplayAttacher(_arg1:DisplayAttacher):DisplayAttacher{ _arg1.parent = null; return ((ArrayUtils.popItem(displayAttachers, _arg1) as DisplayAttacher)); } public function setAllDetectionModes(_arg1:int, _arg2:Boolean=true):void{ var _local3:int; var _local4:int; super.setDetectionMode(_arg1); _local3 = getDetectionMode(); _local4 = 0; while (_local4 < particles.length) { particles[_local4].setDetectionMode(_local3); _local4++; }; _local4 = 0; while (_local4 < surfaces.length) { surfaces[_local4].setDetectionMode(_local3); _local4++; }; _local4 = 0; while (_local4 < polygons.length) { polygons[_local4].setDetectionMode(_local3); _local4++; }; if (!_arg2){ return; }; _local4 = 0; while (_local4 < fisixObjects.length) { fisixObjects[_local4].setDetectionMode(_local3, true); _local4++; }; } public function setFriction(_arg1:Number, _arg2:Boolean=true):void{ var _local3:int; friction = _arg1; _local3 = 0; while (_local3 < particles.length) { particles[_local3].friction = _arg1; _local3++; }; _local3 = 0; while (_local3 < surfaces.length) { surfaces[_local3].friction = _arg1; _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].friction = _arg1; _local3++; }; if (!_arg2){ return; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].setFriction(_arg1, true); _local3++; }; } public function removeConstraint(_arg1:Constraint, _arg2:Boolean=false):Constraint{ if (_arg1 == null){ return (null); }; ArrayUtils.popItem(constraints, _arg1); _arg1.parent = null; if (_arg2){ _arg1.dispose(); }; return (_arg1); } public function newSpringConstraint(_arg1:Particle, _arg2:Particle, _arg3:Number=0.5, _arg4:Number=-1):SpringConstraint{ return (SpringConstraint(addConstraint(new SpringConstraint(_arg1, _arg2, _arg3, _arg4)))); } public function fireOnChildCollision(_arg1:CollisionObject):void{ onChildCollision(_arg1, _arg1.lastCollision); } public function setBounce(_arg1:Number, _arg2:Boolean=true):void{ var _local3:int; bounce = _arg1; _local3 = 0; while (_local3 < particles.length) { particles[_local3].bounce = _arg1; _local3++; }; _local3 = 0; while (_local3 < surfaces.length) { surfaces[_local3].bounce = _arg1; _local3++; }; _local3 = 0; while (_local3 < polygons.length) { polygons[_local3].bounce = _arg1; _local3++; }; if (!_arg2){ return; }; _local3 = 0; while (_local3 < fisixObjects.length) { fisixObjects[_local3].setBounce(_arg1, true); _local3++; }; } public function renderFisixObjects(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < fisixObjects.length) { fisixObjects[_local2].render(_arg1); if (renderBoundingBoxes){ fisixObjects[_local2].renderBoundingBox(_arg1); }; _local2++; }; } override public function render(_arg1:Graphics):void{ renderFisixObjects(_arg1); renderParticles(_arg1); renderGuides(_arg1); renderConstraints(_arg1); renderSurfaces(_arg1); renderPolygons(_arg1); renderMagnets(_arg1); } public function newFisixObject():FisixObject{ return ((addObject(new FisixObject()) as FisixObject)); } public function newAngularConstraint(_arg1:Particle, _arg2:Particle, _arg3:Particle, _arg4:Number=-1, _arg5:Number=-1):AngularConstraint{ return (AngularConstraint(addConstraint(new AngularConstraint(_arg1, _arg2, _arg3, _arg4, _arg5)))); } public function solveFisixObject(_arg1:FisixObject, _arg2:Boolean=false):void{ var _local3:int; if (!_arg1.collidable){ return; }; DetectionBroadPhase.findParticlesParticles(_arg1.particles, particles, _arg1.fixed, mFixed); DetectionBroadPhase.findParticlesSurfaces(_arg1.particles, surfaces, _arg1.fixed, mFixed); DetectionBroadPhase.findParticlesSurfaces(particles, _arg1.surfaces, mFixed, _arg1.fixed); DetectionBroadPhase.findParticlesPolygons(_arg1.particles, polygons, _arg1.fixed, mFixed); DetectionBroadPhase.findParticlesPolygons(particles, _arg1.polygons, mFixed, _arg1.fixed); DetectionBroadPhase.findPolygonsPolygons(_arg1.polygons, polygons, _arg1.fixed, mFixed); DetectionBroadPhase.findPolygonsSurfaces(_arg1.polygons, surfaces, _arg1.fixed, mFixed); DetectionBroadPhase.findPolygonsSurfaces(polygons, _arg1.surfaces, mFixed, _arg1.fixed); DetectionBroadPhase.findSurfacesSurfaces(_arg1.surfaces, surfaces, _arg1.fixed, mFixed); _local3 = 0; while (_local3 < int(_arg1.fisixObjects.length)) { solveFisixObject(_arg1.fisixObjects[_local3]); _local3++; }; } public function getBounds():BoundingBox{ return (bounds); } public function addDisplayAttacher(_arg1:DisplayAttacher):DisplayAttacher{ displayAttachers.push(_arg1); _arg1.parent = this; return (_arg1); } public function setBounds(_arg1:BoundingBox):void{ bounds = _arg1; } private function sortConstraints():void{ Sorter.bubbleSort(constraints, Sorter.constraintSorter); } public function newSurfaceAttacher(_arg1:DisplayObject, _arg2:Surface, _arg3:Number=0, _arg4:Number=1):SurfaceAttacher{ return ((addDisplayAttacher(new SurfaceAttacher(_arg1, _arg2, _arg3, _arg4)) as SurfaceAttacher)); } public function renderParticles(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < particles.length) { particles[_local2].render(_arg1); if (renderBoundingBoxes){ particles[_local2].renderBoundingBox(_arg1); }; _local2++; }; _local2 = 0; while (_local2 < containers.length) { containers[_local2].render(_arg1); _local2++; }; } public function pickParticle(_arg1:Number, _arg2:Number, _arg3:Number=0):CircleParticle{ var _local4:CircleParticle; var _local5:Array; var _local6:int; var _local7:CircleParticle; var _local8:Number; var _local9:Vector; if ((((particles.length < 1)) && ((fisixObjects.length < 1)))){ return (null); }; _local5 = new Array(); _local6 = 0; while (_local6 < particles.length) { _local4 = particles[_local6]; _local4.updateBoundingBox(); if ((_arg1 + _arg3) < _local4.minX){ break; }; _local9 = new Vector(_arg1, _arg2); if (_local9.distanceTo(_local4.pos) < (_local4.radius + _arg3)){ _local5.push(_local4); }; _local6++; }; _local6 = 0; while (_local6 < fisixObjects.length) { _local4 = fisixObjects[_local6].pickParticle(_arg1, _arg2, _arg3); if (_local4 != null){ _local5.push(_local4); }; _local6++; }; if (_local5.length == 0){ return (null); }; _local7 = _local5[0]; _local8 = _local7.radius; _local6 = 1; while (_local6 < _local5.length) { if (_local5[_local6].radius < _local8){ _local7 = _local5[_local6]; _local8 = _local7.radius; }; _local6++; }; return (_local7); } private function solveChildReactions(_arg1:CollisionObject):void{ if (_arg1.lastCollision.used){ return; }; if (_arg1.lastCollision.object == null){ return; }; _arg1.fireOnCollision(); if (reactionMode != 0){ _arg1.solveReactions(); }; _arg1.lastCollision.used = true; _arg1.fireAfterCollision(); } public function newCircleContainer(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=true):CircleContainer{ return ((addContainer(new CircleContainer(_arg1, _arg2, _arg3, _arg4)) as CircleContainer)); } public function renderMagnets(_arg1:Graphics):void{ var _local2:int; _local2 = 0; while (_local2 < magnets.length) { magnets[_local2].render(_arg1); if (renderBoundingBoxes){ magnets[_local2].renderBoundingBox(_arg1); }; _local2++; }; } public function move(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{ var _local4:int; _local4 = 0; while (_local4 < particles.length) { particles[_local4].move(_arg1, _arg2); _local4++; }; _local4 = 0; while (_local4 < guides.length) { guides[_local4].move(_arg1, _arg2); _local4++; }; _local4 = 0; while (_local4 < polygons.length) { polygons[_local4].move(_arg1, _arg2); _local4++; }; if (!_arg3){ return; }; _local4 = 0; while (_local4 < fisixObjects.length) { fisixObjects[_local4].move(_arg1, _arg2); _local4++; }; } public function updateDisplays():void{ var _local1:int; _local1 = 0; while (_local1 < displayAttachers.length) { displayAttachers[_local1].update(); _local1++; }; _local1 = 0; while (_local1 < fisixObjects.length) { fisixObjects[_local1].updateDisplays(); _local1++; }; } public function newDisplayAttacher2(_arg1:DisplayObject, _arg2:Vector, _arg3:Vector, _arg4:Number=0, _arg5:Number=1):DisplayAttacher2{ return ((addDisplayAttacher(new DisplayAttacher2(_arg1, _arg2, _arg3, _arg4, _arg5)) as DisplayAttacher2)); } public function newDisplayAttacher3(_arg1:DisplayObject, _arg2:Vector, _arg3:Vector, _arg4:Vector, _arg5:Number=0, _arg6:Number=1):DisplayAttacher3{ return ((addDisplayAttacher(new DisplayAttacher3(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)) as DisplayAttacher3)); } public function rotationalThrust(_arg1:Number, _arg2:Vector=null):void{ var _local3:int; var _local4:Vector; if (_arg2 == null){ _arg2 = getCenter(); }; _local3 = 0; while (_local3 < particles.length) { particles[_local3].rotationalThrust(_arg1, _arg2); _local3++; }; _local3 = 0; while (_local3 < guides.length) { guides[_local3].rotationalThrust(_arg1, _arg2); _local3++; }; } public function newGuideParticle(_arg1:Number, _arg2:Number):GuideParticle{ return (GuideParticle(addObject(new GuideParticle(_arg1, _arg2)))); } override public function solveReactions():void{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { solveChildReactions(particles[_local1]); _local1++; }; _local1 = 0; while (_local1 < surfaces.length) { solveChildReactions(surfaces[_local1]); _local1++; }; _local1 = 0; while (_local1 < fisixObjects.length) { fisixObjects[_local1].solveReactions(); _local1++; }; } protected function initChild(_arg1:CollisionObject):void{ var _local2:FisixObject; _arg1.parent = this; if (mStatic){ _arg1.makeStatic(); }; if ((_arg1 is WheelParticle)){ (_arg1 as WheelParticle).rim.parent = this; }; if (inheritAttributesOnAdd){ _arg1.setDetectionMode(detectionMode); _arg1.setReactionMode(reactionMode); _arg1.magnetic = magnetic; _arg1.setMaterial(mMaterial); _arg1.friction = friction; _arg1.bounce = bounce; _arg1.traction = traction; if ((_arg1 is FisixObject)){ _local2 = (_arg1 as FisixObject); _local2.drag = drag; }; }; _arg1.onInit(); } public function flipJoints():void{ var _local1:int; var _local2:Constraint; _local1 = 0; while (_local1 < constraints.length) { _local2 = constraints[_local1]; if ((_local2 is AngularConstraint)){ (_local2 as AngularConstraint).flip(); }; _local1++; }; } public function removeThrust(_arg1:Vector):Vector{ if (_arg1 == null){ return (null); }; ArrayUtils.popItem(thrusts, _arg1); return (_arg1); } } }//package com.fileitup.fisixengine.core
Section 29
//Vector (com.fileitup.fisixengine.core.Vector) package com.fileitup.fisixengine.core { import flash.display.*; import com.fileitup.fisixengine.utils.*; public class Vector { public var x:Number; public var y:Number; public function Vector(_arg1:Number, _arg2:Number){ x = _arg1; y = _arg2; } public function divide(_arg1:Number):Vector{ if (_arg1 != 0){ x = (x / _arg1); y = (y / _arg1); }; return (this); } public function times(_arg1:Number):Vector{ x = (x * _arg1); y = (y * _arg1); return (this); } public function dot(_arg1:Vector):Number{ return (((x * _arg1.x) + (y * _arg1.y))); } public function normalize(_arg1:Number=1):Vector{ var _local2:Number; _local2 = getMagnitude(); _arg1 = Math.abs(_arg1); x = (x / _local2); x = (x * _arg1); y = (y / _local2); y = (y * _arg1); return (this); } public function distanceTo(_arg1:Vector):Number{ return (Math.sqrt((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2)))); } public function setAngle(_arg1:Number):void{ var _local2:Number; _local2 = getMagnitude(); x = (Math.sin((((-(_arg1) - 180) * Math.PI) / 180)) * _local2); y = (Math.cos((((-(_arg1) - 180) * Math.PI) / 180)) * _local2); } public function setPos(_arg1:Number, _arg2:Number):Vector{ x = _arg1; y = _arg2; return (this); } public function subtract(_arg1:Vector):Vector{ x = (x - _arg1.x); y = (y - _arg1.y); return (this); } public function plus(_arg1:Number):Vector{ x = (x + _arg1); y = (y + _arg1); return (this); } public function rotate(_arg1:Number):Vector{ setAngle((getAngle() + _arg1)); return (this); } public function distanceSquaredTo(_arg1:Vector):Number{ return ((Math.pow((x - _arg1.x), 2) + Math.pow((y - _arg1.y), 2))); } public function getNormal(_arg1:Number=1):Vector{ return (new Vector((-(y) * _arg1), (x * _arg1))); } public function vectorTo(_arg1:Vector):Vector{ return (new Vector((_arg1.x - x), (_arg1.y - y))); } public function renderFrom(_arg1:Number, _arg2:Number, _arg3:Graphics, _arg4:uint=0x660066):void{ _arg3.lineStyle(1, _arg4); _arg3.moveTo(_arg1, _arg2); _arg3.lineTo((_arg1 + x), (_arg2 + y)); } public function add(_arg1:Vector):Vector{ x = (x + _arg1.x); y = (y + _arg1.y); return (this); } public function reverse():Vector{ x = -(x); y = -(y); return (this); } public function getAngle():Number{ return ((MathEngine.getAngle(0, 0, x, y) + 90)); } public function getMagnitude():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function clone():Vector{ return (new Vector(x, y)); } public function getMagnitudeSquared():Number{ return (((x * x) + (y * y))); } public function angleTo(_arg1:Vector):Number{ return (MathEngine.getAngle(x, y, _arg1.x, _arg1.y)); } public function minus(_arg1:Number):Vector{ x = (x - _arg1); y = (y - _arg1); return (this); } public function perp(_arg1:Vector):Number{ return (((x * _arg1.y) - (y * _arg1.x))); } public function toString():String{ return (((("Vector: x: " + x) + ", y: ") + y)); } public static function toAngle(_arg1:Number, _arg2:Number):Number{ return (MathEngine.getAngle(0, 0, _arg1, _arg2)); } public static function vectorBetween(_arg1:Vector, _arg2:Vector):Vector{ return (new Vector((_arg2.x - _arg1.x), (_arg2.y - _arg1.y))); } public static function vectorFromAngle(_arg1:Number, _arg2:Number=1):Vector{ var _local3:Number; var _local4:Number; var _local5:Vector; _local3 = (Math.sin((_arg1 * MathEngine.toRad)) * _arg2); _local4 = (Math.cos((_arg1 * MathEngine.toRad)) * _arg2); _local5 = new Vector(_local3, _local4); return (_local5); } } }//package com.fileitup.fisixengine.core
Section 30
//ConstraintAttacher (com.fileitup.fisixengine.graphics.ConstraintAttacher) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.constraints.*; public class ConstraintAttacher extends DisplayAttacher2 { public function ConstraintAttacher(_arg1:DisplayObject, _arg2:SpringConstraint, _arg3:Number=0, _arg4:Number=1, _arg5:Boolean=false){ var _local6:Vector; var _local7:Vector; _local6 = _arg2.particleA.pos; _local7 = _arg2.particleB.pos; if (_arg5){ _local6 = _arg2.particleB.pos; _local7 = _arg2.particleA.pos; }; super(_arg1, _local6, _local7, _arg3, _arg4); } } }//package com.fileitup.fisixengine.graphics
Section 31
//DisplayAttacher (com.fileitup.fisixengine.graphics.DisplayAttacher) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.core.*; public class DisplayAttacher { public var disp:DisplayObject; public var parent:FisixObject; public var xOffset:Number; public var yOffset:Number; public var anchor:Vector; public function DisplayAttacher(_arg1:DisplayObject, _arg2:Vector, _arg3:Number=0, _arg4:Number=0){ disp = _arg1; anchor = _arg2; xOffset = _arg3; yOffset = _arg4; } public function dispose():void{ parent = null; disp = null; anchor = null; } public function update():void{ disp.x = (anchor.x + xOffset); disp.y = (anchor.y + yOffset); } public function unload():void{ if (parent != null){ parent.removeDisplayAttacher(this); }; dispose(); } } }//package com.fileitup.fisixengine.graphics
Section 32
//DisplayAttacher2 (com.fileitup.fisixengine.graphics.DisplayAttacher2) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.core.*; public class DisplayAttacher2 extends DisplayAttacher { public var multiplier:Number; public var offset:Number; protected var anchor2:Vector; public function DisplayAttacher2(_arg1:DisplayObject, _arg2:Vector, _arg3:Vector, _arg4:Number=0, _arg5:Number=1){ super(_arg1, _arg2); anchor2 = _arg3; offset = _arg4; multiplier = _arg5; } override public function update():void{ var _local1:Number; super.update(); _local1 = ((anchor.angleTo(anchor2) * multiplier) + offset); disp.rotation = _local1; } override public function dispose():void{ super.dispose(); anchor2 = null; } } }//package com.fileitup.fisixengine.graphics
Section 33
//DisplayAttacher3 (com.fileitup.fisixengine.graphics.DisplayAttacher3) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.core.*; public class DisplayAttacher3 extends DisplayAttacher { private var multiplier:Number; private var offset:Number; private var anchor2:Vector; private var anchor3:Vector; public function DisplayAttacher3(_arg1:DisplayObject, _arg2:Vector, _arg3:Vector, _arg4:Vector, _arg5:Number=0, _arg6:Number=1){ super(_arg1, _arg2); anchor2 = _arg3; anchor3 = _arg4; offset = _arg5; multiplier = _arg6; } override public function update():void{ var _local1:Number; super.update(); _local1 = ((anchor2.angleTo(anchor3) * multiplier) + offset); disp.rotation = _local1; } override public function dispose():void{ super.dispose(); anchor2 = null; anchor3 = null; } } }//package com.fileitup.fisixengine.graphics
Section 34
//ParticleAttacher (com.fileitup.fisixengine.graphics.ParticleAttacher) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.primitives.*; public class ParticleAttacher extends DisplayAttacher { public function ParticleAttacher(_arg1:DisplayObject, _arg2:Particle, _arg3:Number=0, _arg4:Number=0){ super(_arg1, _arg2.pos, _arg3, _arg4); } } }//package com.fileitup.fisixengine.graphics
Section 35
//SurfaceAttacher (com.fileitup.fisixengine.graphics.SurfaceAttacher) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; public class SurfaceAttacher extends DisplayAttacher2 { public function SurfaceAttacher(_arg1:DisplayObject, _arg2:Surface, _arg3:Number=0, _arg4:Number=1, _arg5:Boolean=false){ var _local6:Vector; var _local7:Vector; _local6 = _arg2.vectorA; _local7 = _arg2.vectorB; if (_arg5){ _local6 = _arg2.vectorB; _local7 = _arg2.vectorA; }; super(_arg1, _local6, _local7, _arg3, _arg4); } } }//package com.fileitup.fisixengine.graphics
Section 36
//WheelAttacher (com.fileitup.fisixengine.graphics.WheelAttacher) package com.fileitup.fisixengine.graphics { import flash.display.*; import com.fileitup.fisixengine.particles.*; public class WheelAttacher extends DisplayAttacher2 { protected var wheel:WheelParticle; public function WheelAttacher(_arg1:DisplayObject, _arg2:WheelParticle, _arg3:Number=0, _arg4:Number=1){ super(_arg1, _arg2.pos, null, _arg3, _arg4); wheel = _arg2; } override public function update():void{ disp.x = anchor.x; disp.y = anchor.y; disp.rotation = ((wheel.angle * multiplier) + offset); } override public function dispose():void{ super.dispose(); wheel = null; } } }//package com.fileitup.fisixengine.graphics
Section 37
//Material (com.fileitup.fisixengine.materials.Material) package com.fileitup.fisixengine.materials { public class Material { private var mTraction:Number; private var mFriction:Number; private var mBounce:Number; private var mColor:int; private var mName:String; public function Material(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:int=-1){ mName = _arg1; mFriction = _arg2; mBounce = _arg3; mTraction = _arg4; mColor = _arg5; } public function get color():int{ return (mColor); } public function get traction():Number{ return (mTraction); } public function get bounce():Number{ return (mBounce); } public function get friction():Number{ return (mFriction); } } }//package com.fileitup.fisixengine.materials
Section 38
//MaterialFactory (com.fileitup.fisixengine.materials.MaterialFactory) package com.fileitup.fisixengine.materials { import flash.utils.*; public final class MaterialFactory { private static var materials:Dictionary = new Dictionary(); public static function removeMaterial(_arg1:String):void{ materials[_arg1] = null; } public static function getMaterial(_arg1:String):Material{ return (materials[_arg1]); } public static function addMaterial(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:int=-1):void{ materials[_arg1] = new Material(_arg1, _arg2, _arg3, _arg4, _arg5); } } }//package com.fileitup.fisixengine.materials
Section 39
//CircleParticle (com.fileitup.fisixengine.particles.CircleParticle) package com.fileitup.fisixengine.particles { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.collisions.*; public class CircleParticle extends Particle { public var radius:Number; public function CircleParticle(_arg1:Number, _arg2:Number, _arg3:Number){ super(_arg1, _arg2); radius = _arg3; color = 4162278; } override public function updateBoundingBox():void{ minX = (pos.x - radius); maxX = (pos.x + radius); minY = (pos.y - radius); maxY = (pos.y + radius); if (!useRaycasting){ return; }; if (minX > (old.x - radius)){ minX = (old.x - radius); }; if (maxX < (old.x + radius)){ maxX = (old.x + radius); }; if (minY > (old.y - radius)){ minY = (old.y - radius); }; if (maxY < (old.y + radius)){ maxY = (old.y + radius); }; } override public function thrustPoint(_arg1:Number, _arg2:Number, _arg3:Vector):void{ var _local4:Vector; var _local5:Number; _local4 = Vector.vectorBetween(pos, _arg3).normalize(); _local5 = ((_arg1 * _local4.x) + (_arg2 * _local4.y)); thrust((_local4.x * _local5), (_local4.y * _local5)); } override public function applyForcePoint(_arg1:Vector, _arg2:Vector):void{ var _local3:Vector; var _local4:Number; _local3 = Vector.vectorBetween(pos, _arg2).normalize(); _local4 = _arg1.dot(_local3); applyForce(_local3.clone().times(_local4)); } override public function solveBoundsCollisions(_arg1:BoundingBox):void{ if (((fixed) || (!(collidable)))){ return; }; if (pos.x < (_arg1.minX + radius)){ thrustTo((_arg1.minX + radius), pos.y); }; if (pos.x > (_arg1.maxX - radius)){ thrustTo((_arg1.maxX - radius), pos.y); }; if (pos.y < (_arg1.minY + radius)){ thrustTo(pos.x, (_arg1.minY + radius)); }; if (pos.y > (_arg1.maxY - radius)){ thrustTo(pos.x, (_arg1.maxY - radius)); }; } public function setRadius(_arg1:Number):void{ radius = _arg1; } override public function setDetectionMode(_arg1:int):void{ super.setDetectionMode(_arg1); if ((((detectionMode == DetectionModes.LIMIT_VELOCITY)) || ((detectionMode == DetectionModes.HYBRID_RAYCAST)))){ setMaxVel(radius); }; } override public function render(_arg1:Graphics):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local2 = color; _local3 = radius; if (_local3 < 1){ _local3 = 1; }; _arg1.lineStyle(1, _local2); _arg1.drawCircle(pos.x, pos.y, _local3); _local4 = (_local3 + 3); _arg1.lineStyle(1, _local2, 100); _arg1.moveTo(pos.x, (pos.y + _local3)); _local8 = 1; while (_local8 < (_local4 + 1)) { _local5 = (((2 * Math.PI) / _local4) * _local8); _local6 = (Math.sin(_local5) * _local3); _local7 = (Math.cos(_local5) * _local3); _arg1.lineTo((pos.x + _local6), (pos.y + _local7)); _local8++; }; } override public function getNormalAt(_arg1:Vector, _arg2:Vector=null):Vector{ return (Vector.vectorBetween(pos, _arg1).normalize()); } } }//package com.fileitup.fisixengine.particles
Section 40
//GuideParticle (com.fileitup.fisixengine.particles.GuideParticle) package com.fileitup.fisixengine.particles { import flash.display.*; import com.fileitup.fisixengine.primitives.*; public class GuideParticle extends Particle { public function GuideParticle(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); color = 170; } override public function integrate(_arg1:Number=1):void{ accel.times(0); super.integrate(_arg1); } override public function render(_arg1:Graphics):void{ _arg1.lineStyle(1, 0xFF, 0); _arg1.moveTo((pos.x - 2), (pos.y - 2)); _arg1.lineTo((pos.x + 2), (pos.y - 2)); _arg1.lineTo((pos.x + 2), (pos.y + 2)); _arg1.lineTo((pos.x - 2), (pos.y + 2)); } } }//package com.fileitup.fisixengine.particles
Section 41
//PolygonParticle (com.fileitup.fisixengine.particles.PolygonParticle) package com.fileitup.fisixengine.particles { import com.fileitup.fisixengine.primitives.*; public class PolygonParticle extends Particle { public function PolygonParticle(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package com.fileitup.fisixengine.particles
Section 42
//WheelEdgeParticle (com.fileitup.fisixengine.particles.WheelEdgeParticle) package com.fileitup.fisixengine.particles { import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; class WheelEdgeParticle extends Particle { public var angAccel:Number; private var maxSpeed:Number; public var wheel:WheelParticle; public var radius:Number; public var speed:Number; function WheelEdgeParticle(_arg1:Number, _arg2:WheelParticle){ maxSpeed = 10; super(_arg1, 0); wheel = _arg2; radius = _arg1; speed = 0; angAccel = 0; } override public function dispose():void{ super.dispose(); wheel = null; } public function get maximumSpeed():Number{ return (maxSpeed); } public function set maximumSpeed(_arg1:Number):void{ maxSpeed = Math.abs(_arg1); } public function solve(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; speed = (speed + angAccel); angAccel = 0; if (speed < -(maxSpeed)){ speed = -(maxSpeed); }; if (speed > maxSpeed){ speed = maxSpeed; }; _local2 = -(pos.y); _local3 = pos.x; _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); _local2 = (_local2 / _local4); _local3 = (_local3 / _local4); pos.x = (pos.x + (_local2 * speed)); pos.y = (pos.y + (_local3 * speed)); integrate(_arg1); pos.normalize(wheel.radius); } } }//package com.fileitup.fisixengine.particles
Section 43
//WheelParticle (com.fileitup.fisixengine.particles.WheelParticle) package com.fileitup.fisixengine.particles { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.collisions.*; public class WheelParticle extends CircleParticle { public var rim:WheelEdgeParticle; public function WheelParticle(_arg1:Number, _arg2:Number, _arg3:Number){ super(_arg1, _arg2, _arg3); rim = new WheelEdgeParticle(_arg3, this); color = 4162278; } override public function thrustPoint(_arg1:Number, _arg2:Number, _arg3:Vector):void{ var _local4:Vector; var _local5:Number; super.thrustPoint(_arg1, _arg2, _arg3); _local4 = getNormalAt(_arg3); _local5 = ((_arg1 * _local4.y) - (_arg2 * _local4.x)); rotateWheel(-(_local5)); } override public function dispose():void{ super.dispose(); rim.dispose(); rim = null; } override public function integrate(_arg1:Number=1):void{ if (((fixed) || (!(active)))){ return; }; super.integrate(_arg1); rim.solve(_arg1); } override public function applyForcePoint(_arg1:Vector, _arg2:Vector):void{ var _local3:Vector; var _local4:Number; super.applyForcePoint(_arg1, _arg2); _local3 = getNormalAt(_arg2); _local4 = _arg1.perp(_local3); rotateWheel(-(_local4)); } override public function setRadius(_arg1:Number):void{ super.setRadius(_arg1); rim.radius = _arg1; } override public function render(_arg1:Graphics):void{ super.render(_arg1); rim.pos.renderFrom(pos.x, pos.y, _arg1, 13015553); rim.pos.clone().rotate(120).renderFrom(pos.x, pos.y, _arg1, 13015553); rim.pos.clone().rotate(-120).renderFrom(pos.x, pos.y, _arg1, 13015553); } public function set angle(_arg1:Number):void{ rim.pos.setAngle(_arg1); } public function getMaxSpeed():Number{ return (rim.maximumSpeed); } public function setMaxSpeed(_arg1:Number):void{ rim.maximumSpeed = _arg1; } public function rotateWheel(_arg1:Number):void{ rim.angAccel = (rim.angAccel + _arg1); } public function get angle():Number{ return (rim.pos.getAngle()); } override public function solveReactions():void{ CollisionReaction.solveWheelStatic(this, lastCollision.object, lastCollision.normal, lastCollision.penetration); if (lastCollision.object.fixed == true){ CollisionReaction.solveDynamicStatic(this, lastCollision.object, lastCollision.normal, lastCollision.penetration); }; } } }//package com.fileitup.fisixengine.particles
Section 44
//Constraint (com.fileitup.fisixengine.primitives.Constraint) package com.fileitup.fisixengine.primitives { import flash.display.*; import com.fileitup.fisixengine.core.*; public class Constraint implements EngineObject { protected var mBreakPoint:Number; public var unloadOnBreak:Boolean; protected var mBroken:Boolean; protected var restMin:Number; protected var stiff:Number; public var parent:FisixObject; protected var restLen:Number; protected var restMax:Number; public function Constraint(){ unloadOnBreak = true; mBreakPoint = 0; mBroken = false; super(); } protected function solveConstraint(_arg1:Number, _arg2:Number):void{ } public function set stiffness(_arg1:Number):void{ _arg1 = ((_arg1 < 0)) ? 0 : _arg1; _arg1 = ((_arg1 > 1)) ? 1 : _arg1; stiff = _arg1; } public function unload():void{ onUnload(); parent.removeConstraint(this, true); } public function set max(_arg1:Number):void{ restMax = _arg1; restLen = -1; } public function get breakPoint():Number{ return (mBreakPoint); } public function get min():Number{ return (restMin); } public function get broken():Boolean{ return (mBroken); } public function render(_arg1:Graphics):void{ } public function solve():void{ } public function get restLength():Number{ return (restLen); } public function dispose():void{ parent = null; } public function set min(_arg1:Number):void{ restMin = _arg1; restLen = -1; } protected function onBreak():void{ } public function set breakPoint(_arg1:Number):void{ _arg1 = ((_arg1 < 0)) ? 0 : _arg1; mBreakPoint = _arg1; } public function get max():Number{ return (restMax); } public function set restLength(_arg1:Number):void{ _arg1 = Math.abs(_arg1); restLen = _arg1; } protected function breakConstraint():void{ if (!unloadOnBreak){ return; }; onBreak(); unload(); } public function setMinMax(_arg1:Number, _arg2:Number):void{ min = _arg1; max = _arg2; } protected function onUnload():void{ } public function get stiffness():Number{ return (stiff); } } }//package com.fileitup.fisixengine.primitives
Section 45
//FisixContainer (com.fileitup.fisixengine.primitives.FisixContainer) package com.fileitup.fisixengine.primitives { import flash.display.*; import com.fileitup.fisixengine.core.*; public class FisixContainer implements EngineObject { public var parent:FisixObject; public var collisionObject:CollisionObject; public var innerDynamics:Boolean; public var objects:FisixObject; public function FisixContainer(_arg1:CollisionObject, _arg2:Boolean=true){ innerDynamics = true; super(); collisionObject = _arg1; objects = new FisixObject(); objects.innerCollisions = true; objects.setIterations(3); innerDynamics = _arg2; } public function unload():void{ parent.removeContainer(this); dispose(); } public function render(_arg1:Graphics):void{ objects.render(_arg1); } public function integrate(_arg1:Number=1):void{ objects.integrate(_arg1); objects.solve(); solveContainment(); } public function solveContainment(_arg1:Boolean=false):void{ } public function dispose():void{ parent = null; collisionObject.unload(); collisionObject = null; objects.dispose(); objects = null; } } }//package com.fileitup.fisixengine.primitives
Section 46
//Magnet (com.fileitup.fisixengine.primitives.Magnet) package com.fileitup.fisixengine.primitives { import flash.display.*; import com.fileitup.fisixengine.core.*; public class Magnet implements EngineObject { public var active:Boolean; protected var pos:Vector; public var parent:FisixObject; public var force:Number; private var realForce:Number; public var recursive:Boolean; private var magnetGroup:Array; public function Magnet(_arg1:Number, _arg2:Vector, _arg3:FisixObject=null){ active = true; recursive = true; super(); parent = _arg3; force = _arg1; pos = _arg2; } public function setMagnetGroup(_arg1:Array):void{ magnetGroup = _arg1; } public function attachToVector(_arg1:Vector):void{ pos = _arg1; } public function unload():void{ parent.removeMagnet(this); dispose(); } public function get x():Number{ return (pos.x); } public function attachToObject(_arg1:Particle):void{ pos = _arg1.pos; } public function render(_arg1:Graphics):void{ var _local2:uint; if (pos == null){ return; }; _local2 = 10; _arg1.lineStyle(1, 0xFF); _arg1.moveTo((pos.x - _local2), pos.y); _arg1.lineTo((pos.x + _local2), pos.y); _arg1.moveTo(pos.x, (pos.y - _local2)); _arg1.lineTo(pos.x, (pos.y + _local2)); _arg1.moveTo((pos.x - (_local2 / 2)), (pos.y - (_local2 / 2))); _arg1.lineTo((pos.x + (_local2 / 2)), (pos.y + (_local2 / 2))); _arg1.moveTo((pos.x + (_local2 / 2)), (pos.y - (_local2 / 2))); _arg1.lineTo((pos.x - (_local2 / 2)), (pos.y + (_local2 / 2))); } protected function solveFisixObject(_arg1:FisixObject, _arg2:Number):void{ var _local3:int; var _local4:Vector; var _local5:Number; var _local6:Particle; var _local7:Surface; _local3 = 0; while (_local3 < _arg1.particles.length) { _local6 = _arg1.particles[_local3]; if (((((!((_local6.pos == pos))) && (_local6.magnetic))) && (!(_local6.fixed)))){ _local6.pointForce(pos, _arg2); }; _local3++; }; _local3 = 0; while (_local3 < _arg1.polygons.length) { _local6 = _arg1.polygons[_local3]; if (((((!((_local6.pos == pos))) && (_local6.magnetic))) && (!(_local6.fixed)))){ _local6.pointForce(pos, _arg2); }; _local3++; }; _local3 = 0; while (_local3 < _arg1.surfaces.length) { _local7 = _arg1.surfaces[_local3]; if (((((((!((_local7.vectorA == pos))) && (!((_local7.vectorB == pos))))) && (_local7.magnetic))) && (!(_local7.fixed)))){ _local7.pointForce(pos, _arg2); }; _local3++; }; if (!recursive){ return; }; _local3 = 0; while (_local3 < _arg1.fisixObjects.length) { if (((_arg1.fisixObjects[_local3].magnetic) && (!(_arg1.fisixObjects[_local3].fixed)))){ solveFisixObject(_arg1.fisixObjects[_local3], _arg2); }; _local3++; }; } public function dispose():void{ parent = null; pos = null; magnetGroup = null; } public function integrate(_arg1:Number=1):void{ var _local2:CollisionObject; var _local3:int; if (!active){ return; }; if (pos == null){ return; }; realForce = (-(force) * _arg1); if (magnetGroup != null){ _local3 = 0; while (_local3 < magnetGroup.length) { _local2 = magnetGroup[_local3]; if ((_local2 is CollisionObject)){ if ((_local2 is FisixObject)){ solveFisixObject((_local2 as FisixObject), realForce); } else { if ((_local2 is Particle)){ if (((((!(((_local2 as Particle).pos == pos))) && (_local2.magnetic))) && (!(_local2.fixed)))){ _local2.pointForce(pos, realForce); }; }; }; }; _local3++; }; } else { solveFisixObject(parent, realForce); }; } public function get y():Number{ return (pos.y); } public function setPosition(_arg1:Number, _arg2:Number):void{ pos = new Vector(_arg1, _arg2); } } }//package com.fileitup.fisixengine.primitives
Section 47
//Particle (com.fileitup.fisixengine.primitives.Particle) package com.fileitup.fisixengine.primitives { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.collisions.*; public class Particle extends CollisionObject { protected var mMass:Number; private var tmpX:Number; private var tmpY:Number; public var old:Vector; private var tmpYAdd:Number; protected var maxVelSquared:Number; public var pos:Vector; protected var invMass:Number; private var velSquared:Number; protected var maxVel:Number; private var dt2:Number; private var tmpXAdd:Number; public var velocity:Vector; public var old2:Vector; public var accel:Vector; public function Particle(_arg1:Number, _arg2:Number){ mMass = 1; invMass = 1; super(); pos = new Vector(_arg1, _arg2); old = new Vector(_arg1, _arg2); old2 = new Vector(_arg1, _arg2); accel = new Vector(0, 0); velocity = new Vector(0, 0); myType = "Particle"; } public function set mass(_arg1:Number):void{ if (_arg1 < 0){ _arg1 = 0; }; mMass = _arg1; if (_arg1 == 0){ invMass = 10000; } else { invMass = (1 / _arg1); }; } override public function updateBoundingBox():void{ minX = pos.x; maxX = pos.x; minY = pos.y; maxY = pos.y; if (!useRaycasting){ return; }; if (minX > old.x){ minX = old.x; }; if (maxX < old.x){ maxX = old.x; }; if (minY > old.y){ minY = old.y; }; if (maxY < old.y){ maxY = old.y; }; } override public function applyForce(_arg1:Vector, _arg2:Boolean=true):void{ if (((fixed) || (mStatic))){ return; }; if (((_arg2) && (!((parent == null))))){ if (parent.axisAligned){ parent.applyForce(_arg1); return; }; }; accel.add(_arg1); } override public function dispose():void{ super.dispose(); pos = null; old = null; old2 = null; accel = null; velocity = null; } public function moveTo(_arg1:Number, _arg2:Number, _arg3:Number=1):void{ move(((_arg1 - pos.x) / _arg3), ((_arg2 - pos.y) / _arg3)); } public function integrate(_arg1:Number=1):void{ if (((((fixed) || (mStatic))) || (!(active)))){ return; }; beforeIntegrate(_arg1); tmpX = pos.x; tmpY = pos.y; dt2 = ((_arg1 == 1)) ? 1 : (_arg1 * _arg1); pos.x = (pos.x + (((pos.x - old.x) + (accel.x * _arg1)) * (1 - parent.drag))); pos.y = (pos.y + (((pos.y - old.y) + (accel.y * _arg1)) * (1 - parent.drag))); old.x = tmpX; old.y = tmpY; old2.x = old.x; old2.y = old.y; accel.x = 0; accel.y = 0; velocity.x = (pos.x - old.x); velocity.y = (pos.y - old.y); postIntegrate(); afterIntegrate(_arg1); } override public function pointForce(_arg1:Vector, _arg2:Number):void{ var _local3:Vector; var _local4:Number; _local3 = Vector.vectorBetween(pos, _arg1); _local4 = _local3.getMagnitudeSquared(); if (_local4 == 0){ _local3 = new Vector(0, -(_arg2)); } else { _local3.times((-(_arg2) / _local4)); }; applyForce(_local3); } public function get mass():Number{ return (mMass); } public function distanceTo(_arg1:Particle):Number{ return (pos.distanceTo(_arg1.pos)); } public function get inverseMass():Number{ return (invMass); } override public function thrust(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{ if (((fixed) || (mStatic))){ return; }; if (((_arg3) && (!((parent == null))))){ if (parent.axisAligned){ parent.thrust(_arg1, _arg2); return; }; }; pos.x = (pos.x + _arg1); pos.y = (pos.y + _arg2); } public function rotationalForce(_arg1:Number, _arg2:Vector):void{ var _local3:Vector; var _local4:Number; if (((((fixed) || (mStatic))) || (!(active)))){ return; }; _local3 = pos.vectorTo(_arg2); _local4 = ((_arg1 * Math.PI) / 180); _local3 = _local3.getNormal().times(-(_local4)); applyForce(_local3); } public function clone():Object{ var _local1:Particle; _local1 = new Particle(pos.x, pos.y); _local1.old.x = old.x; _local1.old.y = old.y; _local1.accel.x = accel.x; _local1.accel.y = accel.y; _local1.velocity.x = velocity.x; _local1.velocity.y = velocity.y; _local1.mass = mass; _local1.velSquared = velSquared; _local1.maxVel = maxVel; _local1.maxVelSquared = maxVelSquared; return (_local1); } public function setVelocity(_arg1:Vector, _arg2:Boolean=true):void{ if (((_arg2) && (!((parent == null))))){ if (parent.axisAligned){ parent.setVelocity(_arg1); return; }; }; old.x = (pos.x - _arg1.x); old.y = (pos.y - _arg1.y); } public function distanceSquaredTo(_arg1:Particle):Number{ return (pos.distanceSquaredTo(_arg1.pos)); } private function postIntegrate():void{ if ((((detectionMode == 0)) || ((detectionMode == 2)))){ return; }; useRaycasting = false; velSquared = velocity.getMagnitudeSquared(); if (detectionMode == 1){ if (velSquared > maxVelSquared){ velocity.normalize(maxVel); setVelocity(velocity); }; } else { if (detectionMode == 3){ if (velSquared > maxVelSquared){ useRaycasting = true; }; }; }; } protected function beforeIntegrate(_arg1:Number):void{ } public function solveBoundsCollisions(_arg1:BoundingBox):void{ if (fixed){ return; }; if (pos.x < _arg1.minX){ thrustTo(_arg1.minX, pos.y); }; if (pos.x > _arg1.maxX){ thrustTo(_arg1.maxX, pos.y); }; if (pos.y < _arg1.minY){ thrustTo(pos.x, _arg1.minY); }; if (pos.y > _arg1.maxY){ thrustTo(pos.x, _arg1.maxY); }; } protected function setMaxVel(_arg1:Number):void{ maxVel = Math.abs(_arg1); maxVelSquared = (maxVel * maxVel); } public function addVelocity(_arg1:Vector):void{ old.x = (old.x - _arg1.x); old.y = (old.y - _arg1.y); } public function setPosition(_arg1:Number, _arg2:Number):void{ pos.x = _arg1; pos.y = _arg2; old.x = _arg1; old.y = _arg2; } protected function afterIntegrate(_arg1:Number):void{ } public function thrustVector(_arg1:Vector):void{ thrust(_arg1.x, _arg1.y); } public function move(_arg1:Number, _arg2:Number):void{ pos.x = (pos.x + _arg1); pos.y = (pos.y + _arg2); old.x = (old.x + _arg1); old.y = (old.y + _arg2); } override public function solveReactions():void{ if (((lastCollision.object.fixed) || (dynamicObjectCollisions))){ CollisionReaction.solveDynamicStatic(this, lastCollision.object, lastCollision.normal, lastCollision.penetration); }; } public function thrustTo(_arg1:Number, _arg2:Number, _arg3:Number=1):void{ thrust(((_arg1 - pos.x) / _arg3), ((_arg2 - pos.y) / _arg3)); } public function rotationalThrust(_arg1:Number, _arg2:Vector):void{ var _local3:Vector; var _local4:Number; if (((((fixed) || (mStatic))) || (!(active)))){ return; }; _local3 = pos.vectorTo(_arg2); _local4 = ((_arg1 * Math.PI) / 180); _local3 = _local3.getNormal().times(-(_local4)); thrust(_local3.x, _local3.y); } } }//package com.fileitup.fisixengine.primitives
Section 48
//Surface (com.fileitup.fisixengine.primitives.Surface) package com.fileitup.fisixengine.primitives { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; public class Surface extends CollisionObject { public var line:Line; public var vectorA:Vector; public var vectorB:Vector; public var radius:Number; public var length:Number; public function Surface(_arg1:Vector, _arg2:Vector, _arg3:Number=0){ myType = "Surface"; vectorA = _arg1; vectorB = _arg2; fixed = true; line = new Line(vectorA, vectorB); line.getNormal(); radius = _arg3; color = 6697779; updateBoundingBox(); getLength(); } override public function updateBoundingBox():void{ if (vectorA.x < vectorB.x){ minX = (vectorA.x - radius); maxX = (vectorB.x + radius); } else { minX = (vectorB.x - radius); maxX = (vectorA.x + radius); }; if (vectorA.y < vectorB.y){ minY = (vectorA.y - radius); maxY = (vectorB.y + radius); } else { minY = (vectorB.y - radius); maxY = (vectorA.y + radius); }; } override public function thrustPoint(_arg1:Number, _arg2:Number, _arg3:Vector):void{ } override public function dispose():void{ super.dispose(); vectorA = null; vectorB = null; line = null; } public function applyForceAt(_arg1:Vector, _arg2:Number):void{ } public function getVector():Vector{ return (line.vector); } public function massOnSurface(_arg1:Number):Number{ return (0); } override public function applyForcePoint(_arg1:Vector, _arg2:Vector):void{ applyForceAt(_arg1, 0); } override public function render(_arg1:Graphics):void{ var _local2:Vector; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = getVector().getNormal(); _local3 = _local2.getMagnitude(); _local4 = ((_local2.x / _local3) * radius); _local5 = ((_local2.y / _local3) * radius); _arg1.lineStyle(1, color); _arg1.moveTo(vectorA.x, vectorA.y); _arg1.lineTo(vectorB.x, vectorB.y); _arg1.moveTo((vectorA.x + _local4), (vectorA.y + _local5)); _arg1.lineTo((vectorB.x + _local4), (vectorB.y + _local5)); _arg1.moveTo((vectorA.x - _local4), (vectorA.y - _local5)); _arg1.lineTo((vectorB.x - _local4), (vectorB.y - _local5)); _arg1.drawCircle(vectorA.x, vectorA.y, radius); _arg1.drawCircle(vectorB.x, vectorB.y, radius); } public function thrustAt(_arg1:Number, _arg2:Number, _arg3:Number):void{ } public function getLength():Number{ length = vectorA.distanceTo(vectorB); return (length); } override public function getNormalAt(_arg1:Vector, _arg2:Vector=null):Vector{ var _local3:Vector; var _local4:Vector; var _local5:int; _local3 = line.vector.getNormal().normalize(); if (_arg2 == null){ _local4 = Vector.vectorBetween(vectorA, _arg1); } else { _local4 = Vector.vectorBetween(vectorA, _arg2); }; _local5 = _local4.dot(_local3); if (_local5 < 0){ _local3.reverse(); }; return (_local3); } } }//package com.fileitup.fisixengine.primitives
Section 49
//DynamicSurface (com.fileitup.fisixengine.surfaces.DynamicSurface) package com.fileitup.fisixengine.surfaces { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; public class DynamicSurface extends Surface { public var particleB:Particle; public var particleA:Particle; public function DynamicSurface(_arg1:Particle, _arg2:Particle, _arg3:Number=0){ particleA = _arg1; particleB = _arg2; vectorA = _arg1.pos; vectorB = _arg2.pos; super(vectorA, vectorB, _arg3); mFixed = false; } private function thruster(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Vector, _arg5:Vector):void{ var _local6:Number; var _local7:Vector; var _local8:Number; var _local9:Vector; var _local10:Vector; var _local11:Vector; if (!fixed){ _local6 = massOnSurface(_arg3); if (_arg3 < 0){ _arg3 = 0; }; if (_arg3 > 1){ _arg3 = 1; }; _local7 = new Vector(_arg1, _arg2); _local8 = Math.min(_arg3, (1 - _arg3)); _local9 = _local7.clone().times(_local8).times(2); if (((!(particleA.fixed)) && (!((_arg3 == 1))))){ _local10 = _local7.clone().times((1 - _arg3)).add(_local9); _local11 = _local10.clone().times(particleA.inverseMass); _arg4.add(_local11); }; if (((!(particleB.fixed)) && (!((_arg3 == 0))))){ _local10 = _local7.clone().times(_arg3).add(_local9); _local11 = _local10.clone().times(particleB.inverseMass); _arg5.add(_local11); }; }; } override public function thrustPoint(_arg1:Number, _arg2:Number, _arg3:Vector):void{ thrustAt(_arg1, _arg2, MathEngine.closestPointOnLine(_arg3, line)); } override public function applyForce(_arg1:Vector, _arg2:Boolean=true):void{ particleA.applyForce(_arg1, _arg2); particleB.applyForce(_arg1, _arg2); } override public function dispose():void{ super.dispose(); particleA = null; particleB = null; } override public function applyForceAt(_arg1:Vector, _arg2:Number):void{ thruster(_arg1.x, _arg1.y, _arg2, particleA.accel, particleB.accel); } override public function massOnSurface(_arg1:Number):Number{ return (((particleB.mass * _arg1) + (particleA.mass * (1 - _arg1)))); } override public function thrust(_arg1:Number, _arg2:Number, _arg3:Boolean=true):void{ particleA.thrust(_arg1, _arg2, _arg3); particleB.thrust(_arg1, _arg2, _arg3); } override public function applyForcePoint(_arg1:Vector, _arg2:Vector):void{ applyForceAt(_arg1, MathEngine.closestPointOnLine(_arg2, line)); } override public function thrustAt(_arg1:Number, _arg2:Number, _arg3:Number):void{ thruster(_arg1, _arg2, _arg3, particleA.pos, particleB.pos); } override public function makeStatic():void{ super.makeStatic(); particleA.makeStatic(); particleB.makeStatic(); } } }//package com.fileitup.fisixengine.surfaces
Section 50
//ArrayUtils (com.fileitup.fisixengine.utils.ArrayUtils) package com.fileitup.fisixengine.utils { public class ArrayUtils { public static function popItem(_arg1:Array, _arg2:Object):Object{ var _local3:Object; var _local4:Boolean; var _local5:int; var _local6:int; _local4 = false; _local6 = (_arg1.length - 1); _local5 = 0; while (_local5 < _local6) { if (_arg1[_local5] == _arg2){ _local3 = _arg1[_local5]; _local4 = true; }; if (_local4){ _arg1[_local5] = _arg1[(_local5 + 1)]; }; _local5++; }; _arg1.pop(); return (_local3); } } }//package com.fileitup.fisixengine.utils
Section 51
//BoundingBox (com.fileitup.fisixengine.utils.BoundingBox) package com.fileitup.fisixengine.utils { public class BoundingBox { public var minX:Number; public var minY:Number; public var maxX:Number; public var maxY:Number; public function BoundingBox(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ minX = _arg1; minY = _arg2; maxX = _arg3; maxY = _arg4; } public function toString():String{ return (((((((("BoundingBox: " + minX) + ",") + minY) + ",") + maxX) + ",") + maxY)); } } }//package com.fileitup.fisixengine.utils
Section 52
//IntersectionData (com.fileitup.fisixengine.utils.IntersectionData) package com.fileitup.fisixengine.utils { public class IntersectionData { public var t1:Number; public var t2:Number; public function IntersectionData(_arg1:Number, _arg2:Number){ t1 = _arg1; t2 = _arg2; } } }//package com.fileitup.fisixengine.utils
Section 53
//Line (com.fileitup.fisixengine.utils.Line) package com.fileitup.fisixengine.utils { import flash.display.*; import com.fileitup.fisixengine.core.*; public class Line { public var vectorA:Vector; public var lastDistance:Number; public var lastNormal:Vector; public var vectorB:Vector; public function Line(_arg1:Vector, _arg2:Vector){ lastDistance = 0; super(); vectorA = _arg1; vectorB = _arg2; } public function get vector():Vector{ return (Vector.vectorBetween(vectorA, vectorB)); } public function addVector(_arg1:Vector):void{ vectorA.add(_arg1); vectorB.add(_arg1); } public function pointOnLine(_arg1:Number, _arg2:Boolean=true):Vector{ var _local3:Vector; if (_arg2){ if (_arg1 <= 0){ return (vectorA.clone()); }; if (_arg1 >= 1){ return (vectorB.clone()); }; }; if (_arg1 == 0){ return (vectorA.clone()); }; if (_arg1 == 1){ return (vectorB.clone()); }; _local3 = new Vector(vectorA.x, vectorA.y); _local3.x = (_local3.x + ((vectorB.x - vectorA.x) * _arg1)); _local3.y = (_local3.y + ((vectorB.y - vectorA.y) * _arg1)); return (_local3); } public function getNormal():Vector{ lastNormal = vector.getNormal().normalize(); return (lastNormal); } public function render(_arg1:Graphics):void{ _arg1.lineStyle(1, 0xCC0000); _arg1.moveTo(vectorA.x, vectorA.y); _arg1.lineTo(vectorB.x, vectorB.y); } public function get distance():Number{ lastDistance = vectorA.distanceTo(vectorB); return (lastDistance); } } }//package com.fileitup.fisixengine.utils
Section 54
//MathEngine (com.fileitup.fisixengine.utils.MathEngine) package com.fileitup.fisixengine.utils { import com.fileitup.fisixengine.core.*; public class MathEngine { public static const toDeg:Number = 57.2957795130823; public static const toRad:Number = 0.0174532925199433; public static function pointToLineDirection(_arg1:Vector, _arg2:Vector, _arg3:Vector):int{ var _local4:Vector; var _local5:Vector; var _local6:Number; _local4 = Vector.vectorBetween(_arg1, _arg2); _local5 = Vector.vectorBetween(_arg2, _arg3); _local6 = _local4.perp(_local5); if (_local6 > 0){ return (1); }; if (_local6 < 0){ return (-1); }; return (0); } public static function closestPointsOnLines(_arg1:Line, _arg2:Line):Object{ var _local3:Vector; var _local4:Vector; var _local5:IntersectionData; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Vector; var _local11:Vector; var _local12:Vector; var _local13:Vector; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; _local5 = linesIntersection(_arg1, _arg2); if (_local5 == null){ return (null); }; if (((inLine(_local5.t1)) && (inLine(_local5.t2)))){ _local3 = _arg1.pointOnLine(_local5.t1, false); _local4 = _local3; return ({c1:_local3, c2:_local4}); }; _local14 = closestPointOnLine(_arg1.vectorA, _arg2, true); _local15 = closestPointOnLine(_arg1.vectorB, _arg2, true); _local10 = _arg2.pointOnLine(_local14, false); _local6 = _local10.distanceSquaredTo(_arg1.vectorA); _local11 = _arg2.pointOnLine(_local15, false); _local7 = _local11.distanceSquaredTo(_arg1.vectorB); _local16 = closestPointOnLine(_arg2.vectorA, _arg1, true); _local17 = closestPointOnLine(_arg2.vectorB, _arg1, true); _local12 = _arg1.pointOnLine(_local16, false); _local8 = _local12.distanceSquaredTo(_arg2.vectorA); _local13 = _arg1.pointOnLine(_local17, false); _local9 = _local13.distanceSquaredTo(_arg2.vectorB); _local18 = Math.min(_local6, _local7, _local8, _local9); if (_local18 == _local6){ _local3 = _arg1.vectorA; _local4 = _local10; }; if (_local18 == _local7){ _local3 = _arg1.vectorB; _local4 = _local11; }; if (_local18 == _local8){ _local3 = _local12; _local4 = _arg2.vectorA; }; if (_local18 == _local9){ _local3 = _local13; _local4 = _arg2.vectorB; }; return ({c1:_local3, c2:_local4}); } private static function min2(_arg1:Array):Number{ var _local2:int; var _local3:Number; _local3 = _arg1[0]; _local2 = 1; while (_local2 < _arg1.length) { if ((((_local3 == -1)) || (((!((_arg1[_local2] == -1))) && ((_arg1[_local2] < _local3)))))){ _local3 = _arg1[_local2]; }; _local2++; }; return (_local3); } public static function linesIntersection(_arg1:Line, _arg2:Line):IntersectionData{ var _local3:Vector; var _local4:Vector; var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:IntersectionData; _local3 = _arg1.vector; _local4 = _arg2.vector; if ((((_local3.x == _local4.x)) && ((_local3.y == _local4.y)))){ return (null); }; if ((((_local3.x == -(_local4.x))) && ((_local3.y == -(_local4.y))))){ return (null); }; _local5 = Vector.vectorBetween(_arg1.vectorA, _arg2.vectorA); _local6 = _local3.perp(_local4); if (_local6 == 0){ return (null); }; _local7 = (_local5.perp(_local4) / _local6); _local8 = (_local5.perp(_local3) / _local6); _local9 = new IntersectionData(_local7, _local8); return (_local9); } public static function closestPointOnLine(_arg1:Vector, _arg2:Line, _arg3:Boolean=false):Number{ var _local4:Vector; var _local5:Vector; var _local6:Vector; var _local7:Number; _local4 = _arg2.vector; _local5 = _local4.getNormal(); _local6 = Vector.vectorBetween(_arg2.vectorA, _arg1); _local7 = (_local6.perp(_local5) / _local4.perp(_local5)); if (_arg3){ if (_local7 < 0){ _local7 = 0; }; if (_local7 > 1){ _local7 = 1; }; }; return (_local7); } public static function closestPointOnLineVector(_arg1:Vector, _arg2:Line, _arg3:Boolean=true):Vector{ var _local4:Number; _local4 = closestPointOnLine(_arg1, _arg2); return (_arg2.pointOnLine(_local4, _arg3)); } private static function inLine(_arg1:Number):Boolean{ if (_arg1 < 0){ return (false); }; if (_arg1 > 1){ return (false); }; return (true); } public static function linesIntersectionVector(_arg1:Line, _arg2:Line):Vector{ var _local3:Vector; var _local4:Vector; var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:Vector; _local3 = _arg1.vector; _local4 = _arg2.vector; if ((((_local3.x == _local4.x)) && ((_local3.y == _local4.y)))){ return (null); }; if ((((_local3.x == -(_local4.x))) && ((_local3.y == -(_local4.y))))){ return (null); }; _local5 = Vector.vectorBetween(_arg1.vectorA, _arg2.vectorA); _local6 = (_local5.perp(_local4) / _local3.perp(_local4)); _local7 = (_local5.perp(_local3) / _local3.perp(_local4)); if ((((_local6 >= 0)) && ((_local6 <= 1)))){ if ((((_local7 >= 0)) && ((_local7 <= 1)))){ _local8 = new Vector(0, 0); _local8.x = (_arg1.vectorA.x + (_local3.x * _local6)); _local8.y = (_arg1.vectorA.y + (_local3.y * _local6)); }; }; return (_local8); } private static function clipT(_arg1:Number):Number{ return (Math.min(Math.max(_arg1, 0), 1)); } public static function linesIntersectionBool(_arg1:Line, _arg2:Line):Boolean{ var _local3:Vector; var _local4:Vector; var _local5:Vector; var _local6:Number; var _local7:Number; _local3 = _arg1.vector; _local4 = _arg2.vector; if ((((_local3.x == _local4.x)) && ((_local3.y == _local4.y)))){ return (false); }; if ((((_local3.x == -(_local4.x))) && ((_local3.y == -(_local4.y))))){ return (false); }; _local5 = Vector.vectorBetween(_arg1.vectorA, _arg2.vectorA); _local6 = (_local5.perp(_local4) / _local3.perp(_local4)); _local7 = (_local5.perp(_local3) / _local3.perp(_local4)); if ((((_local6 < 0)) || ((_local6 > 1)))){ return (false); }; if ((((_local7 < 0)) || ((_local7 > 1)))){ return (false); }; return (true); } public static function angleBetweenVectors(_arg1:Vector, _arg2:Vector, _arg3:Boolean=true):Number{ var _local4:Number; var _local5:Number; var _local6:Number; _local4 = _arg1.perp(_arg2); _local5 = _arg1.normalize().dot(_arg2.normalize()); _local6 = ((Math.acos(_local5) * 180) / Math.PI); if (((_arg3) && ((_local4 < 0)))){ _local6 = (-(_local6) + 360); }; return (_local6); } public static function getAngle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number; var _local6:Number; var _local7:Number; _local5 = (_arg1 - _arg3); _local6 = (_arg2 - _arg4); _local7 = Math.atan2(_local6, _local5); if (_local6 < 0){ _local7 = (_local7 + (2 * Math.PI)); }; return (((_local7 / (Math.PI / 180)) - 180)); } } }//package com.fileitup.fisixengine.utils
Section 55
//MouseAttacher (com.fileitup.fisixengine.utils.MouseAttacher) package com.fileitup.fisixengine.utils { import flash.display.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; public class MouseAttacher implements EngineObject { public var mouseObject:DisplayObject; public var active:Boolean; public var parent:FisixEngine; public var ease:Number; public var dynamicObject:Particle; public function MouseAttacher(_arg1:Particle, _arg2:DisplayObject, _arg3:Number){ active = true; super(); dynamicObject = _arg1; mouseObject = _arg2; ease = _arg3; } public function update():void{ if (!active){ return; }; dynamicObject.thrustTo(mouseObject.mouseX, mouseObject.mouseY, ease); } public function dispose():void{ parent = null; dynamicObject = null; mouseObject = null; } public function unload():void{ parent.removeMouseAttacher(this); dispose(); } } }//package com.fileitup.fisixengine.utils
Section 56
//Sorter (com.fileitup.fisixengine.utils.Sorter) package com.fileitup.fisixengine.utils { import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; public class Sorter { public static function particleSorter(_arg1:Particle, _arg2:Particle):int{ if (_arg1.minX > _arg2.minX){ return (1); }; if (_arg1.minX < _arg2.minX){ return (-1); }; return (0); } public static function constraintSorter(_arg1:Constraint, _arg2:Constraint):int{ if (_arg1.restLength > _arg2.restLength){ return (1); }; if (_arg1.restLength < _arg2.restLength){ return (-1); }; return (0); } public static function FisixObjectSorter(_arg1:FisixObject, _arg2:FisixObject):int{ if (_arg1.minX > _arg2.minX){ return (1); }; if (_arg1.minX < _arg2.minX){ return (-1); }; return (0); } public static function bubbleSort(_arg1:Array, _arg2:Function):void{ var _local3:Object; var _local4:int; var _local5:int; _local5 = 1; while (_local5 < _arg1.length) { _local4 = _local5; while ((((_local4 > 0)) && ((_arg2(_arg1[(_local4 - 1)], _arg1[_local4]) == 1)))) { _local3 = _arg1[_local4]; _arg1[_local4] = _arg1[(_local4 - 1)]; _arg1[(_local4 - 1)] = _local3; _local4--; }; _local5++; }; } public static function collidableObjectSorter(_arg1:CollisionObject, _arg2:CollisionObject):int{ if (_arg1.minX > _arg2.minX){ return (1); }; if (_arg1.minX < _arg2.minX){ return (-1); }; return (0); } public static function surfaceSorter(_arg1:Surface, _arg2:Surface):int{ if (_arg1.minX > _arg2.minX){ return (1); }; if (_arg1.minX < _arg2.minX){ return (-1); }; return (0); } } }//package com.fileitup.fisixengine.utils
Section 57
//Car (WonderLine.Car.Car) package WonderLine.Car { import flash.display.*; import flash.events.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.collisions.*; public class Car { private var engine:FisixEngine;// = null private var carClip:CarClip;// = null private var isCreate:Boolean;// = false private var speed:Number;// = 0 private var sk:SuperKey;// = null private var car:FisixObject;// = null private var rightWheel:WheelParticle;// = null private var body:CircleParticle;// = null private var leftWheel:WheelParticle;// = null private var cm:CarModel;// = null public function Car(){ engine = null; carClip = null; car = null; body = null; leftWheel = null; rightWheel = null; speed = 0; sk = null; isCreate = false; cm = null; super(); engine = GlobalInfo.Engine; sk = SuperKey.Instance(GlobalInfo.StageObject); speed = 0.4; } private function singleKeyDownHandle(_arg1:Event){ if (((((((sk.IsDown(37)) || (sk.IsDown(65)))) || (sk.IsDown(39)))) || (sk.IsDown(68)))){ if (cm.BodyMC.parent != null){ SoundManager.PlaySound("启动"); }; sk.removeEventListener("SingleKeyDown", singleKeyDownHandle); }; } public function get HitTestArea():Sprite{ return (cm.HitTestArea); } public function CancelRest(){ cm.active = true; } public function get IsFall():Boolean{ if (Math.abs(cm.BodyMC.rotation) > 50){ return (true); }; return (false); } private function keyDownHandle(_arg1:Event){ if (((sk.IsDown(37)) || (sk.IsDown(65)))){ cm.drive(-(speed)); } else { if (((sk.IsDown(39)) || (sk.IsDown(68)))){ cm.drive(speed); }; }; } public function Clear(){ if (cm == null){ return; }; cm.Destroy(); } public function Rest(){ cm.active = false; } public function Initialize(_arg1:Number, _arg2:Number){ Clear(); cm = new CarModel(_arg1, _arg2, GlobalInfo.Layers[4]); engine.addObject(cm); cm.setDetectionMode(DetectionModes.RAYCAST); sk.addEventListener("KeyDown", keyDownHandle); sk.addEventListener("SingleKeyDown", singleKeyDownHandle); cm.gradualDisplay(); } public function get x():Number{ return (cm.Body.pos.x); } public function get y():Number{ return (cm.Body.pos.y); } } }//package WonderLine.Car
Section 58
//CarModel (WonderLine.Car.CarModel) package WonderLine.Car { import flash.display.*; import flash.events.*; import flash.geom.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import com.fileitup.fisixengine.collisions.*; import com.fileitup.fisixengine.constraints.*; import com.fileitup.fisixengine.surfaces.*; import WonderLine.Library.*; import flash.utils.*; public class CarModel extends FisixObject { var wheelMC1:Sprite; var wheelMC2:Sprite; public var sur:Surface;// = null private var p:Boolean;// = true public var rightWheel:WheelParticle; private var hitTestArea:Sprite;// = null var bodyMc:Sprite; private var ggg:MouseAttacher;// = null public var leftWheel:WheelParticle; var mm:Sprite;// = null public var body:WheelParticle; var monkey:DisplayObject; public function CarModel(_arg1:Number, _arg2:Number, _arg3:Sprite){ sur = null; hitTestArea = null; mm = null; ggg = null; p = true; super(); mm = _arg3; body = this.newWheelParticle(0, -8, 12); leftWheel = this.newWheelParticle(-20, 14, 10); rightWheel = this.newWheelParticle(30, 14, 10); sur = this.newSurface(leftWheel.pos, rightWheel.pos, 1); body.mass = 0.2; leftWheel.mass = 0.3; rightWheel.mass = 0.1; leftWheel.setMaterial("轮胎"); rightWheel.setMaterial("轮胎"); body.setDetectionMode(DetectionModes.RAYCAST); leftWheel.setDetectionMode(DetectionModes.RAYCAST); rightWheel.setDetectionMode(DetectionModes.RAYCAST); StickConstraint.constraintAll(this, this.particles); wheelMC1 = new WheelClip(); _arg3.addChild(wheelMC1); newWheelAttacher(wheelMC1, leftWheel); wheelMC2 = new WheelClip(); _arg3.addChild(wheelMC2); newWheelAttacher(wheelMC2, rightWheel); bodyMc = new BodyClip(); _arg3.addChild(bodyMc); newDisplayAttacher2(bodyMc, leftWheel.pos, rightWheel.pos); monkey = bodyMc.getChildByName("monkey"); hitTestArea = MovieClip(bodyMc.getChildByName("hta")); setCenter(_arg1, _arg2); bodyMc.addEventListener(Event.ENTER_FRAME, frameHandle); } private function frameHandle(_arg1:Event){ if (Math.abs(bodyMc.rotation) > 80){ if (p){ falling(); SoundManager.PlaySound("尴尬", 0.8); p = false; }; }; if (((!(p)) && ((Math.abs(bodyMc.rotation) < 20)))){ p = true; }; if (bodyMc.y > 700){ this.active = false; }; } function gradualDisplay(){ Library.GradualDisplay(wheelMC1); Library.GradualDisplay(wheelMC2); Library.GradualDisplay(bodyMc); } private function falling(){ this.collidable = false; while (constraints.length > 0) { constraints[0].unload(); }; PlaceConversion.Shift(monkey, mm); newWheelAttacher(monkey, body); body.rotateWheel(((Math.round(Math.random()) == 1)) ? -((Math.random() * 5)) : (Math.random() * 5)); StickConstraint.constraintAll(this, [leftWheel, rightWheel]); } function get HitTestArea():Sprite{ return (hitTestArea); } function get BodyMC():Sprite{ return (bodyMc); } public function drive(_arg1:Number):void{ if (((!((bodyMc == null))) && ((bodyMc.alpha >= 1)))){ leftWheel.rotateWheel(_arg1); rightWheel.rotateWheel(_arg1); }; } private function clickHandle(_arg1:MouseEvent){ } function get Body():CircleParticle{ return (body); } public function Destroy(){ this.unload(); if (wheelMC1.parent != null){ wheelMC1.parent.removeChild(wheelMC1); }; if (wheelMC2.parent != null){ wheelMC2.parent.removeChild(wheelMC2); }; if (bodyMc.parent != null){ bodyMc.parent.removeChild(bodyMc); }; if (monkey.parent != null){ monkey.parent.removeChild(monkey); }; bodyMc.removeEventListener(Event.ENTER_FRAME, frameHandle); body = null; leftWheel = null; rightWheel = null; hitTestArea = null; } } }//package WonderLine.Car
Section 59
//DrawBoard (WonderLine.DrawBoard.DrawBoard) package WonderLine.DrawBoard { import flash.display.*; import flash.events.*; import flash.geom.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.primitives.*; import flash.net.*; import flash.ui.*; public class DrawBoard { private var lines:Array;// = null private var tracks:Array;// = null private var block:Sprite;// = null private var area:Rectangle;// = null private var stageObj:Stage;// = null private var isMove:Boolean;// = false private var lastPoint:Point;// = null private var sign:Array;// = null private var draws:Array;// = null private var engine:FisixEngine;// = null private var track:Array;// = null private var traces:Array;// = null private var signs:Array;// = null private var isMouseDown:Boolean;// = false private var rect:Rectangle; private var isDown:Boolean;// = false private var line:Array;// = null private var focusObj:Object;// = null public function DrawBoard(){ stageObj = null; engine = null; area = null; track = null; tracks = null; lines = null; line = null; draws = null; traces = null; block = null; sign = null; signs = null; focusObj = null; isDown = false; lastPoint = null; isMove = false; isMouseDown = false; rect = new Rectangle(0, 0, 10, 10); super(); engine = GlobalInfo.Engine; stageObj = GlobalInfo.StageObject; block = new EraserArea(); block.x = -50; block.y = -50; block.alpha = 0; GlobalInfo.Layers[0].addChild(block); block.mouseEnabled = false; } private function dragHandle(_arg1:Event){ _arg1.currentTarget.x = stageObj.mouseX; _arg1.currentTarget.y = stageObj.mouseY; } public function SaveTracks(_arg1:String){ var _local2:SharedObject; _local2 = SharedObject.getLocal("Gamer142857"); _local2.data[_arg1] = new Object(); _local2.data[_arg1].lines = getPlanarArrayCopy(lines); _local2.data[_arg1].signs = getPlanarArrayCopy(signs); _local2.flush(); } private function Dispose(){ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < tracks.length) { _local2 = 0; while (_local2 < tracks[_local1].length) { if (((!((tracks[_local1][_local2] == null))) && (!((tracks[_local1][_local2].parent == null))))){ engine.removeObject(tracks[_local1][_local2]); }; _local2++; }; _local1++; }; _local1 = 0; while (_local1 < tracks.length) { _local2 = 0; while (_local2 < tracks[_local1].length) { if (tracks[_local1][_local2] != null){ if ((((getDistance(focusObj, tracks[_local1][_local2].vectorA) < 100)) || ((getDistance(focusObj, tracks[_local1][_local2].vectorB) < 100)))){ engine.addObject(tracks[_local1][_local2]); }; }; _local2++; }; _local1++; }; } public function DrawArea(_arg1:Rectangle){ area = _arg1; draws = new Array(); traces = new Array(); track = new Array(); tracks = new Array(); line = new Array(); lines = new Array(); sign = new Array(); signs = new Array(); stageObj.addEventListener(Event.ENTER_FRAME, frameHandle); } public function ClearTrack(){ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < traces.length) { _local2 = 0; while (_local2 < traces[_local1].length) { if (((!((traces[_local1][_local2] == null))) && (block.hitTestObject(traces[_local1][_local2])))){ if (traces[_local1][_local2].parent != null){ traces[_local1][_local2].parent.removeChild(traces[_local1][_local2]); traces[_local1][_local2] = null; if (tracks[_local1][_local2].parent != null){ engine.removeObject(tracks[_local1][_local2], true); }; tracks[_local1][_local2] = null; signs[_local1][_local2] = false; }; }; _local2++; }; _local1++; }; } public function StopDrawing(){ stageObj.removeEventListener(MouseEvent.MOUSE_DOWN, downHandle); stageObj.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandle); stageObj.removeEventListener(MouseEvent.MOUSE_UP, upHandle); } private function upHandle(_arg1:MouseEvent){ isDown = false; lines.push(line); traces.push(draws); tracks.push(track); signs.push(sign); draws = new Array(); track = new Array(); line = new Array(); sign = new Array(); } public function LoadTracks(_arg1:String){ var _local2:SharedObject; var _local3:Array; var _local4:Array; var _local5:int; _local2 = SharedObject.getLocal("Gamer142857"); if (_local2.data[_arg1] == null){ return; }; _local3 = getPlanarArrayCopy(_local2.data[_arg1].lines); _local4 = getPlanarArrayCopy(_local2.data[_arg1].signs); lines = _local3; signs = _local4; _local5 = 0; while (_local5 < lines.length) { revertLine(lines[_local5].slice(), signs[_local5].slice()); _local5++; }; } private function startErasureHandle(_arg1:Event){ if (isMouseDown){ ClearTrack(); }; } public function ClearAll(){ ClearAllTracks(); StopDrawing(); StopErasure(); stageObj.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function drag(_arg1:Sprite){ _arg1.addEventListener(Event.ENTER_FRAME, dragHandle); } public function DeleteTracksNote(_arg1:String){ var _local2:SharedObject; _local2 = SharedObject.getLocal("Gamer142857"); delete _local2.data[_arg1]; _local2.flush(); } public function StartErasure(){ drag(block); stageObj.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandle); stageObj.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandle); stageObj.addEventListener(Event.ENTER_FRAME, startErasureHandle); } private function getPlanarArrayCopy(_arg1:Array):Array{ var _local2:Array; var _local3:int; var _local4:int; _local2 = new Array(); _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local2.push(_arg1[_local4].slice()); _local4++; }; return (_local2); } private function cancelDrag(_arg1:Sprite){ _arg1.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function moveHandle(_arg1:MouseEvent){ if (isDown){ isMove = true; }; } public function ClearAllTracks(){ var _local1:int; var _local2:int; _local1 = 0; while (_local1 < traces.length) { _local2 = 0; while (_local2 < traces[_local1].length) { if (traces[_local1][_local2] != null){ if (traces[_local1][_local2].parent != null){ traces[_local1][_local2].parent.removeChild(traces[_local1][_local2]); traces[_local1][_local2] = null; if (tracks[_local1][_local2].parent != null){ engine.removeObject(tracks[_local1][_local2], true); }; tracks[_local1][_local2] = null; }; }; _local2++; }; _local1++; }; traces = new Array(); tracks = new Array(); lines = new Array(); signs = new Array(); } private function getPlanarArrayCount(_arg1:Array):int{ var _local2:int; var _local3:int; var _local4:int; _local2 = 0; _local3 = _arg1.length; _local4 = 0; while (_local4 < _local3) { _local2 = (_local2 + _arg1[_local4].length); _local4++; }; return (_local2); } public function StopErasure(){ cancelDrag(block); stageObj.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandle); stageObj.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandle); stageObj.removeEventListener(Event.ENTER_FRAME, startErasureHandle); } private function mouseUpHandle(_arg1:MouseEvent){ isMouseDown = false; } private function downHandle(_arg1:MouseEvent){ isDown = true; if (!checkMouseSide()){ lastPoint = new Point(stageObj.mouseX, stageObj.mouseY); line.push(lastPoint); }; } private function getDistance(_arg1:Object, _arg2:Object):Number{ var _local3:Number; var _local4:Number; _local3 = (_arg1.x - _arg2.x); _local4 = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } private function mouseDownHandle(_arg1:MouseEvent){ isMouseDown = true; } private function frameHandle(_arg1:Event){ var _local2:Shape; var _local3:Surface; if (isMove){ if (!checkMouseSide()){ _local2 = new Shape(); GlobalInfo.Layers[1].addChild(_local2); _local2.graphics.moveTo(lastPoint.x, lastPoint.y); _local2.graphics.lineStyle(4, 39372, 1); _local2.graphics.lineTo(stageObj.mouseX, stageObj.mouseY); draws.push(_local2); _local3 = engine.newSurface(new Vector(lastPoint.x, lastPoint.y), new Vector(stageObj.mouseX, stageObj.mouseY), 2); _local3.setMaterial("路面"); track.push(_local3); lastPoint = new Point(stageObj.mouseX, stageObj.mouseY); line.push(lastPoint); sign.push(true); }; isMove = false; }; if (focusObj != null){ Dispose(); }; } public function AddFocusObject(_arg1:Object){ focusObj = _arg1; } private function revertLine(_arg1:Array, _arg2:Array){ var _local3:Array; var _local4:Array; var _local5:*; var _local6:int; var _local7:int; var _local8:Shape; var _local9:Surface; _local3 = _arg1.slice(); _local4 = _arg2.slice(); _local5 = _local3.shift(); _local6 = _local3.length; _local7 = 0; while (_local7 < _local6) { if (_local4[_local7]){ _local8 = new Shape(); GlobalInfo.Layers[1].addChild(_local8); _local8.graphics.moveTo(_local5.x, _local5.y); _local8.graphics.lineStyle(4, 39372, 1); _local8.graphics.lineTo(_local3[0].x, _local3[0].y); draws.push(_local8); _local9 = engine.newSurface(new Vector(_local5.x, _local5.y), new Vector(_local3[0].x, _local3[0].y), 2); track.push(_local9); } else { draws.push(null); track.push(null); }; _local5 = _local3.shift(); if (_local3.length <= 0){ traces.push(draws); tracks.push(track); draws = new Array(); track = new Array(); return; }; _local7++; }; } private function checkMouseSide():Boolean{ if ((((((((stageObj.mouseX < area.left)) || ((stageObj.mouseX > area.right)))) || ((stageObj.mouseY < area.top)))) || ((stageObj.mouseY > area.bottom)))){ return (true); }; return (false); } public function StartDrawing(){ stageObj.addEventListener(MouseEvent.MOUSE_DOWN, downHandle); stageObj.addEventListener(MouseEvent.MOUSE_MOVE, moveHandle); stageObj.addEventListener(MouseEvent.MOUSE_UP, upHandle); } } }//package WonderLine.DrawBoard
Section 60
//GameScene (WonderLine.GameScene.GameScene) package WonderLine.GameScene { import flash.display.*; import flash.events.*; import flash.geom.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.materials.*; import com.fileitup.fisixengine.utils.*; import com.fileitup.fisixengine.primitives.*; import com.fileitup.fisixengine.particles.*; import WonderLine.Car.*; import com.fileitup.fisixengine.collisions.*; import com.fileitup.fisixengine.constraints.*; import com.fileitup.fisixengine.surfaces.*; import com.fileitup.fisixengine.graphics.*; import com.fileitup.fisixengine.containers.*; import WonderLine.Library.*; import flash.net.*; import flash.ui.*; import flash.utils.*; import com.fileitup.fisixengine.resources.*; public class GameScene extends EventDispatcher { private var scene:SceneClip;// = null private var endGroundModel:Surface;// = null private var getStarNum:int;// = 0 private var startGroundModel:Surface;// = null private var sceneID:int;// = 0 private var starPlaces:Array;// = null private var engine:FisixEngine;// = null private var sceneStarNums:Array;// = null private var car:Car;// = null private var endStation:Sprite;// = null private var stars:Array;// = null private var levelNum:int;// = 0 private var startStation:Sprite;// = null private var focusObj:Sprite;// = null public function GameScene(){ engine = null; car = null; sceneID = 0; starPlaces = null; stars = null; startGroundModel = null; endGroundModel = null; focusObj = null; getStarNum = 0; levelNum = 0; startStation = null; endStation = null; scene = null; sceneStarNums = null; super(); } private function frame2Handle(_arg1:Event){ if (getStarNum == sceneStarNums[sceneID]){ SoundManager.PlaySound("吹口哨", 1); this.dispatchEvent(new Event("ClearFinish")); scene.removeEventListener(Event.ENTER_FRAME, frame2Handle); }; } public function get SceneID():int{ return (sceneID); } private function frameHandle(_arg1:Event){ var _local2:int; var _local3:Timer; _local2 = 0; for (;_local2 < stars.length;_local2++) { if (car.HitTestArea.hitTestObject(stars[_local2])){ getStarNum++; stars[_local2].play(); stars.splice(_local2, 1); SoundManager.PlaySound("碰到星星"); continue; }; }; if (getStarNum == sceneStarNums[sceneID]){ if (car.HitTestArea.hitTestObject(scene.endStationClip.endSign)){ scene.removeEventListener(Event.ENTER_FRAME, frameHandle); _local3 = new Timer(500, 1); _local3.addEventListener(TimerEvent.TIMER, timerHandle); _local3.start(); }; }; } private function timer2Handle(_arg1:TimerEvent){ this.dispatchEvent(new Event("Pass")); _arg1.currentTarget.stop(); _arg1.currentTarget.removeEventListener(TimerEvent.TIMER, timer2Handle); } private function IniStarPlaces(){ starPlaces = new Array(); starPlaces[0] = [new Point(394, 130), new Point(444, 140), new Point(344, 140), new Point(294, 150), new Point(544, 160), new Point(494, 150), new Point(244, 160)]; starPlaces[1] = [new Point(259, 100), new Point(309, 120), new Point(359, 140), new Point(409, 160), new Point(459, 180), new Point(509, 200), new Point(559, 220)]; starPlaces[2] = [new Point(300, 240), new Point(335, 210), new Point(370, 190), new Point(405, 170), new Point(440, 150), new Point(475, 130), new Point(510, 110)]; starPlaces[3] = [new Point(400, 210), new Point(450, 200), new Point(350, 200), new Point(300, 190), new Point(550, 180), new Point(500, 190), new Point(250, 180), new Point(600, 170), new Point(200, 170)]; starPlaces[4] = [new Point(200, 100), new Point(200, 180), new Point(200, 140), new Point(200, 220), new Point(200, 300), new Point(200, 260), new Point(555, 100), new Point(555, 180), new Point(555, 140), new Point(555, 220), new Point(555, 300), new Point(555, 260)]; starPlaces[5] = [new Point(148, 70), new Point(218, 70), new Point(288, 70), new Point(358, 70), new Point(428, 70), new Point(498, 70), new Point(568, 70), new Point(638, 70), new Point(144, 334), new Point(214, 334), new Point(284, 334), new Point(354, 334), new Point(424, 334), new Point(494, 334), new Point(564, 334), new Point(634, 334)]; starPlaces[6] = [new Point(110, 100), new Point(110, 180), new Point(110, 140), new Point(110, 220), new Point(110, 300), new Point(110, 260), new Point(655, 100), new Point(655, 180), new Point(655, 140), new Point(655, 220), new Point(655, 300), new Point(655, 260)]; starPlaces[7] = [new Point(111.95, 59.95), new Point(192, 60), new Point(272, 60), new Point(352, 60), new Point(432, 60), new Point(0x0200, 60), new Point(592, 60), new Point(672, 60), new Point(112, 380), new Point(192, 380), new Point(272, 380), new Point(352, 380), new Point(432, 380), new Point(0x0200, 380), new Point(592, 380), new Point(672, 380), new Point(112, 140), new Point(112, 220), new Point(112, 300), new Point(672, 140), new Point(672, 220), new Point(672, 300)]; starPlaces[8] = [new Point(400, 40), new Point(400, 90), new Point(400, 140), new Point(400, 190), new Point(400, 240), new Point(400, 290), new Point(400, 340), new Point(400, 390)]; starPlaces[9] = [new Point(338, 145), new Point(388, 145), new Point(438, 145), new Point(338, 185), new Point(388, 185), new Point(438, 185), new Point(338, 225), new Point(388, 225), new Point(438, 225), new Point(338, 265), new Point(388, 265), new Point(438, 265)]; starPlaces[10] = [new Point(357.3, 104.4), new Point(308.3, 79.4), new Point(247.3, 59.4), new Point(198.9, 94.5), new Point(198.9, 157.4), new Point(256.85, 248.4), new Point(213.9, 202.4), new Point(406.65, 70.4), new Point(470.65, 65.95), new Point(522.65, 94.5), new Point(543.65, 145.95), new Point(522.65, 197.95), new Point(482.65, 255.95), new Point(423.65, 309.95), new Point(293.85, 283.5), new Point(330.85, 326.5), new Point(378.65, 352.95)]; starPlaces[11] = [new Point(64, 56), new Point(125, 56), new Point(225, 56), new Point(325, 56), new Point(425, 56), new Point(525, 56), new Point(624, 56), new Point(475, 56), new Point(375, 56), new Point(275, 56), new Point(575, 56), new Point(675, 56), new Point(175, 56), new Point(725, 56), new Point(63, 104), new Point(124, 104), new Point(224, 104), new Point(324, 104), new Point(424, 104), new Point(524, 104), new Point(623, 104), new Point(474, 104), new Point(374, 104), new Point(274, 104), new Point(574, 104), new Point(674, 104), new Point(174, 104), new Point(724, 104), new Point(62, 150), new Point(123, 150), new Point(323, 150), new Point(423, 150), new Point(473, 150), new Point(373, 150), new Point(673, 150), new Point(723, 150), new Point(61, 198), new Point(122, 198), new Point(322, 198), new Point(422, 198), new Point(472, 198), new Point(372, 198), new Point(672, 198), new Point(722, 198), new Point(61.25, 237.1), new Point(122.25, 237.1), new Point(322.25, 237.1), new Point(422.25, 237.1), new Point(472.25, 237.1), new Point(372.25, 237.1), new Point(672.25, 237.1), new Point(722.25, 237.1), new Point(60.25, 285.1), new Point(121.25, 285.1), new Point(321.25, 285.1), new Point(421.25, 285.1), new Point(471.25, 285.1), new Point(371.25, 285.1), new Point(671.25, 285.1), new Point(721.25, 285.1), new Point(59.25, 331.1), new Point(120.25, 331.1), new Point(220.25, 331.1), new Point(320.25, 331.1), new Point(420.25, 331.1), new Point(520.25, 331.1), new Point(619.25, 331.1), new Point(470.25, 331.1), new Point(370.25, 331.1), new Point(270.25, 331.1), new Point(570.25, 331.1), new Point(670.25, 331.1), new Point(170.25, 331.1), new Point(720.25, 331.1), new Point(58.25, 379.1), new Point(119.25, 379.1), new Point(219.25, 379.1), new Point(319.25, 379.1), new Point(419.25, 379.1), new Point(519.25, 379.1), new Point(618.25, 379.1), new Point(469.25, 379.1), new Point(369.25, 379.1), new Point(269.25, 379.1), new Point(569.25, 379.1), new Point(669.25, 379.1), new Point(169.25, 379.1), new Point(719.25, 379.1)]; } public function set SceneID(_arg1:int){ sceneID = _arg1; } public function Initialize(_arg1:Car){ car = _arg1; engine = GlobalInfo.Engine; engine.newSurface(new Vector(-30, -50), new Vector(-30, 520), 30); engine.newSurface(new Vector(810, -50), new Vector(810, 520), 30); sceneID = GlobalInfo.PassNum; stars = new Array(); IniStarPlaces(); scene = new SceneClip(); GlobalInfo.Layers[3].addChild(scene); sceneStarNums = [7, 7, 7, 9, 12, 16, 12, 22, 8, 12, 17, 88]; CreateScene(); } private function createSceneHandle(_arg1:Event){ var _local2:Point; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Point; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; scene.removeEventListener(Event.ENTER_FRAME, createSceneHandle); stars = createStars(); clearStationModel(); _local2 = PlaceConversion.GetGlobal(scene.startStationClip.startGround); _local3 = _local2.x; _local4 = _local2.y; _local5 = scene.startStationClip.startGround.width; _local6 = scene.startStationClip.startGround.height; startGroundModel = engine.newSurface(new Vector((_local3 + (_local6 / 2)), (_local4 + (_local6 / 2))), new Vector(((_local3 + _local5) - (_local6 / 2)), (_local4 + (_local6 / 2))), (_local6 / 2)); _local7 = PlaceConversion.GetGlobal(scene.endStationClip.endGround); _local8 = _local7.x; _local9 = _local7.y; _local10 = scene.endStationClip.endGround.width; _local11 = scene.endStationClip.endGround.height; endGroundModel = engine.newSurface(new Vector((_local8 + (_local11 / 2)), (_local9 + (_local11 / 2))), new Vector(((_local8 + _local10) - (_local11 / 2)), (_local9 + (_local11 / 2))), (_local11 / 2)); car.Initialize((scene.startStationClip.x + 15), scene.startStationClip.y); CheckAward(); } private function createStars():Array{ var _local1:Array; var _local2:int; var _local3:MovieClip; var _local4:int; _local1 = new Array(); _local2 = starPlaces[sceneID].length; _local3 = null; _local4 = 0; while (_local4 < _local2) { _local3 = new Star(); _local3.x = starPlaces[sceneID][_local4].x; _local3.y = starPlaces[sceneID][_local4].y; scene.addChild(_local3); _local1.push(_local3); _local4++; }; return (_local1); } public function CreateScene(){ getStarNum = 0; scene.gotoAndStop((SceneID + 1)); Library.GradualDisplay(scene); scene.addEventListener(Event.ENTER_FRAME, createSceneHandle); } private function CheckAward(){ scene.addEventListener(Event.ENTER_FRAME, frameHandle); scene.addEventListener(Event.ENTER_FRAME, frame2Handle); } private function clearStationModel(){ if (startGroundModel != null){ engine.removeObject(startGroundModel); startGroundModel = null; }; if (endGroundModel != null){ engine.removeObject(endGroundModel); endGroundModel = null; }; } public function ClearScene(){ engine.removeObject(startGroundModel); engine.removeObject(endGroundModel); if (scene.parent != null){ scene.parent.removeChild(scene); }; } private function timerHandle(_arg1:TimerEvent){ var _local2:Timer; if (((car.HitTestArea.hitTestObject(scene.endStationClip.endSign)) && (!(car.IsFall)))){ car.Rest(); this.dispatchEvent(new Event("Succeed")); SoundManager.PlaySound("胜利", 0.8); _local2 = new Timer(2000, 1); _local2.addEventListener(TimerEvent.TIMER, timer2Handle); _local2.start(); } else { scene.addEventListener(Event.ENTER_FRAME, frameHandle); }; _arg1.currentTarget.stop(); _arg1.currentTarget.removeEventListener(TimerEvent.TIMER, timerHandle); } public function Renew(){ var _local1:int; var _local2:int; car.Initialize(scene.startStationClip.x, (scene.startStationClip.y + 15)); _local1 = stars.length; _local2 = 0; while (_local2 < _local1) { if (((!((stars[_local2] == null))) && (!((stars[_local2].parent == null))))){ stars[_local2].parent.removeChild(stars[_local2]); }; _local2++; }; stars = createStars(); Library.GradualDisplay(scene); getStarNum = 0; } private function getNowSceneStars():Array{ var _local1:Array; var _local2:int; var _local3:MovieClip; var _local4:int; _local1 = new Array(); _local2 = sceneStarNums[SceneID]; _local3 = null; _local4 = 0; while (_local4 < _local2) { _local3 = MovieClip(scene.getChildByName(("star" + _local4))); if (_local3 != null){ _local1.push(_local3); }; _local4++; }; return (_local1); } } }//package WonderLine.GameScene
Section 61
//Library (WonderLine.Library.Library) package WonderLine.Library { import flash.display.*; import flash.events.*; public class Library { public static function GradualDisplay(_arg1:Sprite){ _arg1.alpha = 0; _arg1.addEventListener(Event.ENTER_FRAME, frameHandle); } private static function frameHandle(_arg1:Event){ _arg1.currentTarget.alpha = (_arg1.currentTarget.alpha + 0.02); if (_arg1.currentTarget.alpha >= 1){ _arg1.currentTarget.alpha = 1; _arg1.currentTarget.addEventListener(Event.ENTER_FRAME, frameHandle); }; } } }//package WonderLine.Library
Section 62
//AccessWindowClip (AccessWindowClip) package { import flash.display.*; public dynamic class AccessWindowClip extends Sprite { public var loadBut:MovieClip; public var saveBut:MovieClip; public var deleteBut:MovieClip; } }//package
Section 63
//BodyClip (BodyClip) package { import flash.display.*; public dynamic class BodyClip extends MovieClip { public var monkey:MovieClip; public var hta:MovieClip; } }//package
Section 64
//Bone (Bone) package { import flash.display.*; public dynamic class Bone extends Sprite { } }//package
Section 65
//CarClip (CarClip) package { import flash.display.*; public dynamic class CarClip extends Sprite { public var leftWheelClip:WheelClip; public var bodyClip:BodyClip; public var rightWheelClip:WheelClip; } }//package
Section 66
//Copyright (Copyright) package { import flash.display.*; public dynamic class Copyright extends Sprite { } }//package
Section 67
//EndInterface (EndInterface) package { import flash.display.*; public dynamic class EndInterface extends MovieClip { public var butArea:MovieClip; public var logo:MovieClip; public function EndInterface(){ addFrameScript(0, frame1); } function frame1(){ SoundManager.PlaySound("通关"); } } }//package
Section 68
//EndStationClip (EndStationClip) package { import flash.display.*; public dynamic class EndStationClip extends Sprite { public var endSign:MovieClip; public var endGround:MovieClip; } }//package
Section 69
//EraserArea (EraserArea) package { import flash.display.*; public dynamic class EraserArea extends Sprite { } }//package
Section 70
//EraserClip (EraserClip) package { import flash.display.*; public dynamic class EraserClip extends Sprite { } }//package
Section 71
//GlobalInfo (GlobalInfo) package { import flash.display.*; import flash.events.*; import com.fileitup.fisixengine.core.*; import com.fileitup.fisixengine.materials.*; import com.fileitup.fisixengine.collisions.*; public class GlobalInfo { public static var StageHeight:Number = 480; public static var StageWidth:Number = 780; public static var Layers:Array = null; public static var Egg:Boolean = false; public static var FrameRate:Number = 36; public static var Engine:FisixEngine = null; public static var PassNum:int = 0; public static var 存盘标记:String = "PickingBananasByGamer142857"; public static var MainObject:Main = null; public static var sponsorURL:String = "http://www.freegamesjungle.com/"; public static var StageObject:Stage = null; private static function frameHandle(_arg1:Event){ Engine.mainLoop(1); } public static function Initialize(_arg1:Main){ var _local2:int; StageObject = _arg1.stage; MainObject = _arg1; Layers = new Array(); _local2 = 0; while (_local2 < 8) { Layers[_local2] = new Sprite(); MainObject.addChild(Layers[_local2]); _local2++; }; Engine = new FisixEngine(); Engine.setReactionMode(ReactionModes.PHYSICAL); Engine.setGravity(0, 0.7); MaterialFactory.addMaterial("轮胎", 0.2, 0.3, 1, 0xFFCC00); MaterialFactory.addMaterial("路面", 0.5, 0.1, 1, 0xFFFF00); MainObject.addEventListener(Event.ENTER_FRAME, frameHandle); } } }//package
Section 72
//HelpInterface (HelpInterface) package { import flash.display.*; public dynamic class HelpInterface extends MovieClip { public var continueBut:MovieClip; } }//package
Section 73
//Interface (Interface) package { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.net.*; import flash.ui.*; import flash.utils.*; public class Interface extends EventDispatcher { private var mainObj:Main;// = null private var so:SharedObject;// = null private var endInterface:MovieClip;// = null private var helpInterface:MovieClip;// = null private var startInterface:MovieClip;// = null public function Interface(){ mainObj = null; startInterface = null; helpInterface = null; endInterface = null; so = null; super(); } private function removeEndInterface(){ var _local1:MovieClip; var _local2:MovieClip; _local1 = endInterface.butArea.replayBut; _local2 = endInterface.butArea.mgBut; _local1.buttonMode = false; _local1.removeEventListener(MouseEvent.CLICK, replayButClickHandle); _local1.removeEventListener(MouseEvent.MOUSE_OVER, endInterfaceOverHandle); _local1.removeEventListener(MouseEvent.MOUSE_OUT, endInterfaceOutHandle); _local2.buttonMode = false; _local2.removeEventListener(MouseEvent.CLICK, endInterfaceMgButClickHandle); _local2.removeEventListener(MouseEvent.MOUSE_OVER, endInterfaceOverHandle); _local2.removeEventListener(MouseEvent.MOUSE_OUT, endInterfaceOutHandle); if (endInterface.parent != null){ endInterface.parent.removeChild(endInterface); }; } private function startInterfaceHighScoreButClickHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest(GlobalInfo.sponsorURL), "_blank"); } private function endInterfaceMgButClickHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest(GlobalInfo.sponsorURL), "_blank"); } private function createStartInterface(){ if (startInterface == null){ startInterface = new StartInterface(); }; mainObj.addChild(startInterface); startInterface.startBut.buttonMode = true; startInterface.startBut.addEventListener(MouseEvent.CLICK, startInterfaceStartButClickHandle); so = SharedObject.getLocal(GlobalInfo.存盘标记); if (so.data.PassNum == undefined){ startInterface.continueBut.alpha = 0.4; } else { startInterface.continueBut.alpha = 1; startInterface.continueBut.buttonMode = true; startInterface.continueBut.addEventListener(MouseEvent.CLICK, startInterfaceContinueButClickHandle); }; startInterface.mgBut.buttonMode = true; startInterface.mgBut.addEventListener(MouseEvent.CLICK, startInterfaceMgButClickHandle); } private function continueButClickHandle(_arg1:MouseEvent){ removeHelpInterface(); this.dispatchEvent(new Event("GameStart")); } private function startInterfaceStartButClickHandle(_arg1:MouseEvent){ removeStartInterface(); GlobalInfo.StageObject.focus = GlobalInfo.StageObject; SoundManager.LoopPlay("背景音乐", 0.3); this.dispatchEvent(new Event("GameStart")); } private function removeStartInterface(){ startInterface.startBut.buttonMode = false; startInterface.startBut.removeEventListener(MouseEvent.CLICK, startInterfaceStartButClickHandle); startInterface.continueBut.buttonMode = false; startInterface.continueBut.removeEventListener(MouseEvent.CLICK, startInterfaceContinueButClickHandle); startInterface.mgBut.buttonMode = false; startInterface.mgBut.removeEventListener(MouseEvent.CLICK, startInterfaceMgButClickHandle); if (startInterface.parent != null){ startInterface.parent.removeChild(startInterface); }; } private function continueButOverHandle(_arg1:MouseEvent){ helpInterface.continueBut.gotoAndStop(2); } private function startInterfaceOutHandle(_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(1); } private function startInterfaceMgButClickHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest(GlobalInfo.sponsorURL), "_blank"); } public function CreateEndInterface(){ var _local1:MovieClip; var _local2:MovieClip; if (endInterface == null){ endInterface = new EndInterface(); }; mainObj.addChild(endInterface); Tool.GradualDisplay(endInterface.logo, 0.01); Tool.GradualDisplay(endInterface.butArea, 0.01); _local1 = endInterface.butArea.replayBut; _local2 = endInterface.butArea.mgBut; _local1.buttonMode = true; _local1.addEventListener(MouseEvent.CLICK, replayButClickHandle); _local1.addEventListener(MouseEvent.MOUSE_OVER, endInterfaceOverHandle); _local1.addEventListener(MouseEvent.MOUSE_OUT, endInterfaceOutHandle); _local2.buttonMode = true; _local2.addEventListener(MouseEvent.CLICK, endInterfaceMgButClickHandle); _local2.addEventListener(MouseEvent.MOUSE_OVER, endInterfaceOverHandle); _local2.addEventListener(MouseEvent.MOUSE_OUT, endInterfaceOutHandle); } private function createHelpInterface(){ if (helpInterface == null){ helpInterface = new HelpInterface(); }; mainObj.addChild(helpInterface); helpInterface.continueBut.buttonMode = true; helpInterface.continueBut.addEventListener(MouseEvent.CLICK, continueButClickHandle); helpInterface.continueBut.addEventListener(MouseEvent.MOUSE_OVER, continueButOverHandle); helpInterface.continueBut.addEventListener(MouseEvent.MOUSE_OUT, continueButOutHandle); SoundManager.LoopPlay("背景音乐", 0.3); } private function replayButClickHandle(_arg1:MouseEvent){ SoundManager.StopLoop("背景音乐"); removeEndInterface(); this.dispatchEvent(new Event("Replay")); } private function endInterfaceOutHandle(_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(1); } private function endInterfaceOverHandle(_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(2); } private function continueButOutHandle(_arg1:MouseEvent){ helpInterface.continueBut.gotoAndStop(1); } private function startInterfaceContinueButClickHandle(_arg1:MouseEvent){ removeStartInterface(); GlobalInfo.StageObject.focus = GlobalInfo.StageObject; SoundManager.LoopPlay("背景音乐", 0.3); GlobalInfo.PassNum = so.data.PassNum; this.dispatchEvent(new Event("GameStart")); } public function Initialize(){ mainObj = GlobalInfo.MainObject; createStartInterface(); } private function removeHelpInterface(){ helpInterface.continueBut.buttonMode = false; helpInterface.continueBut.removeEventListener(MouseEvent.CLICK, continueButClickHandle); helpInterface.continueBut.removeEventListener(MouseEvent.MOUSE_OVER, continueButOverHandle); helpInterface.continueBut.removeEventListener(MouseEvent.MOUSE_OUT, continueButOutHandle); if (helpInterface.parent != null){ helpInterface.parent.removeChild(helpInterface); }; } private function startInterfaceOverHandle(_arg1:MouseEvent){ _arg1.currentTarget.gotoAndStop(2); } } }//package
Section 74
//LoadingClip (LoadingClip) package { import flash.display.*; public dynamic class LoadingClip extends MovieClip { } }//package
Section 75
//Main (Main) package { import flash.display.*; import flash.events.*; import flash.geom.*; import WonderLine.Car.*; import WonderLine.DrawBoard.*; import flash.net.*; import WonderLine.GameScene.*; import flash.ui.*; import flash.utils.*; import flash.system.*; public class Main extends MovieClip { var interfaceObj:Interface;// = null var drawBoard:DrawBoard;// = null public var rq:MovieClip; private var so:SharedObject;// = null public var preloader:Preloader; var toolbar:Toolbar;// = null public var gameLoaded:Boolean; var scene:GameScene;// = null var car:Car;// = null public function Main(){ interfaceObj = null; car = null; drawBoard = null; scene = null; toolbar = null; so = null; super(); addFrameScript(0, frame1, 1, frame2); } private function createGame(){ car = new Car(); scene = new GameScene(); scene.Initialize(car); drawBoard = new DrawBoard(); drawBoard.AddFocusObject(car); drawBoard.DrawArea(new Rectangle(0, 0, 780, 430)); toolbar = new Toolbar(); toolbar.Initialize(); toolbar.addEventListener("ClickArrow", clickArrowHandle); toolbar.addEventListener("ClickPen", clickPenHandle); toolbar.addEventListener("ClickEraser", clickEraserHandle); toolbar.addEventListener("ClickWastebin", clickWastebinHandle); toolbar.addEventListener("ClickRetry", clickRetryHandle); scene.addEventListener("Succeed", succeedHandle); scene.addEventListener("Pass", passHandle); } private function gameStartHandle(_arg1:Event){ createGame(); } public function succeedHandle(_arg1:Event){ } private function ReplayHandle(_arg1:Event){ replay(); } private function clickRetryHandle(_arg1:Event){ drawBoard.ClearAllTracks(); scene.Renew(); } function frame1(){ gameLoaded = false; this.stop(); preloader.stop(); preloader.logo_mc.stop(); preloader.logo_mc.loaderbar.stop(); preloader.addEventListener(Event.ENTER_FRAME, updatePreloader, false, 0, true); preloader.link_btn.addEventListener(MouseEvent.MOUSE_DOWN, gotoArc, false); } private function quit(){ car.Clear(); scene.ClearScene(); drawBoard.ClearAll(); toolbar.ClearAll(); } private function clickEraserHandle(_arg1:Event){ drawBoard.StopDrawing(); drawBoard.StartErasure(); } public function startGame(){ stage.scaleMode = StageScaleMode.EXACT_FIT; so = SharedObject.getLocal(GlobalInfo.存盘标记); GlobalInfo.Initialize(this); interfaceObj = new Interface(); interfaceObj.Initialize(); interfaceObj.addEventListener("GameStart", gameStartHandle); interfaceObj.addEventListener("Replay", ReplayHandle); } function frame2(){ stop(); this.removeChild(rq); startGame(); } private function passHandle(_arg1:Event){ scene.SceneID = (scene.SceneID + 1); if (scene.SceneID >= 12){ quit(); interfaceObj.CreateEndInterface(); return; }; drawBoard.ClearAllTracks(); scene.CreateScene(); toolbar.UpdateLevelShow(scene.SceneID); toolbar.UpdateScoreShow(); drawBoard.StopErasure(); drawBoard.StopDrawing(); toolbar.Clear(); GlobalInfo.PassNum = scene.SceneID; so.data.PassNum = GlobalInfo.PassNum; } public function updatePreloader(_arg1:Event):void{ var _local2:Number; _local2 = ((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100); if (_local2 != 100){ preloader.logo_mc.loaderbar.gotoAndStop(int(_local2)); } else { if (!gameLoaded){ gameLoaded = true; preloader.logo_mc.play(); }; if (preloader.logo_mc.currentFrame == preloader.logo_mc.totalFrames){ preloader.logo_mc.gotoAndStop(preloader.logo_mc.totalFrames); preloader.removeEventListener(Event.ENTER_FRAME, updatePreloader, false); this.gotoAndStop(2); }; }; } private function completeHandle(_arg1:Event){ } private function clickWastebinHandle(_arg1:Event){ drawBoard.ClearAllTracks(); } private function clickArrowHandle(_arg1:Event){ drawBoard.StopErasure(); drawBoard.StopDrawing(); } private function replay(){ GlobalInfo.PassNum = 0; interfaceObj.Initialize(); } public function gotoArc(_arg1:MouseEvent):void{ navigateToURL(new URLRequest("http://www.freegamesjungle.com"), "_blank"); } private function clickPenHandle(_arg1:Event){ drawBoard.StopErasure(); drawBoard.StartDrawing(); } } }//package
Section 76
//MyKey (MyKey) package { import flash.display.*; import flash.events.*; import flash.ui.*; public class MyKey extends EventDispatcher { private var target:Stage;// = null private var ed:EventDispatcher;// = null private var cm:ContextMenu;// = null private var keys:Array; private static var instance:MyKey = null; public function MyKey(_arg1:Stage){ target = null; keys = new Array(); ed = null; cm = null; super(); target = _arg1; target.addEventListener(Event.ENTER_FRAME, frameHandle); ed = new EventDispatcher(); cm = new ContextMenu(); DisplayObjectContainer(target.getChildAt(0)).contextMenu = cm; ed.addEventListener(Event.DEACTIVATE, suddenHandle); cm.addEventListener(ContextMenuEvent.MENU_SELECT, suddenHandle); target.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandle); target.addEventListener(KeyboardEvent.KEY_UP, keyUpHandle); } private function dispatch(){ this.dispatchEvent(new Event("KeyDown")); } public function IsDown(_arg1:int):Boolean{ var _local2:Boolean; _local2 = Boolean(keys[_arg1]); return (_local2); } private function suddenHandle(_arg1:Event){ target.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function keyDownHandle(_arg1:KeyboardEvent){ if (!keys[_arg1.keyCode]){ keys[_arg1.keyCode] = true; dispatch(); target.addEventListener(Event.ENTER_FRAME, frameHandle); }; } private function keyUpHandle(_arg1:KeyboardEvent){ this.dispatchEvent(new Event("KeyUp")); keys[_arg1.keyCode] = false; if (IsDownAnyKey()){ target.removeEventListener(Event.ENTER_FRAME, frameHandle); }; } private function frameHandle(_arg1:Event){ dispatch(); } public function destroy(){ instance = null; target.removeEventListener(Event.ENTER_FRAME, frameHandle); target.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandle); target.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandle); ed.removeEventListener(Event.DEACTIVATE, suddenHandle); cm.removeEventListener(ContextMenuEvent.MENU_SELECT, suddenHandle); } public function IsDownAnyKey():Boolean{ var _local1:int; var _local2:int; _local1 = keys.length; _local2 = 0; while (_local2 < _local1) { if (((!((keys[_local2] == undefined))) && (keys[_local2]))){ return (false); }; _local2++; }; return (true); } public static function Instance(_arg1:Stage=null):MyKey{ if (instance == null){ instance = new MyKey(_arg1); }; return (instance); } } }//package
Section 77
//MyKeySingleDown (MyKeySingleDown) package { import flash.display.*; import flash.events.*; public class MyKeySingleDown extends EventDispatcher { private var target:Stage;// = null private var lastKey:Number;// = -1 private var mk:MyKey;// = null private static var instance:MyKeySingleDown = null; public function MyKeySingleDown(_arg1:Stage){ target = null; mk = null; lastKey = -1; super(); target = _arg1; mk = new MyKey(target); target.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandle); target.addEventListener(KeyboardEvent.KEY_UP, keyUpHandle); } private function keyUpHandle(_arg1:KeyboardEvent){ if (_arg1.keyCode == lastKey){ lastKey = -1; }; } private function keyDownHandle(_arg1:KeyboardEvent){ if (lastKey != _arg1.keyCode){ this.dispatchEvent(new Event("SingleKeyDown")); lastKey = _arg1.keyCode; }; } public function destroy(){ instance = null; target.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandle); target.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandle); } public static function Instance(_arg1:Stage=null):MyKeySingleDown{ if (instance == null){ instance = new MyKeySingleDown(_arg1); }; return (instance); } } }//package
Section 78
//PenClip (PenClip) package { import flash.display.*; public dynamic class PenClip extends Sprite { } }//package
Section 79
//PlaceConversion (PlaceConversion) package { import flash.display.*; import flash.geom.*; public class PlaceConversion { public static function GetGlobal(_arg1:DisplayObject):Point{ return (_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y))); } public static function Shift(_arg1:DisplayObject, _arg2:DisplayObjectContainer){ var _local3:Point; _local3 = GetLocal(_arg1, _arg2); _arg1.x = _local3.x; _arg1.y = _local3.y; _arg2.addChild(_arg1); } public static function GetLocal(_arg1:DisplayObject, _arg2:DisplayObject):Point{ return (_arg2.globalToLocal(GetGlobal(_arg1))); } } }//package
Section 80
//Platform (Platform) package { import flash.display.*; public dynamic class Platform extends Sprite { } }//package
Section 81
//Preloader (Preloader) package { import flash.display.*; public dynamic class Preloader extends MovieClip { public var link_btn:SimpleButton; public var logo_mc:MovieClip; public function Preloader(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 82
//SceneClip (SceneClip) package { import flash.display.*; public dynamic class SceneClip extends MovieClip { public var endStationClip:EndStationClip; public var startStationClip:StartStationClip; public function SceneClip(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 83
//SoundManager (SoundManager) package { import flash.media.*; public class SoundManager { private static var sounds:Object = new Object(); private static var channels:Object = new Object(); public static function StopLoop(_arg1:String){ if (channels[_arg1] == null){ return; }; channels[_arg1].stop(); } public static function PlaySound(_arg1:String, _arg2:Number=1){ var _local3:Sound; var _local4:SoundTransform; _local3 = null; switch (_arg1){ case "胜利": _local3 = new 胜利(); break; case "碰到星星": _local3 = new 碰到星星(); break; case "启动": _local3 = new 启动(); break; case "吹口哨": _local3 = new 吹口哨(); break; case "尴尬": _local3 = new 尴尬(); break; case "通关": _local3 = new 通关(); break; case "按钮点击": _local3 = new 按钮点击(); break; case "鼠标经过": _local3 = new 鼠标经过(); break; }; _local4 = new SoundTransform(); _local4.volume = _arg2; _local3.play(0, 0, _local4); } public static function LoopPlay(_arg1:String, _arg2:Number=1){ var _local3:SoundTransform; if (sounds[_arg1] == null){ switch (_arg1){ case "背景音乐": sounds[_arg1] = new 背景音乐(); break; }; }; _local3 = new SoundTransform(); _local3.volume = _arg2; channels[_arg1] = sounds[_arg1].play(0, 10000, _local3); } } }//package
Section 84
//Star (Star) package { import flash.display.*; public dynamic class Star extends MovieClip { public function Star(){ addFrameScript(0, frame1, 21, frame22); } function frame1(){ stop(); } function frame22(){ stop(); if (this.parent != null){ this.parent.removeChild(this); }; } } }//package
Section 85
//StartInterface (StartInterface) package { import flash.display.*; public dynamic class StartInterface extends MovieClip { public var continueBut:MovieClip; public var mgBut:MovieClip; public var startBut:MovieClip; } }//package
Section 86
//StartStationClip (StartStationClip) package { import flash.display.*; public dynamic class StartStationClip extends Sprite { public var startGround:MovieClip; } }//package
Section 87
//SuperKey (SuperKey) package { import flash.display.*; import flash.events.*; public class SuperKey extends EventDispatcher { private var target:Stage;// = null private var mks:MyKeySingleDown;// = null private var mk:MyKey;// = null private static var instance:SuperKey = null; public function SuperKey(_arg1:Stage){ mk = null; mks = null; target = null; super(); target = _arg1; mk = MyKey.Instance(target); mk.addEventListener("KeyDown", keyDownHandle); mk.addEventListener("KeyUp", keyUpHandle); mks = MyKeySingleDown.Instance(target); mks.addEventListener("SingleKeyDown", singleKeyDownHandle); } private function singleKeyDownHandle(_arg1:Event){ this.dispatchEvent(new Event("SingleKeyDown")); } public function IsDown(_arg1:int):Boolean{ return (mk.IsDown(_arg1)); } private function keyDownHandle(_arg1:Event){ this.dispatchEvent(new Event("KeyDown")); } private function keyUpHandle(_arg1:Event){ this.dispatchEvent(new Event("KeyUp")); } public function destroy(){ instance = null; mk.destroy(); mks.destroy(); } public function IsDownAnyKey():Boolean{ return (mk.IsDownAnyKey()); } public static function Instance(_arg1:Stage=null):SuperKey{ if (instance == null){ instance = new SuperKey(_arg1); }; return (instance); } } }//package
Section 88
//Tool (Tool) package { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.ui.*; import flash.utils.*; public class Tool { private static var delay:Number = 0; public static function GradualDisplay(_arg1:Sprite, _arg2:Number){ delay = _arg2; _arg1.alpha = 0; _arg1.addEventListener(Event.ENTER_FRAME, frameHandle); } private static function frameHandle(_arg1:Event){ _arg1.currentTarget.alpha = (_arg1.currentTarget.alpha + delay); if (_arg1.currentTarget.alpha >= 1){ _arg1.currentTarget.alpha = 1; _arg1.currentTarget.addEventListener(Event.ENTER_FRAME, frameHandle); }; } } }//package
Section 89
//Toolbar (Toolbar) package { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.ui.*; import flash.utils.*; public class Toolbar extends EventDispatcher { private var eraser:EraserClip;// = null private var onOff:Boolean;// = true private var bar:ToolbarClip;// = null private var pen:PenClip;// = null public function Toolbar(){ bar = null; eraser = null; pen = null; onOff = true; super(); } public function ClearAll(){ Clear(); bar.arrowBut.removeEventListener(MouseEvent.CLICK, arrowButHandle); bar.penBut.removeEventListener(MouseEvent.CLICK, penButHandle); bar.eraserBut.removeEventListener(MouseEvent.CLICK, eraserButHandle); bar.wastebinBut.removeEventListener(MouseEvent.CLICK, wastebinButHandle); bar.retryBut.removeEventListener(MouseEvent.CLICK, retryButHandle); bar.soundBut.removeEventListener(MouseEvent.CLICK, soundButHandle); GlobalInfo.StageObject.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandle); if (bar.parent != null){ bar.parent.removeChild(bar); }; } private function retryButHandle(_arg1:MouseEvent){ SoundManager.PlaySound("按钮点击"); this.dispatchEvent(new Event("ClickRetry")); } private function cancelEraserDrag(){ if (eraser.parent != null){ eraser.parent.removeChild(eraser); }; eraser.stopDrag(); } private function cancelAll(){ if (eraser.parent != null){ eraser.parent.removeChild(eraser); }; if (pen.parent != null){ pen.parent.removeChild(pen); }; eraser.stopDrag(); pen.stopDrag(); } private function cancelPenDrag(){ if (pen.parent != null){ pen.parent.removeChild(pen); }; pen.stopDrag(); } private function wastebinButHandle(_arg1:MouseEvent){ SoundManager.PlaySound("按钮点击"); this.dispatchEvent(new Event("ClickWastebin")); } private function eraserButHandle(_arg1:MouseEvent){ cancelPenDrag(); GlobalInfo.Layers[7].addChild(eraser); eraser.startDrag(true); Mouse.hide(); this.dispatchEvent(new Event("ClickEraser")); } public function UpdateScoreShow(){ } private function keyUpHandle(_arg1:KeyboardEvent){ if (_arg1.keyCode == 81){ cancelAll(); Mouse.show(); this.dispatchEvent(new Event("ClickArrow")); } else { if (_arg1.keyCode == 83){ cancelEraserDrag(); GlobalInfo.Layers[7].addChild(pen); pen.startDrag(true); Mouse.hide(); this.dispatchEvent(new Event("ClickPen")); } else { if (_arg1.keyCode == 87){ cancelPenDrag(); GlobalInfo.Layers[7].addChild(eraser); eraser.startDrag(true); Mouse.hide(); this.dispatchEvent(new Event("ClickEraser")); }; }; }; } private function arrowButHandle(_arg1:MouseEvent){ cancelAll(); Mouse.show(); this.dispatchEvent(new Event("ClickArrow")); } public function Initialize(){ eraser = new EraserClip(); pen = new PenClip(); bar = new ToolbarClip(); bar.x = 0; bar.y = 430; GlobalInfo.Layers[0].addChild(bar); bar.levelDenote.stop(); UpdateLevelShow(GlobalInfo.PassNum); eraser.mouseEnabled = false; pen.mouseEnabled = false; GlobalInfo.Layers[7].mouseEnabled = false; bar.arrowBut.buttonMode = true; bar.penBut.buttonMode = true; bar.eraserBut.buttonMode = true; bar.wastebinBut.buttonMode = true; bar.retryBut.buttonMode = true; bar.soundBut.buttonMode = true; bar.arrowBut.addEventListener(MouseEvent.CLICK, arrowButHandle); bar.penBut.addEventListener(MouseEvent.CLICK, penButHandle); bar.eraserBut.addEventListener(MouseEvent.CLICK, eraserButHandle); bar.wastebinBut.addEventListener(MouseEvent.CLICK, wastebinButHandle); bar.retryBut.addEventListener(MouseEvent.CLICK, retryButHandle); bar.soundBut.addEventListener(MouseEvent.CLICK, soundButHandle); GlobalInfo.StageObject.addEventListener(KeyboardEvent.KEY_UP, keyUpHandle); } private function penButHandle(_arg1:MouseEvent){ cancelEraserDrag(); GlobalInfo.Layers[7].addChild(pen); pen.startDrag(true); Mouse.hide(); this.dispatchEvent(new Event("ClickPen")); } public function UpdateLevelShow(_arg1:int){ bar.levelDenote.gotoAndStop((_arg1 + 1)); } private function soundButHandle(_arg1:MouseEvent){ if (onOff){ SoundManager.StopLoop("背景音乐"); bar.soundBut.gotoAndStop(2); onOff = !(onOff); } else { SoundManager.LoopPlay("背景音乐", 0.3); bar.soundBut.gotoAndStop(1); onOff = !(onOff); }; } public function Clear(){ cancelAll(); Mouse.show(); } } }//package
Section 90
//ToolbarClip (ToolbarClip) package { import flash.display.*; public dynamic class ToolbarClip extends Sprite { public var eraserBut:MovieClip; public var levelDenote:MovieClip; public var penBut:MovieClip; public var wastebinBut:MovieClip; public var retryBut:MovieClip; public var arrowBut:MovieClip; public var soundBut:MovieClip; } }//package
Section 91
//WheelClip (WheelClip) package { import flash.display.*; public dynamic class WheelClip extends Sprite { } }//package
Section 92
//启动 (启动) package { import flash.media.*; public dynamic class 启动 extends Sound { } }//package
Section 93
//吹口哨 (吹口哨) package { import flash.media.*; public dynamic class 吹口哨 extends Sound { } }//package
Section 94
//尴尬 (å°´å°¬) package { import flash.media.*; public dynamic class 尴尬 extends Sound { } }//package
Section 95
//按钮点击 (按钮点击) package { import flash.media.*; public dynamic class 按钮点击 extends Sound { } }//package
Section 96
//碰到星星 (碰到星星) package { import flash.media.*; public dynamic class 碰到星星 extends Sound { } }//package
Section 97
//背景音乐 (背景音乐) package { import flash.media.*; public dynamic class 背景音乐 extends Sound { } }//package
Section 98
//胜利 (胜利) package { import flash.media.*; public dynamic class 胜利 extends Sound { } }//package
Section 99
//通关 (通关) package { import flash.media.*; public dynamic class 通关 extends Sound { } }//package
Section 100
//鼠标经过 (鼠标经过) package { import flash.media.*; public dynamic class 鼠标经过 extends Sound { } }//package

Library Items

Symbol 1 GraphicUsed by:5
Symbol 2 GraphicUsed by:5
Symbol 3 GraphicUsed by:5
Symbol 4 GraphicUsed by:5
Symbol 5 MovieClip {LoadingClip}Uses:1 2 3 4
Symbol 6 GraphicUsed by:13
Symbol 7 GraphicUsed by:8 41 87 88
Symbol 8 MovieClipUses:7Used by:11
Symbol 9 GraphicUsed by:11
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip {_fla.Timeline_94}Uses:8 9 10Used by:13
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip {HelpInterface}Uses:6 11 12
Symbol 14 GraphicUsed by:28
Symbol 15 FontUsed by:16 17 23 25
Symbol 16 TextUses:15Used by:28
Symbol 17 TextUses:15Used by:28
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClipUses:18Used by:28
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:28
Symbol 22 GraphicUsed by:28
Symbol 23 EditableTextUses:15Used by:28
Symbol 24 GraphicUsed by:28
Symbol 25 EditableTextUses:15Used by:28
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClipUses:26Used by:28
Symbol 28 MovieClip {AccessWindowClip}Uses:14 16 17 19 21 22 23 24 25 27
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClip {EraserArea}Uses:29
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip {PenClip}Uses:31
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClip {EraserClip}Uses:33
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClip {Copyright}Uses:35
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:42
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:39Used by:42
Symbol 41 MovieClipUses:7Used by:42
Symbol 42 MovieClip {BodyClip}Uses:38 40 41Used by:46 239
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClipUses:43Used by:45
Symbol 45 MovieClip {WheelClip}Uses:44Used by:46 239
Symbol 46 MovieClip {CarClip}Uses:42 45Used by:177
Symbol 47 GraphicUsed by:48
Symbol 48 MovieClipUses:47Used by:51
Symbol 49 GraphicUsed by:50
Symbol 50 MovieClipUses:49Used by:51
Symbol 51 MovieClipUses:48 50Used by:86
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClipUses:52Used by:86
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClipUses:54Used by:86
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:56Used by:86
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:86
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClipUses:60Used by:86
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClipUses:62Used by:86
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClipUses:64Used by:86
Symbol 66 GraphicUsed by:67
Symbol 67 MovieClipUses:66Used by:86
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClipUses:68Used by:86
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClipUses:70Used by:86
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:72Used by:86
Symbol 74 GraphicUsed by:77
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClipUses:75Used by:77
Symbol 77 MovieClipUses:74 76Used by:86
Symbol 78 GraphicUsed by:79
Symbol 79 MovieClipUses:78Used by:86
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClipUses:80Used by:86
Symbol 82 SoundUsed by:86
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:83Used by:86
Symbol 85 SoundUsed by:86
Symbol 86 MovieClip {_fla.fgjpre_as3_bomb_preloader_2}Uses:51 53 55 57 59 61 63 65 67 69 71 73 77 79 81 82 84 85Used by:88
Symbol 87 ButtonUses:7Used by:88
Symbol 88 MovieClip {Preloader}Uses:7 86 87Used by:Timeline
Symbol 89 BitmapUsed by:90 117
Symbol 90 GraphicUses:89Used by:Timeline
Symbol 91 BitmapUsed by:92
Symbol 92 GraphicUses:91Used by:116
Symbol 93 GraphicUsed by:95
Symbol 94 GraphicUsed by:95
Symbol 95 ButtonUses:93 94Used by:97 99 122 124 170
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClip {_fla.Timeline_27}Uses:95 96Used by:100 130
Symbol 98 GraphicUsed by:99
Symbol 99 MovieClip {_fla.Timeline_29}Uses:95 98Used by:100
Symbol 100 MovieClip {_fla.Timeline_26}Uses:97 99Used by:116
Symbol 101 GraphicUsed by:105
Symbol 102 GraphicUsed by:103
Symbol 103 MovieClipUses:102Used by:105 130
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClipUses:101 103 104Used by:116
Symbol 106 GraphicUsed by:114
Symbol 107 GraphicUsed by:114
Symbol 108 GraphicUsed by:114
Symbol 109 FontUsed by:110 111 112 125 126
Symbol 110 TextUses:109Used by:114
Symbol 111 TextUses:109Used by:114
Symbol 112 TextUses:109Used by:114
Symbol 113 GraphicUsed by:114
Symbol 114 ButtonUses:106 107 108 110 111 112 113Used by:115
Symbol 115 MovieClip {_fla.Timeline_32}Uses:114Used by:116 130
Symbol 116 MovieClip {EndInterface}Uses:92 100 105 115Used by:239
Symbol 117 GraphicUses:89Used by:130
Symbol 118 BitmapUsed by:120
Symbol 119 BitmapUsed by:120
Symbol 120 GraphicUses:118 119Used by:130
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClip {_fla.Timeline_35}Uses:95 121Used by:130
Symbol 123 GraphicUsed by:124
Symbol 124 MovieClip {_fla.Timeline_36}Uses:95 123Used by:130
Symbol 125 TextUses:109Used by:128
Symbol 126 TextUses:109Used by:128
Symbol 127 GraphicUsed by:128
Symbol 128 ButtonUses:125 126 127Used by:129
Symbol 129 MovieClip {_fla.Timeline_37}Uses:128Used by:130
Symbol 130 MovieClip {StartInterface}Uses:117 103 120 122 97 124 115 129Used by:239
Symbol 131 GraphicUsed by:133
Symbol 132 GraphicUsed by:133
Symbol 133 ButtonUses:131 132Used by:134
Symbol 134 MovieClipUses:133Used by:176
Symbol 135 GraphicUsed by:176
Symbol 136 GraphicUsed by:139
Symbol 137 GraphicUsed by:139
Symbol 138 GraphicUsed by:139
Symbol 139 ButtonUses:136 137 138Used by:141 143 145
Symbol 140 GraphicUsed by:141
Symbol 141 MovieClipUses:139 140Used by:176
Symbol 142 GraphicUsed by:143
Symbol 143 MovieClipUses:139 142Used by:176
Symbol 144 GraphicUsed by:145
Symbol 145 MovieClipUses:139 144Used by:176
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClipUses:146Used by:168
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClipUses:148Used by:168
Symbol 150 GraphicUsed by:151
Symbol 151 MovieClipUses:150Used by:168
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClipUses:152Used by:168
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClipUses:154Used by:168
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClipUses:156Used by:168
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClipUses:158Used by:168
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClipUses:160Used by:168
Symbol 162 GraphicUsed by:163
Symbol 163 MovieClipUses:162Used by:168
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClipUses:164Used by:168
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:166Used by:168
Symbol 168 MovieClip {_fla.Timeline_52}Uses:147 149 151 153 155 157 159 161 163 165 167Used by:176
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClipUses:95 169Used by:176
Symbol 171 GraphicUsed by:173
Symbol 172 GraphicUsed by:173
Symbol 173 ButtonUses:171 172Used by:175
Symbol 174 GraphicUsed by:175
Symbol 175 MovieClip {_fla.Timeline_65}Uses:173 174Used by:176
Symbol 176 MovieClip {ToolbarClip}Uses:134 135 141 143 145 168 170 175Used by:239
Symbol 177 MovieClip {Bone}Uses:46Used by:239
Symbol 178 BitmapUsed by:179
Symbol 179 GraphicUses:178Used by:182
Symbol 180 GraphicUsed by:181 215
Symbol 181 MovieClipUses:180Used by:182
Symbol 182 MovieClip {StartStationClip}Uses:179 181Used by:218 228 239
Symbol 183 GraphicUsed by:202
Symbol 184 GraphicUsed by:202
Symbol 185 GraphicUsed by:202
Symbol 186 GraphicUsed by:202
Symbol 187 GraphicUsed by:202
Symbol 188 GraphicUsed by:202
Symbol 189 GraphicUsed by:202
Symbol 190 GraphicUsed by:202
Symbol 191 GraphicUsed by:202
Symbol 192 GraphicUsed by:202
Symbol 193 GraphicUsed by:202
Symbol 194 GraphicUsed by:202
Symbol 195 GraphicUsed by:202
Symbol 196 GraphicUsed by:202
Symbol 197 GraphicUsed by:202
Symbol 198 GraphicUsed by:202
Symbol 199 GraphicUsed by:202
Symbol 200 GraphicUsed by:202
Symbol 201 GraphicUsed by:202
Symbol 202 MovieClipUses:183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201Used by:203
Symbol 203 MovieClipUses:202Used by:210
Symbol 204 GraphicUsed by:209
Symbol 205 GraphicUsed by:209
Symbol 206 GraphicUsed by:209
Symbol 207 GraphicUsed by:209
Symbol 208 GraphicUsed by:209
Symbol 209 MovieClipUses:204 205 206 207 208Used by:210
Symbol 210 MovieClip {Star}Uses:203 209Used by:239
Symbol 211 BitmapUsed by:212
Symbol 212 GraphicUses:211Used by:216
Symbol 213 GraphicUsed by:214
Symbol 214 MovieClipUses:213Used by:216
Symbol 215 MovieClipUses:180Used by:216
Symbol 216 MovieClip {EndStationClip}Uses:212 214 215Used by:218 228 239
Symbol 217 GraphicUsed by:218
Symbol 218 MovieClip {Platform}Uses:217 182 216Used by:239
Symbol 219 GraphicUsed by:220
Symbol 220 MovieClipUses:219Used by:222 225
Symbol 221 GraphicUsed by:222
Symbol 222 MovieClipUses:220 221Used by:228
Symbol 223 GraphicUsed by:228
Symbol 224 GraphicUsed by:225
Symbol 225 MovieClipUses:220 224Used by:227
Symbol 226 GraphicUsed by:227
Symbol 227 MovieClipUses:225 226Used by:228
Symbol 228 MovieClip {SceneClip}Uses:222 223 216 182 227Used by:239
Symbol 229 Sound {碰到星星}Used by:238
Symbol 230 Sound {按钮点击}Used by:238
Symbol 231 Sound {背景音乐}Used by:238
Symbol 232 Sound {尴尬}Used by:238
Symbol 233 Sound {吹口哨}Used by:238
Symbol 234 Sound {启动}Used by:238
Symbol 235 Sound {胜利}Used by:238
Symbol 236 Sound {鼠标经过}Used by:238
Symbol 237 Sound {通关}Used by:238
Symbol 238 MovieClip {_fla.Timeline_84}Uses:229 230 231 232 233 234 235 236 237Used by:239
Symbol 239 MovieClipUses:116 130 45 42 176 177 182 210 216 218 228 238Used by:240
Symbol 240 MovieClip {_fla.Timeline_23}Uses:239Used by:Timeline

Instance Names

"preloader"Frame 1Symbol 88 MovieClip {Preloader}
"rq"Frame 2Symbol 240 MovieClip {_fla.Timeline_23}
"continueBut"Symbol 13 MovieClip {HelpInterface} Frame 1Symbol 11 MovieClip {_fla.Timeline_94}
"saveBut"Symbol 28 MovieClip {AccessWindowClip} Frame 1Symbol 19 MovieClip
"loadBut"Symbol 28 MovieClip {AccessWindowClip} Frame 1Symbol 21 MovieClip
"deleteBut"Symbol 28 MovieClip {AccessWindowClip} Frame 1Symbol 27 MovieClip
"monkey"Symbol 42 MovieClip {BodyClip} Frame 1Symbol 40 MovieClip
"hta"Symbol 42 MovieClip {BodyClip} Frame 1Symbol 41 MovieClip
"bodyClip"Symbol 46 MovieClip {CarClip} Frame 1Symbol 42 MovieClip {BodyClip}
"leftWheelClip"Symbol 46 MovieClip {CarClip} Frame 1Symbol 45 MovieClip {WheelClip}
"rightWheelClip"Symbol 46 MovieClip {CarClip} Frame 1Symbol 45 MovieClip {WheelClip}
"loaderbar"Symbol 86 MovieClip {_fla.fgjpre_as3_bomb_preloader_2} Frame 1Symbol 77 MovieClip
"logo_mc"Symbol 88 MovieClip {Preloader} Frame 1Symbol 86 MovieClip {_fla.fgjpre_as3_bomb_preloader_2}
"link_btn"Symbol 88 MovieClip {Preloader} Frame 1Symbol 87 Button
"mgBut"Symbol 100 MovieClip {_fla.Timeline_26} Frame 1Symbol 97 MovieClip {_fla.Timeline_27}
"replayBut"Symbol 100 MovieClip {_fla.Timeline_26} Frame 1Symbol 99 MovieClip {_fla.Timeline_29}
"butArea"Symbol 116 MovieClip {EndInterface} Frame 1Symbol 100 MovieClip {_fla.Timeline_26}
"logo"Symbol 116 MovieClip {EndInterface} Frame 1Symbol 105 MovieClip
"startBut"Symbol 130 MovieClip {StartInterface} Frame 1Symbol 122 MovieClip {_fla.Timeline_35}
"mgBut"Symbol 130 MovieClip {StartInterface} Frame 1Symbol 97 MovieClip {_fla.Timeline_27}
"continueBut"Symbol 130 MovieClip {StartInterface} Frame 1Symbol 124 MovieClip {_fla.Timeline_36}
"wastebinBut"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 134 MovieClip
"arrowBut"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 141 MovieClip
"eraserBut"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 143 MovieClip
"penBut"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 145 MovieClip
"levelDenote"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 168 MovieClip {_fla.Timeline_52}
"retryBut"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 170 MovieClip
"soundBut"Symbol 176 MovieClip {ToolbarClip} Frame 1Symbol 175 MovieClip {_fla.Timeline_65}
"startGround"Symbol 182 MovieClip {StartStationClip} Frame 1Symbol 181 MovieClip
"endSign"Symbol 216 MovieClip {EndStationClip} Frame 1Symbol 214 MovieClip
"endGround"Symbol 216 MovieClip {EndStationClip} Frame 1Symbol 215 MovieClip
"endStationClip"Symbol 228 MovieClip {SceneClip} Frame 1Symbol 216 MovieClip {EndStationClip}
"startStationClip"Symbol 228 MovieClip {SceneClip} Frame 1Symbol 182 MovieClip {StartStationClip}

Special Tags

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

Labels

"preloader_check"Symbol 86 MovieClip {_fla.fgjpre_as3_bomb_preloader_2} Frame 3




http://swfchan.com/23/113971/info.shtml
Created: 11/3 -2019 05:08:07 Last modified: 11/3 -2019 05:08:07 Server time: 14/11 -2024 23:50:53