How to listen Events in a DisplayObject3D

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to listen Events in a DisplayObject3D

Olivier GILQUIN
Hello,

I have a class which extends DisplayObject3D and I would like to listen
enterFrame events so I wrote:

public class Player extends DisplayObject3D {
         public function Player(field : Field) {
             super();

             addEventListener(Event.ENTER_FRAME, handleEnterFrame);
         }

         protected function handleEnterFrame(evt : Event) : void {
             trace('enterFrame');
         }
}

and this class is instanciated and added to the scene

but handleEnterFrame is never called, so how can it works ?

Thanks,

Olivier

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: How to listen Events in a DisplayObject3D

Merrill, Jason
I don't think DisplayObject3D extends MovieClip and therefore would not dispatch Event.ENTER_FRAME... better to use that on a class that extends MovieClip or use  a Timer.

 Jason Merrill
 Instructional Technology Architect
 Bank of America  Global Learning





_______________________


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Olivier GILQUIN
Sent: Tuesday, April 12, 2011 1:52 PM
To: [hidden email]
Subject: [Papervision3D] How to listen Events in a DisplayObject3D

Hello,

I have a class which extends DisplayObject3D and I would like to listen enterFrame events so I wrote:

public class Player extends DisplayObject3D {
         public function Player(field : Field) {
             super();

             addEventListener(Event.ENTER_FRAME, handleEnterFrame);
         }

         protected function handleEnterFrame(evt : Event) : void {
             trace('enterFrame');
         }
}

and this class is instanciated and added to the scene

but handleEnterFrame is never called, so how can it works ?

Thanks,

Olivier

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

----------------------------------------------------------------------
This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited.
Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law.
The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses.

References to "Sender" are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link:
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing.

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: How to listen Events in a DisplayObject3D

Ross Sclafani
In reply to this post by Olivier GILQUIN
displayObject doesnt have an enterFrame event
On Apr 12, 2011, at 1:51 PM, Olivier GILQUIN wrote:

> Hello,
>
> I have a class which extends DisplayObject3D and I would like to listen enterFrame events so I wrote:
>
> public class Player extends DisplayObject3D {
>        public function Player(field : Field) {
>            super();
>
>            addEventListener(Event.ENTER_FRAME, handleEnterFrame);
>        }
>
>        protected function handleEnterFrame(evt : Event) : void {
>            trace('enterFrame');
>        }
> }
>
> and this class is instanciated and added to the scene
>
> but handleEnterFrame is never called, so how can it works ?
>
> Thanks,
>
> Olivier
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: How to listen Events in a DisplayObject3D

viaria
it shuld 
stage.addEventListener

On Tue, Apr 12, 2011 at 21:03, Ross Sclafani <[hidden email]> wrote:
displayObject doesnt have an enterFrame event
On Apr 12, 2011, at 1:51 PM, Olivier GILQUIN wrote:

> Hello,
>
> I have a class which extends DisplayObject3D and I would like to listen enterFrame events so I wrote:
>
> public class Player extends DisplayObject3D {
>        public function Player(field : Field) {
>            super();
>
>            addEventListener(Event.ENTER_FRAME, handleEnterFrame);
>        }
>
>        protected function handleEnterFrame(evt : Event) : void {
>            trace('enterFrame');
>        }
> }
>
> and this class is instanciated and added to the scene
>
> but handleEnterFrame is never called, so how can it works ?
>
> Thanks,
>
> Olivier
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: How to listen Events in a DisplayObject3D

Ross Sclafani
good idea.
On Apr 12, 2011, at 2:05 PM, Emrah Atılkan wrote:

it shuld 
stage.addEventListener

On Tue, Apr 12, 2011 at 21:03, Ross Sclafani <[hidden email]> wrote:
displayObject doesnt have an enterFrame event
On Apr 12, 2011, at 1:51 PM, Olivier GILQUIN wrote:

> Hello,
>
> I have a class which extends DisplayObject3D and I would like to listen enterFrame events so I wrote:
>
> public class Player extends DisplayObject3D {
>        public function Player(field : Field) {
>            super();
>
>            addEventListener(Event.ENTER_FRAME, handleEnterFrame);
>        }
>
>        protected function handleEnterFrame(evt : Event) : void {
>            trace('enterFrame');
>        }
> }
>
> and this class is instanciated and added to the scene
>
> but handleEnterFrame is never called, so how can it works ?
>
> Thanks,
>
> Olivier
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org


_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Reply | Threaded
Open this post in threaded view
|

Re: [SPAM?] How to listen Events in a DisplayObject3D

Creighton, Gerry
In reply to this post by Olivier GILQUIN
Check the docs...
http://www.papervision3d.org/docs/as3/org/papervision3d/objects/DisplayObject3D.html

The DisplayObject3D does inherit from EventDispatcher but I don't think you can apply an event
To the DisplayObject3D.
Inheritance DisplayObject3D >  DisplayObjectContainer3D > flash.events.EventDispatcher

Check out the Container object that is within the DisplayObject3D


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Olivier GILQUIN
Sent: Tuesday, April 12, 2011 1:52 PM
To: [hidden email]
Subject: [SPAM?] [Papervision3D] How to listen Events in a DisplayObject3D
Importance: Low

Hello,

I have a class which extends DisplayObject3D and I would like to listen
enterFrame events so I wrote:

public class Player extends DisplayObject3D {
         public function Player(field : Field) {
             super();

             addEventListener(Event.ENTER_FRAME, handleEnterFrame);
         }

         protected function handleEnterFrame(evt : Event) : void {
             trace('enterFrame');
         }
}

and this class is instanciated and added to the scene

but handleEnterFrame is never called, so how can it works ?

Thanks,

Olivier

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org