How can i make the avatar bounce......

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
JarochoCity
Posts: 180
Joined: 01 Dec 2005, 01:22
Location: Mexico
Contact:

How can i make the avatar bounce......

Postby JarochoCity » 16 Dec 2005, 19:40

How can i make the avatar bounce into a wall, in the avatarChat

please answer me, i will buy the product but i need to finish the chat, and i only need that!!

please, help me
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Dec 2005, 07:55

Here's a good tutorial about making objects bounce --> http://www.flashkit.com/board/showthread.php?t=544413
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
JarochoCity
Posts: 180
Joined: 01 Dec 2005, 01:22
Location: Mexico
Contact:

Yeah, i now how to do it but i dunno what......

Postby JarochoCity » 18 Dec 2005, 21:21

Yeah, i now, but how can i do it in the Avatar Chat!?¿
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Dec 2005, 21:44

All I can say is that once you have understood the simple code involved in making an object bounce you can apply it everywhere.

You will obviously need some basic knowledge of Actionscript and of the Flash authoring tool.

Also I'd reccomend to take the time to study the "Avatar Chat" tutorial and its source code.

Good luck :)
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
JarochoCity
Posts: 180
Joined: 01 Dec 2005, 01:22
Location: Mexico
Contact:

Yeah, but i dunno what....

Postby JarochoCity » 19 Dec 2005, 19:02

Yeah, of curse, but there is a problem i dunno wich instanse name i need to use, can you help me?
i dunno the instance name of the avatar, is attached to avatarMC but, if use that instance everyone is going to move..
keagan
Posts: 32
Joined: 13 Nov 2006, 06:34

Postby keagan » 30 Dec 2006, 01:32

well finding a instance name to something that you can just click on the main stage would be finding the mc or w/e in the liabrey and then right clicking and then click linkage, there ya go :)
User avatar
Carl
Posts: 36
Joined: 22 Dec 2006, 20:40
Location: New York
Contact:

Postby Carl » 03 Jan 2007, 19:57

Also, something to think about is that the mostion of the avatar is determined by some sort of A* pathfinding routine. If you don't need that to walk around objects or somthing like that, you will want to create your own function for moving the avatars.

For example, you would use the sendObject function to send a new coordinate that you want your avatar to walk towards. The other clients will receive this and start the object traveling in this direction by continually changing the _x and _y properties of the MC. You could actually create an XSPEED and YSPEED so that the character contiunes in this direction until it reaches a wall, then you would just invert both speeds to create a bounce, and maybe multiply times -.95 to reduce the speed a bit on the bounce.

Hope this helps
Carl Lydon
Illustrator, animator, programmer
----------------------------------------
www.gametrust.com
www.chamberofchat.com

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 35 guests