This does not work:
var sphere:SphereGeometry = new SphereGeometry(1024,32,32);
mesh = new Mesh( sphere );
mesh.addEventListener(“mouseDown”,function(){trace(‘down’)})
Why?
Objects do not recognize eventsSoftware: Away3D 4.x |
||
Lucid, Member
Posted: 22 March 2012 12:19 PM Total Posts: 93 This does not work: var sphere:SphereGeometry = new SphereGeometry(1024,32,32); Why? |
||
|
||
Lucid, Member
Posted: 22 March 2012 12:40 PM Total Posts: 93 [ # 2 ] Yes, this works but how was I supposed to find this? The mesh class doesn’t even show this as an option when adding an event listener. I know Away3D 4 is still in beta but damn. C’mon folks! That seems like a pretty essential, rudimentary feature no? Seems like the majority of questions on the forum are just about doing rudimentary things (like adding a mouse down event on an object). |
||
|
||
John Brookes, Moderator
Posted: 22 March 2012 01:49 PM Total Posts: 732 [ # 4 ] The issue has been on the git for a while Click that above follow link back to the forum and change objectContainer3d.as Then you will get nice code completion And yeah its annoying, been using away for ages and can never remember whether is mouse3devent or mouseevent3d. Always choose the wrong one |
||
charlito, Jr. Member
Posted: 22 March 2012 11:37 PM Total Posts: 36 [ # 5 ] hi i had the same problem.. here is an example of working code to add an event to a mesh
public class away3D_mouseEvent extends Sprite so everyone else who has this problem, have a simple solution grettings..
|