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
/** | |
* This example sets up an asynchronous process that will complete with a | |
* complete signal | |
*/ | |
public class Example | |
{ | |
private var _complete:Signal; | |
public function Example() | |
{ |
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 var index; | |
private function loadPanels():void | |
{ | |
for (var i:Number = 0; i < PANELS.length; i++) | |
{ | |
index = i; | |
loadPanel(); | |
} | |
} |
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 var _view:IView; | |
private var _notifications:Array; | |
final protected function registerObserver(notificationName:String, closure:Function):void | |
{ | |
_view ||= View.getInstance(); | |
_view.registerObserver(notificationName, new Observer(closure, this)); | |
(_notifications ||= []).push(notificationName); | |
} |
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
class NoCake | |
{ | |
private var _clicked:Signal; | |
private var _data:Object; | |
public function NoCake(mc:MovieClip, data:Object) | |
{ | |
_clicked = new Signal(Object); | |
_data = data; | |
mc.addEventListener(MouseEvent.CLICK, onClick); |
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
// the code | |
class eg | |
{ | |
public var width:int; | |
public var height:int; | |
public function eg(width:int, height:int) | |
{ | |
this.width = width; |
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
/** | |
* consolidate the LZMA encoder and decoders from @joa and @inspirit | |
*/ | |
package | |
{ | |
import apparat.lzma.LZMADecoder; | |
import ru.inspirit.lzma.LZMAEncoder; | |
import flash.utils.ByteArray; |
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 alecmce.anim | |
{ | |
import org.osflash.signals.ISignal; | |
/** | |
* Describes an Animation in general terms. | |
*/ | |
public interface Anim | |
{ | |
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 flash.display.BitmapData; | |
import flash.display.Sprite; | |
import flash.display.StageDisplayState; | |
import flash.events.MouseEvent; | |
import flash.text.TextField; | |
import flash.text.TextFormat; |
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 list:Vector.<Point> = new Vector.<Point>(); | |
list[0] = new Point(1, 1); | |
list[1] = new Point(-1, 1); | |
list[2] = new Point(-1, -1); | |
list[3] = new Point(1, -1); | |
var polygon:Polygon = new Polygon(list); | |
// INTERPRETATION 1: | |
// polygon is defined by vertices and represents a square the sides of which lie parallel |
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 alecmce.ui.misc | |
{ | |
import flash.display.Graphics; | |
import flash.display.GraphicsPath; | |
import flash.geom.Rectangle; | |
public class Scribble | |
{ | |
public var spacing:Number; | |
public var thickness:Number; |