In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2013-9-22

Get Adobe Flash player
by Joro.Nikolov 22 Sep 2013
    Embed
/**
 * Copyright Joro.Nikolov ( http://wonderfl.net/user/Joro.Nikolov )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/wZu6
 */

package {
    import flash.text.TextField;
    import flash.text.engine.TextBlock;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
             var maxPoint:int = -1000;

            var chooseComb:Array = new Array();
            var points:Array = new Array();
            points.push(-11);
            points.push(-5);
            points.push(-11);
            points.push(-5);
            var i:int;

            for(i=0;i<4;i++) {

                if (points[i] > maxPoint) maxPoint = points[i];

            }



            for(i=0;i<4;i++) {

                if (points[i] ==  maxPoint) chooseComb.push(i);

            }
            
            var txt:String = chooseComb.join(",");
            
            var lbl:TextField = new TextField();
            lbl.text = txt;
            
            this.addChild(lbl);

         
            
        }
    }
}