I simply looked a lesson on the sandy. It is site about a sandy:
http://www.flashsandy.org/tutorials/3.0/sandy_cs3_tut043 From
there I download an example. There the clip as library for images is
just used. I want to make too most with a away3d.
Here a part of a code from thise exemple:
public class Example0043 extends Sprite
{
private var scene:Scene3D;
private var camera:Camera3D;
private var queue:LoaderQueue;
private var s:Sprite3D;
public function Example0043():void
{
queue = new LoaderQueue();
queue.add( "plane", new URLRequest("plane/plane.swf") );
queue.addEventListener(SandyEvent.QUEUE_COMPLETE, loadComplete );
queue.start();
}
public function loadComplete(event:QueueEvent ):void
{
// We create the camera
camera = new Camera3D( 500, 300 );
camera.y = 10;
camera.z = -300;
// We create the "group" that is the tree of all the visible
objects
var root:Group = createScene();
// We create a Scene and we add the camera and the objects tree
scene = new Scene3D( "scene", this, camera, root );
scene.rectClipping = true;
// Listen to the heart beat and render the scene
addEventListener( Event.ENTER_FRAME, enterFrameHandler );
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedHandler);
}
// Create the scene graph based on the root Group of the scene
private function createScene():Group
{
// Create the root Group
var g:Group = new Group();
// let's create the Sprete 3D object
s = new Sprite3D("plane",queue.data["plane"],2);
s.rotateY = 90;
s.x = 0;
s.z = 0;
s.y = 0;
g.addChild(s);
return g;
}
// The Event.ENTER_FRAME event handler tells the Scene3D to
render
private function enterFrameHandler( event : Event ) : void
{
if (s.rotateY==0)
s.rotateY=0.1;
if(s.x > 220 && s.z < 0)
s.x=-220;
else if(s.x < -220 && s.z < 0)
s.x=220;
else if (s.z<-250)
s.z=1000;
s.moveForward(-7);
scene.render();
}
// This function handles the move foreward or backward simultaion
private function keyPressedHandler(event:KeyboardEvent):void {
if(event.keyCode == Keyboard.RIGHT)
s.rotateY -=5;
if(event.keyCode == Keyboard.LEFT)
s.rotateY +=5;
}
}
P.S.: Probably I badly explain, coz my English is unreal bad.
link (using mc):
http://away3d-dev.googlegroups.com/web/Sandi3dSpriteExemple.rar?gda=JvSo3EkAAAAHMJMgzEEFY9eje5YoZG2YvJ2MJKSX_2oj0SM8gqgpQGG1qiJ7UbTIup-M2XPURDR9at1yCnUo3-8G1kpo_IIPaVlcxA3SGWbGzZuMbMYyXw