Current Position:Home > Error in a simple example

Error in a simple example

Update:11-30Source: network consolidation
I'm trying to make a simple example working.
The example was taken from director 11.5 scripting reference pdf.
The code is in the function called BuildPolygons whithin a Movie Script.
I also added a 3D window to the cast (menu Window/Shockwave 3D) and named it Shapes (Property Inspector/Member/Name:)
I get an error message:
       Script Error: TypeError: nm.face[1] has no properties nm.face[1].vertices = [1,2,3];
If I run it again, without Save & Compact,
I get a different message:
    Script Error: Object with duplicate name already exists
        nm = member("Shapes").newMesh("Plane",1,3,0,3,0);
As if the second run created another member called Shapes. (Shouldn't clear globals take care of it?)
// The Movie script -
function startMovie()
function stopMovie()
function BuildPolygons()
  nm = member("Shapes").newMesh("Plane",1,3,0,3,0);
  nm.vertexList = [vector(0,0,0), vector(20,0,0), vector(20, 20, 0)];
  nm.face[1].vertices = [1,2,3];
  nm.colorList = [rgb(255,255,0), rgb(0, 255, 0), rgb(0,0,255)];
  nm.face[1].colors = [3,2,1];
  nm = member("Shapes").newModel("TriModel", nm);
What am I doing wrong?
Please help.

The Best Answer

I got the answer -
  • Overwriting framework error messages of simple types Update:11-30

    Hi Is it possible to overwrite the framework error messages of simple types? For example: Instead of "Enter the value in the format -2,733.34" we prefer something like "Enter the percent value in the format 0.00 to 100." or "Enter

  • BPC 7.5NW SP08: "unknown MDX error" message for simple dimension formula Update:10-11

    Hi everyone!! We are facing many different issues concerning dimension formulas and script logic. Maybe it's something related to SP08. For instance, consider the following: - there is a dimension named P_Account, with members Price, SalesCost, and o

  • Error while running simple JAXB test class Update:10-11

    I am new to JAXB and trying to run simple tutorial code. I created Java project and added required jar files in a classpath. But I get error as "com.jaxbtest" doesnt contain ObjectFactory.class or jaxb.index I am using Eclipse and I have added t

  • Error Calling a simple stored procedure Update:10-11

    Hello. I'm using the code below to call a simple stored procedure which returns a number. Why does it throw the exception (Also below)? Thank you, Alek ======================= Code: import java.sql.*; public class Connect public static void main (Str

  • Runtime error: Creating a simple resource in a CM repository Update:10-11

    Hi All,      I am trying to create a simple Resource & a collection in a CM repository without properties.      <b>The list of my imports is as follows:</b> import com.sapportals.htmlb.event.Event; import;

  • Error when calling simple restful service from SOA 11G Update:10-11

    Hi' I have a URL for simple restful service http://xxxxx:857/swift/v2/EMPIDChanges/{bookmarkDate} GET method I am able to invoke this from IE and This URL is also accessible in UNIX server where SOA server is deployed. http://xxxxx:857/swift/v2/EMPID

  • 'Error 1063 occurred at an unidentified location' CompactRIO driver internal error when attempting simple input/output Update:11-30

       An NI representative (Eric Dean) recently held an NI Open House to showcase the contributions NI was making to the University.  Before leaving he noticed cRIO-9014 was not functioning properly and asked that I reinstall the drivers, saying they ha

  • Error in my simple program Update:11-30

    hey I'm a beginner to java and i tried to program a simple calculator but my Jcreator says it has an Error this is the program that i encoded: import javax.swing.JOptionPane; public class quiz      public static void main(String[]args)           Stri

  • Error on Deploy - simple Struts + SLSB + PostGreSQL DS Update:11-30

    Hi, I'm completly new to SOAS and J2EE, so I hope someone can help me on this. I get the following error when I deploy my (first ever :P) .ear-file: Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- -- Failed to load de

  • Deployment error when running simple serlet application Update:11-30

    Hello folks! I am a newbie in developing Java Servlets and my problem might sound almost too trivial for professionals, however I hope to find help here after I have tried to solve this problem on my own for almost 2 days now... I have been trying to