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

test

Get Adobe Flash player
by gaziya 09 Dec 2011
    Embed
/**
 * Copyright gaziya ( http://wonderfl.net/user/gaziya )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/eqsd
 */

// forked from gaziya's フィボナッチ数列 
// forked from gaziya's example用スケルトン
package {
    
    import flash.utils.*;
    import flash.geom.*;
    import flash.display.*;
    import flash.display3D.*;
    import flash.display3D.textures.*;
    import com.adobe.utils.*
    
    import com.actionscriptbible.Example
    [SWF(width=465,height=465)]

    public class Main extends Example {
        public function Main() {
            var rails:Vector.<Vector3D> = new Vector.<Vector3D>
             var railCoord:Function = function(r:int,t:Number):Vector3D {
                return new Vector3D(
                    r*Math.cos(t),
                    r*Math.sin(2*t),
                    0.3*r*Math.sin(t)
                )
                //return coord
            }
            rails.push(railCoord(200,Math.PI))
            rails.push(railCoord(300,Math.PI))
            trace(rails)
            var v:Vector3D
            trace(v=rails[0].subtract(rails[1]))
            v.negate()
            trace(v)
            
        }
    }
}