Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Hope for the best, plan for the worst.

Mr. Phantom agentphantom

💭
Hope for the best, plan for the worst.
View GitHub Profile
@agentphantom
agentphantom / FirebaseConverter.as
Last active Feb 22, 2017
Add the node key as a value to an Object from a Firebase database response.
View FirebaseConverter.as
private function dataLoaded(event:flash.events.Event):void
{
//The JSON generated by Firebase contains the id as the key, we use this function to add it to our Objects
var rawData:Object = JSON.parse(event.currentTarget.data);
var myArray:Array = new Array();
for (var parent:String in rawData)
{
var tempObject:Object = new Object();
@agentphantom
agentphantom / FeathersUIEmoji.as
Last active May 2, 2018
Showing emojis in FeathersUI
View FeathersUIEmoji.as
var label:Label = new Label();
label.x = 50;
label.y = 100;
label.text = "Sup 🍔";
label.textRendererFactory = function():ITextRenderer
{
var renderer:TextFieldTextRenderer = new TextFieldTextRenderer();
renderer.textFormat = new TextFormat("_sans", 40, 0xFFFFFF);
return renderer;
};
You can’t perform that action at this time.