This file contains 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
class Main extends Sprite | |
{ | |
private var shape:Shape; | |
public function new() | |
{ | |
super(); | |
#if iphone | |
Lib.current.stage.addEventListener(Event.RESIZE, init); | |
#else |
This file contains 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 static var MAXIMUM_POOL_LENGTH:uint = 5000; | |
private static var POOL:Array = []; | |
public function SphericalCoordinates(azimuth:Number = 0, elevation:Number = 0, | |
radius:Number = 1) { | |
this.elevation = elevation; | |
this.azimuth = azimuth; | |
this.radius = radius; | |
} |
This file contains 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
protected function loader_completeHandler(event:Event):void { | |
var loaderInfo:LoaderInfo = event.currentTarget as LoaderInfo; | |
var bytes:ByteArray = loaderInfo.bytes; | |
var definitionFinder:DefinitionFinder = new DefinitionFinder(bytes); | |
var definitions:Array = definitionFinder.getDefinitionNames(); | |
log(" defs:\r" + String(definitions)); | |
for (var i:int = 0; i < definitions.length; i++) { | |
var defName:String = definitions[i]; |
This file contains 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 decode(async: Boolean = true):void { | |
if (_decoded) | |
return; | |
_lenght = _bundle.atfTextures.length; | |
_counter = 0; | |
var me: StarlingWrapper = this; | |
for (var i: int = 0; i < _lenght; i++) { | |
var atf: ByteArray = _bundle.atfTextures[i]; | |
if (async) { | |
Texture.fromAtfData(atf, 1, true, createCallBack(i, atf)); |
This file contains 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
public class CreatureBubbles extends Sprite { | |
//-------------------------------------------------------------------------- | |
// | |
// Constructor | |
// | |
//-------------------------------------------------------------------------- | |
/** | |
* @private |
This file contains 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 initHandlers():void { | |
NativeApplication.nativeApplication.addEventListener(KeyboardEvent.KEY_DOWN, checkKeypress); | |
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, deactivateListener) | |
} | |
public function checkKeypress(event:KeyboardEvent):void { | |
switch (event.keyCode){ | |
case Keyboard.BACK: | |
event.preventDefault(); | |
NativeApplication.nativeApplication.exit(); |
This file contains 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
//////////////////////////////////////////////////////////////////////////////// | |
// | |
// © 2010 SOME | |
// | |
//////////////////////////////////////////////////////////////////////////////// | |
package some.gui.display.component { | |
import some.core.controllers.IBaseController; | |
import some.core.display.DisplayObjectContainerProxy; |
This file contains 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 some.gui.display.component { | |
import some.core.controllers.IBaseController; | |
import some.core.display.DisplayObjectContainerProxy; | |
import some.core.managers.process.IProgressProcessable; | |
import some.core.utils.ClassUtils; | |
import some.core.utils.UID; | |
import some.gui.controller.ComponentController; | |
import flash.errors.IllegalOperationError; |
This file contains 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 ru.k0t0vich.utils.math { | |
import flash.geom.Point; | |
public class IntersectUtil { | |
public static function getLinesIntersectionPoint(a1:Point, a2:Point, b1:Point, b2:Point):Point { | |
var d:Number = (a1.x - a2.x) * (b2.y - b1.y) - (a1.y - a2.y) * (b2.x - b1.x); | |
var da:Number = (a1.x - b1.x) * (b2.y - b1.y) - (a1.y - b1.y) * (b2.x - b1.x); | |
var db:Number = (a1.x - a2.x) * (a1.y - b1.y) - (a1.y - a2.y) * (a1.x - b1.x); |
This file contains 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 k0t0vich.utils.net.tar { | |
import flash.events.EventDispatcher; | |
import flash.utils.ByteArray; | |
import flash.utils.IDataInput; | |
public class TarParser extends EventDispatcher { | |
private var inputStream: IDataInput; | |
public function TarParser(bytes: IDataInput) { | |
super(); |
OlderNewer