msg-chumby-display 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/msg-chumby-daemon +6 -1
- data/etc/msgchumbydaemonrc +7 -4
- data/lib/msg-chumby-daemon/http-xml-server.rb +20 -1
- data/widget/currentpower/currentpower Report.txt +1 -1
- data/widget/currentpower/currentpower.swd +0 -0
- data/widget/currentpower/currentpower.swf +0 -0
- data/widget/last_reading/DataArray.as +116 -0
- data/widget/last_reading/Gluehlampe.fla +0 -0
- data/widget/last_reading/Gluehlampe.swf +0 -0
- data/widget/last_reading/Gluehlampe_frames.fla +0 -0
- data/widget/last_reading/Gluehlampe_frames.swf +0 -0
- data/widget/last_reading/Makefile +30 -0
- data/widget/last_reading/Makefile.orig +60 -0
- data/widget/last_reading/README.rdoc +50 -0
- data/widget/last_reading/README.rtf +57 -0
- data/widget/last_reading/XmlParse.as +1 -0
- data/widget/last_reading/caurina/transitions/AuxFunctions.as +88 -0
- data/widget/last_reading/caurina/transitions/Equations.as +713 -0
- data/widget/last_reading/caurina/transitions/PropertyInfoObj.as +86 -0
- data/widget/last_reading/caurina/transitions/SpecialProperty.as +48 -0
- data/widget/last_reading/caurina/transitions/SpecialPropertyModifier.as +39 -0
- data/widget/last_reading/caurina/transitions/SpecialPropertySplitter.as +46 -0
- data/widget/last_reading/caurina/transitions/TweenListObj.as +227 -0
- data/widget/last_reading/caurina/transitions/Tweener.as +1121 -0
- data/widget/last_reading/caurina/transitions/properties/ColorShortcuts.as +471 -0
- data/widget/last_reading/caurina/transitions/properties/CurveModifiers.as +104 -0
- data/widget/last_reading/caurina/transitions/properties/DisplayShortcuts.as +158 -0
- data/widget/last_reading/caurina/transitions/properties/FilterShortcuts.as +516 -0
- data/widget/last_reading/caurina/transitions/properties/SoundShortcuts.as +83 -0
- data/widget/last_reading/caurina/transitions/properties/TextShortcuts.as +151 -0
- data/widget/last_reading/energietacho.fla +0 -0
- data/widget/last_reading/energietacho.swf +0 -0
- metadata +30 -4
@@ -0,0 +1,83 @@
|
|
1
|
+
/**
|
2
|
+
* properties.SoundShortcuts
|
3
|
+
* List of default special properties for Sounds
|
4
|
+
* The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
|
5
|
+
*
|
6
|
+
* @author Zeh Fernando, Nate Chatellier, Arthur Debert
|
7
|
+
* @version 1.0.0
|
8
|
+
*/
|
9
|
+
|
10
|
+
import caurina.transitions.Tweener;
|
11
|
+
|
12
|
+
class caurina.transitions.properties.SoundShortcuts {
|
13
|
+
|
14
|
+
/**
|
15
|
+
* There's no constructor.
|
16
|
+
*/
|
17
|
+
public function SoundShortcuts () {
|
18
|
+
trace ("This is an static class and should not be instantiated.")
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
|
23
|
+
*/
|
24
|
+
public static function init():Void {
|
25
|
+
|
26
|
+
// Normal properties
|
27
|
+
Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
|
28
|
+
Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
|
29
|
+
|
30
|
+
}
|
31
|
+
|
32
|
+
|
33
|
+
// ==================================================================================================================================
|
34
|
+
// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
|
35
|
+
|
36
|
+
// ----------------------------------------------------------------------------------------------------------------------------------
|
37
|
+
// _sound_volume
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Returns the current sound volume
|
41
|
+
*
|
42
|
+
* @param p_obj Object Sound object
|
43
|
+
* @return Number The current volume
|
44
|
+
*/
|
45
|
+
public static function _sound_volume_get (p_obj:Object):Number {
|
46
|
+
return p_obj.getVolume();
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Sets the sound volume
|
51
|
+
*
|
52
|
+
* @param p_obj Object Sound object
|
53
|
+
* @param p_value Number New volume
|
54
|
+
*/
|
55
|
+
public static function _sound_volume_set (p_obj:Object, p_value:Number):Void {
|
56
|
+
p_obj.setVolume(p_value);
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
// ----------------------------------------------------------------------------------------------------------------------------------
|
61
|
+
// _sound_pan
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Returns the current sound pan
|
65
|
+
*
|
66
|
+
* @param p_obj Object Sound object
|
67
|
+
* @return Number The current pan
|
68
|
+
*/
|
69
|
+
public static function _sound_pan_get (p_obj:Object):Number {
|
70
|
+
return p_obj.getPan();
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Sets the sound volume
|
75
|
+
*
|
76
|
+
* @param p_obj Object Sound object
|
77
|
+
* @param p_value Number New pan
|
78
|
+
*/
|
79
|
+
public static function _sound_pan_set (p_obj:Object, p_value:Number):Void {
|
80
|
+
p_obj.setPan(p_value);
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
/**
|
2
|
+
* properties.TextShortcuts
|
3
|
+
* Special properties for the Tweener class to handle MovieClip filters
|
4
|
+
* The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
|
5
|
+
*
|
6
|
+
* @author Zeh Fernando, Nate Chatellier, Arthur Debert
|
7
|
+
* @version 1.0.0
|
8
|
+
*/
|
9
|
+
|
10
|
+
import caurina.transitions.Tweener;
|
11
|
+
import caurina.transitions.AuxFunctions;
|
12
|
+
|
13
|
+
class caurina.transitions.properties.TextShortcuts {
|
14
|
+
|
15
|
+
/**
|
16
|
+
* There's no constructor.
|
17
|
+
*/
|
18
|
+
public function TextShortcuts () {
|
19
|
+
trace ("This is an static class and should not be instantiated.")
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
|
24
|
+
*/
|
25
|
+
public static function init():Void {
|
26
|
+
// Normal properties
|
27
|
+
Tweener.registerSpecialProperty("_text", _text_get, _text_set, undefined, _text_preProcess);
|
28
|
+
// Tweener.registerSpecialPropertyModifier("_text", _text_modifier, _text_get);
|
29
|
+
|
30
|
+
// TextFormat-based properties
|
31
|
+
Tweener.registerSpecialPropertySplitter("_text_color", _generic_color_splitter, ["_text_color_r", "_text_color_g", "_text_color_b"]);
|
32
|
+
Tweener.registerSpecialProperty("_text_color_r", _textFormat_property_get, _textFormat_property_set, ["color", true, "r"]);
|
33
|
+
Tweener.registerSpecialProperty("_text_color_g", _textFormat_property_get, _textFormat_property_set, ["color", true, "g"]);
|
34
|
+
Tweener.registerSpecialProperty("_text_color_b", _textFormat_property_get, _textFormat_property_set, ["color", true, "b"]);
|
35
|
+
Tweener.registerSpecialProperty("_text_indent", _textFormat_property_get, _textFormat_property_set, ["indent"]);
|
36
|
+
Tweener.registerSpecialProperty("_text_leading", _textFormat_property_get, _textFormat_property_set, ["leading"]);
|
37
|
+
Tweener.registerSpecialProperty("_text_leftMargin", _textFormat_property_get, _textFormat_property_set, ["leftMargin"]);
|
38
|
+
Tweener.registerSpecialProperty("_text_letterSpacing", _textFormat_property_get, _textFormat_property_set, ["letterSpacing"]);
|
39
|
+
Tweener.registerSpecialProperty("_text_rightMargin", _textFormat_property_get, _textFormat_property_set, ["rightMargin"]);
|
40
|
+
Tweener.registerSpecialProperty("_text_size", _textFormat_property_get, _textFormat_property_set, ["size"]);
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
// ==================================================================================================================================
|
46
|
+
// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
|
47
|
+
|
48
|
+
// ----------------------------------------------------------------------------------------------------------------------------------
|
49
|
+
// _text
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Returns the current frame number from the movieclip timeline
|
53
|
+
*
|
54
|
+
* @param p_obj Object MovieClip object
|
55
|
+
* @return Number The current frame
|
56
|
+
*/
|
57
|
+
public static function _text_get (p_obj:Object, p_parameters:Array, p_extra:Object):Number {
|
58
|
+
//return p_obj._currentFrame;
|
59
|
+
return -p_obj.text.length;
|
60
|
+
}
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Sets the timeline frame
|
64
|
+
*
|
65
|
+
* @param p_obj Object MovieClip object
|
66
|
+
* @param p_value Number New frame number
|
67
|
+
*/
|
68
|
+
public static function _text_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object):Void {
|
69
|
+
//p_obj.gotoAndStop(Math.round(p_value));
|
70
|
+
//p_obj.text =
|
71
|
+
if (p_value < 0) {
|
72
|
+
// Old text
|
73
|
+
p_obj.text = p_extra.oldText.substr(0, -Math.round(p_value));
|
74
|
+
} else {
|
75
|
+
// New text
|
76
|
+
p_obj.text = p_extra.newText.substr(0, Math.round(p_value));
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
public static function _text_preProcess (p_obj:Object, p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): Number {
|
81
|
+
p_extra.oldText = p_obj.text;
|
82
|
+
p_extra.newText = p_originalValueComplete;
|
83
|
+
return p_extra.newText.length;
|
84
|
+
}
|
85
|
+
|
86
|
+
// ==================================================================================================================================
|
87
|
+
// PROPERTY GROUPING/SPLITTING functions --------------------------------------------------------------------------------------------
|
88
|
+
|
89
|
+
// ----------------------------------------------------------------------------------------------------------------------------------
|
90
|
+
// generic splitters
|
91
|
+
|
92
|
+
/**
|
93
|
+
* A generic color splitter - from 0xrrggbb to r, g, b with the name of the parameters passed
|
94
|
+
*
|
95
|
+
* @param p_value Number The original _color value
|
96
|
+
* @return Array An array containing the .name and .value of all new properties
|
97
|
+
*/
|
98
|
+
public static function _generic_color_splitter (p_value:Number, p_parameters:Array):Array {
|
99
|
+
var nArray:Array = new Array();
|
100
|
+
nArray.push({name:p_parameters[0], value:AuxFunctions.numberToR(p_value)});
|
101
|
+
nArray.push({name:p_parameters[1], value:AuxFunctions.numberToG(p_value)});
|
102
|
+
nArray.push({name:p_parameters[2], value:AuxFunctions.numberToB(p_value)});
|
103
|
+
return nArray;
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
// ==================================================================================================================================
|
108
|
+
// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Generic function for the textformat properties
|
112
|
+
*/
|
113
|
+
public static function _textFormat_property_get (p_obj:Object, p_parameters:Array):Number {
|
114
|
+
var fmt:TextFormat = p_obj.getTextFormat();
|
115
|
+
var propertyName:String = p_parameters[0];
|
116
|
+
var isColor:Boolean = p_parameters[1];
|
117
|
+
if (!isColor) {
|
118
|
+
// Standard property
|
119
|
+
return (fmt[propertyName]);
|
120
|
+
} else {
|
121
|
+
// Composite, color channel
|
122
|
+
var colorComponent:String = p_parameters[2];
|
123
|
+
if (colorComponent == "r") return AuxFunctions.numberToR(fmt[propertyName]);
|
124
|
+
if (colorComponent == "g") return AuxFunctions.numberToG(fmt[propertyName]);
|
125
|
+
if (colorComponent == "b") return AuxFunctions.numberToB(fmt[propertyName]);
|
126
|
+
}
|
127
|
+
|
128
|
+
return null;
|
129
|
+
}
|
130
|
+
|
131
|
+
public static function _textFormat_property_set (p_obj:Object, p_value:Number, p_parameters:Array):Void {
|
132
|
+
var fmt:TextFormat = p_obj.getTextFormat();
|
133
|
+
var propertyName:String = p_parameters[0];
|
134
|
+
var isColor:Boolean = p_parameters[1];
|
135
|
+
if (!isColor) {
|
136
|
+
// Standard property
|
137
|
+
fmt[propertyName] = p_value;
|
138
|
+
} else {
|
139
|
+
// Composite, color channel
|
140
|
+
var colorComponent:String = p_parameters[2];
|
141
|
+
if (colorComponent == "r") fmt[propertyName] = (fmt[propertyName] & 0xffff) | (p_value << 16);
|
142
|
+
if (colorComponent == "g") fmt[propertyName] = (fmt[propertyName] & 0xff00ff) | (p_value << 8);
|
143
|
+
if (colorComponent == "b") fmt[propertyName] = (fmt[propertyName] & 0xffff00) | p_value;
|
144
|
+
}
|
145
|
+
|
146
|
+
p_obj.setTextFormat(fmt);
|
147
|
+
p_obj.setNewTextFormat(fmt);
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
}
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msg-chumby-display
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mathias Dalheimer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-13 00:00:00 +02:00
|
19
19
|
default_executable: msg-chumby-daemon
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -111,6 +111,32 @@ files:
|
|
111
111
|
- widget/currentpower/currentpower.html
|
112
112
|
- widget/currentpower/currentpower.swd
|
113
113
|
- widget/currentpower/currentpower.swf
|
114
|
+
- widget/last_reading/DataArray.as
|
115
|
+
- widget/last_reading/Gluehlampe.fla
|
116
|
+
- widget/last_reading/Gluehlampe.swf
|
117
|
+
- widget/last_reading/Gluehlampe_frames.fla
|
118
|
+
- widget/last_reading/Gluehlampe_frames.swf
|
119
|
+
- widget/last_reading/Makefile
|
120
|
+
- widget/last_reading/Makefile.orig
|
121
|
+
- widget/last_reading/README.rdoc
|
122
|
+
- widget/last_reading/README.rtf
|
123
|
+
- widget/last_reading/XmlParse.as
|
124
|
+
- widget/last_reading/caurina/transitions/AuxFunctions.as
|
125
|
+
- widget/last_reading/caurina/transitions/Equations.as
|
126
|
+
- widget/last_reading/caurina/transitions/PropertyInfoObj.as
|
127
|
+
- widget/last_reading/caurina/transitions/SpecialProperty.as
|
128
|
+
- widget/last_reading/caurina/transitions/SpecialPropertyModifier.as
|
129
|
+
- widget/last_reading/caurina/transitions/SpecialPropertySplitter.as
|
130
|
+
- widget/last_reading/caurina/transitions/TweenListObj.as
|
131
|
+
- widget/last_reading/caurina/transitions/Tweener.as
|
132
|
+
- widget/last_reading/caurina/transitions/properties/ColorShortcuts.as
|
133
|
+
- widget/last_reading/caurina/transitions/properties/CurveModifiers.as
|
134
|
+
- widget/last_reading/caurina/transitions/properties/DisplayShortcuts.as
|
135
|
+
- widget/last_reading/caurina/transitions/properties/FilterShortcuts.as
|
136
|
+
- widget/last_reading/caurina/transitions/properties/SoundShortcuts.as
|
137
|
+
- widget/last_reading/caurina/transitions/properties/TextShortcuts.as
|
138
|
+
- widget/last_reading/energietacho.fla
|
139
|
+
- widget/last_reading/energietacho.swf
|
114
140
|
has_rdoc: true
|
115
141
|
homepage: http://github.com/gonium/msg-chumby-display
|
116
142
|
licenses: []
|