  | | | so.send problems ??? | so.send problems ??? 2004-02-25 - By Srinivas Nagarajan
Back Hi ,
I am having some problems with so.send message calls. I have the below code in the first frame of the movie and have a pushbutton when clicked sends the so.send("getMesgFunction") but i dont recieve it in the so.getMesgFunction defined.
BUT if i do this : I put this so.send("getMesgFunction") function rite after
this.so = SharedObject.getRemote("video", myConn.uri, false); > this.so.onSync = function(info) { > trace("syncing"); > }; > this.so.connect(myConn);
It worked. Any idea why does it work that way ?
Can i not define it outside the initialize function ? Any help would be appreciated.
>//CLIENT SIDE CODE >myConn = new NetConnection(); >myConn.onStatus = function(info) { > if(info.code == "NetConnection.Connect.Success"){ > initalize(); > } >} >myConn.connect("rtmp:/sharedObjectTest/test"); >initalize = function() { > > this.so = SharedObject.getRemote("video", myConn.uri, false); > this.so.onSync = function(info) { > trace("syncing"); > }; > this.so.connect(myConn); >} >this.so.getMesgFunction = function(){ > display.text = "Got Message" ; >} >onPushButton = function() { > so.send("getMesgFunction"); >} >stop(); > >//SERVER SIDE >load("components.asc"); >// INITIALIZE THE APPLICATION >application.onAppStart = function() { > SharedObject_init(); >}; >// >// APPLICATION CONNECT >application.onConnect = function(theClient) { > //Accept the connection from the user. > application.acceptConnection(theClient); >}; >// SHARED OBJECTS >SharedObject_init = function () { > server_so = SharedObject.get("video", false); >}; > > >Thanks >Srinivas
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ Dream of owning a home? Find out how in the First-time Home Buying Guide. http://special.msn.com/home/firsthome.armx
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: flashcomm-unsubscribe@(protected) For additional commands, e-mail: flashcomm-help@(protected)
|
|
 |