I am on the second step - putting a box on the screen.
I have removed some white space and comments to shorten the post
CODE
class com.rwcontrols.sandytest.TestMain {
static var app : TestMain;
function TestMain() {
var myMC : MovieClip
try
{ _root.createEmptyMovieClip('myMC', 1)
init(_root.myMC); }
catch (e:Error)
{trace(e.message);}
}
// entry point
static function main(mc) {app = new TestMain(); }
function init( stage : MovieClip ):Void
{
var ecran:ClipScreen = new ClipScreen( stage, 600, 600 );
var cam:Camera3D = new Camera3D( 400, ecran);
World3D.getInstance().addCamera( cam );
var bg:Group = new Group();
World3D.getInstance().setRootGroup( bg );
createScene( bg );
}
static function createScene( bg:Group ):Void
{
var o:Object3D = new Box( 50, 50, 50 );
bg.addChild( o);
}
}
It compiiles quite nicely with no errors but does not draw a box on the screen
C:\mtasc\mtasc.exe -swf C:\eclipse\workspace\sandytest\test.swf -cp C:\eclipse\workspace\sandytest\src -main com\rwcontrols\sandytest\testmain.as -trace Flashout.traceReplacer -header 800:600:20 -cp C:\mtasc\std8
..... compilation complete!
If I test
try
{ _root.createEmptyMovieClip('myMC', _root.getNextHighestDepth());
_root.myMC.createTextField("tf",0,0,0,800,600);
_root.myMC.tf.text = "Hello world !";
// init(_root.myMC);
}
catch (e:Error)
{trace(e.message);}
}
I do see "Hello World"
If I test
try
{ _root.createEmptyMovieClip('myMC', _root.getNextHighestDepth());
_root.myMC.createTextField("tf",0,0,0,800,600);
_root.myMC.tf.text = "Hello world !";
init(_root.myMC);
}
catch (e:Error)
{trace(e.message);}
}
"Hello World" does not appear.
In the end I hope to use Sandy with ActionStep to create a business application that combines simple 3D graphics with a forms based application.
I hope to be able to Ant rather that Flashout to develope the system once I get the graphics working reliably.
Ron
Anybody gone down that road.