first book, first time, first bug away3d

Software: Away3D 3.x

hw2002, Newbie
Posted: 24 August 2011 02:46 PM   Total Posts: 6

Hello,

I just bought my first Away3d book and trying to go through the first chapter, and then I catch errors :S

The download link that the book specifies is DOWN.
http://away3d.com/download/away3d_3_6_0.zip

Away3D 4.0 is for flashplayer 11 as I understood, I cannot use it with flash player 10? So I go find Away3D for flash player 10.

Downloaded Away3D 3.6
https://github.com/away3d/away3d-core-fp10

Then I try to type this:

public class TreD extends Sprite
{
 
private var _view:View3D;
 
 public function 
TreD()
 
{
  _view 
= new View3D();
  
_view.200;
  
_view.200;
  
addChild(_view);
  
  
addEventListener(Event.ENTER_FRAMEeventEnterFrame);
 
}
 
 
private function eventEnterFrame(event:Event):void
 {
  _view
.render();

 
}  
 

Throws:
ReferenceError: Error #1065: Variable _init is not defined.

I don’t know what to do now?

   

hw2002, Newbie
Posted: 25 August 2011 10:52 AM   Total Posts: 6   [ # 1 ]

Thanks for trying to helping me smile

I have not got any further.

Here is the console output.

ReferenceError: Error #1065: Variable _init is not defined.
at away3d.core.utils::Init/getBoolean()[/Users/login/Documents/Adobe Flash Builder 4.5/TreD/src/away3d/core/utils/Init.as:114]
at away3d.containers::View3D()[/Users/login/Documents/Adobe Flash Builder 4.5/TreD/src/away3d/containers/View3D.as:591]
at TreD()[/Users/login/Documents/Adobe Flash Builder 4.5/TreD/src/TreD.as:15]

First line number here is 112

public function getBoolean(name:Stringdef:Boolean):Boolean
{
    
if (_init == null)
        return 
def;

    if (!
_init.hasOwnProperty(name))
        return 
def;

    var 
result:Boolean _init[name];

    
delete _init[name];

    return 
result;
   

pjetr, Newbie
Posted: 29 November 2011 08:46 AM   Total Posts: 1   [ # 2 ]

Hi there,

I just had the same problem. Some searching gave me the answer.
In Flashbuilder, make sure you have the Flex SDK 4.1 instead of 4.5.

you can get that here:
Hi there,  I just had the same problem. Some searching gave me the answer. In Flashbuilder, make sure you have the Flex SDK 4.1 instead of 4.5.  you can get that here: flex SDK 4

That should do the trick.

Edit:
I should’ve tried to compile and run before claiming to have the answer. I’ll update as soon as I find the correct answer.

Edit 2:
It did the trick, but my away3D source is in a library project. This library-project is the one that has to be in SDK4.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X