[FragmentDemuxedStream] Add com.pivotshare.hls.loader.FragmentDemuxedStream

error: pathspec 'src/com/pivotshare/hls/loader/FragmentDemuxedStream.as' did not match any file(s) known to git

--- src/com/pivotshare/hls/loader/FragmentDemuxedStream.as
+++ src/com/pivotshare/hls/loader/FragmentDemuxedStream.as
@@ -0,0 +1,409 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+package com.pivotshare.hls.loader {
+
+    import flash.display.DisplayObject;
+    import flash.events.*;
+    import flash.net.*;
+    import flash.utils.ByteArray;
+    import flash.utils.getTimer;
+    import flash.utils.Timer;
+    import com.pivotshare.hls.loader.FragmentStream;
+    import org.mangui.hls.constant.HLSLoaderTypes;
+    import org.mangui.hls.demux.Demuxer;
+    import org.mangui.hls.demux.DemuxHelper;
+    import org.mangui.hls.demux.ID3Tag;
+    import org.mangui.hls.event.HLSError;
+    import org.mangui.hls.event.HLSEvent;
+    import org.mangui.hls.event.HLSLoadMetrics;
+    import org.mangui.hls.flv.FLVTag;
+    import org.mangui.hls.HLS;
+    import org.mangui.hls.model.AudioTrack;
+    import org.mangui.hls.model.Fragment;
+    import org.mangui.hls.model.FragmentData;
+    import org.mangui.hls.utils.AES;
+
+    CONFIG::LOGGING {
+        import org.mangui.hls.utils.Log;
+        import org.mangui.hls.utils.Hex;
+    }
+
+    /**
+     * HLS Fragment Demuxed Streamer.
+     * Tries to parallel URLStream design pattern, but is incomplete.
+     *
+     * This class encapsulates Demuxing, but in an inefficient way. This is not
+     * meant to be performant for sequential Fragments in play.
+     *
+     * @class    FragmentDemuxedStream
+     * @extends  EventDispatcher
+     * @author   HGPA
+     */
+    public class FragmentDemuxedStream extends EventDispatcher {
+
+        /*
+         * DisplayObject needed by AES decrypter.
+         */
+        private var _displayObject : DisplayObject;
+
+        /*
+         * Fragment being loaded.
+         */
+        private var _fragment : Fragment;
+
+        /*
+         * URLStream used to download current Fragment.
+         */
+        private var _fragmentStream : FragmentStream;
+
+        /*
+         * Metrics for this stream.
+         */
+        private var _metrics : HLSLoadMetrics;
+
+        /*
+         * Demuxer needed for this Fragment.
+         */
+        private var _demux : Demuxer;
+
+        /*
+         * Options for streaming and demuxing.
+         */
+        private var _options : Object;
+
+        //
+        //
+        //
+        // Public Methods
+        //
+        //
+        //
+
+        /**
+         * Create a FragmentStream.
+         *
+         * This constructor takes a reference to main DisplayObject, e.g. stage,
+         * necessary for AES decryption control.
+         *
+         * TODO: It would be more appropriate to create a factory that itself
+         * takes the DisplayObject (or a more flexible version of AES).
+         *
+         * @constructor
+         * @param  {DisplayObject}  displayObject
+         */
+        public function FragmentDemuxedStream(displayObject : DisplayObject) : void {
+            _displayObject = displayObject;
+            _fragment = null;
+            _fragmentStream = null;
+            _metrics = null;
+            _demux = null;
+            _options = new Object();
+        };
+
+        /*
+         * Return FragmentData of Fragment currently being downloaded.
+         * Of immediate interest is the `bytes` field.
+         *
+         * @method getFragment
+         * @return  {Fragment}
+         */
+        public function getFragment() : Fragment {
+            return _fragment;
+        }
+
+        /*
+         * Close the stream.
+         *
+         * @method  close
+         */
+        public function close() : void {
+            if (_fragmentStream) {
+                _fragmentStream.close();
+            }
+
+            if (_demux) {
+                _demux.cancel();
+                _demux = null;
+            }
+        }
+
+        /**
+         * Load a Fragment.
+         *
+         * This class/methods DOES NOT user reference of parameter. Instead it
+         * clones the Fragment and manipulates this internally.
+         *
+         * @method  load
+         * @param   {Fragment}   fragment  -  Fragment with details (cloned)
+         * @param   {ByteArray}  key       -  Encryption Key
+         * @return  {HLSLoadMetrics}
+         */
+        public function load(fragment : Fragment, key : ByteArray, options : Object) : HLSLoadMetrics {
+
+            _options = options;
+
+            // Clone Fragment, with new initilizations of deep fields
+            // Passing around references is what is causing problems.
+            // FragmentData is initialized as part of construction
+            _fragment = new Fragment(
+                fragment.url,
+                fragment.duration,
+                fragment.level,
+                fragment.seqnum,
+                fragment.start_time,
+                fragment.continuity,
+                fragment.program_date,
+                fragment.decrypt_url,
+                fragment.decrypt_iv, // We need this reference
+                fragment.byterange_start_offset,
+                fragment.byterange_end_offset,
+                new Vector.<String>()
+            )
+
+            _fragmentStream = new FragmentStream(_displayObject);
+
+            _fragmentStream.addEventListener(IOErrorEvent.IO_ERROR, onStreamError);
+            _fragmentStream.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onStreamError);
+            _fragmentStream.addEventListener(ProgressEvent.PROGRESS, onStreamProgress);
+            _fragmentStream.addEventListener(Event.COMPLETE, onStreamComplete);
+
+            CONFIG::LOGGING {
+                var fragmentString : String = "Fragment[" + _fragment.level + "][" + _fragment.seqnum + "]";
+                Log.debug("FragmentDemuxedStream#load: " + fragmentString);
+            }
+
+            _metrics = _fragmentStream.load(_fragment, key);
+
+            return _metrics;
+        }
+
+        //
+        //
+        //
+        // FragmentStream Event Listeners
+        //
+        //
+        //
+
+        /**
+         *
+         * @method  onFragmentStreamProgress
+         * @param   {ProgressEvent}  evt
+         */
+        private function onStreamProgress(evt : ProgressEvent) : void {
+
+            _fragment = _fragmentStream.getFragment();
+
+            CONFIG::LOGGING {
+                var fragmentString : String = "Fragment[" + _fragment.level + "][" + _fragment.seqnum + "]";
+                Log.debug("FragmentDemuxedStream#onStreamProgress: " +
+                    fragmentString + " Progress - " + evt.bytesLoaded + " of " + evt.bytesTotal);
+
+                Log.debug("FragmentDemuxedStream#onStreamProgress: " +
+                    fragmentString + " Fragment status - bytes.position / bytes.length / bytesLoaded " +
+                    _fragment.data.bytes.position + " / " +
+                    _fragment.data.bytes.length + " / " +
+                    _fragment.data.bytesLoaded);
+            }
+
+            // If we are loading a partial Fragment then only parse when it has
+            // completed loading to desired portion (See onFragmentStreamComplete)
+            /*
+            if (fragment.byterange_start_offset != -1) {
+                return;
+            }
+            */
+
+            // START PARSING METRICS
+            if (_metrics.parsing_begin_time == 0) {
+                _metrics.parsing_begin_time = getTimer();
+            }
+
+            // Demuxer has not yet been initialized as this is probably first
+            // call to onFragmentStreamProgress, but demuxer may also be/remain
+            // null due to unknown Fragment type. Probe is synchronous.
+            if (_demux == null) {
+
+                // It is possible we have run onFragmentStreamProgress before
+                // without having sufficient data to probe
+                //bytes.position = bytes.length;
+                //bytes.writeBytes(byteArray);
+                //byteArray = bytes;
+                CONFIG::LOGGING {
+                    var fragmentString : String = "Fragment[" + _fragment.level + "][" + _fragment.seqnum + "]";
+                    Log.debug("FragmentDemuxedStream#onStreamProgress: Need a Demuxer for " + fragmentString);
+                }
+
+                _demux = DemuxHelper.probe(
+                    _fragment.data.bytes,
+                    null,
+                    _onDemuxAudioTrackRequested,
+                    _onDemuxProgress,
+                    _onDemuxComplete,
+                    _onDemuxVideoMetadata,
+                    _onDemuxID3TagFound,
+                    false
+                    );
+            }
+
+            if (_demux) {
+
+                // Demuxer expects the ByteArray delta
+                var byteArray : ByteArray = new ByteArray();
+                _fragment.data.bytes.readBytes(byteArray, 0, _fragment.data.bytes.length - _fragment.data.bytes.position);
+                byteArray.position = 0;
+
+                _demux.append(byteArray);
+            }
+        }
+
+        /**
+         * Called when FragmentStream completes.
+         *
+         * @method  onStreamComplete
+         * @param   {Event}  evt
+         */
+        private function onStreamComplete(evt : Event) : void {
+
+            // If demuxer is still null, then the Fragment type was invalid
+            if (_demux == null) {
+                CONFIG::LOGGING {
+                    Log.error("FragmentDemuxedStream#onStreamComplete: unknown fragment type");
+                    _fragment.data.bytes.position = 0;
+                    var bytes2 : ByteArray = new ByteArray();
+                    _fragment.data.bytes.readBytes(bytes2, 0, 512);
+                    Log.debug2("FragmentDemuxedStream#onStreamComplete: frag dump(512 bytes)");
+                    Log.debug2(Hex.fromArray(bytes2));
+                }
+
+                var err : ErrorEvent = new ErrorEvent(
+                    ErrorEvent.ERROR,
+                    false,
+                    false,
+                    "Unknown Fragment Type"
+                    );
+
+                dispatchEvent(err);
+
+            } else {
+                _demux.notifycomplete();
+            }
+        }
+
+        /**
+         * Called when FragmentStream has errored.
+         *
+         * @method  onStreamError
+         * @param   {ProgressEvent}  evt
+         */
+        private function onStreamError(evt : ErrorEvent) : void {
+            CONFIG::LOGGING {
+                Log.error("FragmentDemuxedStream#onStreamError: " + evt.text);
+            }
+            dispatchEvent(evt);
+        }
+
+        //
+        //
+        //
+        // Demuxer Callbacks
+        //
+        //
+        //
+
+        /**
+         * Called when Demuxer needs to know which AudioTrack to parse for.
+         *
+         * FIXME: This callback simply returns the first audio track!
+         * We need to pass this class the appropriate callback propogated from
+         * UI layer. Yuck.
+         *
+         * @method  _onDemuxAudioTrackRequested
+         * @param   {Vector<AudioTrack}  audioTrackList  -  List of AudioTracks
+         * @return  {AudioTrack}  -  AudioTrack to parse
+         */
+        private function _onDemuxAudioTrackRequested(audioTrackList : Vector.<AudioTrack>) : AudioTrack {
+            if (audioTrackList.length > 0) {
+                return audioTrackList[0];
+            } else {
+                return null;
+            }
+        }
+
+        /**
+         * Called when Demuxer parsed portion of Fragment.
+         *
+         * @method  _onDemuxProgress
+         * @param   {Vector<FLVTag}  tags
+         */
+        private function _onDemuxProgress(tags : Vector.<FLVTag>) : void {
+            CONFIG::LOGGING {
+                Log.debug("FragmentDemuxedStream#_onDemuxProgress");
+            }
+
+            _fragment.data.appendTags(tags);
+
+            // TODO: Options to parse only portion of Fragment
+
+            // FIXME: bytesLoaded and bytesTotal represent stats of the current
+            // FragmentStream, not Demuxer, which is no longer bytes-relative.
+            // What should we define here?
+            var progressEvent : ProgressEvent = new ProgressEvent(
+                ProgressEvent.PROGRESS,
+                false,
+                false,
+                _fragment.data.bytes.length, // bytesLoaded
+                _fragment.data.bytesTotal    // bytesTotal
+                );
+
+            dispatchEvent(progressEvent);
+        };
+
+        /**
+         * Called when Demuxer has finished parsing Fragment.
+         *
+         * @method  _onDemuxComplete
+         */
+        private function _onDemuxComplete() : void {
+            CONFIG::LOGGING {
+                Log.debug("FragmentDemuxedStream#_onDemuxComplete");
+            }
+
+            _metrics.parsing_end_time = getTimer();
+
+            var completeEvent : Event = new ProgressEvent(Event.COMPLETE);
+            dispatchEvent(completeEvent);
+        };
+
+        /**
+         * Called when Video metadata is parsed.
+         *
+         * Specifically, when Sequence Parameter Set (SPS) is found.
+         *
+         * @method  _onDemuxVideoMetadata
+         * @param   {uint}  width
+         * @param   {uint}  height
+         */
+        private function _onDemuxVideoMetadata(width : uint, height : uint) : void {
+            if (_fragment.data.video_width == 0) {
+                CONFIG::LOGGING {
+                    Log.debug("FragmentDemuxedStream#_onDemuxVideoMetadata: AVC SPS = " + width + "x" + height);
+                }
+                _fragment.data.video_width = width;
+                _fragment.data.video_height = height;
+            }
+        }
+
+        /**
+         * Called when ID3 tags are found.
+         *
+         * @method  _onDemuxID3TagFound
+         * @param   {Vector.<ID3Tag>}  id3_tags  -  ID3 Tags
+         */
+        private function _onDemuxID3TagFound(id3_tags : Vector.<ID3Tag>) : void {
+            _fragment.data.id3_tags = id3_tags;
+        }
+
+    }
+}


