Multiple shared objects

There is an example app for FMS where people can move a ball which they share
http://www.adobe.com/devnet/flashmediaserver/sample_apps.html
I'd like to have this app extended so that:
- each user has his own ball
- The balls can be customized (e.g. color etc)
I'd like to know what the best way is to create such an app. Would each user have his own shared object? Or would there be only one shared object with an array?
Any help is appreciated how I should tackle this problem.
thanks

you would need each ball to have its own shared object thereby creating an onsync event for each shared object but i'd only have 1 onConnect event on the client side.

Similar Messages

  • How to dynamicaly link multiple shared objects (.so files) using JNI

    Hi all,
    I recently started working on JNI where i suppose to call C application's .so files using JAVA. Existing C application is huge, it contains many .so files which are having dependencies with other .so files. My problem is when i call a function of one .so file it does not link with other .so files at run time and gives me error(undefined function as that function is implemented in other .so file).
    Can someone suggest me any solution for the same? I am a Java developer and don't have much knowledge about the C language.
    Any suggestion will be highly appreciated.

    jeet420 wrote:
    Hi all,
    I recently started working on JNI where i suppose to call C application's .so files using JAVA. Existing C application is huge, it contains many .so files which are having dependencies with other .so files. My problem is when i call a function of one .so file it does not link with other .so files at run time and gives me error(undefined function as that function is implemented in other .so file). That is not a Java/JNI problem.
    A shared library either uses an explicit link or dynamic link to other libraries.
    If the first then the OS will fail the load of the library if it can't find the dependency.
    If the second then the implementation (the developer) is responsible for correctly dealing with the problem.
    Again none of the above has anything to do with Java nor JNI.
    Nothing in Java nor JNI will help you to figure out the problem nor manage it.
    Two solutions.
    1. Be very careful in manually managing the laydown via an installer of all of the required libraries.
    2. Write code to verify that all libraries are found by the OS. This however still require manual steps as you must explicitly name the shared libraries in some way.
    ... and don't have much knowledge about the C language.Not a good situation. JNI assumes that you have quite a bit of knowledge about C and/or C++.

  • 9 shared objects performance question

    I have 9 shared objects 8 of which contain dynamic data which i cannot really consolidate into a single shared object because the shared object often has to be cleared.....my question is what performance issues will I exsperience with this number of shared objects .....I maybe wrong in thinking that 9 shared objects is alot.....anybody with any exsperience using multiple shared objects plz respond.

    I've used many more than 9 SO's in an application without issue. I suppose what it really comes down to is how many clients are connected to those SO's and how often each one is being updated.

  • Shared Object - Prompt Data Permissions Dialog

    Hello,
    I'm creating a small app to run from CD-Rom/local
    installation that will use multiple shared objects for data
    storage. To ensure proper saving without surprising the user with a
    permissions dialog unexpectedly, I'd like to request unlimited data
    storage on first time app launch - Joey Lott shows how to do this
    in the Actionscript Cookbook...
    request=mySO.flush(1024 * 500);
    My question is,
    Can I perform this permissions request with the user a single
    time with a generic app SO in global fashion, so that the
    permissions would be set for any SOs created during the use of the
    product (all written to same SO directory), or do I have to request
    permissions for each and every SO created? Since the latter
    would be unacceptable from a UE standpoint, that means stuffing all
    app data into a single SO which doesn't seem so great from a data
    config perspective...
    I really appreciate your attention and help on this!
    Thanks in advance,
    -Maura

    Hmm. Experimented a bit and it seems that once the permission
    is set it applies to the Flash Player installation globally, and
    not per SO, not even per domain...
    Or, please correct me if I'm mistaken.
    Thanks.

  • Shared Objects: How to store and read multiple instances

    Hi,
    Can we store multiple instances of Shared Objects in memory and read the desired instance.
    e.g
    If i execute the below program twice then also it will create only a single instance in the memory.
    Can we create a memory object with a key and then read the instance with the object with key
    data: handle type ref to ZCL_SHM_AREA_XX,
          root   type ref to ZCL_SHM_AREA_ROOT_XX.
    handle = ZCL_SHM_AREA_XX=>attach_for_write( ).
    create object root AREA HANDLE handle.
    root->FORM = 'Termination'.
    handle->set_root( root ).
    handle->detach_commit( ).

    Hi Sameer,
    check my reply to Recursive methods..
    Cheers
    Graham Robbo

  • Local Shared Objects and multiple SWFs: mutexes necessary?

    I will have multiple SWFs on a single web page, each reading
    and writing the same SharedObject, which may be up to 100K in size.
    Will I need to create some sort of mutex scheme to ensure that one
    SWF isn't writing while another is reading, or do all SWFs on a
    page essentially run as a single-threaded application?

    >1) I don't think a SharedObject.flush is synchronous.
    I believe it is, as long as you're not attempting to write
    more data than the user has set for the Local Storage limit.
    http://livedocs.adobe.com/flex/3/langref/flash/net/SharedObject.html#flush()
    You'll note that flush is described this way: "Immediately
    writes a locally persistent shared object to a local file", and if
    it returns "SharedObjectFlushStatus.FLUSHED" that means that "The
    shared object has been successfully written to a file on the local
    disk". So I'd say that the normal operation of flush() is
    synchronous. However, the SharedObjectFlushStatus.PENDING state
    means that we've exceeded the limit set by the user, and are
    waiting for them to allow or disallow it. I believe (strongly) that
    that's the only case in which a netStatus event is sent.
    Do you read this differently?
    As far as multiple SWFs running as cooperative or preemptive
    multitasking processes, I'd really like to know the answer, but it
    probably doesn't matter. The more I read and think about this, the
    more it seems to me that Adobe has to prevent simultaneous reads
    and writes to a single Shared Object from taking place, as one use
    of it that I've read about is to share data between SWFs. For
    example:
    http://www.devarticles.com/c/a/Flash/Communication-and-Security-with-the-Flash-Communicati on-Server/1/

  • One shared object among multiple applications

    How would I enable a shared object to be used by more than one game? I have tried doing SharedObject.getLocal("ID","/"), but they still seem to have seperate shared objects, both of these applications have seperate domains (com.domain.app).

    try it.  but i suspect those will look like different domains.
    you could use:
    com.mydomain.games/game117 for your game117's main swf
    and
    com.mydomain.games/game2245 for your game2245's main swf

  • Load balancing remote shared object?

    Has anyone had experience keeping the Remote Shared Object in
    sync between multiple FMS servers for load balancing purposes? I'm
    thinking in terms of being able to push an SO change to one and
    have the others stay in sync.

    I made it use localhost as the path to the .swf so you might
    want to change the net connection uri property to the application
    directory if you are testing on a webhosts domain.
    [/code]
    var my_nc:NetConnection = new NetConnection();
    my_nc.connect("rtmp:/myDomain/mySwf");
    my_so = SharedObject.getRemote("testSo", my_nc.uri, true);
    my_so.connect(my_nc);
    my_so.data.aString = "a testing string";
    /// making sure it's saved.
    //I can see it fine now
    trace(my_so.data.aString);
    var my_nc:NetConnection = new NetConnection();
    my_nc.connect("rtmp:/myDomain/mySWF");
    my_so = SharedObject.getRemote("testSo", my_nc.uri, true);
    my_so.connect(my_nc);
    trace(my_so.data.astring);
    [/code]

  • Issue with Shared Objects

    Hi all,
    I've a problem with a program working on Shared Objects technology.
    We have a Job, scheduled in 18 parallelism, and each one writes into the SHM controlled by a SHMA Class.
    At jobs ending, a program reads content from the area and sends an automatic e-mail with the results.
    Everything works well if the writer program is executed on-line.
    Otherwise, in background, seems that nothing is stored in the SHM.
    Here's the code executed by the writer program:
    FORM shared_memory_access  TABLES  it_fehler STRUCTURE rpfausg.
      DATA: errors_reference TYPE REF TO data.
      DATA: lx_pterl00       TYPE REF TO zcx_pterl00_collector.
      TRY.
    * --> Get SHM Access
          CALL METHOD zcl_pterl00_collector_root=>build
            EXPORTING
              invocation_mode = cl_shm_area=>invocation_mode_explicit.
    * --> It's ok?
          IF zcl_pterl00_collector_root=>area_exists EQ 'X'.
    * --> Fill Data:
            GET REFERENCE OF it_fehler[] INTO errors_reference.
            CALL METHOD zcl_pterl00_collector_root=>fill_area_with_data
              EXPORTING
                error_messages_dref = errors_reference.
          ENDIF.
        CATCH zcx_pterl00_collector INTO lx_pterl00.
          MESSAGE lx_pterl00 TYPE 'S' DISPLAY LIKE 'E'. "Non-blocking -> JOBS
      ENDTRY.
    ENDFORM.                    " SHARED_MEMORY_ACCESS
    Here is the section from the class handling the attachment to the SHMA:
    METHOD if_shm_build_instance~build.
      DATA: lx_collector TYPE REF TO zcx_pterl00_collector.
    * --> Automatic building of instance:
      TRY.
          CALL METHOD get_handle_for_update( inst_name ).
        CATCH zcx_pterl00_collector INTO lx_collector.
          MESSAGE lx_collector TYPE 'X'.
        CATCH: cx_shm_no_active_version.
          TRY.
              CALL METHOD get_handle_for_write( inst_name ).
            CATCH zcx_pterl00_collector INTO lx_collector.
              MESSAGE lx_collector TYPE 'X'.
          ENDTRY.
        CATCH: cx_shm_inconsistent.
          zcl_pterl00_collector=>free_area( ).
          TRY.
              CALL METHOD get_handle_for_write( inst_name ).
            CATCH zcx_pterl00_collector INTO lx_collector.
              MESSAGE lx_collector TYPE 'X'.
          ENDTRY.
      ENDTRY.
    ENDMETHOD.
    I cannot explain why multiple jobs do not populate the area...

    Hi Rob,
    if your requirement is to have many (18) active processes all updating the shared object, and very few simply reading the shared object, then versioning is probably not what you require.
    Versioning allows readers to continue to attach and read the active shared object instance while the updater gets their own instance of the shared object. When the updater does a detach_commit the old instance becomes obsolete and all new requests to attach will be diected to the new instance. The old instance will be cleaned up by garbage collection once all of its readers have detached.
    If your programs primarily attach for update then you will decrease performance with versioning because a new instance needs to be created at every attach for update.
    Perhaps you should just retry the attach for update after a small period of time has passed?
    If, on the other hand, you do have lots of other readers of the shared object you may well still find that it is more efficient not to have versioning. I build a web shop catalogue using shared objects and found that versioning severly hampered performance. This was because, once the catalogue was initialised, updaters were pretty rare but readers were constant.
    BTW make sure you keep the locks on the object as short as possible. Do all your preparation work first, then attach for update, update, detach as quick as possible.
    Cheers
    Graham Robbo

  • Building Shared Object for LabView

    All;
    I'm trying to build a C++-based shared object to be called from LabView and use SunCC instead of gcc. The compile stage looks like:danny@traveler:~/tubes/dielectric/rod_software/lookup> make -f Makefile.unix suncc=1
    sunCC -I/usr/local/lv71/cintools -I/home/danny/src/NR_C301/code -c -KPIC -m32 -Di686 lookup.cc
    "/home/danny/src/NR_C301/code/interp_1d.h", line 183: Warning: n hides Base_interp::n.
    "/home/danny/src/NR_C301/code/mins_ndim.h", line 103: Warning: n hides Linemethod<extern "C" double(const NRvector<double>&)>::n.
    "lookup.cc", line 176:     Where: While instantiating "Powell<extern "C" double(const NRvector<double>&)>::minimize(const NRvector<double>&)".
    "lookup.cc", line 176:     Where: Instantiated from non-template code.
    2 Warning(s) detected.and the load stage fails like this:sunCC -G -m32 -o lookup.so lookup.o /usr/local/lv71/AppLibs/liblvrt.so.7.1 /usr/lib/libGL.so /usr/lib/libOSMesa.so.6
    /opt/sun/sunstudio12/prod/lib/crtn.o:(.text+0x0): multiple definition of `_etext'
    make: *** [lookup.so] Error 1Is my problem obvious? Is there a simple example on how to build SOs? I found the switch definitions in the Sun documentation, but no good examples yet.
    ...Dan

    If your library links to other shared libraries, use -L options to point to directories other than system directories, and the -l option for the library name after "lib".
    When building shared libraries, you also need to list all system libraries explicity, unfortunately, to ensure your library has the right dependencies.
    You should also add -zdefs to force the linker to complain about unresolved symbols. The default when building shared libraries is not to warn about them.
    You want to be sure you have included all the needed libraries in the link.
    Your link command should look like this :
    sunCC -G -m32 -o lookup.so lookup.o -zdefs \
      -L /usr/local/lv71/AppLibs -llvrt.so.7.1 -lGL.so -lOSMesa.so.6 -lCstd -lCrun -lm -lcYou don't need a -L option for /usr/lib or the directories in the Sun Studio installation. The CC driver knows where to find system libraries.
    That said, I don't think the command line issues are the cause of the multiple definition error.
    Binaries created by Sun C++ are not compatible with binaries created by other C++ compilers like g++. Is liblvrt.so.7.1 a g++ library?

  • Multiple Consumer object per Streaming Connection in AIR

    hi,
    We require streaming server setup for our project.
    We are trying to minimize the active connections to the server.
    My query is "If we are using multiple Consumer object instances with same channel and destination, will we have a single connection to the server shared by all Consumer instances or we'll be having different connection for each Consumer instance".
    Thanks in advance for your support
    Regards,
    Shailendra Sirohi

    Excellent answer.  It dovetails with the approach I've started to take here.  I'm using something called NetConnectionClient to catch server calls.  Does your NCMgr class extend NetConnection or EventDispatcher?
    Mine extends EventDispatcher and has a method like the following.  Just stuffs the message from the server into an object first before dispatching an event containing it:
            public function receiveChatMessage(msg:String):void
                var tempObj:Object = new Object();
                tempObj.msg = msg;
                dispatchEvent(new NetConnectionClientEvent("onReceiveChatMsg", tempObj));
    All cool there.  This works up to this point.
    I'm hazy after that though.  Who should listen for and handle the event?  I'd like my chat component to listen for and handle it directly, like in your scenario.  But my chat component is in a separate mxml file imported into the main app file.  I'm hazy on how to have it grab what it needs.
    I currently have the "application" listening for and handling the event.  The handler method just relays the call by calling a method on the chat component instance, like this:
    chat.receiveMessage(tempObj); //tempObj contains the message
    I think that's too many relays of the same call, from the NetConnectionClient class, to the main application file, down to the custom chat component.  I'd like to cut out a leg of that trip.
    Should I have the chat component instance itself be listening, like this?
                chat.addEventListener("onReceiveChatMessage", chat.receiveChatMsg);
    Is that a proper relay of the dispatched event to the target component.  The syntax doesn't seem proper to me.  I feel like something's wrong with the design of the last leg of the relay here.

  • Using flash shared object to have a load animation play only once

    Hey all I have a swf on multiple pages, I onyl want it to
    play the load animation once, so I thought I would try the shared
    object to do this.
    //On frame 1 on my mc if it hasnt played the file below it
    should to gotoAndPlay frame 1 of my mc, logo_mc
    logoload = SharedObject.getLocal("logoload1");
    if (logoload.data.logoloadvar == undefined){
    _root.logo_mc.gotoAndStop(30);
    } else {
    _root.logo_mc.gotoAndPlay(1);
    stop();
    //at the end of my load animation frame 30 of logo_mc I am
    trying to tell the shared object that its has played, so I put
    something in it:
    stop();
    computer = System.capabilities.os;
    _root.logoload.data.logoloadvar = "logoseen";
    _root.logoload.flush();
    But it does not appear to be responding, what am I doing
    wrong there? Its the first time Ive used the object.
    Any help would be great.

    Wow. That is exactly what it was, thanks so much. Our IT guys are working on the problem now. Thanks again.

  • Problem Assigning Local Shared Object

    I have created a swf that increments a dollar amount every
    five seconds. My clients want this dollar counter to be consistent
    between HTML pages. That is where the local shared object comes in.
    I can create it fine, and even read it (I know this by a trace() I
    used). But for the life of me I can't get the value from the shared
    object passed to the dynamic text field as soon as the swf is
    loaded. It always starts at the beginning increment of 0.192!
    I'm pretty sure what is messing me up is either the function
    that formats the number to a dollar format or the function that
    increments the dollar value up every five seconds and saves that
    value to the shared object.
    Using the code below, you can create a flash file with a
    dynamic text labeled 'money' and the actionscript copied into the
    first frame on the timeline.
    Any help would be great appreciated!

    aasimmomin wrote:
    > Hi,
    >
    > I have 2 files *.swf files. The first one is creating a
    shared object while
    > the second one reads the created shared object.
    > The files works perfectly on my local machine and on my
    server, but the second
    > file is not able to read the shared object on the
    client's server.
    > Although both files work perfectly well on the client's
    local machine.
    >
    > I have checked and found that there is no synchronizing
    problem between the
    > writing and reading of the shared object.
    >
    > Could there be some settings on the client's server
    which may be missing?
    do not post same question to multiple forums, post in one and
    stick to it.
    http://www.adobe.com/support/forums/guidelines.html
    Adobe forums posting guidelines
    When posting messages...
    - in DON'T Section :
    Don't cross-post or double-post. Posting a message to more
    than one forum (i.e "cross-posting" is
    unnecessary, and creates extra traffic for you and others to
    read through. If you've already posted
    a question, please don't repeat your posts in order to get
    more attention- this makes it very
    difficult for others to see if and/or where your question was
    answered.
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • Understanding remote shared objects

    Hi Fellow users, I am using a remote shared object in my Flash Media Server project for the first time. My purpose of using a rso is to update data in real-time accross multiple clients.
    Ok, I like to store a list of users who are connected to my application. And when a client disconnects I want the object updated to all other clients connected and the online status list is revised.
    I dont know what the best approach is for this... Is it possible to use the onSync event?  And put the clients in an array and when their properties are changed the server is dispatched and updated. Or, would you recommend other alternatives?
    Interested to hear your thoughts and opinions guys.
    Thanks

    Thank you Rajesh. Apologies for my late reply. Are you suggesting I do something like this? In the code below I have included a changeList array to describe the change properties of each member in a remote shared object. Furthermore, I have created so.data property to store attributes of the rso when a user changes one of the slots it triggers the syncEvent. Can someone please take a good close look at my code to see if you can identify any errors? thanks in advance.
    function syncExample(event:SyncEvent):void{
         my_rso.data.username1;
         my_rso.data.username2;
         my_rso.data.username3;
         my_rso.data.username4;
         my_rso.data.username5;
    for (var i = 0; i <changeList.length; i++){
    var changeList:Array = event.changeList;
    var info:Object;
    info = changeList[i];
    switch(info.code){
       case "success"
      lient_info = my_rso.data[info.name];
       case "change":
       client_info = my_rso.data[info.name];

  • Error while loading shared libraries: librt.so.1: cannot open shared object

    error while loading shared libraries: librt.so.1: cannot open shared object
    I cant run my apache server v2.2.3.
    Can someone help me?
    thanks in advance

    That could be an accessibility issue. Check the user with whom you installed Apache server. Check the user has permissions to access the libraries.
    -Mahendra.

Maybe you are looking for

  • Plugin CONTAINER keeps crashing, now a specific plugin noted, but sometimes Adobe crashes too... What is the fix for the CONTAINER?

    I have had this problem for a few months. I am using version 3.6.12, have always updated when noticed, couldn't find a resolution for the problem and have been waiting to see if the fix came with one of the updates, but it continues. Firefox will jus

  • Airport extreme and external hd

    I have a western digital hd connected to my airport extreme via usb hub. I can access it fine from my powerbook. However if I try to connect to it remotely no drives appear. I've looked at several posts in the forums and even a pdf guide, but nothing

  • How to use the LIKE_INSENSITIVE ?

    Hi all, I've updated my DB2E 8.2.2 to 8.2.4 and applied the patch SP20DELTA for MI2.5. My purpose is to use the LIKE_INSENSITIVE operator during the search function. In the "SearchProcessImpl.java", I tried to replace the following line : protexted R

  • JSP calling a SessionBean

    I'm getting some errors with this JSP page I'm working on. The page is trying to access a sessionbean. The errors are: Error: cannot access class javax.ejb.EJBObject; file javax\ejb\EJBObject.class not found Error: cannot access class javax.ejb.EJBHo

  • EPMA Import profile options V11.1.2

    Hi Al, Iam working on EPMA import profiles. For a dimension in shared library we want it to cleared before loading the hierarchy from Interface tables. In 11.1.2.1 there is a option "Clear Before Importing" in import profiles. But i can t find it in