
Welcome Guest
|
#1
|
|||
|
|||
|
cannot save to sharedObject.data??
For some reason, i cannot get values to save to sharedObject.data
I am doing this: private var netConn:NetConnection; private var serverPath:String = "rtmp://141.163.49.29/MoreLikeHowTo/nigel"; private var mySharedObject:SharedObject; private var conn:Boolean; function onLoad(){ netConn = new NetConnection(); netConn.connect(serverPath); mySharedObject = SharedObject.getRemote("keyboardStatus", netConn.uri, false); mySharedObject.connect(netConn); myKeyListener = new Object(); myKeyListener.onKeyDown = myOnKeyDown; myKeyListener.onKeyUp = myOnKeyUp; Key.addListener(myKeyListener); stop(); } function myOnKeyDown():Void { if ((Key.isDown(Key.RIGHT)) || (Key.isDown(Key.LEFT))) { var curKey = Key.getCode(); var curKDown = true; mySharedObject.data.key = curKey; mySharedObject.data.isKeyDown = curKDown; trace("keydown: " + mySharedObject.data.isKeyDown); trace("key: " + mySharedObject.data.key); } } function myOnKeyUp():Void{ if ((!Key.isDown(Key.RIGHT)) || (!Key.isDown(Key.LEFT))) { var curKDown = false; mySharedObject.data.isKeyDown = curKDown; } } the traces in the myOnKeyDown function return 'undefined', and I can't figure out why it's not saving the values to the sharedobject.data? Any ideas? am i doing something really stupid?? someone please help! thanks |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Save to JPG | paulcybulski | Actionscript 2.0 |
1 | 04-10-2008 07:41 PM |
| 'Save' MovieClip into '.swf' File | grg51 | General Flash | 0 | 01-19-2005 04:05 PM |
| Swift3D Xpress - How to save your work | FlashMove | 3rd Party Tools and Plugins | 0 | 10-18-2003 03:14 AM |
| fscommand Save | Nascent | General Flash | 1 | 10-31-2001 06:59 AM |
| fscommand save | Danc | General Flash | 3 | 10-19-2001 06:57 PM |





