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

Rope

Get Adobe Flash player
by ChevyRay 19 Apr 2013
    Embed
/**
 * Copyright ChevyRay ( http://wonderfl.net/user/ChevyRay )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/9Fem
 */

package {
    import flash.display.Sprite;
    
    public class Rope extends Sprite
    {
        public static const PARTS:int = 10
        public static const LENGTH:Number = 100;
        
        public var parts:Array = [];
        
        public function Rope()
        {
            for (var i:int = 0; i < PARTS; i++)
            {
                var part:Sprite = new Sprite();
                part.graphics.beginFill(0xFF0000);
                part.graphics.drawCircle(0, 0, 10);
                addChild(part);
                parts.push(part);
            }
        }
    }
}