|
Hi forum people
I
am loading an object from an ASE file using the AseParser, and want to
enable events for the object. However, nothing I do seems to make it
work. Is this a strange thing to try and do? Am I missing something?
I
have tried adding the listener functions in my scene creation method
and in the onLoad and onInit handlers for the parser, but no luck:
_button.enableEvents(true);
_button.addEventListener( ObjectEvent.onRollOverEVENT, this, onButtonOver );
_button.addEventListener( ObjectEvent.onRollOutEVENT, this, onButtonOut );
The exact same code works fine for a Plane3D object in the same scene.
Any thoughts you have would be much appreciated!
Sandy is a great system by the way :-)
Regards,
Ben
Hi,
no your approach seems correct...
Can
you provide a bit more of your code? Never test to listen objects
events after an ase load, but it should not lead to any problem...
++
I've
attached my class file and the ASE file as a zip - obviously it won't
run standalone as it's part of a bigger app, but I can tweak it to if
you want?
What I am trying to do is create an invisible
'rollover layer' to sit in front of a textured Plane3D - when the user
rolls their mouse over the layer the texture image on the Plane3D will
be swapped. This works fine when I enable events on the Plane3D, but
this has transparent areas which also trigger the rollover event, and
could interfere with other objects in the scene.
Thanks again for your help!
Ben
Attached File(s)
ASEtest.zip ( 6.16k )
Number of downloads: 9
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)