forked from: flash on 2011-3-11
forked from flash on 2011-3-11 (diff: 39)
ActionScript3 source code
/**
* Copyright John_Blackburne ( http://wonderfl.net/user/John_Blackburne )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/nLPw
*/
// forked from John_Blackburne's flash on 2011-3-11
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
[SWF(width = "400", height = "400", frameRate = "60", backgroundColor = "#aaaaaa")]
public class FlashTest extends Sprite {
var bd:BitmapData, iCount:int;
function FlashTest() {
iCount = 0;
bd = new BitmapData(100, 100, false, 0xFF0000);
var bm1:Bitmap = new Bitmap(bd);
var bm2:Bitmap = new Bitmap(bd);
var Sprite1:Sprite = new Sprite();
var Sprite2:Sprite = new Sprite();
Sprite2.x = 101;
addChild(Sprite1);
addChild(Sprite2);
Sprite1.addChild(bm1);
Sprite2.addChild(bm2);
addEventListener(Event.ENTER_FRAME, Refresh);
}
function Refresh(e:Event):void {
iCount++;
bd.setPixel((iCount * 1.5) % 100, (iCount * 1.6) % 100, 0);
}
}
}
