Book: Away 3D 3.6 Essentials…. Problem/Question

Software: Away3D 3.x

markerline, Newbie
Posted: 31 May 2012 11:50 PM   Total Posts: 8

Hi.  I have tried to set up my Flash Builder 4.5 environment from the Away 3D 3.6 Essentials book instructions at the beginning of the book where it instructs to use Flex Builder or Flash Builder.

It seems that even though I follow the book to the letter I’m getting errors stating that Scene3D, Camera3D, and View3D cannot be found or are not compile-type constants.  I then try to continue and I get a black Internet Explorer window with my compiled HTML file.  I then try to create the Sphere Demo AS file but when I try to run it it says that there is no SphereDemo.html file.  I easily created this file from the Away3DTemplate.html file but I think that was a bad step.  I also do not know why my constants which I can view in my project Explorer cannot be found as I stated near the beginning of this post.

Any help is greatly appreciated.
Sincerely,
markerline

   

Richard Olsson, Administrator
Posted: 16 June 2012 01:12 PM   Total Posts: 1192   [ # 1 ]

It sounds like you haven’t added the source code for Away3D properly. I’m not familiar with the book but you’ll need to make sure that your compiler can find Away3D, e.g. by adding the contents of Away3D’s src folder to your own src, folder, or by adding the Away3D src folder to your project source path.

 

   

markerline, Newbie
Posted: 18 June 2012 07:08 PM   Total Posts: 8   [ # 2 ]

Here’s the error I’m getting in jpg format….

 

   

Richard Olsson, Administrator
Posted: 18 June 2012 08:03 PM   Total Posts: 1192   [ # 3 ]

Yes, it definitely does look like you have not added Away3D properly. It looks like you have added the “away3d” folder to your source path, but it likely contains a “src” folder, and that’s the one you should add to your source path. So go into your project settings and remove the “away3d” folder from your source path, replacing it with the “away3d/src” folder instead.

 

   

markerline, Newbie
Posted: 19 June 2012 01:11 AM   Total Posts: 8   [ # 4 ]

It in fact DOES NOT contain a src folder.  I am speaking of the Away3D that was downloaded via SVN from an example in the book.

The src folder that exists was created by flash builder for the Away3Dtemplate.as and SphereDemo.as files . 

I do not know what to do from this point forth since I do not have the src folder.  If I add the one that exists then it won’t point to the classes in away3d that was downloaded from SVN.

 

   

Richard Olsson, Administrator
Posted: 19 June 2012 06:20 AM   Total Posts: 1192   [ # 5 ]

What then DOES the away3d folder contain? Please don’t have me guessing to help you. Does it contain for example “core”, “materials” and “primitives”? If so, the away3d folder should be actual CONTENT of the src folder.

Assuming this is the case, create a new folder in your project, call it for example “away3d-src”, and then move the entire “away3d” folder INTO the “away3d-src” folder. Then re-configure your project to include the “away3d-src” folder in your source path.

You might also want to go back to the start of the book where I can only assume there is a section about getting started. Maybe it told you to get the “Away3D” (capitals) folder from SVN, which is located directly inside the “fp10” folder, but you accidentally got the “away3d” (lowercase) folder instead (which is located at fp10/Away3D/src/away3d). Correct me if I’m wrong. The “away3d” (lowercase) folder represents the root package of the Away3D library. A package in ActionScript is something you use to namespace and structure your code.

 

   

markerline, Newbie
Posted: 19 June 2012 12:22 PM   Total Posts: 8   [ # 6 ]

Sorry if I was being abrupt or unclear.

The book gave suggestions as to what to do.

First, create a folder at the root directory called “Away3D”

Then download “away3d” from SVN using checkout with TortoiseSVN into “Away3D”.

The “away3d” folder contains (\Away3D\away3d\...)
animators, audio, cameras, containers, core, debug, dev, events, exporters, extrusions, graphs, lights, loaders, materials, modifiers, overlays, pbks, physics, primitives, sprites, test, tools, and arcane.as as well as away3d-license.txt .

When initializing the Flash Builder project it tells you to “create an empty project for Away3D (not the folder but the program)”

I started a new ActionScript Project and used the default location and named the AS Project Away3DTemplate .  For the build paths option I searched until Flash Builder could populate so I searched for “F:\Away3D\away3d” and that is what populated in my Project Explorer.

I mentioned in a separate thread that while creating a new AS Class called “SphereDemo.as” which is the first project in the book the code hints would populate correctly as if Flash Builder could locate the classes properly within away3d after having declared the away3d imports.  So this is why I don’t understand why my project still contains errors even after the code hints work.

(And now unfortunately I am running into a scenario where Flash Builder will not launch and I am trying to troubleshoot that in itself before getting back to away3d)

Thanks in advance.

 

   

markerline, Newbie
Posted: 19 June 2012 05:07 PM   Total Posts: 8   [ # 7 ]

Alas you were right about the book pointing me to the incorrect svn checkout.  I took the src off the checkout line and downloaded the entire away3d library from svn.

Now, I was able to compile and run both the Away3DTemplate AS file as well as the SphereDemo AS file however in the book the conclusion is that you should see a sphere in the browser.  However, when I run SphereDemo.as I don’t see anything—the page is blank.  And it’s not because I’m running it locally… I’ve allowed blocked protocols to run.  So what else could be the issue?  Should I zip my AS files and upload them here for you to look at?  I didn’t receive any errors or any feedback when I ran SphereDemo via Flash Builder 4.5 .

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X