Skip to content

Instantly share code, notes, and snippets.

View debreuil's full-sized avatar

Robin Debreuil debreuil

View GitHub Profile
package
{
import Components.KeypadButton;
import DDW.Components.DefaultButton;
import DDW.Screens.Screen;
import flash.display.DisplayObject;
import flash.display.Sprite;
public class Calculator extends Screen
{
@debreuil
debreuil / gist:724337
Created December 1, 2010 22:19
moveToTL.jsfl
// move all elements selected in the library to 0,0
fl.outputPanel.clear();
var trace = fl.trace;
fl.showIdleMessage(false);
var doc = fl.getDocumentDOM();
var lib = doc.library;
@debreuil
debreuil / SevenSegmentDisplay.cs
Created October 30, 2010 21:46
Simulated 7 segment display for Swf2XNA
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DDW.V2D;
using V2DRuntime.Attributes;
using Microsoft.Xna.Framework.Graphics;
using HeadGame.Screens;
using DDW.Display;
private function compareData(editedVO:AdminDataVO):void
{
var currentStoredVO:AdminDataVO = editingModel.itemBeingEdited;
if(!comparator.areObjectsEqual(currentStoredVO, editedVO))
{
var keepHandler:Function = function():void { editingModel.updateItem(editedVO) };
var discardHandler:Function = function():void {};
override public function areObjectsEqual(accountVO1:AdminDataVO, accountVO2:AdminDataVO):Boolean
{
var result:Boolean = false;
if( (accountVO1.password == accountVO2.password ) &&
(accountVO1.email == accountVO2.email ) &&
(accountVO1.serverID == accountVO2.serverID ) &&
(accountVO1.dataSetID == accountVO2.dataSetID ) &&
(accountVO1.pluginMixID == accountVO2.pluginMixID ) &&
(accountVO1.adminPluginMixID == accountVO2.adminPluginMixID ) &&
var td:TypeDescriptor = new TypeDescriptor();
var s:String = getQualifiedClassName(_classType);
var xml:XML = describeType(s);
var t2:TypeDescriptor = td.fromXML(xml, loaderInfo.applicationDomain);
// t2.description.extendsClass.type == "Object"
// t2.superClasses == ["Object"]