STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229672 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2596 · P5191 |
This is the info page for Flash #46336 |
gravity friction quantity |
0 |
ActionScript [AS1/AS2]
Frame 1function makeBalls(numBalls) { var _local1 = _root; var _local2 = numBalls; j = 0; while (j < 20) { _local1["mc_ball" + j].removeMovieClip(); j++; } i = 0; while (i < (_local2 - 1)) { mc_ball.duplicateMovieClip("mc_ball" + i, i); _local1["mc_ball" + i]._x = initX; _local1["mc_ball" + i]._y = initY; _local1["mc_ball" + i].velocityY = 10 * Math.random(); _local1["mc_ball" + i].velocityX = 10 * Math.random(); _local1["mc_ball" + i].velocityZ = 10 * Math.random(); _local1["mc_ball" + i].oldX = initX; _local1["mc_ball" + i].oldY = initY; _local1["mc_ball" + i].oldZ = initY; _local1["mc_ball" + i].time = 1; i++; } } var time; var velocity; var blnHasBounced; var previousY; var previousX; var mGravity; var mFriction; var blnChanged; mc_ball._visible = false; var initX = 20; var initY = 20; if (!blnChanged) { sliderFriction.slideBar._x = 190; sliderGravity.slideBar._x = 50; sliderBalls.slideBar._x = 120; } mFriction = sliderFriction.slideBar._x / 200; mGravity = sliderGravity.slideBar._x / 10; mBalls = sliderBalls.slideBar._x / 10; makeBalls(mBalls); sliderGravity.onEnterFrame = function () { gravity = this.slideBar._x / 10; _root.mGravity = gravity; this.txtCounter = gravity; }; sliderFriction.onEnterFrame = function () { friction = this.slideBar._x / 200; _root.mFriction = friction; this.txtCounter = friction; }; sliderBalls.onEnterFrame = function () { balls = Math.floor(this.slideBar._x / 10); _root.mBalls = balls; this.txtCounter = balls; };Instance of Symbol 13 MovieClip "sliderGravity" in Frame 1/* no clip actions */Instance of Symbol 13 MovieClip "sliderFriction" in Frame 1/* no clip actions */Instance of Symbol 13 MovieClip "sliderBalls" in Frame 1/* no clip actions */Instance of Symbol 2 MovieClip [mc_ball] "mc_ball" in Frame 1onClipEvent (enterFrame) { velocityY = (_root.mGravity * time) + velocityY; velocityX = velocityX; velocityZ = velocityZ; newY = oldY + (velocityY * time); newX = oldX + (velocityX * time); newZ = oldZ + (velocityZ * time); trace(velocityY); if (Math.abs(velocityY) < 0.001) { velocityY = 0; } if (Math.abs(velocityX) < 0.001) { velocityX = 0; } if (Math.abs(velocityZ) < 0.001) { velocityZ = 0; } if (newY >= 200) { newY = 200; velocityY = -1 * velocityY; velocityX = velocityX * _root.mFriction; velocityZ = velocityZ * _root.mFriction; } if (newY <= 5) { newY = 5; velocityY = -1 * velocityY; } if (newX >= 445) { newX = 445; velocityX = -1 * velocityX; } if (newX <= 5) { newX = 5; velocityX = -1 * velocityX; } if (newZ >= 100) { newZ = 100; velocityZ = -1 * velocityZ; } if (newZ <= 5) { newZ = 5; velocityZ = -1 * velocityZ; } oldY = newY; oldX = newX; oldZ = newZ; this._alpha = ((newZ / 100) * 30) + 70; this._height = ((newZ / 100) * 8) + 2; this._width = ((newZ / 100) * 8) + 2; this._y = newY; this._x = newX; }Frame 2stop();Symbol 5 Buttonon (press) { blnChanged = true; gotoAndPlay (1); }Symbol 13 MovieClip Frame 1this.slideBar.onPress = function () { var _local1 = this; startDrag (_local1, false, 0, _local1._y, 200, _local1._y); }; this.slideBar.onRelease = (slider.slideBar.onReleaseOutside = function () { stopDrag(); });
Library Items
Symbol 1 Graphic | Used by:2 | |
Symbol 2 MovieClip [mc_ball] | Uses:1 | Used by:Timeline |
Symbol 3 Graphic | Used by:Timeline | |
Symbol 4 Graphic | Used by:5 | |
Symbol 5 Button | Uses:4 | Used by:Timeline |
Symbol 6 Font | Used by:7 8 | |
Symbol 7 EditableText | Uses:6 | Used by:Timeline |
Symbol 8 EditableText | Uses:6 | Used by:13 |
Symbol 9 Graphic | Used by:10 | |
Symbol 10 MovieClip | Uses:9 | Used by:13 |
Symbol 11 Graphic | Used by:12 | |
Symbol 12 Button | Uses:11 | Used by:13 |
Symbol 13 MovieClip | Uses:8 10 12 | Used by:Timeline |
Instance Names
"sliderGravity" | Frame 1 | Symbol 13 MovieClip |
"sliderFriction" | Frame 1 | Symbol 13 MovieClip |
"sliderBalls" | Frame 1 | Symbol 13 MovieClip |
"mc_ball" | Frame 1 | Symbol 2 MovieClip [mc_ball] |
"slideBar" | Symbol 13 MovieClip Frame 1 | Symbol 12 Button |
Special Tags
ExportAssets (56) | Timeline Frame 1 | Symbol 2 as "mc_ball" |
ExportAssets (56) | Timeline Frame 1 | Symbol 2 as "mc_ball" |
ExportAssets (56) | Timeline Frame 2 | Symbol 2 as "mc_ball" |
Dynamic Text Variables
txtCounter | Symbol 8 EditableText | "0" |
|