LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-11-2007, 04:20 PM
ella_romanos ella_romanos is offline
Registered User
 
Join Date: Nov 2007
Posts: 1
Rep Power: 0
ella_romanos is on a distinguished road
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
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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




All times are GMT. The time now is 02:51 PM.