add TypeChangeSignal class

add TypeChangeSignal class

error: pathspec 'src/battlecode/world/signals/TypeChangeSignal.as' did not match any file(s) known to git

--- src/battlecode/world/signals/TypeChangeSignal.as
+++ src/battlecode/world/signals/TypeChangeSignal.as
@@ -0,0 +1,25 @@
+package battlecode.world.signals {
+    public class TypeChangeSignal implements Signal {
+        private var robotID:uint;
+        private var type:String;
+
+        public function TypeChangeSignal(robotID:uint, type:String) {
+            this.robotID = robotID;
+            this.type = type;
+        }
+
+        public function getRobotID():uint {
+            return robotID;
+        }
+
+        public function getType():String {
+            return type;
+        }
+
+        public function accept(handler:SignalHandler):* {
+            return handler.visitTypeChangeSignal(this);
+        }
+
+    }
+
+}


updating layout to read tag names, instead of "id"

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


improving debugging messages

improving debugging messages

fatal: unable to access 'https://github.com/rafaelcordoba/cocktail-demo.git/': The requested URL returned error: 403


added more docs / implemented more logic


Issue 229; sped up normalizeSVGData() method by ~60%. Page load is still too slow though; need to find other bottlenecks

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leymannx/svgweb.git/'


adding bind variable, adding "log.info" calls


Adding LinePointUtil for line-point and segment-point distance calcs.

Used by bezier flatness calcs.

error: pathspec 'raw/src/org/yellcorp/lib/geom/curves/LinePointUtil.as' did not match any file(s) known to git

--- raw/src/org/yellcorp/lib/geom/curves/LinePointUtil.as
+++ raw/src/org/yellcorp/lib/geom/curves/LinePointUtil.as
@@ -0,0 +1,121 @@
+package org.yellcorp.lib.geom.curves
+{
+import flash.geom.Point;
+
+
+public class LinePointUtil
+{
+    public static function lineParamClosestToPoint(p0:Point, p1:Point, q:Point):Number
+    {
+        var xDiff:Number = p1.x - p0.x;
+        var yDiff:Number = p1.y - p0.y;
+
+        return ((q.x - p0.x) * xDiff + (q.y - p0.y) * yDiff) / (xDiff * xDiff + yDiff * yDiff);
+    }
+
+    public static function linePointClosestToPoint(p0:Point, p1:Point, q:Point, out:Point):Point
+    {
+        var param:Number = lineParamClosestToPoint(p0, p1, q);
+        out.x = p0.x + param * (p1.x - p0.x);
+        out.y = p0.y + param * (p1.y - p0.y);
+        return out;
+    }
+
+    public static function linePointDistanceSquared(p0:Point, p1:Point, q:Point):Number
+    {
+        var param:Number = lineParamClosestToPoint(p0, p1, q);
+        var pqx:Number = p0.x + param * (p1.x - p0.x);
+        var pqy:Number = p0.y + param * (p1.y - p0.y);
+
+        var dx:Number = pqx - q.x;
+        var dy:Number = pqy - q.y;
+
+        return dx * dx + dy * dy;
+    }
+
+    public static function linePointDistance(p0:Point, p1:Point, q:Point):Number
+    {
+        return Math.sqrt(linePointDistanceSquared(p0, p1, q));
+    }
+
+    // like line* methods but clamps to the segment between p0 and p1, which
+    // also allows meaningful values to be returned when p0 and p1 are
+    // coincident
+    public static function segmentPointClosestToPoint(p0:Point, p1:Point, q:Point, out:Point):Point
+    {
+        var param:Number;
+
+        if (p0.x == p1.x && p0.y == p1.y)
+        {
+            out.x = p0.x;
+            out.y = p0.y;
+            return out;
+        }
+
+        param = lineParamClosestToPoint(p0, p1, q);
+
+        if (param <= 0)
+        {
+            out.x = p0.x;
+            out.y = p0.y;
+        }
+        else if (param >= 1)
+        {
+            out.x = p1.x;
+            out.y = p1.y;
+        }
+        else
+        {
+            out.x = p0.x + param * (p1.x - p0.x);
+            out.y = p0.y + param * (p1.y - p0.y);
+        }
+        return out;
+    }
+
+    public static function segmentPointDistanceSquared(p0:Point, p1:Point, q:Point):Number
+    {
+        var param:Number;
+        var pqx:Number;
+        var pqy:Number;
+
+        var dx:Number;
+        var dy:Number;
+
+        if (p0.x == p1.x && p0.y == p1.y)
+        {
+            dx = q.x - p0.x;
+            dy = q.y - p0.y;
+        }
+        else
+        {
+            param = lineParamClosestToPoint(p0, p1, q);
+
+            if (param <= 0)
+            {
+                pqx = p0.x;
+                pqy = p0.y;
+            }
+            else if (param >= 1)
+            {
+                pqx = p1.x;
+                pqy = p1.y;
+            }
+            else
+            {
+                pqx = p0.x + param * (p1.x - p0.x);
+                pqy = p0.y + param * (p1.y - p0.y);
+            }
+
+            dx = pqx - q.x;
+            dy = pqy - q.y;
+        }
+
+        return dx * dx + dy * dy;
+    }
+
+    public static function segmentPointDistance(p0:Point, p1:Point, q:Point):Number
+    {
+        return Math.sqrt(segmentPointDistanceSquared(p0, p1, q));
+    }
+}
+}


Bug 678952: testcase for Verifier changes (r=lhansen)

error: pathspec 'test/acceptance/as3/Vector/bug_678952.as' did not match any file(s) known to git

--- test/acceptance/as3/Vector/bug_678952.as
+++ test/acceptance/as3/Vector/bug_678952.as
@@ -0,0 +1,95 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine.].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2011
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Adobe AS3 Team
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+Running this testcase and the entire as3/Vector/* acceptance tests will provide
+almost full coverage of this change:
+    http://hg.mozilla.org/tamarin-redux/diff/6f72616eadd7/core/Verifier.cpp
+
+These testcases focus on covering all conditions of this line:
+    bool maybeIntegerIndex = !attr && multiname.isRtname() && multiname.containsAnyPublicNamespace();
+
+The only condition that is not being covered is the false branch of:
+    multiname.containsAnyPublicNamespace().
+ */
+
+import avmplus.*;
+
+var SECTION = " ";
+var VERSION = "AS3";
+startTest();
+writeHeaderToLog( SECTION + " Vector code coverage around Verifier changes made in bug 678952");
+
+class C
+{
+    var x: C = null;  // just some field to make the type nontrivial
+}
+
+var expected;
+var err;
+var a: Vector.<C> = new Vector.<C>;
+
+expected = "ReferenceError: Error #1069";
+err = "exception not thrown";
+try {
+    var f = a.foo;
+ }
+catch (e:Error){
+    err = e.toString();
+}
+// http://hg.mozilla.org/tamarin-redux/diff/6f72616eadd7/core/Verifier.cpp#l1.26
+AddTestCase("ReferenceError for multiname.isRtname() failing",
+               expected,
+               parseError(err, expected.length));
+
+expected = "ReferenceError: Error #1081";
+err = "exception not thrown";
+try {
+    // attr -> false
+    var g = a.@attr;
+ }
+catch (e:Error){
+    err = e.toString();
+}
+// http://hg.mozilla.org/tamarin-redux/diff/6f72616eadd7/core/Verifier.cpp#l1.26
+AddTestCase("ReferenceError for !attr failing",
+               expected,
+               parseError(err, expected.length));
+
+
+
+test();


Test case base class -- all AS test classes extend this.

error: pathspec 'flash/org/windmill/TestCase.as' did not match any file(s) known to git

