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 | |
{ | |
import org.osflash.signals.Signal; | |
import flash.display.MovieClip; | |
import flash.events.Event; | |
import flash.utils.getDefinitionByName; | |
/** | |
* The EnterFrameDispatcher is injected into the Main class through the [Frame] MetaData tag. |
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 performancetests | |
{ | |
import flash.events.Event; | |
public class EventsTest | |
{ | |
private const COMPLETE:String = Event.COMPLETE; | |
public var iterations:uint = 5; | |
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 performancetests | |
{ | |
import flash.events.Event; | |
public class CapturedEventsTest | |
{ | |
private const COMPLETE:String = Event.COMPLETE; | |
public var iterations:uint = 5; | |
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 | |
{ | |
import flash.display.Bitmap; | |
import flash.display.BitmapData; | |
import flash.events.Event; | |
/** | |
* A pretty quick implementation of Conway's Game Of Life | |
* | |
* @author Alec McEachran |
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 | |
{ | |
import flash.display.Sprite; | |
import flash.events.Event; | |
import flash.text.TextField; | |
public class EnterFrameIsConfusing extends Sprite | |
{ | |
private var output:TextField; | |
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
// meh... | |
var iAmAStringInstance :String = ""; | |
var iAmANullString :String = null; | |
if(iAmAStringInstance) | |
{ | |
trace("iAmAStringInstance is neither null nor empty"); | |
} | |
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
var ray:Ray3D = new Ray3D(0, 0, -140, 0, 0, 100); | |
var sphere:Sphere3D = new Sphere3D(40, 0, 0, 0); | |
var alpha:Number = sphere.intersectRay(ray); | |
trace(alpha); | |
// outputs 0.6428719030100183 | |
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
// hex definition | |
public static const FLAG_1:uint = 0x1; | |
public static const FLAG_2:uint = 0x2; | |
public static const FLAG_3:uint = 0x4; | |
public static const FLAG_4:uint = 0x8; | |
public static const FLAG_5:uint = 0x10; | |
public static const FLAG_6:uint = 0x20; | |
public static const FLAG_7:uint = 0x40; | |
public static const FLAG_8:uint = 0x80; |
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 ; | |
import flash.display.Sprite; | |
import flash.display.BitmapData; | |
import flash.display.Bitmap; | |
import flash.utils.ByteArray; | |
import flash.utils.Endian; |
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
def inspect(dir) | |
Dir.foreach(dir) do |subdir| | |
if (FileTest.directory?(subdir)) | |
inspect(subdir) | |
end | |
end | |
do_something_interesting_with_directory(dir) | |
end |
OlderNewer