This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Vector3( x, y, z ) | |
{ | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
this.tx = 0; | |
this.ty = 0; | |
this.tz = 0; | |
this.sinRX = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////// | |
// | |
// BUILT BY EDGAR | |
// | |
// Clock.js | |
// | |
// http://builtbyedgar.com/ | |
// https://twitter.com/BuiltByEdgar | |
// https://github.com/BuiltByEdgar | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bmd:BitmapData = new BitmapData(myBitmap.height, myBitmap.width, false, 0x000000); | |
var matrix:Matrix = new Matrix(); | |
matrix.translate(-myBitmap.width / 2, -myBitmap.height / 2); | |
matrix.rotate(90 * (Math.PI / 180)); | |
matrix.translate(myBitmap.height / 2, myBitmap.width / 2); | |
bmd.draw(myBitmap, matrix); | |
var bm:Bitmap = new Bitmap(bmd); | |
var sp:Sprite = new Sprite(); | |
sp.addChild(bm); | |
addChild(sp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bringToFront(obj:DisplayObject):void | |
{ | |
var pos:Number = this.getChildIndex(obj); | |
while(pos < this.numChildren - 1) | |
{ | |
var next:DisplayObject = this.getChildAt(pos + 1) as DisplayObject; | |
this.swapChildren(obj, next); | |
pos = this.getChildIndex(obj); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function setRegistration(obj:DisplayObject):void | |
{ | |
obj.x = -obj.width >> 1; | |
obj.y = -obj.width >> 1; | |
} |
NewerOlder