Created
February 13, 2014 01:06
-
-
Save girasquid/8967802 to your computer and use it in GitHub Desktop.
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 text { | |
import flash.text.TextFormat; | |
public class SimpleFormat extends TextFormat { | |
public function SimpleFormat(options:Object):void { | |
for(var k:Object in options) { | |
if(this.hasOwnProperty(k)) { | |
this[k] = options[k]; | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This makes formatting your text a one-liner that you can use keyword arguments for.
Example: