I am using the latest Flex Builder - how are you creating the
SimpleView object without getting the stage=null problem in the
SimpleView constructor? I'm aware it's just for testing purposes -
that's all I was going to use it for. There are other classes that
also access the stage in their constructor, so I'm sure I'll see this
problem again if I don't figure it out now. :) Thanks again!


On Dec 8, 8:27 pm, katopz <[email protected]> wrote:
> all Collada examples is base on SimpleView, and it's working
>
> >http://away3d.googlecode.com/svn/trunk/fp9/Examples/Collada/src
>
> and if you look precisely you can see that landing on import away3d.*test*
> .SimpleView;
> which mean it's just for testing purpose
>
> for real life use, obvious that you have to create your own to match your
> environment ;)
>
> hth
>
> 2009/12/9 mkupper <[email protected]>
>
>
>
> > Thanks, but I had already tried it at both before and neither seemed
> > to work. This is why I was wondering if anyone else had used
> > SimpleView successfully recently. I suppose I'll have to mod
> > SimpleView.
>
> > On Dec 8, 7:15 pm, katopz <[email protected]> wrote:
> > > try add that ADDED_TO_STAGE at MyManager not myView
> > > and if it still not work on you, just mod SimpleView constructor to wait
> > for
> > > stage before construct/init
>
> > > hth
>
> > > 2009/12/9 mkupper <[email protected]>
>
> > > > Thanks but I *believe* I've done that correctly and I still get null
> > > > for the stage when I enter the constructor in SimpleView (which is a
> > > > Sprite essentially). Here is some of the code:
>
> > > > public class myView extends SimpleView
> > > > {
> > > >   public function myView()
> > > >   {
> > > >      addEventListener(Event.ADDED_TO_STAGE, addedHandler);
> > > >      super("Test", "Character Load Test");
> > > >   }
>
> > > >   private function addedHandler(event:Event)
> > > >   {
> > > >      removeEventListener(Event.ADDED_TO_STAGE, addedHandler);
> > > >   }
> > > > }
>
> > > > //Here is the calling class....
>
> > > > public class MyManager extends UIComponent
> > > > {
> > > >   public var currView:myView;
>
> > > >   public function MyManager()
> > > >   {
> > > >      super();
> > > >      currView = new myView();
> > > >      addChild(currView);
> > > >    }
> > > > }
>
> > > > On Dec 8, 11:15 am, katopz <[email protected]> wrote:
> > > > > try listen ADD_TO_STAGE event via container or parent before load
> > > > SimpleView
> > > > > should help
>
> > > > > hth
>
> > > > > 2009/12/9 mkupper <[email protected]>
>
> > > > > > The test class SimpleView accesses the stage in its constructor.
> > The
> > > > > > stage is always null because you can't do an addChild on it until
> > it's
> > > > > > been constructed. I have a class that  I was just attempting to get
> > a
> > > > > > simple mesh loaded and displayed with SimpleView, but even that
> > seems
> > > > > > to have problems. I think you used to be able to get to the stage
> > from
> > > > > > _root prior to AS3. And yes, I am calling addEventListener,
> > > > > > removeEventListener, and addChild at the appropriate places. Does
> > > > > > anyone have working code with the latest lib which uses
> > SimpleView???
> > > > > > Thanks!! This is really bothering me.
>
> > > > > --
> > > > > katopzhttp://www.sleepydesign.com
>
> > > --
> > > katopzhttp://www.sleepydesign.com
>
> --
> katopzhttp://www.sleepydesign.com

Reply via email to