Permalink
Browse files

Library moved to new root folder. VO object deleted. (implemented as …

…private class)

 (I will move all utility/helper libraries started by me to this folder)
  • Loading branch information...
1 parent 33b1f41 commit bf0f66530bf77014bbcd3bad9a24368bc147de02 @MindScriptAct committed Feb 19, 2014
View
@@ -22,9 +22,11 @@
<!-- Build options -->
<build>
<option accessible="False" />
+ <option advancedTelemetry="False" />
<option allowSourcePathOverlap="False" />
<option benchmark="False" />
<option es="False" />
+ <option inline="False" />
<option locale="" />
<option loadConfig="" />
<option optimize="True" />
@@ -76,7 +78,7 @@
</compileTargets>
<!-- Paths to exclude from the Project Explorer tree -->
<hiddenPaths>
- <!-- example: <hidden path="..." /> -->
+ <hidden path="obj" />
</hiddenPaths>
<!-- Executed before build -->
<preBuildCommand />
@@ -86,6 +88,7 @@
<options>
<option showHiddenPaths="False" />
<option testMovie="Default" />
+ <option testMovieCommand="" />
</options>
<!-- Plugin storage -->
<storage />
@@ -1,8 +1,7 @@
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
-package org.signalsExpress {
+package msa.signalsExpress {
import flash.utils.Dictionary;
import flash.utils.getQualifiedClassName;
-import org.signalsExpress.vo.SignalHandlerVO;
/**
* Alternative to flash events. Re-imagination of as3-Signals (Robert Penner)
@@ -241,4 +240,17 @@ public class SignalExpress {
}
}
+}
+
+/**
+ * Value object for handler data.
+ */
+class SignalHandlerVO {
+
+ public var handler:Function;
+ public var once:Boolean;
+
+ public var next:SignalHandlerVO;
+ public var prev:SignalHandlerVO;
+
}
@@ -1,17 +0,0 @@
-// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
-package org.signalsExpress.vo {
-
-/**
- * Value object for handler data.
- * @author Raimundas Banevicius (http://www.mindscriptact.com/)
- */
-public class SignalHandlerVO {
-
- public var handler:Function;
- public var once:Boolean;
-
- public var next:SignalHandlerVO;
- public var prev:SignalHandlerVO;
-
-}
-}
View
@@ -1,7 +1,6 @@
package {
import flash.display.Sprite;
import flash.events.Event;
-import org.osflash.signals.Signal;
import senders.ParentSender;
import senders.Sender;
@@ -22,37 +21,41 @@ public class Main extends Sprite {
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
- var sender1:Sender = new Sender("Simple signal", 0x80FF00);
+ var sender1:Sender = new Sender("A1:\nSimple signal", 0x80FF00);
addChild(sender1);
sender1.clicked.add(handleSingleSimpleClick);
+ sender1.x = 50;
+ sender1.y = 10;
- var sender2:Sender = new Sender("One shot signal", 0xFF8040);
+ var sender2:Sender = new Sender("A2:\nOne shot signal", 0xFF8040);
addChild(sender2);
sender2.x = 400;
+ sender2.y = 10
sender2.clicked.add(handleSingleSimpleClick, true);
- var sender3:ParentSender = new ParentSender("Parent signal no bubbling", "Child signal, no bubbling", 0x80FFFF, 0x9B9BFF, false);
+ var sender3:ParentSender = new ParentSender("B11:\nParent signal no bubbling", "B12:\nChild signal, no bubbling", 0x80FFFF, 0x9B9BFF, false);
addChild(sender3);
sender3.x = 60;
sender3.y = 200;
sender3.clicked.add(handleSimpleClick);
- var sender4:ParentSender = new ParentSender("Parent signal WITH bubbling", "Child signal, WITH bubbling", 0x20B7FF, 0xFF91FF, true);
+ var sender4:ParentSender = new ParentSender("B21:\nParent signal WITH bubbling", "B22:\nChild signal, WITH bubbling", 0x20B7FF, 0xFF91FF, true);
addChild(sender4);
sender4.x = 400;
sender4.y = 200;
sender4.clicked.add(handleSimpleClick);
- var sender5:Sender = new Sender("Bubble through unrelated object, listener added, and bubling from unrelated object added.", 0xD3A8FF);
+ var sender5:Sender = new Sender("C1:\nBubble through unrelated object,\n listener added for C1 to react to C1 click", 0xD3A8FF);
addChild(sender5);
- sender5.x = 60;
+ sender5.x = 50;
sender5.y = 400;
+
sender5.clicked.add(handleSimpleClick);
- var sender6:Sender = new Sender("Bubble from unrelated object, listener NOT added", 0xFFA8FF);
+ var sender6:Sender = new Sender("C2:\nBubble from unrelated object,\n listener added for C1 to react to C2 click", 0xFFA8FF);
addChild(sender6);
- sender6.x = 180;
- sender6.y = 430;
+ sender6.x = 400;
+ sender6.y = 400;
sender5.clicked.addBubblingFrom(sender6.clicked);
}
@@ -4,7 +4,7 @@ import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
-import org.signalsExpress.SignalExpress;
+import msa.signalsExpress.SignalExpress;
/**
@@ -14,7 +14,8 @@ import org.signalsExpress.SignalExpress;
public class ChildSender extends Sprite {
private var label:String;
- public var clicked:SignalExpress = new SignalExpress(String);
+ public var clicked:SignalExpress
+ = new SignalExpress(String);
public function ChildSender(label:String, color:uint = 0xC0C0C0) {
this.label = label;
@@ -4,7 +4,7 @@ import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
-import org.signalsExpress.SignalExpress;
+import msa.signalsExpress.SignalExpress;
/**
* COMMENT
@@ -4,8 +4,7 @@ import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
-import org.osflash.signals.Signal;
-import org.signalsExpress.SignalExpress;
+import msa.signalsExpress.SignalExpress;
/**
* COMMENT
@@ -26,7 +25,7 @@ public class Sender extends Sprite {
var rectangle:Shape = new Shape();
rectangle.graphics.lineStyle(0.1, 0x000000);
rectangle.graphics.beginFill(color);
- rectangle.graphics.drawRect(0, 0, 100, 100);
+ rectangle.graphics.drawRect(0, 0, 230, 100);
rectangle.graphics.endFill();
this.addChild(rectangle);

0 comments on commit bf0f665

Please sign in to comment.