Box2D Forums

It is currently Thu May 23, 2013 3:21 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Mar 30, 2011 10:07 am 
Offline

Joined: Thu Mar 17, 2011 2:03 am
Posts: 41
How do you reference the position of an object in the world, or the point of collision?

When I tried using import.display.* and referencing ._x and ._y, i get "Access of possibly undefined property"


Top
 Profile  
 
PostPosted: Wed Mar 30, 2011 11:12 am 
Offline

Joined: Thu Dec 09, 2010 9:59 pm
Posts: 77
I gave the shape a mc name using and used the folowing.

tarce(myWorld.red1.x);


Top
 Profile  
 
PostPosted: Wed Mar 30, 2011 11:39 am 
Offline

Joined: Thu Mar 17, 2011 2:03 am
Posts: 41
Are you using Flash CS5? I get "Access of undefined property" when i try that...

Instance name?


Top
 Profile  
 
PostPosted: Wed Mar 30, 2011 12:27 pm 
Offline

Joined: Thu Dec 09, 2010 9:59 pm
Posts: 77
Yes I am using CS5.

I pretty much

1. add the shape to the stage inside the world.
2. Using property inspector I give the the shape an mc name.

Make sure you use the correct world name and that you followed the wck steps to make your movie clip a shape.


Top
 Profile  
 
PostPosted: Wed Mar 30, 2011 12:37 pm 
Offline

Joined: Thu Mar 17, 2011 2:03 am
Posts: 41
it looks like if it's the class of the mc then just referencing trace(x) does the trick... the numbers returned on contact are weird... See viewtopic.php?f=19&t=6674


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group