all groups > macromedia flash flashcom > march 2005 >
You're in the

macromedia flash flashcom

group:

Can't make SO methods work


Can't make SO methods work CDXX
3/17/2005 11:59:44 PM
macromedia flash flashcom:
Changing SO properties is working fine. But when I try to call an SO method,
other clients aren't receiving it. Code: [BROADCASTER] askQuestion =
function() { trace ('so = ' + so); so.send('studentRequest',
Session.username); } [CLIENT] so.studentRequest = function (studentName) {
trace ('studentRequest: ' + studentName); Session.pendingStudent =
studentName; myMessageBox._visible = true; myMessageBox.setTitle = 'Request
from ' + studentName; myMessageBox.setMessage = 'Please Answer'; }
Unfortunately this is just the example from Kevin Towes book. Is there some
server setting or something that I'm missing?
Re: Can't make SO methods work CDXX
3/18/2005 8:26:12 AM
Just to clarify this - I can't use a SharedObject to broadcast, although I can
set properties on it. I was sure there was a scoping issue, but there isn't.
Just above the client-side code quoted above, I have: function textOnChanged
() { trace (this._name); so.data[this._name] = this.text; };
teacher_info.onChanged = textOnChanged; ... And this works fine. When one
client updates so.data[this._name], the data slot is corectly updated and all
clients see the result. So the scoe of 'so seems to be OK.
AddThis Social Bookmark Button