alan's multi-user skunkworks
works in progressproject
something stinks around here
skunkworks
item generic login for MU apps
view first used in multi-user prototype of gas law game
purpose Provide a single shockwave interface that could be used as an entrance to other MU applications we develop. This provides the initial connection to the MU server and generates a reference to the instance of the MU Xtra.
notes july 29
This first version is loosely based upon some of the features of the Shockwave beta lounge, namely that it could be modified by simply editing the HTML parameters, and thus could be changed without going inside the Director environment, The other feature was having the graphics and button elements scale to the size of the application.

The blue background is a vector shape that can be set to scale to the window size, and all of the fields, and buttons align themselves to the left or right side of the blue background. See, as reference the base size and locations in the Director environment (13k screenshot) and then as how the elements adjust themselves according to the window size and the current settings for what fields should appear. (13k screenshot)

We also use setPref() / getPref() to store the entered username, password, and server as cookies that are restored the next time the login file is run.

 

The parameters are read in as a Lingo Property List format for Shockwave HTML parameter sw1. For authoring, they are stored in a cast member MUS default. So far the following are supported:

  • #defaultuser: text that appears initially for a user name (string)
  • #server: default multiuser server IP (string, e.g "123.45.67.89")
    current value = 134.114.145.96 (address for G4) This must be changed for moving to another server. The server can be entered in shockwave if the #showServer flag is true.
  • #port: default port (nearly always 1626), integer
  • #showPass: flag whether the password is visible; values are true/false
  • #showServer: flag whether the server field is visible; values are true/false
  • #appTitle: text displayed as a banner for the name of this application
  • #movieID: unique string to identify the intended shockwave file to the MU server, string. For the ideal Gas law app, this ID is "igas" while the competitive version is "igasComp". Do not confuse this with user group names
  • #movieDest: name of director file to connect to (without .dir extension)
  • #movieDestFrame: name of frame within destination movie file to jump to (empty string means start from frame 1)
  • #groupMode: indicates type of group assignment. Values include:
    • #assigned : all users are joined with the group name provided in the #groups property
    • #randomFromList : groups assigned to one of the names provided in the #groups property
    • #entered : users must enter their group ID, must be one of the possible names provided in the #groups property
  • #groups: Lingo list of strings for possible group names; if #groupMode is #assigned, than only the first one is used:
    ["red", "blue", "orange"] would mean that users may join any of these three groups if #groupMode is #entered or #randomFromList (see changes below)

This movie initiates the conection to the MultiUser Xtra and stores the following information into a global variable gMultiUserInstance


--==================================================
-- OBJECT PROPERTIES
--==================================================
property pUser              -- the name of the user.
property pPassword          -- the password for the user.
property pConnect           -- instance of the multiuser object.
property pServer            -- the server to log into.
property pPort              -- the port number of the server.
property pGroup             -- primary group joined
property pID                -- movie connection ID for MUS

august 21
Updates to error reporting behind the scenes. A confirmation message is now presented to the user before the branch to a MU app showing what username they are using and what group that have joined (if appropriate).

Major change is an extra parameter in the embed/default list above:

  • #validGroupSource: a flag to indicate whether a list of valid groups a user may join or be randomly assigned is read from the embed parameters (value=#param) OR if the list of valid groups is stored as an attribute of a DBApplication Object assoictaed with the application (value=#server).
This feature now allows our administrative applications (run via a web interface) can define the groups students may joined w/o any re-editing of the HTML file. In some cases, we would still read valid groups from the params (if they will not change, if they are assigned, etc...).

This requires that the admin application set the attribute of a DBApplication object to hold this data; the attribute name must be named ValidGroups for example, to update the valid list of groups to some new linear list newGroupList :


  newGroupList = ["groupname1", "groupname2"]
  err=myConnection.sendNetMessage("system.DBApplication.setAttribute", 
      "my message", \
       [#application: myConnectID, #attribute: [#validGroups:newGroupList]])

Also, in case the list of valid groups is needed elsewhere, it it now stored as a property pValidGroups of the global variable gMultiUserInstance


--==================================================
-- OBJECT PROPERTIES
--==================================================
property pUser              -- the name of the user.
property pPassword          -- the password for the user.
property pConnect           -- instance of the multiuser object.
property pServer            -- the server to log into.
property pPort              -- the port number of the server.
property pGroup             -- primary group joined
property pValidGroups       -- other groups available for connection
property pID                -- movie connection ID for MUS
Also, the password entry field is now protected to show only asterisks on the screen as a password is typed in.

aug 25
The login movie now has an exit button that uses browser scripting to close the window (after a confirmation screen). Also, a help button is now active (although the pages are not written yet). The behavior on the help button allows specification of a full or relative (to the .dcr file) URL for the help files. Since many will be the same, the help pages will be located in the mu_help directory on the web server.

nov 7
Article written for Director-Online User Group demo-ing a generic example of this login movie.

feb 26
Modified logo link top use external GIF to customize further. Wow. Looking at a check for a user exisiting before logging in- if another user "blob" is signed in somewhere, and I sign in with a user name of "blob", the first Blob is automatically booted off. Bad form!