--- flash/org/windmill/TestCase.as
+++ flash/org/windmill/TestCase.as
@@ -0,0 +1,32 @@
+/*
+Copyright 2009, Matthew Eernisse (mde@fleegix.org) and Slide, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package org.windmill {
+  import flash.display.Sprite;
+  import flash.display.Stage;
+  import org.windmill.WMAssert;
+  public class TestCase extends Sprite {
+    public var asserts:* = WMAssert;
+    // Get a reference to the Stage in the base class
+    // before the tests actually load so tests can all
+    // reference it
+    private var fakeStage:Stage = Windmill.getStage();
+    override public function get stage():Stage {
+      return fakeStage;
+    }
+  }
+}
+


Adds interface cast test

Adds interface cast test

error: pathspec 'src/avm2/tests/regress/correctness/interfaceCast.as' did not match any file(s) known to git

--- src/avm2/tests/regress/correctness/interfaceCast.as
+++ src/avm2/tests/regress/correctness/interfaceCast.as
@@ -0,0 +1,25 @@
+package {
+
+  interface IClassA
+  {
+    function foo() : void;
+  }
+
+  class ClassA implements IClassA
+  {
+    public function foo() : void
+    {
+      trace('bar');
+    }
+  }
+
+  trace("-- ClassA");
+  var a: ClassA = new ClassA();
+  a.foo();
+  trace("-- IClassA()");
+  IClassA(a).foo();
+  trace("-- IClassA");
+  var ai: IClassA = a;
+  ai.foo();
+  trace("--");
+}


fixing full house logic

fixing full house logic

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jkanchelov/VideoPoker.git/'


Added BitmapFillStyle.  Currently non-functional.

Change-Id: I5fcf5389da72a7b49ac1e647f263c6a751c752d0

error: pathspec 'WeaveUI/src/weave/visualization/plotters/styles/BitmapFillStyle.as' did not match any file(s) known to git

--- WeaveUI/src/weave/visualization/plotters/styles/BitmapFillStyle.as
+++ WeaveUI/src/weave/visualization/plotters/styles/BitmapFillStyle.as
@@ -0,0 +1,85 @@
+/*
+    Weave (Web-based Analysis and Visualization Environment)
+    Copyright (C) 2008-2011 University of Massachusetts Lowell
+
+    This file is a part of Weave.
+
+    Weave is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License, Version 3,
+    as published by the Free Software Foundation.
+
+    Weave is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Weave.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package weave.visualization.plotters.styles
+{
+	import flash.display.BitmapData;
+	import flash.display.Graphics;
+	import flash.net.URLRequest;
+
+	import weave.api.WeaveAPI;
+	import weave.api.data.IQualifiedKey;
+	import weave.api.registerLinkableChild;
+	import weave.api.ui.IFillStyle;
+	import weave.compiler.BooleanLib;
+	import weave.data.AttributeColumns.AlwaysDefinedColumn;
+
+	/**
+	 * BitmapFillStyle
+	 *
+	 * @author adufilie
+	 */
+	public class BitmapFillStyle implements IFillStyle
+	{
+		public function BitmapFillStyle()
+		{
+		}
+
+		/**
+		 * enable or disable fill on a per-record basis
+		 */
+		public const enabled:AlwaysDefinedColumn = registerLinkableChild(this, new AlwaysDefinedColumn(true));
+		/**
+		 * enable or disable repeat on a per-record basis
+		 */
+		public const repeat:AlwaysDefinedColumn = registerLinkableChild(this, new AlwaysDefinedColumn(true));
+		/**
+		 * enable or disable smooth on a per-record basis
+		 */
+		public const smooth:AlwaysDefinedColumn = registerLinkableChild(this, new AlwaysDefinedColumn(false));
+		/**
+		 * set image URL on a per-record basis
+		 */
+		public const imageURL:AlwaysDefinedColumn = registerLinkableChild(this, new AlwaysDefinedColumn(null));
+
+		/**
+		 * This function sets the fill on a Graphics object using the saved fill properties.
+		 * @param recordKey The record key to initialize the fill style for.
+		 * @param graphics The Graphics object to initialize.
+		 */
+		public function beginFillStyle(recordKey:IQualifiedKey, target:Graphics):void
+		{
+			var _bitmapData:BitmapData = null;
+			//TODO: fill _bitmapData
+			//WeaveAPI.URLRequestUtils.getContent(new URLRequest(url), handleResult);
+
+			var fillEnabled:Boolean = _bitmapData && BooleanLib.toBoolean( enabled.getValueFromKey(recordKey) );
+			if (fillEnabled)
+			{
+				var _repeat:Boolean = BooleanLib.toBoolean( repeat.getValueFromKey(recordKey, Boolean) );
+				var _smooth:Boolean = BooleanLib.toBoolean( smooth.getValueFromKey(recordKey, Boolean) );
+				target.beginBitmapFill(_bitmapData, null, _repeat, _smooth);
+			}
+			else
+			{
+				target.endFill();
+			}
+		}
+	}
+}


improving "toString" method

improving "toString" method


Add stub class for Equivalence class testing

error: pathspec 'unittests/TestEquivalence.as' did not match any file(s) known to git

--- unittests/TestEquivalence.as
+++ unittests/TestEquivalence.as
@@ -0,0 +1,27 @@
+package unittests
+{
+	public class TestEquivalence
+	{
+		[Before]
+		public function setUp():void
+		{
+		}
+
+		[After]
+		public function tearDown():void
+		{
+		}
+
+		[BeforeClass]
+		public static function setUpBeforeClass():void
+		{
+		}
+
+		[AfterClass]
+		public static function tearDownAfterClass():void
+		{
+		}
+
+
+	}
+}


Added Stats.as statistics object for use by AirQualityDataSet.as (which has also been modified to this purpose).

error: pathspec 'src/data/Stats.as' did not match any file(s) known to git

--- src/data/Stats.as
+++ src/data/Stats.as
@@ -0,0 +1,50 @@
+package data
+{
+	import __AS3__.vec.Vector;
+
+	public class Stats
+	{
+		private var spikeEpisodes:Array;
+
+		public function Stats(_data:Vector.<Object>, headers:Array){ // Constructor
+			spikeEpisodes = new Array();
+			processSpikes(_data, headers);
+		}
+
+		private function processSpikes(_data:Vector.<Object>, headers:Array):void{
+			// Header indices for data array refer to PM data at the moment - standard for this may needed to be generalized
+			// for different kinds of data
+			var startTime:Number = 0;
+			var timeWindow:Number = 60;
+			var windowAverage:Number = 0;
+			var windowCounter:Number = 0;
+			var k:Number = 0;
+
+			for(var i:Number=0; i < _data.length; i += 30){
+			// 30-second staggering for window checks:
+			// NOTE that this 30 refers to the array index, not actual time...
+			// I probably need to change this, but PM has data for every second, so it seems ok for now...
+				startTime = Number(_data[i][headers[0]]);
+				k = i;
+				windowCounter = 0;
+				windowAverage = 0;
+
+				// check a 60-second window of data
+				while(k < _data.length && _data[k][headers[1]] < startTime+60){ // 1-minute time window
+					windowAverage += Number(_data[k][headers[3]])
+					windowCounter++;
+					k++;
+				}
+				windowAverage = windowAverage/windowCounter;
+				if(windowAverage > 0.020){ // Hard-coding the threshold of "spike-interest"
+					spikeEpisodes.push({'beginTime':startTime, 'endTime':startTime+60});
+					//trace("found episode: ("+startTime+","+(startTime+60)+")");
+				}
+			}
+		}
+
+		public function getSpikes():Array{
+			return spikeEpisodes;
+		}
+	}
+}


Add AS3 example.

Add AS3 example.

error: pathspec 'tests/examplefiles/as3_test.as' did not match any file(s) known to git

--- tests/examplefiles/as3_test.as
+++ tests/examplefiles/as3_test.as
@@ -0,0 +1,143 @@
+			import flash.events.MouseEvent;
+			import com.example.programmingas3.playlist.PlayList;
+			import com.example.programmingas3.playlist.Song;
+			import com.example.programmingas3.playlist.SortProperty;
+
+			// constants for the different "states" of the song form
+			private static const ADD_SONG:uint = 1;
+			private static const SONG_DETAIL:uint = 2;
+
+			private var playList:PlayList = new PlayList();
+
+			private function initApp():void
+			{
+				// set the initial state of the song form, for adding a new song
+				setFormState(ADD_SONG);
+
+				// prepopulate the list with a few songs
+				playList.addSong(new Song("Nessun Dorma", "Luciano Pavarotti", 1990, "nessundorma.mp3", ["90's", "Opera"]));
+				playList.addSong(new Song("Come Undone", "Duran Duran", 1993, "comeundone.mp3", ["90's", "Pop"]));
+				playList.addSong(new Song("Think of Me", "Sarah Brightman", 1987, "thinkofme.mp3", ["Showtunes"]));
+				playList.addSong(new Song("Unbelievable", "EMF", 1991, "unbelievable.mp3", ["90's", "Pop"]));
+
+				songList.dataProvider = playList.songList;
+			}
+
+
+			private function sortList(sortField:SortProperty):void
+			{
+				// Make all the sort type buttons enabled.
+				// The active one will be grayed-out below
+				sortByTitle.selected = false;
+				sortByArtist.selected = false;
+				sortByYear.selected = false;
+
+				switch (sortField)
+				{
+					case SortProperty.TITLE:
+						sortByTitle.selected = true;
+						break;
+					case SortProperty.ARTIST:
+						sortByArtist.selected = true;
+						break;
+					case SortProperty.YEAR:
+						sortByYear.selected = true;
+						break;
+				}
+
+				playList.sortList(sortField);
+
+				refreshList();
+			}
+
+
+			private function refreshList():void
+			{
+				// remember which song was selected
+				var selectedSong:Song = Song(songList.selectedItem);
+
+				// re-assign the song list as the dataprovider to get the newly sorted list
+				// and force the List control to refresh itself
+				songList.dataProvider = playList.songList;
+
+				// reset the song selection
+				if (selectedSong != null)
+				{
+					songList.selectedItem = selectedSong;
+				}
+			}
+
+
+			private function songSelectionChange():void
+			{
+				if (songList.selectedIndex != -1)
+				{
+					setFormState(SONG_DETAIL);
+				}
+				else
+				{
+					setFormState(ADD_SONG);
+				}
+			}
+
+
+			private function addNewSong():void
+			{
+				// gather the values from the form and add the new song
+				var title:String = newSongTitle.text;
+				var artist:String = newSongArtist.text;
+				var year:uint = newSongYear.value;
+				var filename:String = newSongFilename.text;
+				var genres:Array = newSongGenres.selectedItems;
+
+				playList.addSong(new Song(title, artist, year, filename, genres));
+
+				refreshList();
+
+				// clear out the "add song" form fields
+				setFormState(ADD_SONG);
+			}
+
+
+			private function songListLabel(item:Object):String
+			{
+				return item.toString();
+			}
+
+
+			private function setFormState(state:uint):void
+			{
+				// set the form title and control state
+				switch (state)
+				{
+					case ADD_SONG:
+						formTitle.text = "Add New Song";
+						// show the submit button
+						submitSongData.visible = true;
+						showAddControlsBtn.visible = false;
+						// clear the form fields
+						newSongTitle.text = "";
+						newSongArtist.text = "";
+						newSongYear.value = (new Date()).fullYear;
+						newSongFilename.text = "";
+						newSongGenres.selectedIndex = -1;
+						// deselect the currently selected song (if any)
+						songList.selectedIndex = -1;
+						break;
+
+					case SONG_DETAIL:
+						formTitle.text = "Song Details";
+						// populate the form with the selected item's data
+						var selectedSong:Song = Song(songList.selectedItem);
+						newSongTitle.text = selectedSong.title;
+						newSongArtist.text = selectedSong.artist;
+						newSongYear.value = selectedSong.year;
+						newSongFilename.text = selectedSong.filename;
+						newSongGenres.selectedItems = selectedSong.genres;
+						// hide the submit button
+						submitSongData.visible = false;
+						showAddControlsBtn.visible = true;
+						break;
+				}
+			}
+


The uber-adapter.
I could also make this just implement each interface, but I like
being able to assign the functions to their proper names.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5761 542714f4-19e9-0310-aa3c-eee0fc999fb1

error: pathspec 'src/as/com/threerings/presents/dobj/EventAdapter.as' did not match any file(s) known to git

