This is G o o g l e's cache of http://www.flashsandy.org/forum/index.php?act=Print&client=printer&f=17&t=180 as retrieved on 31 Jul 2007 23:26:48 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:K6xSiWRvX5EJ:www.flashsandy.org/forum/index.php%3Fact%3DPrint%26client%3Dprinter%26f%3D17%26t%3D180+act%3DPrint+%22index+php%22+-lofiversion+site:www.flashsandy.org&hl=en&ct=clnk&cd=68


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: act print index php

Printable Version of Topic

Click here to view this topic in its original format

Sandy's Forum _ AS2 1.x versions _ Enabling events on ASE loaded object

Posted by: Ben Nov 14 2006, 06:28 PM

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

Posted by: kiroukou Nov 14 2006, 06:52 PM

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...

++

Posted by: Ben Nov 15 2006, 10:11 AM

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)
Attached File  ASEtest.zip ( 6.16k ) Number of downloads: 9

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)