|
plz why have this error (ver 1,2)
**Error**
D:\Programmi\Macromedia\Flash 8\Librerie\sandy\view\ClipScreen.as: Line
102: There is no method with the name 'updateScreen'.
_c.updateScreen();
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 22: Type mismatch.
var cam:Camera3D = new Camera3D( 700, screen );
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 29: There is no method with the name 'addCamera'.
world.addCamera( cam );
Total ActionScript Errors: 3 Reported Errors: 3
------------------------------------------------------
origin
import sandy.core.data.*;
import sandy.core.group.*;
import sandy.primitive.*;
import sandy.view.*;
import sandy.core.*;
import sandy.skin.*;
import sandy.util.*;
import sandy.core.transform.*;
import sandy.events.*;
// We define some useful global variables
var screen:ClipScreen; // Presentation surface
var world:World3D = World3D.getInstance(); // Our 3D world
// In the init() function we initialize and render the world
function init( Void ):Void {
// Create a clipScreen as presentation surface for the World3D to draw on
screen = new ClipScreen( this.createEmptyMovieClip('screen', 1), 300, 300 );
// Create a camera, so we can see our world.
// Give it a focal distance ( equivalent ) and a reference to the viewing screen.
var cam:Camera3D = new Camera3D( 700, screen );
// Position the camera at a negative distance along the z axis
// By default it is looking at the origin of the world coordinate system [0,0,0]
cam.setPosition(0,0,-500);
// Attach the camera to the world
world.addCamera( cam );
// Create the root group, the branch node for all objects in our world
var bg:Group = new Group();
// and attach it to the world. this node is responsible
// for drawing all its ( possibly transformed child nodes
world.setRootGroup( bg );
// Create the scene and attach it to the rootGroup
createScene( bg );
// Finally we start rendering the world
world.render();
}
function createScene( bg:Group ):Void {
// Start by creating a Box primitive.
// By setting all edges to 50 pixels, we'll get a cube
var cube:Object3D = new Box( 50, 50, 50, 'quad' );
// We can create a skin to make the cube look a little better
// Here we use a mixed skin with a semi transparent green color and black thin lines
var skin:Skin = new MixedSkin( 0x00FF00, 80, 0, 100, 1 );
// Apply the skin to the cube.
cube.setSkin( skin );
// Add the cube as a child to the rootGroup
bg.addChild( cube );
}
------------------------------------------------------
Look here
http://www.flashsandy.org/faq/porting_11_12
HTH
It looks like you are trying to compile a Sandy 1.1 example with the Sandy 1.2 libraries.
Bruce
**Error**
D:\Programmi\Macromedia\Flash 8\Librerie\sandy\view\ClipScreen.as: Line
102: There is no method with the name 'updateScreen'.
_c.updateScreen();
Total ActionScript Errors: 1 Reported Errors: 1
---------------------------------------
how can i modified this parameter?
screen = new ClipScreen( this.createEmptyMovieClip('screen', 1), 800, 600 );
------> do not work
help
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)