Difference between revisions of "3D Space Example.as"

From Organic Design wiki
m
(oops, didn't include ball)
Line 2: Line 2:
 
allSpaces = [];
 
allSpaces = [];
 
#include "space.as"
 
#include "space.as"
 +
#include "ball.as"
  
 
// Instantiate a new 3D-space
 
// Instantiate a new 3D-space

Revision as of 20:53, 24 March 2006

Mouse.hide(); allSpaces = [];

  1. include "space.as"
  2. include "ball.as"

// Instantiate a new 3D-space // - extends createEmptyMovieClip( name, layer ) createEmptySpace( 'mySpace', 1 ); allSpaces.push( mySpace ); mySpace._x = width / 2; mySpace._y = height / 2;

// Per frame function reduce() { now = new Date(); time = now.getTime(); for ( var i = 0; i < allSpaces.length; i++ ) if ( allSpaces[i].active ) allSpaces[i].reduce(); }

// Test object mySpace.create( [ 'torus', 'myTorus', 5, 200, 2000 ] );