Add away3d class to displaylist

Software: Away3D 3.x

Jumi, Newbie
Posted: 28 November 2011 07:57 PM   Total Posts: 1

Hi!
I’m using away3d 3.6 and flash builder.
I have a class which extends Sprite class, and adds a View3d to its displaylist. I want more than one instances of this class to be added on the stage. How can it be done?
I’m even new to flash builder, so it’s maybe becouse i try it in a wrong way.
I followed the first chapter of the book Away3D 3.6 Essentials, so i have the template class from this book.

So far what i have done:

import flash.display.Sprite;

 public class 
realhiphop extends Sprite
 {
  
private var hh3d:realhiphop3d = new realhiphop3d();
  public function 
realhiphop()
  
{
   addChild
(hh3d);
  
}
 } 

realhiphop3d is the class which implements the away3d code, it is extends the template class.
if i set the realhiphop3d class to the “startup class” it works fine.
If i set the realhiphop class to the “startup class”, nothing shows up.
I want to use a method like this, to separate the 3d and the other codes.

Maybe this post is a bit messed up, but i hope someone will understand it smile

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X