Skip to content

Instantly share code, notes, and snippets.

View destroytoday's full-sized avatar

Jonnie Hallman destroytoday

View GitHub Profile
package {
import flash.display.Sprite;
public class Test extends Sprite {
public function Test() {
for (var i:uint = 0; i < 500; ++i) {
if (i * 0.01 != i / 100) {
trace(i);
}
package {
import org.osflash.signals.Signal;
public class ApplicationSignalBus
{
public const configPathChanged:Signal = new Signal(File);
public const stylesheetChanged:Signal = new Signal(StyleSheet);
public const accountLoggedIn:Signal = new Signal(AccountVO);
package {
import flash.utils.setTimeout;
import org.osflash.signals.Signal;
import org.robotlegs.mvcs.Mediator;
public class ViewMediator extends Mediator {
[Inject]
public var signalBus:ApplicationSignalBus;
package
{
public class BaseMediator extends Mediator
{
[Inject]
public var signalBus:ApplicationSignalBus;
[Inject]
public var styleController:StyleController;
package
{
import flash.display.NativeMenuItem;
import flash.display.Sprite;
import flash.events.KeyboardEvent;
import flash.ui.ContextMenu;
import flash.ui.Keyboard;
public class ContextMenuHotkeyBug extends Sprite
{
package com.destroytoday.destroytwitter.signals
{
public class ApplicationSignalBusTest
{
protected var signalBus:ApplicationSignalBus;
public function ApplicationSignalBusTest()
{
}
package com.destroytoday.desktop
{
import com.destroytoday.desktop.KonamiCode;
import flash.display.Sprite;
public class KonamiCodeTest extends Sprite
{
public var konamiCode:KonamiCode;
protected function statusEnterframeHandler(event:Event):void
{
switch (view.status.text) {
case "starting up":
view.status.text = "starting up ";
break;
case "starting up ":
view.status.text = "starting up.";
break;
case "starting up.":
public function openLinkInBackground(url:String):void
{
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
navigateToURL(new URLRequest(url));
}
protected function applicationDeactivateHandler(event:Event):void
{
NativeApplication.nativeApplication.removeEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
override protected function commitProperties():void
{
if (dirtyDataFlag)
{
trace("data changed, yo!");
}
super.commitProperties();
}