--- src/as/com/threerings/presents/dobj/EventAdapter.as
+++ src/as/com/threerings/presents/dobj/EventAdapter.as
@@ -0,0 +1,89 @@
+//
+// $Id$
+
+package com.threerings.presents.dobj {
+
+/**
+ * One listener that can adapt to all the standard events.
+ */
+public class EventAdapter
+    implements EventListener
+{
+    /** May be assigned a function to receive AttributeChangedEvents. */
+    public var attributeChanged :Function;
+
+    /** May be assigned a function to receive EntryAddedEvents. */
+    public var entryAdded :Function;
+
+    /** May be assigned a function to receive EntryUpdatedEvents. */
+    public var entryUpdated :Function;
+
+    /** May be assigned a function to receive EntryRemovedEvents. */
+    public var entryRemoved :Function;
+
+    /** May be assigned a function to receive ElementUpdatedEvents. */
+    public var elementUpdated :Function;
+
+    /** May be assigned a function to receive MessageEvents. */
+    public var messageReceived :Function;
+
+    /** May be assigned a function to receive ObjectAddedEvents. */
+    public var objectAdded :Function;
+
+    /** May be assigned a function to receive ObjectRemovedEvents. */
+    public var objectRemoved :Function;
+
+    /** May be assigned a function to receive ObjectDestroyedEvents. */
+    public var objectDestroyed :Function;
+
+    // from EventListener
+    public function eventReceived (event :DEvent) :void
+    {
+        if (event is AttributeChangedEvent) {
+            if (attributeChanged != null) {
+                attributeChanged(AttributeChangedEvent(event));
+            }
+
+        } else if (event is EntryAddedEvent) {
+            if (entryAdded != null) {
+                entryAdded(EntryAddedEvent(event));
+            }
+
+        } else if (event is EntryUpdatedEvent) {
+            if (entryUpdated != null) {
+                entryUpdated(EntryUpdatedEvent(event));
+            }
+
+        } else if (event is EntryRemovedEvent) {
+            if (entryRemoved != null) {
+                entryRemoved(EntryRemovedEvent(event));
+            }
+
+        } else if (event is ElementUpdatedEvent) {
+            if (elementUpdated != null) {
+                elementUpdated(ElementUpdatedEvent(event));
+            }
+
+        } else if (event is MessageEvent) {
+            if (messageReceived != null) {
+                messageReceived(MessageEvent(event));
+            }
+
+        } else if (event is ObjectAddedEvent) {
+            if (objectAdded != null) {
+                objectAdded(ObjectAddedEvent(event));
+            }
+
+        } else if (event is ObjectRemovedEvent) {
+            if (objectRemoved != null) {
+                objectRemoved(ObjectRemovedEvent(event));
+            }
+
+        } else if (event is ObjectDestroyedEvent) {
+            if (objectDestroyed != null) {
+                objectDestroyed(ObjectDestroyedEvent(event));
+            }
+        }
+    }
+}
+}


making _after_load be called if no datasources exists


Fiducial with widgets demo app class with TUI

error: pathspec 'fbApplication.as' did not match any file(s) known to git

--- fbApplication.as
+++ fbApplication.as
@@ -0,0 +1,75 @@
+package touchAll.demos.tronFiducialsDemo
+{
+	import flash.display.*;
+	import flash.events.Event;
+	//import flash.events.TransformGestureEvent;
+
+	import org.tuio.fiducial.*;
+
+	import touchAll.*;
+
+	/**
+	 * @author Gonçalo Amador
+	 */
+	//[SWF(width = "1280", height = "720", frameRate = "60", backgroundColor = "#ffffff")]
+	[SWF(width = "1280", height = "720", frameRate = "60", backgroundColor = "#000000")]
+	public class TronFiducialsDemo extends MovieClip implements IDefault
+	{
+		/* global variables */
+		private var tAll:TouchAll = new TouchAll(stage, 1280, 720, 0x0055ff, false);
+		//private var fm:FiducialManager = new FiducialManager(stage, 0x000000, 0x000000, 0xffffff, 0x000000, 0x00BB00, 0x000000, 0xaaaaaa);
+		private var fm:FiducialManager = new FiducialManager(stage, 0x0055ff, 0x000000, 0x0055ff, 0x000000, 0x00BB00, 0x0055ff, 0x0055ff);
+
+		public function TronFiducialsDemo():void
+		{
+			if (stage) init();
+			else addEventListener(Event.ADDED_TO_STAGE, init);
+		}
+
+		private function init(e:Event = null):void
+		{
+			removeEventListener(Event.ADDED_TO_STAGE, init);
+
+			/* LOAD STAGE CONTENT */
+			tAll.backgroundLoader();
+			//backgroundEventListenersLoader();
+
+			/* stage set up */
+			tAll.stageLoader();
+			stageEventListenersLoader();
+
+			/* tuio set up */
+			tAll.tuioLoader();
+		}
+
+		public function stageEventListenersLoader():void {
+			tAll.stageEventListenersLoader();
+			fm.stageEventListenersLoader();
+		}
+
+		public function backgroundEventListenersLoader():void {
+			trace("backgroundEventListenersLoader.");
+		}
+
+		public function fiducialADD(e:FiducialEvent):void {
+			// debug mode console message if Fiducial event captured
+			//trace("Fiducial #" + e.fiducialId + " fiducial added.");
+
+			fm.fiducialADD(e);
+		}
+
+		public function fiducialREMOVE(e:FiducialEvent):void {
+			// debug mode console message if Fiducial event captured
+			//trace("Fiducial #" + e.fiducialId + " fiducial removed.");
+
+			fm.fiducialREMOVE(e);
+		}
+
+		public function fiducialUPDATE(e:FiducialEvent):void {
+			// debug mode console message if Fiducial event captured
+			//trace("Fiducial #" + e.fiducialId + " fiducial update.");
+
+			fm.fiducialUPDATE(e);
+		}
+	}
+}


Player Note object functional, but still a bit wierd

error: pathspec 'flexEditor/src/org/arisgames/editor/data/arisserver/PlayerNoteMedia.as' did not match any file(s) known to git

--- flexEditor/src/org/arisgames/editor/data/arisserver/PlayerNoteMedia.as
+++ flexEditor/src/org/arisgames/editor/data/arisserver/PlayerNoteMedia.as
@@ -0,0 +1,23 @@
+package org.arisgames.editor.data.arisserver
+{
+	public class PlayerNoteMedia // "Extends" the type of object required for multimedia picker... not officially or anything... but... yeah
+	{
+		public var playerNoteId:Number;
+		public var text:String;
+		public var id:Number;
+		public var media:Media;
+		public var index:Number;
+		public var name:String;
+
+		/**
+		 * Constructor
+		 */
+		public function PlayerNoteMedia(mId:Number, text:String, index:Number)
+		{
+			super();
+			this.id = mId;
+			this.text = text;
+			this.index = index;
+		}
+	}
+}


git-svn-id: http://svn.rails2u.com/as3rails2u/trunk@83 96db6a20-122f-0410-8d9f-89437bbe4005

error: pathspec 'src/com/rails2u/utils/TweenerUtil.as' did not match any file(s) known to git

