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; | |
public class Application extends Sprite | |
{ | |
/** Constructor. **/ | |
public function Application() | |
{ |
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.DisplayObject; | |
import flash.display.Graphics; | |
import flash.display.MovieClip; | |
import flash.display.Sprite; | |
import flash.display.StageAlign; | |
import flash.display.StageScaleMode; | |
import flash.events.Event; | |
import flash.events.ProgressEvent; |
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.Graphics; | |
import flash.display.TextField; | |
public class MyAppPreloader extends Preloader | |
{ | |
/** Text display of progress. **/ | |
protected var tf: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
package | |
{ | |
import flash.display.Shape; | |
import flash.events.Event; | |
public class InvalidationPattern | |
{ | |
protected const USE_DEFERRED_VALIDATION:Boolean = true; | |
protected var tickerShape:Shape; |
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.NativeWindow; | |
import flash.geom.Point; | |
import mx.core.ScrollPolicy; | |
import mx.core.Window; | |
public class AutoSizedWindow extends Window | |
{ |
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
<!-- The root of the XML needs to support namespaces that map to packages. --> | |
<mb:ResourceLibrary | |
xmlns:mb="com.mockingbirdgames.document.*" | |
xmlns:tweaks="com.mockingbirdgames.document.tweaks.*" | |
xmlns:behaviors="com.playmockingbird.behaviors.*" | |
> | |
<!-- We use shorthand for setting the contents of a child element. --> | |
<!-- Instead of: <mb:SpriteCollection id="sprites"/> --> | |
<mb:sprites> |
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
/** This base class works for both players and enemies, as far as items are concerned. **/ | |
public class Character | |
{ | |
/** This is a list of items equiped on the character. **/ | |
public var equipedItems:Array = [ ]; | |
/** Equips an item on the character, unequiping it from its current owner. **/ | |
public function equip(item:Item):void | |
{ | |
if (item.owner) item.owner.unequip(item); // unequip item from its current owner |
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 | |
{ | |
public class MyCustomControl | |
{ | |
protected var someDependency:Object; | |
[Bindable] | |
public function get someProperty():Object { return null; } | |
public function set someProperty(value:Object):void | |
{ |
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 private_injection; | |
class ClassWithPrivateInjection | |
{ | |
include "inject.include.as"; | |
private var mySecretWord:String; | |
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 xml:XML = <root><child name="one"/></root>; | |
var name:String = "one"; | |
var matches:XMLList = xml.child.(@name == name); | |
trace(matches.length()); // 0 | |
var nameValue:String = name; | |
matches = xml.child.(@name == nameValue); | |
trace(matches.length()); // 1 |
OlderNewer