Search  

INTERACTIVE PV3D

HomeForumsFlash DiscussionInteractive PV3D
50143 MSFX
297 posts
Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items

SO i’m just messing around with some PV3D , got some interactive planes, got all the listeners working…

How can I tell which plane ive clicked on..

I usually use: e.currentTarget.name

but that wont work now, I also tried adding an object (called extra) with a name property to the 5th parameter of the plane and then tried:

e.currentTarget.extra.name;

which just screwed Flash up completely…

If you simply trace e.currentTarget you get x, y and z co-ordinates as well which is wierd, I was expecting a Sprite of some form….

Anywho, anyone know how to do this…?

Posted about 1 month ago
41362 enhancedmedia
150 posts
Exclusive author Referred at least one person Sold between 1 000 and 5 000 dollars

personally, i just give the name of my sprite which i form from the plane itself a name like you mentioned, so..


var container:Sprite = plane.container;
container.name = "foo";
container.addEventListener( MouseEvent.MOUSE_OVER, planeOver );

..then in the function youre calling, use e.currentTarget.name whereby your function is..


private function planeOver(e:Event):void {

For me, this method works great

Posted about 1 month ago
50143 MSFX
297 posts
Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items

that works great which is how it normally works, papervision is different :(

Posted about 1 month ago
41362 enhancedmedia
150 posts
Exclusive author Referred at least one person Sold between 1 000 and 5 000 dollars

im on about papervision too, and this method works fine for me

Posted about 1 month ago
22362 theflyingtinman
452 posts
Item was featured Sold between 1 and 100 dollars

I use the “extra” object, then:

myPlane.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, OnPlaneClicked);                

private function OnPlaneClicked(ev:InteractiveScene3DEvent) 
{
    trace( ev.displayObject3D.extra.etc );
}
Posted about 1 month ago
50143 MSFX
297 posts
Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items

@enhancedmedia: Read it too fast, didnt notice the plane.container bit lol

@tinman: yeah I saw that, will give it a wirl later :)

Posted about 1 month ago
50143 MSFX
297 posts
Referred at least one person Sold between 100 and 1 000 dollars Bought between 1 and 9 items

right, got it working :)

bit of an odd one actually..

tried setting the extra object through plane contructor like:

var ex: Object = new Object(); ex.id = “blaaa”; plane = new Plane(material, width, height, 5, 5, ex);

but that wont work :s

ended up using

plane.extra = ....

Posted about 1 month ago