--- src/com/rails2u/utils/TweenerUtil.as
+++ src/com/rails2u/utils/TweenerUtil.as
@@ -0,0 +1,166 @@
+package com.rails2u.utils {
+    import caurina.transitions.Equations;
+    public class TweenerUtil {
+
+        /*
+        public static function easingSerial(...easings):Function {
+            init();
+            var len:uint = easings.length;
+            if (len < 2) throw new ArgumentError('needs 2 =< args.');
+
+            var easing:*;
+            return function easeOutInBounce(t:Number, b:Number, c:Number, d:Number, p_params:Object = null):Number {
+                var i:uint = Math.floor(t/d*len);
+
+                easing = easings[i];
+                if (easing is String){
+                    easing = transitions[easing.toLowerCase()];
+                    easings[i] = easing;
+                }
+                return easing.call(null,
+                t * len,
+                b + ((len-i)/len * (c-b)),
+                c,
+                d * len,
+                p_params);
+            }
+        }
+        */
+
+        public static function easingParallel(...easings):Function {
+            init();
+            var len:uint = easings.length;
+            if (len < 2) throw new ArgumentError('needs 2 =< args.');
+
+            var easing:*;
+            return function easeOutInBounce(t:Number, b:Number, c:Number, d:Number, p_params:Object = null):Number {
+                var res:Number = 0;
+                for (var i:uint = 0; i < len; i++) {
+                    easing = easings[i];
+                    if (easing is String){
+                        easing = transitions[easing.toLowerCase()];
+                        easings[i] = easing;
+                    }
+                    res += easing.call(null, t, b/len, c/len, d, p_params);
+                }
+                return res;
+            };
+        }
+
+        private static var inited:Boolean = false;
+        public static var transitions:Object = {};
+        public static function init():void {
+            if (!inited) {
+                registerTransition("easenone",          Equations.easeNone);
+                registerTransition("linear",            Equations.easeNone);      // mx.transitions.easing.None.easeNone
+                registerTransition("easeinquad",        Equations.easeInQuad);    // mx.transitions.easing.Regular.easeIn
+                registerTransition("easeoutquad",       Equations.easeOutQuad);   // mx.transitions.easing.Regular.easeOut
+                registerTransition("easeinoutquad",     Equations.easeInOutQuad); // mx.transitions.easing.Regular.easeInOut
+                registerTransition("easeoutinquad",     Equations.easeOutInQuad);
+                registerTransition("easeincubic",       Equations.easeInCubic);
+                registerTransition("easeoutcubic",      Equations.easeOutCubic);
+                registerTransition("easeinoutcubic",    Equations.easeInOutCubic);
+                registerTransition("easeoutincubic",    Equations.easeOutInCubic);
+                registerTransition("easeinquart",       Equations.easeInQuart);
+                registerTransition("easeoutquart",      Equations.easeOutQuart);
+                registerTransition("easeinoutquart",    Equations.easeInOutQuart);
+                registerTransition("easeoutinquart",    Equations.easeOutInQuart);
+                registerTransition("easeinquint",       Equations.easeInQuint);
+                registerTransition("easeoutquint",      Equations.easeOutQuint);
+                registerTransition("easeinoutquint",    Equations.easeInOutQuint);
+                registerTransition("easeoutinquint",    Equations.easeOutInQuint);
+                registerTransition("easeinsine",        Equations.easeInSine);
+                registerTransition("easeoutsine",       Equations.easeOutSine);
+                registerTransition("easeinoutsine",     Equations.easeInOutSine);
+                registerTransition("easeoutinsine",     Equations.easeOutInSine);
+                registerTransition("easeincirc",        Equations.easeInCirc);
+                registerTransition("easeoutcirc",       Equations.easeOutCirc);
+                registerTransition("easeinoutcirc",     Equations.easeInOutCirc);
+                registerTransition("easeoutincirc",     Equations.easeOutInCirc);
+
+                registerTransition("easeinexpo",        Equations.easeInExpo);        // mx.transitions.easing.Strong.easeIn
+                registerTransition("easeoutexpo",       Equations.easeOutExpo);       // mx.transitions.easing.Strong.easeOut
+                registerTransition("easeinoutexpo",     Equations.easeInOutExpo);     // mx.transitions.easing.Strong.easeInOut
+                registerTransition("easeoutinexpo",     Equations.easeOutInExpo);
+
+                registerTransition("easeinelastic",     Equations.easeInElastic);     // mx.transitions.easing.Elastic.easeIn
+                registerTransition("easeoutelastic",    Equations.easeOutElastic);    // mx.transitions.easing.Elastic.easeOut
+                registerTransition("easeinoutelastic",  Equations.easeInOutElastic);  // mx.transitions.easing.Elastic.easeInOut
+                registerTransition("easeoutinelastic",  Equations.easeOutInElastic);
+
+                registerTransition("easeinback",        Equations.easeInBack);        // mx.transitions.easing.Back.easeIn
+                registerTransition("easeoutback",       Equations.easeOutBack);       // mx.transitions.easing.Back.easeOut
+                registerTransition("easeinoutback",     Equations.easeInOutBack);     // mx.transitions.easing.Back.easeInOut
+                registerTransition("easeoutinback",     Equations.easeOutInBack);
+
+                registerTransition("easeinbounce",      Equations.easeInBounce);      // mx.transitions.easing.Bounce.easeIn
+                registerTransition("easeoutbounce",     Equations.easeOutBounce);     // mx.transitions.easing.Bounce.easeOut
+                registerTransition("easeinoutbounce",   Equations.easeInOutBounce);   // mx.transitions.easing.Bounce.easeInOut
+                registerTransition("easeoutinbounce",   Equations.easeOutInBounce);
+                inited = true;
+            }
+        }
+
+        public static function registerTransition(name:String, easing:Function):void {
+            transitions[name.toLowerCase()] = easing;
+        }
+    }
+}
+    /*
+     * @param t      Current time (in frames or seconds).
+     * @param b      Starting value.
+     * @param c      Change needed in value.
+     * @param d      Expected easing duration (in frames or seconds).
+     Tweener.registerTransition("easenone",          easeNone);
+     Tweener.registerTransition("linear",            easeNone);      // mx.transitions.easing.None.easeNone
+
+     Tweener.registerTransition("easeinquad",        easeInQuad);    // mx.transitions.easing.Regular.easeIn
+     Tweener.registerTransition("easeoutquad",       easeOutQuad);   // mx.transitions.easing.Regular.easeOut
+     Tweener.registerTransition("easeinoutquad",     easeInOutQuad); // mx.transitions.easing.Regular.easeInOut
+     Tweener.registerTransition("easeoutinquad",     easeOutInQuad);
+
+     Tweener.registerTransition("easeincubic",       easeInCubic);
+     Tweener.registerTransition("easeoutcubic",      easeOutCubic);
+     Tweener.registerTransition("easeinoutcubic",    easeInOutCubic);
+     Tweener.registerTransition("easeoutincubic",    easeOutInCubic);
+
+     Tweener.registerTransition("easeinquart",       easeInQuart);
+     Tweener.registerTransition("easeoutquart",      easeOutQuart);
+     Tweener.registerTransition("easeinoutquart",    easeInOutQuart);
+     Tweener.registerTransition("easeoutinquart",    easeOutInQuart);
+
+     Tweener.registerTransition("easeinquint",       easeInQuint);
+     Tweener.registerTransition("easeoutquint",      easeOutQuint);
+     Tweener.registerTransition("easeinoutquint",    easeInOutQuint);
+     Tweener.registerTransition("easeoutinquint",    easeOutInQuint);
+
+     Tweener.registerTransition("easeinsine",        easeInSine);
+     Tweener.registerTransition("easeoutsine",       easeOutSine);
+     Tweener.registerTransition("easeinoutsine",     easeInOutSine);
+     Tweener.registerTransition("easeoutinsine",     easeOutInSine);
+
+     Tweener.registerTransition("easeincirc",        easeInCirc);
+     Tweener.registerTransition("easeoutcirc",       easeOutCirc);
+     Tweener.registerTransition("easeinoutcirc",     easeInOutCirc);
+     Tweener.registerTransition("easeoutincirc",     easeOutInCirc);
+
+     Tweener.registerTransition("easeinexpo",        easeInExpo);        // mx.transitions.easing.Strong.easeIn
+     Tweener.registerTransition("easeoutexpo",       easeOutExpo);       // mx.transitions.easing.Strong.easeOut
+     Tweener.registerTransition("easeinoutexpo",     easeInOutExpo);     // mx.transitions.easing.Strong.easeInOut
+     Tweener.registerTransition("easeoutinexpo",     easeOutInExpo);
+
+     Tweener.registerTransition("easeinelastic",     easeInElastic);     // mx.transitions.easing.Elastic.easeIn
+     Tweener.registerTransition("easeoutelastic",    easeOutElastic);    // mx.transitions.easing.Elastic.easeOut
+     Tweener.registerTransition("easeinoutelastic",  easeInOutElastic);  // mx.transitions.easing.Elastic.easeInOut
+     Tweener.registerTransition("easeoutinelastic",  easeOutInElastic);
+
+     Tweener.registerTransition("easeinback",        easeInBack);        // mx.transitions.easing.Back.easeIn
+     Tweener.registerTransition("easeoutback",       easeOutBack);       // mx.transitions.easing.Back.easeOut
+     Tweener.registerTransition("easeinoutback",     easeInOutBack);     // mx.transitions.easing.Back.easeInOut
+     Tweener.registerTransition("easeoutinback",     easeOutInBack);
+
+     Tweener.registerTransition("easeinbounce",      easeInBounce);      // mx.transitions.easing.Bounce.easeIn
+     Tweener.registerTransition("easeoutbounce",     easeOutBounce);     // mx.transitions.easing.Bounce.easeOut
+     Tweener.registerTransition("easeinoutbounce",   easeInOutBounce);   // mx.transitions.easing.Bounce.easeInOut
+     Tweener.registerTransition("easeoutinbounce",   easeOutInBounce);
+     */


[VectorCommon] Implemented TemperatureCalculator

git-svn-id: adbdea8fc1759bd16b0eaf24a244a7e5f870a654@112 fe3f0490-d73e-11de-a956-c71e7d3a9d2f

error: pathspec 'VectorCommon/src/org/jbei/bio/utils/TemperatureCalculator.as' did not match any file(s) known to git

--- VectorCommon/src/org/jbei/bio/utils/TemperatureCalculator.as
+++ VectorCommon/src/org/jbei/bio/utils/TemperatureCalculator.as
@@ -0,0 +1,136 @@
+package org.jbei.bio.utils
+{
+    /**
+     * @author Zinovii Dmytriv
+     */
+    public class TemperatureCalculator
+    {
+        public static const TABLE_BRESLAUER:String = "breslauer";
+        public static const TABLE_SUGIMOTO:String = "sugimoto";
+        public static const TABLE_UNIFIED:String = "unified";
+
+        private static const A:Number = -10.8; // helix initiation for deltaS
+        private static const R:Number = 1.987; // Gas Constant (cal/(K*mol))
+        private static const C:Number = 0.5e-6; // Oligo concentration. 0.5uM is typical for PCR
+        private static const Na:Number = 50e-3; // Monovalent salt conc. 50mM is typical for PCR
+
+        public static function calculateTemperature(sequence:String, type:String = TABLE_BRESLAUER):Number
+        {
+            var sequenceLength:int = sequence.length;
+
+            if(sequenceLength == 0) {
+                return 0;
+            }
+
+            var deltaHTable:Vector.<Number> = getDeltaHTable(type);
+            var deltaSTable:Vector.<Number> = getDeltaSTable(type);
+
+            var neighbors:Vector.<int> = new Vector.<int>(); // list goes in this order: aa, at, ac, ag, tt, ta, tc, tg, cc, ca, ct, cg, gg, ga gt, gc
+
+            neighbors.push(calculateReps(sequence, "aa"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "at"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "ac"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "ag"));
+
+            neighbors.push(calculateReps(sequence, "tt"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "ta"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "tc"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "tg"));
+
+            neighbors.push(calculateReps(sequence, "cc"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "ca"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "ct"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "cg"));
+
+            neighbors.push(calculateReps(sequence, "gg"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "ga"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "gt"));
+            neighbors.push(calculateNumberOfOccurances(sequence, "gc"));
+
+            var sumDeltaH:Number = 0.0;
+            var sumDeltaS:Number = 0.0;
+
+            for(var i:int = 0; i < 16; i++) {
+                sumDeltaH = sumDeltaH + neighbors[i] * deltaHTable[i];
+                sumDeltaS = sumDeltaS + neighbors[i] * deltaSTable[i];
+            }
+
+            var temperature:Number = ((-1000.0 * sumDeltaH) / (A + -sumDeltaS + R * Math.log(C / 4.0))) - 273.15 + 16.6 * Math.LOG10E * Math.log(Na);
+
+            if(temperature < 0) {
+                return 0;
+            }
+
+            return temperature;
+        }
+
+        private static function getDeltaHTable(type:String):Vector.<Number> {
+            if(type == TABLE_BRESLAUER) {
+                return Vector.<Number>([9.1, 8.6, 6.5, 7.8, 9.1, 6.0, 5.6, 5.8, 11.0, 5.8, 7.8, 11.9, 11.0, 5.6, 6.5, 11.1]);
+            } else if(type == TABLE_SUGIMOTO) {
+                return Vector.<Number>([8.0, 5.6, 6.5, 7.8, 8.0, 5.6, 5.6, 5.8, 10.9, 8.2, 6.6, 11.8, 10.9, 6.6, 9.4, 11.9]);
+            } else if(type == TABLE_UNIFIED) {
+                return Vector.<Number>([7.9, 7.2, 8.4, 7.8, 7.9, 7.2, 8.2, 8.5, 8.0, 8.5, 7.8, 10.6, 8.0, 8.2, 8.4, 9.8]);
+            } else {
+                return null;
+            }
+        }
+
+        private static function getDeltaSTable(type:String):Vector.<Number> {
+            if(type == TABLE_BRESLAUER) {
+                return Vector.<Number>([24.0, 23.9, 17.3, 20.8, 24.0, 16.9, 13.5, 12.9, 26.6, 12.9, 20.8, 27.8, 26.6, 13.5, 17.3, 26.7]);
+            } else if(type == TABLE_SUGIMOTO) {
+                return Vector.<Number>([21.9, 15.2, 17.3, 20.8, 21.9, 15.2, 13.5, 12.9, 28.4, 25.5, 23.5, 29.0, 28.4, 16.4, 25.5, 29.0]);
+            } else if(type == TABLE_UNIFIED) {
+                return Vector.<Number>([22.2, 20.4, 22.4, 21.0, 22.2, 21.3, 22.2, 22.7, 19.9, 22.7, 21.0, 27.2, 19.9, 22.2, 22.4, 24.4]);
+            } else {
+                return null;
+            }
+        }
+
+        /* like string.count, but find repeating sequences so that
+        repcount("aaaaaa","aa") will return 5 instead of 3.
+        USed for counting sequence pairs for melt temp calculation*/
+        private static function calculateReps(sequence:String, target:String):int
+        {
+            var sequenceLength:int = sequence.length;
+
+            if(sequenceLength == 0) {
+                return 0;
+            }
+
+            var numFound:int = 0;
+            var seqoffset:int = 0; // search offset for finding multiple matches
+
+            while(true) {
+                var foundseq:int = sequence.indexOf(target, seqoffset);
+
+                if(foundseq == -1) {
+                    break;
+                }
+
+                seqoffset = foundseq + 1;
+                numFound++;
+
+                if (seqoffset > sequenceLength) {
+                    break;
+                }
+            }
+
+            return numFound;
+        }
+
+        private static function calculateNumberOfOccurances(sequence:String, target:String):int
+        {
+            var sequenceLength:int = sequence.length;
+
+            if(sequenceLength == 0) {
+                return 0;
+            }
+
+            var numberFound:int = sequence.split(target).length - 1;
+
+            return numberFound;
+        }
+    }
+}


Add missing builtin flash.utils.Endian

Add missing builtin flash.utils.Endian

error: pathspec 'src/flash/utils/Endian.as' did not match any file(s) known to git

