PDA

View Full Version : classes server, client side with flashcom


brusky
08-12-2003, 03:20 AM
Hi,

I'm on a flascomm project using extensively classes and have an architectural question. Let's imagine I use a class 'Person' who inherits of the class 'MovieClip' and I want:
- a method to change the position of that movieclip AND to store it in a DB
- a method to update the age of the person in the DB
- a method to change the scale of the movieclip

Thus, the last method has to run client-side, the second one server side and the first one partly server side partly client side. I see two possibilities so far:
- create functions server side I call from the client side. The methods, classes are thus executed all client side with some server side functions calls.
- duplicate the class 'person': one 'displayedperson' executed client side and one 'serverperson' executed server side. But I don't really see how to implement that and how to call a method of an object situated server side when I'm on the client side.

Which is the best or is there another way to do it?

There is some issues related to that question:
- I will use a lot of inheritance but server side cannot inherit I think?
- I think I have to include the class files both server and client side but do not really understand concretly what it would look like?
- I would like to find examples of how to deal with shared objects with some custom classes like mines.

Finally, does someone know a good url about those issues or a book?

thanks a lot because I'm really lost on that point.
christophe