Created
December 10, 2010 21:38
-
-
Save benbjohnson/736869 to your computer and use it in GitHub Desktop.
Pure AS3 Text File Embed
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.utils.ByteArray; | |
[Embed(source="strings.txt", exportSymbol="EmbeddedText", mimeType="application/octet-stream")] | |
public class EmbeddedText extends ByteArray | |
{ | |
} | |
} |
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.text.TextField; | |
[SWF(width="800", height="600")] | |
public class EmbedExample extends Sprite | |
{ | |
public function EmbedExample() | |
{ | |
var textfield:TextField = new TextField(); | |
textfield.text = (new EmbeddedText()).toString(); | |
addChild(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
foo=bar | |
baz=bat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment