Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411583 Posts in 69386 Topics- by 58445 Members - Latest Member: Mansreign

May 06, 2024, 05:21:28 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Flash AS3
Pages: [1] 2
Print
Author Topic: Flash AS3  (Read 4877 times)
Sigma
Level 1
*


View Profile WWW
« 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
Level 1
*


View Profile WWW
« 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
Level 1
*


View Profile WWW
« Reply #4 on: March 21, 2010, 10:41:08 PM »

SO HOW TO DO ?
Logged

bateleur
Level 10
*****



View Profile
« 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

Sigma
Level 1
*


View Profile WWW
« Reply #6 on: March 22, 2010, 02:33:30 AM »

Hey guys,
        Anyone have idea about how to do mining games? I mean how to clear the area of movieclip when a character is moving over some other clips? As the one in the link below
http://www.freeonlinegames.com/adventure-games/digger.html
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
Level 1
*


View Profile WWW
« 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
Level 1
*


View Profile WWW
« 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
Level 1
*


View Profile WWW
« Reply #10 on: April 04, 2010, 09:37:03 PM »

fixed

Thanks
Logged

nikki
Level 10
*****


View Profile
« 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
Level 1
*


View Profile WWW
« 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
Level 1
*



View Profile WWW
« Reply #13 on: April 06, 2010, 01:12:31 AM »

Code:
if(!(obj is MyClass)) doStuff();
Logged
Sigma
Level 1
*


View Profile WWW
« Reply #14 on: April 30, 2010, 10:30:11 PM »

thanks for the reply
Logged

Sigma
Level 1
*


View Profile WWW
« 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

Aik
Level 6
*


View Profile
« Reply #16 on: May 01, 2010, 02:53:08 AM »

2D tennis as in Pong?

http://www.tutorials-expert.com/tutorial/1525/Making-a-pong-game.html
Logged
Sigma
Level 1
*


View Profile WWW
« 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
Level 10
*****


View Profile
« 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
Level 10
*****



View Profile WWW
« 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

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic