This is an automated email from the ASF dual-hosted git repository.
alinakazi pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
new ed1922b Update UIComponent alpha property Added
ed1922b is described below
commit ed1922bfa4b268f3f21c2ca1a8402583a220dfba
Author: alinakazi <[email protected]>
AuthorDate: Thu May 3 14:40:58 2018 +0500
Update UIComponent alpha property Added
---
.../src/main/royale/mx/core/UIComponent.as | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 8f12f62..f74d054 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -1886,7 +1886,46 @@ public class UIComponent extends UIBase
// always 1.0
}
+ //----------------------------------
+ // alpha
+ //----------------------------------
+ /**
+ * @private
+ * Storage for the alpha property.
+ */
+ private var _alpha:Number = 1.0;
+
+ [Bindable("alphaChanged")]
+ [Inspectable(defaultValue="1.0", category="General", verbose="1",
minValue="0.0", maxValue="1.0")]
+
+ /**
+ * @private
+ */
+ override public function get alpha():Number
+ {
+ // Here we roundtrip alpha in the same manner as the
+ // player (purposely introducing a rounding error).
+ return int(_alpha * 256.0) / 256.0;
+ }
+
+ /**
+ * @private
+ */
+ override public function set alpha(value:Number):void
+ {
+ if (_alpha != value)
+ {
+ _alpha = value;
+
+ /* if (designLayer)
+ value = value * designLayer.effectiveAlpha;
+
+ $alpha = value;
+ */
+ dispatchEvent(new Event("alphaChanged"));
+ }
+ }
//----------------------------------
// includeInLayout
//----------------------------------
--
To stop receiving notification emails like this one, please contact
[email protected].