Okay, someone may or may not have done this, but I have searched and cant find anything.
I wish to validate if a name has been allocated in the database before registering a new user. The database code and server side code is not a problem, except for communicating with the server.
The user is NOT yet logged in hence I cannot use sendXtMessage as this will not work until after login. I understand this. So I thought I would modify "handleInternalEvent" with an event of "validate" and send it using the smartfox.login.
However, I cannot seem to modify the evt sent to the server. Am I missing something in my logic? Am I up the wrong tree? Or is this not possible and I need to do it another (maybe easier) way?
Any constructive advice appreciated.
Thanks in advance.
Custom event- how to create.
Hello,
I assume this is for registration purposes.
Since you are using h2database, this workflow may be acceptable:
1. Temporary log in as a guest and;
2. automatically send an empty room list (if you're using java, use helper.sendCustomRoomList method or use _server.sendGenericMessage instead). The room list is required prior to using sendXtMessage.
If you were using an external database such as mySQL - you could use a php script to validate the username instead.
Hope this helps,
Joshua
I assume this is for registration purposes.
Since you are using h2database, this workflow may be acceptable:
1. Temporary log in as a guest and;
2. automatically send an empty room list (if you're using java, use helper.sendCustomRoomList method or use _server.sendGenericMessage instead). The room list is required prior to using sendXtMessage.
If you were using an external database such as mySQL - you could use a php script to validate the username instead.
Hope this helps,
Joshua
Smartfox's forum is my daily newspaper.
Hey Joshua, Thanks for this.
Yes, this is for registration purposes but we are now using an external mySQL database (in preparation for eventual move to SFS2X).
However, I will proceed using you initial suggestion (not php), as I wish to keep the process linked into the Flash/Air app.
Will let you know the results.
Thanks
PP.
Yes, this is for registration purposes but we are now using an external mySQL database (in preparation for eventual move to SFS2X).
However, I will proceed using you initial suggestion (not php), as I wish to keep the process linked into the Flash/Air app.
Will let you know the results.
Thanks
PP.