Skip to main content
Participant
September 8, 2006
Question

Continuous Server Applications - Possible?

  • September 8, 2006
  • 2 replies
  • 433 views
Ok, I'm a long-time user of Flash and Actionscripting, but totally new to SSAS.

I'm creating (or trying to) a multi-user, persistant world, Flash-Based game.

So far, all the examples I've seen of SSAS start the script when someone connects/requests it and closes directly after all users are disconnected.

Is there a way to create a server app that would run and continue running regardless of current connections, or lack thereof?
    This topic has been closed for replies.

    2 replies

    September 20, 2006
    Use:
    application.onAppStop=function(){
    return false;
    }

    Good Luck!
    Inspiring
    September 9, 2006
    Hello :)

    FMS is a continuous server :)

    You launch the server and you can use methods in the server to dispatch
    informations all the time... use for example a setInterval server site
    to simulate an activity.

    PS : SSAS is Javascript 1.5 implementation in FMS but when you launch
    the server ... you can launch a continuous interval if you don't stop
    the server.

    EKA+ :)

    > Ok, I'm a long-time user of Flash and Actionscripting, but totally new to SSAS.
    >
    > I'm creating (or trying to) a multi-user, persistant world, Flash-Based game.
    >
    > So far, all the examples I've seen of SSAS start the script when someone
    > connects/requests it and closes directly after all users are disconnected.
    >
    > Is there a way to create a server app that would run and continue running
    > regardless of current connections, or lack thereof?
    >
    September 9, 2006
    You also need to consider garbage collection. FMS will kill application instances after they have been idle for a while (as in no clients connected), so you need to tell FMS to not shut your app down.

    Look in the docs for the application.onappStop method to see how to prevent an instance from being GC'd.