Can we save SharedObject
in Database if yes then how? I want to save multiple SharedObject's
in Database and when I would select from one of them i'll be able to select...
Asked
Active
Viewed 183 times
2

Devendra
- 1,864
- 6
- 29
- 49
2 Answers
0
If you're talking about storing several SharedObject
's on the client side, your application can simply create several SharedObjects
's, and just postfix them with an index. When you launch your application, you simply just choose which SharedObject
you want to load. Example:
function getSharedObjectFromIndex(index:int):SharedObject {
return SharedObject.getLocal("foobar"+index.toString());
}
var so:SharedObject;
if ( /*some condition*/ ) {
so = getSharedObjectFromIndex(0);
}
else {
so = getSharedObjectFromIndex(1);
}
This is not the approach I would take, I would rather save an array holding the different information, and simply save that in one SharedObject
.
If you're talking about storing a SharedObject
in a database on your server, then you should clarify that in your question.

RasmusWL
- 1,573
- 13
- 26
-
thanks @Rasmuas can application give control to user to choose any of saved object? – Devendra Feb 25 '13 at 12:06
-
@dev that shouldn't be any problem, if you have N different SharedObjects, you could make N buttons, or make the user input a number from 1 to N in some TextField. – RasmusWL Feb 25 '13 at 17:35
-1
What type of object you wanted to store? Yes you can store any type of shared object like image files and can select at any point of time.

Sandeep Kumar
- 783
- 1
- 5
- 13
-
i've saved data in sharedobject... and i'm able to retrieve that but now i want to save two sharedobject for an application.....and when i open application so i choose one of shared object... – Devendra Feb 25 '13 at 07:09