[Papervision3D] possible to add onEnterFrame-Listener to a Papervision3D Sphere?

Paul Tondeur paul at paultondeur.nl
Thu May 21 07:57:10 PDT 2009


Hi Miriam,

Try adding an event listener to something which has a timeline  
(sprites and movieclips). A sphere (or any other 3D object) is not  
family of these types.

Instead of kugel.addEventListener(Event.ENTER_FRAME,onEnterFr ame);  
you should do addEventListener(Event.ENTER_FRAME,onEnterFr ame); or  
this.addEventListener(Event.ENTER_FRAME,onEnterFr ame);

That will solve your problem.

Have fun with your first steps Papervision3D!

Paul

On May 21, 2009, at 4:25 PM, flashback1 wrote:

>
> Hello,
>
> I am new to Papervision3D and have a question: is it possible to add  
> an
> onEnterFrame-Listener to a Sphere? I tried to do this and I didn´t  
> get any
> error message, but when I ran my application, the action that I  
> wrote in my
> onEnterFrame-Handler did not happen at all. When tested with  
> debugger I saw
> that the onEnterFrame-Handler that I add to the Sphere didn´t be  
> called. Can
> you help me?
>
> I wanted to write an apllication that shows a rotating sphere, but  
> when I
> run my application the sphere is there but it is not rotating at  
> all. Do
> someone of you have an idea why?
>
> I would thank you for any advise!
>
> regards,
> Miriam
>
> Here is the sourcecode:
>
> private var kugel:Sphere;
>
> kugel = new Sphere(composit);
> kugel.addEventListener(Event.ENTER_FRAME,onEnterFr ame);
>
> private function onEnterFrame(e:Event):void{
> kugel.rotationY++;
> }
> scene.addChild(kugel);
> -- 
> View this message in context: http://www.nabble.com/possible-to-add-onEnterFrame-Listener-to-a-Papervision3D-Sphere--tp23654047p23654047.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org




More information about the Papervision3D mailing list