scroll2
/**
* Copyright Scmiz ( http://wonderfl.net/user/Scmiz )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/gdMh
*/
package {
import flash.display.Graphics;
import flash.display.Sprite;
import flash.events.Event;
public class FlashTest extends Sprite {
private var _frame:uint;
public function FlashTest() {
this.addEventListener(Event.ENTER_FRAME, proc);
}
private function proc(e:Event):void {
++_frame;
if (_frame == 60) {
_frame = 0;
}
var g:Graphics = this.graphics;
g.clear();
g.beginFill(0x000000);
g.drawRect(0, 0, 465, 465);
g.endFill();
g.lineStyle(1, 0xFFFFFF);
var centerX:Number = 232.5;
var centerY:Number = -35;
var widthMinHalf:Number = 50.0;
var widthMaxHalf:Number = 200.0;
g.moveTo(centerX - widthMaxHalf, 465);
g.lineTo(centerX - widthMinHalf, centerY);
g.moveTo(centerX + widthMaxHalf, 465);
g.lineTo(centerX + widthMinHalf, centerY);
for (var index:uint = 0; index < 4; ++index) {
var y:Number = (index * 120) + (_frame * 2.0);
y = y * (y * 0.003);
var size:Number = widthMinHalf + (y * 0.3);
g.moveTo(centerX - size, y + centerY);
g.lineTo(centerX + size, y + centerY);
}
}
}
}