Sigma
|
|
« on: March 21, 2010, 09:35:24 PM » |
|
I have a movieclip which is a child of another movieclip, i want to check hit test point with mouse coordinates. So how can i convert my mouse global coordinates to local coordinates of that movieclip?
|
|
|
Logged
|
|
|
|
Glaiel-Gamer
Guest
|
|
« Reply #1 on: March 21, 2010, 09:40:57 PM » |
|
clip.mouseX, clip.mouseY will give you mouse coordinates in the movieclip's reference plane
|
|
|
Logged
|
|
|
|
Sigma
|
|
« Reply #2 on: March 21, 2010, 09:48:46 PM » |
|
i used like this, but it is not working
if (hitTestPoint(this.mouseX, this.mouseY, true))
|
|
|
Logged
|
|
|
|
Glaiel-Gamer
Guest
|
|
« Reply #3 on: March 21, 2010, 10:05:40 PM » |
|
hittestpoint might use global coordinates if i remember correctly
|
|
|
Logged
|
|
|
|
Sigma
|
|
« Reply #4 on: March 21, 2010, 10:41:08 PM » |
|
SO HOW TO DO ?
|
|
|
Logged
|
|
|
|
bateleur
|
|
« Reply #5 on: March 22, 2010, 01:15:59 AM » |
|
SO HOW TO DO ? You could presumably use localToGlobal() to switch to the right coordinates?
|
|
|
Logged
|
|
|
|
|
st33d
Guest
|
|
« Reply #7 on: March 22, 2010, 06:50:37 AM » |
|
That's not clearing a MovieClip, that's using BitmapData and the copyPixels & draw methods.
They're quite an in-depth topic, but something like Flixel already supports them.
|
|
|
Logged
|
|
|
|
Sigma
|
|
« Reply #8 on: March 23, 2010, 11:33:32 PM » |
|
As3 box 2d game running in some machines and in some machines it is not running properly. But if i restart the pc game is running fine. Have anyone encountered this problem before?. Any possible causes?(shared objects? - i'm storing two dimensional arrays in shared objects)
Thanks in Advance.
|
|
« Last Edit: March 24, 2010, 12:10:20 AM by Sigma »
|
Logged
|
|
|
|
Sigma
|
|
« Reply #9 on: March 24, 2010, 11:18:19 AM » |
|
prob with sound not shared object...
|
|
« Last Edit: March 27, 2010, 11:06:00 AM by Sigma »
|
Logged
|
|
|
|
Sigma
|
|
« Reply #10 on: April 04, 2010, 09:37:03 PM » |
|
fixed
Thanks
|
|
|
Logged
|
|
|
|
nikki
|
|
« Reply #11 on: April 05, 2010, 05:59:26 AM » |
|
I am sure you know the Movieclips were flash's poor, sad, horror, way of handling everything visible. Since AS3 alot of new and better and professional new ways have arrived.
I'd look into them.
|
|
|
Logged
|
|
|
|
Sigma
|
|
« Reply #12 on: April 05, 2010, 11:53:26 PM » |
|
to compare two objects we can use "is" keyword say for ex if(_obj is xClass); and how to check false case i tried if(_obj != xClass); but it is not working; anyone have any idea?
Thanks in Advance........
|
|
|
Logged
|
|
|
|
grapefrukt
|
|
« Reply #13 on: April 06, 2010, 01:12:31 AM » |
|
if(!(obj is MyClass)) doStuff();
|
|
|
Logged
|
|
|
|
Sigma
|
|
« Reply #14 on: April 30, 2010, 10:30:11 PM » |
|
thanks for the reply
|
|
|
Logged
|
|
|
|
Sigma
|
|
« Reply #15 on: April 30, 2010, 10:32:31 PM » |
|
can someone tell me where can i find tutorials or articles to create a 2d tennis game else what should i google for?
Thanks in Advance
|
|
|
Logged
|
|
|
|
|
Sigma
|
|
« Reply #17 on: May 04, 2010, 11:09:18 PM » |
|
I'm not looking for this. I mean a 2d game with z depth (play some tennis game). Thanks in advance...
|
|
|
Logged
|
|
|
|
nikki
|
|
« Reply #18 on: May 06, 2010, 05:53:23 AM » |
|
how is your 2d tennis (with z depth) so very different then pong ?
exactly the same principle , perhaps a bit more physics (bouncing ball,resistance) a bit more managing (animations, sounds, and more)
and what else ?
|
|
|
Logged
|
|
|
|
Rob Lach
|
|
« Reply #19 on: May 08, 2010, 03:51:44 AM » |
|
I'm not looking for this. I mean a 2d game with z depth (play some tennis game).
Thanks in advance...
Are you referring to CurveBall?
|
|
|
Logged
|
|
|
|
|