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

tree

Get Adobe Flash player
by maccyan 04 Jan 2010
/**
 * Copyright maccyan ( http://wonderfl.net/user/maccyan )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/629d
 */

// forked from maccyan's forked from: flash on 2010-1-4
package {
	import flash.accessibility.Accessibility;
    import flash.display.Sprite;
    import flash.events.*;
    import flash.utils.*;
    import org.papervision3d.core.geom.*;
    import org.papervision3d.materials.special.*;
    import org.papervision3d.materials.*;
    import org.papervision3d.objects.primitives.*;
    import org.papervision3d.view.*;
    public class FlashTest extends BasicView {
    		private var line:Lines3D;
    		private var line2:Lines3D;
        public function FlashTest() {
            // write as3 code here..
            var lineMaterial:LineMaterial = new LineMaterial(0x956134);		
			var line = new Lines3D(lineMaterial);			
			line.addNewLine(5,-90,0,-90,-90,10,90);
			line.addNewLine(5,-90,10,90,90,20,90);
			line.addNewLine(5,90,20,90,90,30,-90);
			line.addNewLine(5,90,30,-90,-90,40,-90);
			line.addNewLine(5,-90,40,-90,-90,50,90);
			line.addNewLine(5,-90,50,90,90,60,90);
			line.addNewLine(5,90,60,90,90,70,-90);
			line.addNewLine(5,90,70,-90,-90,80,-90);
			line.addNewLine(5,-90,80,-90,-90,90,90);
			line.addNewLine(5,-90,90,90,90,100,90);
			line.addNewLine(5,90,100,90,90,110,-90);
			line.addNewLine(5,90,110,-90,-90,120,-90);
			line.addNewLine(5,-90,120,-90,-90,130,90);
			line.addNewLine(5,-90,130,90,90,140,90);
			line.addNewLine(5,90,150,90,90,160,-90);
			line.addNewLine(5,90,160,-90,-90,170,-90);
			line.addNewLine(5,-90,170,-90,-90,180,90);
			line.addNewLine(5,-90,180,90,90,190,90);
			line.addNewLine(5,90,190,90,90,200,-90);
			line.addNewLine(5,90,200,-90,-90,210,-90);
			line.addNewLine(5,-90,210,-90,-90,220,90);
			line.addNewLine(5,-90,220,90,90,230,90);
			line.addNewLine(5,90,230,90,90,240,-90);
			line.addNewLine(5,90,240,-90,-90,250,-90);
			line.addNewLine(5,-90,250,-90,-90,260,90);
			line.addNewLine(5,-90,260,90,90,270,90);
			line.addNewLine(5,90,270,90,90,280,-90);
			line.addNewLine(5,90,280,-90,-90,290,-90);
			line.addNewLine(5,-90,290,-90,-90,300,90);
			line.addNewLine(5,-90,300,90,90,310,90);
			line.addNewLine(5,90,310,90,90,320,-90);
			line.addNewLine(5,90,320,-90,-90,330,-90);
			line.addNewLine(5,-90,330,-90,-90,340,90);
			line.addNewLine(5,-90,340,90,90,350,90);
			line.addNewLine(5,90,350,90,90,360,-90);
			line.addNewLine(5,90,360,-90,-90,370,-90);
			line.addNewLine(5,-90,370,-90,-90,380,90);
			line.addNewLine(5,-90,380,90,90,390,90);
			line.addNewLine(5,90,400,90,90,410,-90);
			line.addNewLine(5,90,410,-90,-90,420,-90);
			line.addNewLine(5,-90,420,-90,0,430,0);
			
			var lm:LineMaterial = new LineMaterial(0x8DB228);
			var line2 = new Lines3D(lm);	
			
			line2.addNewLine(5,0,430,0,250,440,250);
			line2.addNewLine(5,250,440,250,240,450,-240);
			line2.addNewLine(5,240,450,-240,-230,460,-230);
			line2.addNewLine(5,-230,460,-230,-220,470,220);
			line2.addNewLine(5,-220,470,220,210,480,210);
			line2.addNewLine(5,210,480,210,200,490,-200);
			line2.addNewLine(5,200,490,-200,-190,500,-190);
			line2.addNewLine(5,-190,500,-190,-180,510,180);
			line2.addNewLine(5,-180,510,180,170,520,170);
			line2.addNewLine(5,170,520,170,160,530,-160);
			line2.addNewLine(5,160,530,-160,-155,540,-155);
			line2.addNewLine(5,-155,540,-155,-150,550,150);
			line2.addNewLine(5,-150,550,150,145,560,145);
			line2.addNewLine(5,145,560,145,140,570,-140);
			line2.addNewLine(5,140,570,-140,-135,580,-135);
			line2.addNewLine(5,-135,580,-135,-130,590,130);
			line2.addNewLine(5,-130,590,130,125,600,125);
			line2.addNewLine(5,125,600,125,120,610,-120);
			line2.addNewLine(5,120,610,-120,-115,620,-115);
			line2.addNewLine(5,-115,620,-115,-110,630,110);
			line2.addNewLine(5,-110,630,110,100,640,100);
			line2.addNewLine(5,100,640,100,90,650,-90);
			line2.addNewLine(5,90,650,-90,-80,660,-80);
			line2.addNewLine(5,-80,660,-80,-70,670,70);
			line2.addNewLine(5,-70,670,70,60,680,60);
			line2.addNewLine(5,60,680,60,55,690,-55);
			line2.addNewLine(5,55,690,-55,-50,700,-50);
			line2.addNewLine(5,-50,700,-50,-45,710,45);
			line2.addNewLine(5,-45,710,45,42,720,42);
			line2.addNewLine(5,42,720,42,39,730,-39);
			line2.addNewLine(5,39,730,-39,-36,740,-36);
			line2.addNewLine(5,-36,740,-36,-33,750,33);
			line2.addNewLine(5,-33,750,33,0,780,0);
			
			
			
							
			scene.addChild(line);									
			scene.addChild(line2);				
			var plane:Plane = new Plane(new ColorMaterial(0x333333), 2000, 2000, 14, 14);			
			plane.rotationX = 90;			
			scene.addChild(plane);
										
			startRendering();
			addEventListener(Event.ENTER_FRAME, loop);		
			}				
			private function loop(e:Event):void {			
					camera.x = 1500 * Math.sin(getTimer() / 2000);			
					camera.z = 1500 * Math.cos(getTimer() / 2000);			
					camera.y = 1000;									
							}		
						}				
			}