Groups | Blog | Home
all groups > macromedia flash flash remoting > june 2004 >

macromedia flash flash remoting : dataset.loadFromSharedObj.... does it work?


JimRG
6/30/2004 6:30:57 PM
I have dragged a dataset onto the stage and names it dsThroughput. In the
first fram I then put the following actionscript:

try {
dsThroughput.loadFromSharedObj("phil");
}
catch(errObject:mx.data.components.datasetclasses.DataSetError) {
trace("Unable to load shared object.");
}

according to the documentation, this should work, but no matter what I do I
cant catch the error. There is definitely no shared object called "phil"!.

Any help would be greatly appreciated.

derobinson
7/3/2004 4:41:50 AM
You need to initialize the shared object and store data in it before you can
call on it with the loadFromSharedObj method.

Something like:

// Create shared object
phil= SharedObject.getLocal("foo");
phil.data.this = variable;
phil.data.that = variable2'

//load shared object into dataset
dsThroughput.loadFromSharedObj("phil");

Hope that helps!
/david

AddThis Social Bookmark Button