--- src/flash/utils/Endian.as
+++ src/flash/utils/Endian.as
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2014 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package flash.utils {
+public final class Endian {
+  public static const BIG_ENDIAN: String = "bigEndian";
+  public static const LITTLE_ENDIAN: String = "littleEndian";
+}
+}


Add VertexUvShader (vertex streams must have an uv component)

error: pathspec 'src/aerys/minko/render/effect/vertex/VertexUVShader.as' did not match any file(s) known to git

--- src/aerys/minko/render/effect/vertex/VertexUVShader.as
+++ src/aerys/minko/render/effect/vertex/VertexUVShader.as
@@ -0,0 +1,27 @@
+package aerys.minko.render.effect.vertex
+{
+	import aerys.minko.render.RenderTarget;
+	import aerys.minko.render.effect.basic.BasicShader;
+	import aerys.minko.render.shader.SFloat;
+	import aerys.minko.type.stream.format.VertexComponent;
+
+	public class VertexUVShader extends BasicShader
+	{
+
+		public function VertexUVShader(target 	: RenderTarget 	= null,
+									   priority	: Number		= 0)
+		{
+			super(target, priority);
+		}
+
+		override protected function getPixelColor() : SFloat
+		{
+			var uv 				: SFloat = getVertexAttribute(VertexComponent.UV);
+			var interpolatedUv 	: SFloat = normalize(interpolate(uv));
+
+
+			return float4(interpolatedUv.x, interpolatedUv.y, 0, 1);
+		}
+
+	}
+}


add utility function to help core.version convert from a string

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jisobkim/gaforflash.git/'


formatToString() friendly toString helper

error: pathspec 'src/asx/string/formatToString.as' did not match any file(s) known to git

--- src/asx/string/formatToString.as
+++ src/asx/string/formatToString.as
@@ -0,0 +1,40 @@
+package asx.string
+{
+	import asx.fn._;
+	import asx.fn.partial;
+
+	/**
+	 * Returns a formattted string for use with toString().
+	 *
+	 * @example
+	 * <listing version="3.0">
+	 *  // in Example.as
+	 *  public function toString():String
+	 *  {
+	 *      return formatToString(this, "Example", ["id", "greeting", "departing"]);
+	 *  }
+	 *
+	 *  // in use
+	 *  assertThat(example.toString(), equalTo("[Example id=1 greeting=HELLO departing=GOODBYE]"));
+	 * </listing>
+	 */
+	public function formatToString(object:Object, type:String, fields:Array = null):String
+	{
+		return substitute("[{} {}]", type, (fields || []).map(partial(formatToStringField, object, _)).join(" "));
+	}
+}
+
+import asx.string.substitute;
+
+/**
+ * Format a field for use with formatToString
+ */
+internal function formatToStringField(object:Object, field:String):String
+{
+	var value:Object = object[field];
+	if (value is String)
+	{
+		value = '"' + value + '"';
+	}
+	return substitute("{}={}", field, value);
+}


added CustomVSlider

added CustomVSlider

error: pathspec 'WeaveUI/src/weave/ui/CustomVSlider.as' did not match any file(s) known to git

--- WeaveUI/src/weave/ui/CustomVSlider.as
+++ WeaveUI/src/weave/ui/CustomVSlider.as
@@ -0,0 +1,27 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ *
+ * This file is part of Weave.
+ *
+ * The Initial Developer of Weave is the Institute for Visualization
+ * and Perception Research at the University of Massachusetts Lowell.
+ * Portions created by the Initial Developer are Copyright (C) 2008-2015
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+package weave.ui
+{
+	import mx.controls.sliderClasses.SliderDirection;
+
+	public class CustomVSlider extends CustomHSlider
+	{
+		public function CustomVSlider()
+		{
+			direction = SliderDirection.VERTICAL;
+		}
+	}
+}


Added test cases for dates

Added test cases for dates

error: pathspec 'src/br/com/stimuli/string/tests/DateTest.as' did not match any file(s) known to git

--- src/br/com/stimuli/string/tests/DateTest.as
+++ src/br/com/stimuli/string/tests/DateTest.as
@@ -0,0 +1,51 @@
+package br.com.stimuli.string.tests
+{
+    import flexunit.framework.TestCase;
+    import br.com.stimuli.string.printf;
+
+
+    public class DateTest extends TestCase
+    {
+         public var d : Date = new Date(1978, 2, 10, 14, 35, 5, 6);
+        public function DateTest(methodName:String=null)
+        {
+            super(methodName);
+        }
+
+        public function testFullYear() : void{
+            assertEquals("1978", printf("%Y", d));
+        }
+
+        public function testYear() : void{
+            assertEquals("78", printf("%y", d));
+        }
+
+        public function testMonth() : void{
+            assertEquals("3", printf("%m", d));
+        }
+
+        public function testDay() : void{
+            assertEquals("10", printf("%D", d));
+        }
+
+        public function testHour24() : void{
+            assertEquals("14", printf("%H", d));
+        }
+
+        public function testHour12() : void{
+            assertEquals("2", printf("%I", d));
+        }
+
+        public function testHourAMPM() : void{
+            assertEquals("p.m", printf("%p", d));
+        }
+
+        public function testMinutes() : void{
+            assertEquals("35", printf("%M", d));
+        }
+
+        public function testSeconds() : void{
+            assertEquals("5", printf("%S", d));
+        }
+    }
+}


DoubleClick: This fixes the known issue with DoubleClick where the focusManager tries to access the stage when it doesn't have access to it.  This was part of the Tooltip.swc file.  It also fixes a support case issue for Case# 00033810: IMA3 Issue [Veria, PID 726562].

error: pathspec 'kdp3Lib/src/fl/managers/FocusManager.as' did not match any file(s) known to git

