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 pixelDataURL (r, g, b) { | |
| return 'data:image/gif;base64,' + | |
| btoa( | |
| [71,73,70,56,57,97,1,0,1,0,128,0,0,r,g,b,0,0,0,44,0,0,0,0,1,0,1,0,0,2,2,68,1,0,59] | |
| .map(c => String.fromCharCode(c)) | |
| .join('') | |
| ) | |
| ; | |
| } |
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
| package { | |
| import com.bit101.components.PushButton; | |
| import com.bit101.components.TextArea; | |
| import com.codeazur.as3swf.SWF; | |
| import com.codeazur.as3swf.tags.*;//TagPlaceObject; | |
| import flash.display.DisplayObject; | |
| import flash.display.DisplayObjectContainer; | |
| import flash.display.Loader; | |
| import flash.display.Sprite; | |
| import flash.events.Event; |
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 w:int = bitmapData.width, w1:int = w + 1, w2:int = w + 2, h:int = bitmapData.height, h1:int = h + 1, length:int = w1 * h1; | |
| var integralImage:Vector.<int> = new Vector.<int> (length, true); | |
| var vec:Vector.<uint> = bitmapData.getVector (bitmapData.rect); | |
| var i/*nput*/:int = 0, o/*utput*/:int = w2, s:int; | |
| for (var y:int = 0; y < h; y++, o++) { | |
| s = 0; | |
| for (var x:int = 0; x < w; x++, o++, i++) { |
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
| package com.realaxy.operators{ | |
| import flash.utils.Dictionary; | |
| internal class Pool { | |
| private var instances : Dictionary =new Dictionary() ; | |
| private var instanceCounts : Dictionary =new Dictionary() ; | |
| public function getInstance ( type : Class ) : * { | |
| var cache : Vector.<*>; | |
| if ( instanceCounts[type] ) { |