flash on 2010-12-9
♥0 |
Line 47 |
Modified 2010-12-09 18:38:40 |
MIT License
archived:2017-03-20 04:32:11
ActionScript3 source code
/**
* Copyright www0z0k ( http://wonderfl.net/user/www0z0k )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/g9nY
*/
package {
import flash.display.Shape;
import flash.display.Sprite;
public class FlashTest extends Sprite {
private var _mask:Sprite;
private var background:Sprite;
public static const SIDE:int = 250;
private var allpicks:Vector.<SlidingElement>;
private var picksOnStage:Array;
public function FlashTest() {
init();
}
private function init():void{
_mask = new Sprite();
background = new Sprite();
addChild(background);
background.x = 50;
background.y = 50;
_mask.x = 50;
_mask.y = 50;
with(_mask.graphics){
beginFill(0);
drawRect(0,0,SIDE,SIDE+2);
endFill();
}
this.mask = _mask;
//background.addChild(genRect(0x0000ff));
}
private function genRect(col:int, w:int = 100):Shape{
var tempShape:Shape = new Shape();
with(tempShape.graphics){
beginFill(col);
lineStyle(1);
drawRect(0,0,w,SIDE);
endFill();
}
return tempShape;
}
}
}
import flash.display.Sprite;
import flash.events.Event;
class SlidingElement extends Sprite{
public var totalFrames:int = 1;
public var currentFrame:int = 12;
public function SlidingElement() {
}
}