--- kdp3Lib/src/fl/managers/FocusManager.as
+++ kdp3Lib/src/fl/managers/FocusManager.as
@@ -0,0 +1,832 @@
+package fl.managers
+{
+    import fl.controls.*;
+    import fl.core.*;
+    import flash.display.*;
+    import flash.events.*;
+    import flash.text.*;
+    import flash.ui.*;
+    import flash.utils.*;
+
+    public class FocusManager extends Object implements fl.managers.IFocusManager
+    {
+        private function hasFocusableObjects():Boolean
+        {
+            var loc1:*=null;
+            var loc2:*=0;
+            var loc3:*=focusableObjects;
+            for (loc1 in loc3)
+            {
+                return true;
+            }
+            return false;
+        }
+
+        private function tabIndexChangeHandler(arg1:flash.events.Event):void
+        {
+            calculateCandidates = true;
+            return;
+        }
+
+        public function set defaultButton(arg1:fl.controls.Button):void
+        {
+            var loc1:*=arg1 ? fl.controls.Button(arg1) : null;
+            if (loc1 != _defaultButton)
+            {
+                if (_defaultButton)
+                {
+                    _defaultButton.emphasized = false;
+                }
+                if (defButton)
+                {
+                    defButton.emphasized = false;
+                }
+                _defaultButton = loc1;
+                defButton = loc1;
+                if (loc1)
+                {
+                    loc1.emphasized = true;
+                }
+            }
+            return;
+        }
+
+        private function sortFocusableObjects():void
+        {
+            var loc1:*=null;
+            var loc2:*=null;
+            focusableCandidates = [];
+            var loc3:*=0;
+            var loc4:*=focusableObjects;
+            for (loc1 in loc4)
+            {
+                loc2 = flash.display.InteractiveObject(loc1);
+                if (loc2.tabIndex && !isNaN(Number(loc2.tabIndex)) && loc2.tabIndex > 0)
+                {
+                    sortFocusableObjectsTabIndex();
+                    return;
+                }
+                focusableCandidates.push(loc2);
+            }
+            focusableCandidates.sort(sortByDepth);
+            return;
+        }
+
+        private function keyFocusChangeHandler(arg1:flash.events.FocusEvent):void
+        {
+            showFocusIndicator = true;
+            if ((arg1.keyCode == flash.ui.Keyboard.TAB || arg1.keyCode == 0) && !arg1.isDefaultPrevented())
+            {
+                setFocusToNextObject(arg1);
+                arg1.preventDefault();
+            }
+            return;
+        }
+
+        private function getIndexOfFocusedObject(arg1:flash.display.DisplayObject):int
+        {
+            var loc1:*=focusableCandidates.length;
+            var loc2:*=0;
+            loc2 = 0;
+            while (loc2 < loc1)
+            {
+                if (focusableCandidates[loc2] == arg1)
+                {
+                    return loc2;
+                }
+                ++loc2;
+            }
+            return -1;
+        }
+
+        public function hideFocus():void
+        {
+            return;
+        }
+
+        private function removedHandler(arg1:flash.events.Event):void
+        {
+            var loc1:*=0;
+            var loc3:*=null;
+            var loc2:*=flash.display.DisplayObject(arg1.target);
+            if (loc2 is fl.managers.IFocusManagerComponent && focusableObjects[loc2] == true)
+            {
+                if (loc2 == lastFocus)
+                {
+                    fl.managers.IFocusManagerComponent(lastFocus).drawFocus(false);
+                    lastFocus = null;
+                }
+                loc2.removeEventListener(flash.events.Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
+                delete focusableObjects[loc2];
+                calculateCandidates = true;
+            }
+            else if (loc2 is flash.display.InteractiveObject && focusableObjects[loc2] == true)
+            {
+                loc3 = loc2 as flash.display.InteractiveObject;
+                if (loc3)
+                {
+                    if (loc3 == lastFocus)
+                    {
+                        lastFocus = null;
+                    }
+                    delete focusableObjects[loc3];
+                    calculateCandidates = true;
+                }
+                loc2.addEventListener(flash.events.Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
+            }
+            removeFocusables(loc2);
+            return;
+        }
+
+        private function sortByDepth(arg1:flash.display.InteractiveObject, arg2:flash.display.InteractiveObject):Number
+        {
+            var loc3:*=0;
+            var loc4:*=null;
+            var loc5:*=null;
+            var loc1:*="";
+            var loc2:*="";
+            var loc6:*="0000";
+            var loc7:*=flash.display.DisplayObject(arg1);
+            var loc8:*=flash.display.DisplayObject(arg2);
+            while (!(loc7 == flash.display.DisplayObject(form)) && loc7.parent)
+            {
+                loc3 = getChildIndex(loc7.parent, loc7);
+                loc4 = loc3.toString(16);
+                if (loc4.length < 4)
+                {
+                    loc5 = loc6.substring(0, 4 - loc4.length) + loc4;
+                }
+                loc1 = loc5 + loc1;
+                loc7 = loc7.parent;
+            }
+            while (!(loc8 == flash.display.DisplayObject(form)) && loc8.parent)
+            {
+                loc3 = getChildIndex(loc8.parent, loc8);
+                loc4 = loc3.toString(16);
+                if (loc4.length < 4)
+                {
+                    loc5 = loc6.substring(0, 4 - loc4.length) + loc4;
+                }
+                loc2 = loc5 + loc2;
+                loc8 = loc8.parent;
+            }
+            return loc1 > loc2 ? 1 : loc1 < loc2 ? -1 : 0;
+        }
+
+        public function get defaultButton():fl.controls.Button
+        {
+            return _defaultButton;
+        }
+
+        private function activateHandler(arg1:flash.events.Event):void
+        {
+            var loc1:*=flash.display.InteractiveObject(arg1.target);
+            if (lastFocus)
+            {
+                if (lastFocus is fl.managers.IFocusManagerComponent)
+                {
+                    fl.managers.IFocusManagerComponent(lastFocus).setFocus();
+                }
+                else
+                {
+                    form.stage.focus = lastFocus;
+                }
+            }
+            lastAction = "ACTIVATE";
+            return;
+        }
+
+        public function showFocus():void
+        {
+            return;
+        }
+
+        public function set defaultButtonEnabled(arg1:Boolean):void
+        {
+            _defaultButtonEnabled = arg1;
+            return;
+        }
+
+        public function getNextFocusManagerComponent(arg1:Boolean=false):flash.display.InteractiveObject
+        {
+            var loc7:*=null;
+            if (!hasFocusableObjects())
+            {
+                return null;
+            }
+            if (calculateCandidates)
+            {
+                sortFocusableObjects();
+                calculateCandidates = false;
+            }
+            var loc1:*=form.stage.focus;
+            loc1 = flash.display.DisplayObject(findFocusManagerComponent(flash.display.InteractiveObject(loc1)));
+            var loc2:*="";
+            if (loc1 is fl.managers.IFocusManagerGroup)
+            {
+                loc7 = fl.managers.IFocusManagerGroup(loc1);
+                loc2 = loc7.groupName;
+            }
+            var loc3:*=getIndexOfFocusedObject(loc1);
+            var loc4:*=false;
+            var loc5:*=loc3;
+            if (loc3 == -1)
+            {
+                if (arg1)
+                {
+                    loc3 = focusableCandidates.length;
+                }
+                loc4 = true;
+            }
+            var loc6:*=getIndexOfNextObject(loc3, arg1, loc4, loc2);
+            return findFocusManagerComponent(focusableCandidates[loc6]);
+        }
+
+        private function mouseDownHandler(arg1:flash.events.MouseEvent):void
+        {
+            if (arg1.isDefaultPrevented())
+            {
+                return;
+            }
+            var loc1:*=getTopLevelFocusTarget(flash.display.InteractiveObject(arg1.target));
+            if (!loc1)
+            {
+                return;
+            }
+            showFocusIndicator = false;
+            if ((!(loc1 == lastFocus) || lastAction == "ACTIVATE") && !(loc1 is flash.text.TextField))
+            {
+                setFocus(loc1);
+            }
+            lastAction = "MOUSEDOWN";
+            return;
+        }
+
+        private function isTabVisible(arg1:flash.display.DisplayObject):Boolean
+        {
+            return true;
+            var loc1:*=arg1.parent;
+            while (loc1 && !(loc1 is flash.display.Stage) && !(loc1.parent && loc1.parent is flash.display.Stage))
+            {
+                if (!loc1.tabChildren)
+                {
+                    return false;
+                }
+                loc1 = loc1.parent;
+            }
+            return true;
+        }
+
+        public function get nextTabIndex():int
+        {
+            return 0;
+        }
+
+        private function keyDownHandler(arg1:flash.events.KeyboardEvent):void
+        {
+            if (arg1.keyCode == flash.ui.Keyboard.TAB)
+            {
+                lastAction = "KEY";
+                if (calculateCandidates)
+                {
+                    sortFocusableObjects();
+                    calculateCandidates = false;
+                }
+            }
+            if (defaultButtonEnabled && arg1.keyCode == flash.ui.Keyboard.ENTER && defaultButton && defButton.enabled)
+            {
+                sendDefaultButtonEvent();
+            }
+            return;
+        }
+
+        private function focusInHandler(arg1:flash.events.FocusEvent):void
+        {
+            var loc2:*=null;
+            var loc1:*=flash.display.InteractiveObject(arg1.target);
+            if (form.contains(loc1))
+            {
+                lastFocus = findFocusManagerComponent(flash.display.InteractiveObject(loc1));
+                if (lastFocus is fl.controls.Button)
+                {
+                    loc2 = fl.controls.Button(lastFocus);
+                    if (defButton)
+                    {
+                        defButton.emphasized = false;
+                        defButton = loc2;
+                        loc2.emphasized = true;
+                    }
+                }
+                else if (defButton && !(defButton == _defaultButton))
+                {
+                    defButton.emphasized = false;
+                    defButton = _defaultButton;
+                    _defaultButton.emphasized = true;
+                }
+            }
+            return;
+        }
+
+        private function tabEnabledChangeHandler(arg1:flash.events.Event):void
+        {
+            calculateCandidates = true;
+            var loc1:*=flash.display.InteractiveObject(arg1.target);
+            var loc2:*=focusableObjects[loc1] == true;
+            if (loc1.tabEnabled)
+            {
+                if (!loc2 && isTabVisible(loc1))
+                {
+                    if (!(loc1 is fl.managers.IFocusManagerComponent))
+                    {
+                        loc1.focusRect = false;
+                    }
+                    focusableObjects[loc1] = true;
+                }
+            }
+            else if (loc2)
+            {
+                delete focusableObjects[loc1];
+            }
+            return;
+        }
+
+        public function set showFocusIndicator(arg1:Boolean):void
+        {
+            _showFocusIndicator = arg1;
+            return;
+        }
+
+        public function get form():flash.display.DisplayObjectContainer
+        {
+            return _form;
+        }
+
+        private function sortByTabIndex(arg1:flash.display.InteractiveObject, arg2:flash.display.InteractiveObject):int
+        {
+            return arg1.tabIndex > arg2.tabIndex ? 1 : arg1.tabIndex < arg2.tabIndex ? -1 : sortByDepth(arg1, arg2);
+        }
+
+        public function get defaultButtonEnabled():Boolean
+        {
+            return _defaultButtonEnabled;
+        }
+
+        public function activate():void
+        {
+            if (activated)
+            {
+                return;
+            }
+            form.stage.addEventListener(flash.events.FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
+            form.stage.addEventListener(flash.events.FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
+            form.addEventListener(flash.events.FocusEvent.FOCUS_IN, focusInHandler, true);
+            form.addEventListener(flash.events.FocusEvent.FOCUS_OUT, focusOutHandler, true);
+            form.stage.addEventListener(flash.events.Event.ACTIVATE, activateHandler, false, 0, true);
+            form.stage.addEventListener(flash.events.Event.DEACTIVATE, deactivateHandler, false, 0, true);
+            form.addEventListener(flash.events.MouseEvent.MOUSE_DOWN, mouseDownHandler);
+            form.addEventListener(flash.events.KeyboardEvent.KEY_DOWN, keyDownHandler, true);
+            activated = true;
+            if (lastFocus)
+            {
+                setFocus(lastFocus);
+            }
+            return;
+        }
+
+        public function deactivate():void
+        {
+            form.stage.removeEventListener(flash.events.FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
+            form.stage.removeEventListener(flash.events.FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
+            form.removeEventListener(flash.events.FocusEvent.FOCUS_IN, focusInHandler, true);
+            form.removeEventListener(flash.events.FocusEvent.FOCUS_OUT, focusOutHandler, true);
+            form.stage.removeEventListener(flash.events.Event.ACTIVATE, activateHandler);
+            form.stage.removeEventListener(flash.events.Event.DEACTIVATE, deactivateHandler);
+            form.removeEventListener(flash.events.MouseEvent.MOUSE_DOWN, mouseDownHandler);
+            form.removeEventListener(flash.events.KeyboardEvent.KEY_DOWN, keyDownHandler, true);
+            activated = false;
+            return;
+        }
+
+        public function FocusManager(arg1:flash.display.DisplayObjectContainer)
+        {
+            super();
+            focusableObjects = new flash.utils.Dictionary(true);
+            if (arg1 != null)
+            {
+                _form = arg1;
+                addFocusables(flash.display.DisplayObject(arg1));
+                arg1.addEventListener(flash.events.Event.ADDED, addedHandler);
+                arg1.addEventListener(flash.events.Event.REMOVED, removedHandler);
+                activate();
+            }
+            return;
+        }
+
+        public function get showFocusIndicator():Boolean
+        {
+            return _showFocusIndicator;
+        }
+
+        private function getIndexOfNextObject(arg1:int, arg2:Boolean, arg3:Boolean, arg4:String):int
+        {
+            var loc3:*=null;
+            var loc4:*=null;
+            var loc5:*=0;
+            var loc6:*=null;
+            var loc7:*=null;
+            var loc1:*=focusableCandidates.length;
+            var loc2:*=arg1;
+            while (true)
+            {
+                if (arg2)
+                {
+                    --arg1;
+                }
+                else
+                {
+                    ++arg1;
+                }
+                if (arg3)
+                {
+                    if (arg2 && arg1 < 0)
+                    {
+                        break;
+                    }
+                    if (!arg2 && arg1 == loc1)
+                    {
+                        break;
+                    }
+                }
+                else
+                {
+                    arg1 = (arg1 + loc1) % loc1;
+                    if (loc2 == arg1)
+                    {
+                        break;
+                    }
+                }
+                if (!isValidFocusCandidate(focusableCandidates[arg1], arg4))
+                {
+                    continue;
+                }
+                loc3 = flash.display.DisplayObject(findFocusManagerComponent(focusableCandidates[arg1]));
+                if (loc3 is fl.managers.IFocusManagerGroup)
+                {
+                    loc4 = fl.managers.IFocusManagerGroup(loc3);
+                    loc5 = 0;
+                    while (loc5 < focusableCandidates.length)
+                    {
+                        loc6 = focusableCandidates[loc5];
+                        if (loc6 is fl.managers.IFocusManagerGroup)
+                        {
+                            loc7 = fl.managers.IFocusManagerGroup(loc6);
+                            if (loc7.groupName == loc4.groupName && loc7.selected)
+                            {
+                                arg1 = loc5;
+                            }
+                        }
+                        ++loc5;
+                    }
+                }
+                return arg1;
+            }
+            return arg1;
+        }
+
+        private function mouseFocusChangeHandler(arg1:flash.events.FocusEvent):void
+        {
+            if (arg1.relatedObject is flash.text.TextField)
+            {
+                return;
+            }
+            arg1.preventDefault();
+            return;
+        }
+
+        public function set form(arg1:flash.display.DisplayObjectContainer):void
+        {
+            _form = arg1;
+            return;
+        }
+
+        private function addFocusables(arg1:flash.display.DisplayObject, arg2:Boolean=false):void
+        {
+            var child:flash.display.DisplayObject;
+            var io:flash.display.InteractiveObject;
+            var i:int;
+            var skipTopLevel:Boolean=false;
+            var o:flash.display.DisplayObject;
+            var doc:flash.display.DisplayObjectContainer;
+            var focusable:fl.managers.IFocusManagerComponent;
+
+            var loc1:*;
+            focusable = null;
+            io = null;
+            doc = null;
+            i = 0;
+            child = null;
+            o = arg1;
+            skipTopLevel = arg2;
+            if (!skipTopLevel)
+            {
+                if (o is fl.managers.IFocusManagerComponent)
+                {
+                    focusable = fl.managers.IFocusManagerComponent(o);
+                    if (focusable.focusEnabled)
+                    {
+                        if (focusable.tabEnabled && isTabVisible(o))
+                        {
+                            focusableObjects[o] = true;
+                            calculateCandidates = true;
+                        }
+                        o.addEventListener(flash.events.Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
+                        o.addEventListener(flash.events.Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
+                    }
+                }
+                else if (o is flash.display.InteractiveObject)
+                {
+                    io = o as flash.display.InteractiveObject;
+                    if (io && io.tabEnabled && findFocusManagerComponent(io) == io)
+                    {
+                        focusableObjects[io] = true;
+                        calculateCandidates = true;
+                    }
+                    io.addEventListener(flash.events.Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
+                    io.addEventListener(flash.events.Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
+                }
+            }
+            if (o is flash.display.DisplayObjectContainer)
+            {
+                doc = flash.display.DisplayObjectContainer(o);
+                o.addEventListener(flash.events.Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
+                if (doc is flash.display.Stage || doc.parent is flash.display.Stage || doc.tabChildren)
+                {
+                    i = 0;
+                    while (i < doc.numChildren)
+                    {
+                        try
+                        {
+                            child = doc.getChildAt(i);
+                            if (child != null)
+                            {
+                                addFocusables(doc.getChildAt(i));
+                            }
+                        }
+                        catch (error:SecurityError)
+                        {
+                        };
+                        ++i;
+                    }
+                }
+            }
+            return;
+        }
+
+        private function getChildIndex(arg1:flash.display.DisplayObjectContainer, arg2:flash.display.DisplayObject):int
+        {
+            return arg1.getChildIndex(arg2);
+        }
+
+        public function findFocusManagerComponent(arg1:flash.display.InteractiveObject):flash.display.InteractiveObject
+        {
+            var loc1:*=arg1;
+            while (arg1)
+            {
+                if (arg1 is fl.managers.IFocusManagerComponent && fl.managers.IFocusManagerComponent(arg1).focusEnabled)
+                {
+                    return arg1;
+                }
+                arg1 = arg1.parent;
+            }
+            return loc1;
+        }
+
+        private function focusOutHandler(arg1:flash.events.FocusEvent):void
+        {
+            var loc1:*=arg1.target as flash.display.InteractiveObject;
+            return;
+        }
+
+        private function isValidFocusCandidate(arg1:flash.display.DisplayObject, arg2:String):Boolean
+        {
+            var loc1:*=null;
+            if (!isEnabledAndVisible(arg1))
+            {
+                return false;
+            }
+            if (arg1 is fl.managers.IFocusManagerGroup)
+            {
+                loc1 = fl.managers.IFocusManagerGroup(arg1);
+                if (arg2 == loc1.groupName)
+                {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        private function setFocusToNextObject(arg1:flash.events.FocusEvent):void
+        {
+            if (!hasFocusableObjects())
+            {
+                return;
+            }
+            var loc1:*=getNextFocusManagerComponent(arg1.shiftKey);
+            if (loc1)
+            {
+                setFocus(loc1);
+            }
+            return;
+        }
+
+        private function sortFocusableObjectsTabIndex():void
+        {
+            var loc1:*=null;
+            var loc2:*=null;
+            focusableCandidates = [];
+            var loc3:*=0;
+            var loc4:*=focusableObjects;
+            for (loc1 in loc4)
+            {
+                loc2 = flash.display.InteractiveObject(loc1);
+                if (!(loc2.tabIndex && !isNaN(Number(loc2.tabIndex))))
+                {
+                    continue;
+                }
+                focusableCandidates.push(loc2);
+            }
+            focusableCandidates.sort(sortByTabIndex);
+            return;
+        }
+
+        public function getFocus():flash.display.InteractiveObject
+        {
+            var loc1:*=form.stage.focus;
+            return findFocusManagerComponent(loc1);
+        }
+
+        public function setFocus(arg1:flash.display.InteractiveObject):void
+        {
+            if (arg1 is fl.managers.IFocusManagerComponent)
+            {
+                fl.managers.IFocusManagerComponent(arg1).setFocus();
+            }
+            else
+            {
+                form.stage.focus = arg1;
+            }
+            return;
+        }
+
+        private function deactivateHandler(arg1:flash.events.Event):void
+        {
+            var loc1:*=flash.display.InteractiveObject(arg1.target);
+            return;
+        }
+
+        private function tabChildrenChangeHandler(arg1:flash.events.Event):void
+        {
+            if (arg1.target != arg1.currentTarget)
+            {
+                return;
+            }
+            calculateCandidates = true;
+            var loc1:*=flash.display.DisplayObjectContainer(arg1.target);
+            if (loc1.tabChildren)
+            {
+                addFocusables(loc1, true);
+            }
+            else
+            {
+                removeFocusables(loc1);
+            }
+            return;
+        }
+
+        private function isEnabledAndVisible(arg1:flash.display.DisplayObject):Boolean
+        {
+            var loc2:*=null;
+            var loc3:*=null;
+            var loc1:*=flash.display.DisplayObject(form).parent;
+            while (arg1 != loc1)
+            {
+                if (arg1 is fl.core.UIComponent)
+                {
+                    if (!fl.core.UIComponent(arg1).enabled)
+                    {
+                        return false;
+                    }
+                }
+                else if (arg1 is flash.text.TextField)
+                {
+                    loc2 = flash.text.TextField(arg1);
+                    if (loc2.type == flash.text.TextFieldType.DYNAMIC || !loc2.selectable)
+                    {
+                        return false;
+                    }
+                }
+                else if (arg1 is flash.display.SimpleButton)
+                {
+                    loc3 = flash.display.SimpleButton(arg1);
+                    if (!loc3.enabled)
+                    {
+                        return false;
+                    }
+                }
+                if (!arg1.visible)
+                {
+                    return false;
+                }
+                arg1 = arg1.parent;
+            }
+            return true;
+        }
+
+        private function addedHandler(arg1:flash.events.Event):void
+        {
+            var loc1:*=flash.display.DisplayObject(arg1.target);
+            if (loc1.stage)
+            {
+                addFocusables(flash.display.DisplayObject(arg1.target));
+            }
+            return;
+        }
+
+        public function sendDefaultButtonEvent():void
+        {
+            defButton.dispatchEvent(new flash.events.MouseEvent(flash.events.MouseEvent.CLICK));
+            return;
+        }
+
+        private function getTopLevelFocusTarget(arg1:flash.display.InteractiveObject):flash.display.InteractiveObject
+        {
+            while (arg1 != flash.display.InteractiveObject(form))
+            {
+                if (arg1 is fl.managers.IFocusManagerComponent && fl.managers.IFocusManagerComponent(arg1).focusEnabled && fl.managers.IFocusManagerComponent(arg1).mouseFocusEnabled && fl.core.UIComponent(arg1).enabled)
+                {
+                    return arg1;
+                }
+                arg1 = arg1.parent;
+                if (arg1 != null)
+                {
+                    continue;
+                }
+                break;
+            }
+            return null;
+        }
+
+        private function removeFocusables(arg1:flash.display.DisplayObject):void
+        {
+            var loc1:*=null;
+            var loc2:*=null;
+            if (arg1 is flash.display.DisplayObjectContainer)
+            {
+                arg1.removeEventListener(flash.events.Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
+                arg1.removeEventListener(flash.events.Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
+                var loc3:*=0;
+                var loc4:*=focusableObjects;
+                for (loc1 in loc4)
+                {
+                    loc2 = flash.display.DisplayObject(loc1);
+                    if (!flash.display.DisplayObjectContainer(arg1).contains(loc2))
+                    {
+                        continue;
+                    }
+                    if (loc2 == lastFocus)
+                    {
+                        lastFocus = null;
+                    }
+                    loc2.removeEventListener(flash.events.Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
+                    delete focusableObjects[loc1];
+                    calculateCandidates = true;
+                }
+            }
+            return;
+        }
+
+        private var _defaultButtonEnabled:Boolean=true;
+
+        private var _showFocusIndicator:Boolean=true;
+
+        private var defButton:fl.controls.Button;
+
+        private var lastAction:String;
+
+        private var lastFocus:flash.display.InteractiveObject;
+
+        private var _form:flash.display.DisplayObjectContainer;
+
+        private var focusableCandidates:Array;
+
+        private var activated:Boolean=false;
+
+        private var calculateCandidates:Boolean=true;
+
+        private var focusableObjects:flash.utils.Dictionary;
+
+        private var _defaultButton:fl.controls.Button;
+    }
+}
+
+


Added a basic assert on property that supports attr lookup chaining.

error: pathspec 'flash/org/windmill/WMAssert.as' did not match any file(s) known to git

--- flash/org/windmill/WMAssert.as
+++ flash/org/windmill/WMAssert.as
@@ -0,0 +1,62 @@
+/*
+Copyright 2009, Matthew Eernisse (mde@fleegix.org) and Slide, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package org.windmill {
+  import org.windmill.WMLocator;
+  import org.windmill.WMLogger;
+
+  public class WMAssert {
+    public function WMAssert():void {}
+
+    public static function assertProperty(params:Object):Boolean {
+      var obj:* = WMLocator.lookupDisplayObject(params);
+      // validators can look like this:
+      // foo|bar (Check for attribute foo with value of bar)
+      // foo.bar.baz|qux (Chained attr lookup -- look for
+      //    bar on foo, then baz on bar, where baz has a
+      //    value of qux.
+      var validator:Array = params.validator.split('|');
+      if (validator.length != 2) {
+        throw new Error('assertProperty needs a validator with a pipe separator.');
+      }
+      var attr:String = validator[0];
+      var val:String = validator[1];
+      // Attribute may be chained, so loop through any and
+      // look up the attr we want to check the value on
+      var attrArr:Array = attr.split('.');
+      var objRef:Object;
+      var key:String;
+      while (attrArr.length) {
+        if (!objRef) {
+          objRef = obj;
+        }
+        key = attrArr.shift();
+        if (key in objRef) {
+          objRef = objRef[key];
+        }
+        else {
+          throw new Error('"' + key + '" does not exist.');
+        }
+      }
+      if (objRef == val) {
+        return true;
+      }
+      else {
+        throw new Error('"' + key + '" does not equal "' + val + '"');
+      }
+    }
+  }
+}


adding temporary fake gun shoot to close the cycle in controller (need to be removed and properly implemented)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


added Feature #934 SceneBackground scene node

error: pathspec 'src/aerys/minko/render/shader/background/BackgroundLayerShader.as' did not match any file(s) known to git

--- src/aerys/minko/render/shader/background/BackgroundLayerShader.as
+++ src/aerys/minko/render/shader/background/BackgroundLayerShader.as
@@ -0,0 +1,38 @@
+package aerys.minko.render.shader.background
+{
+	import aerys.minko.render.RenderTarget;
+	import aerys.minko.render.material.basic.BasicProperties;
+	import aerys.minko.render.material.basic.BasicShader;
+	import aerys.minko.render.shader.SFloat;
+
+	public class BackgroundLayerShader extends BasicShader
+	{
+		public function BackgroundLayerShader(target : RenderTarget = null)
+		{
+			super(target, Number.MAX_VALUE);
+		}
+		private static const ZMAX	: Number	= 1. - 1e-7;
+
+		override protected function getVertexPosition() : SFloat
+		{
+			return float4(
+				multiply(vertexXYZ.x, 2),
+				multiply(vertexXYZ.y, 2),
+				ZMAX,
+				1
+			);
+		}
+
+		override protected function getPixelColor() : SFloat
+		{
+			var diffuseMap	: SFloat	= meshBindings.getTextureParameter(BasicProperties.DIFFUSE_MAP);
+
+			var uv 			: SFloat 	= multiply(
+				float4(1, 1, 1, 1),
+				interpolate(vertexUV)
+			);
+
+			return sampleTexture(diffuseMap, uv);
+		}
+	}
+}