Index: lams_flash/src/central/flash/main2.as =================================================================== diff -u -r3fc9626d0692f03e5998d786766a82f45e640e03 -rec61f5d738bce3513b4e5204e011a68476a9c165 --- lams_flash/src/central/flash/main2.as (.../main2.as) (revision 3fc9626d0692f03e5998d786766a82f45e640e03) +++ lams_flash/src/central/flash/main2.as (.../main2.as) (revision ec61f5d738bce3513b4e5204e011a68476a9c165) @@ -6,35 +6,11 @@ // Temp values to be removed / repplaced at deployment _global.myRoot = this; -if(StringUtils.isEmpty(lcId)){ - Debugger.log('lcId is not defined, actionscript will not be able to communicate with javascript',Debugger.CRITICAL,'main','ROOT'); -} - -if(StringUtils.isEmpty(presenceServerUrl)){ - _root.presenceServerUrl = "192.168.1.1"; - Debugger.log('presenceServerUrl is not defined, using defualt:'+_root.presenceServerUrl ,Debugger.CRITICAL,'main','ROOT'); -} - if(StringUtils.isEmpty(serverURL)){ _root.serverURL = "http://localhost:8080/lams/"; Debugger.log('serverURL is not defined, using defualt:'+_root.serverURL ,Debugger.CRITICAL,'main','ROOT'); } -if(StringUtils.isEmpty(userID)){ - _root.userID = 4; - Debugger.log('userID is not defined, using defualt:'+_root.userID ,Debugger.CRITICAL,'main','ROOT'); -} - -if(StringUtils.isEmpty(firstName)){ - _root.firstName = "firstName"; - Debugger.log('firstName is not defined, using defualt:'+_root.firstName ,Debugger.CRITICAL,'main','ROOT'); -} - -if(StringUtils.isEmpty(lastName)){ - _root.lastName = "lastName"; - Debugger.log('lastName is not defined, using defualt:'+_root.lastName ,Debugger.CRITICAL,'main','ROOT'); -} - if(StringUtils.isEmpty(mode)){ _root.mode = 1; Debugger.log('Mode is not defined, using defualt:'+_root.mode,Debugger.CRITICAL,'main','ROOT'); @@ -54,18 +30,10 @@ _root.langDate = "01-01-1970"; } -if(StringUtils.isEmpty(isIe)){ - _root.isIe = "false"; - Debugger.log('browser is not defined, using defualt:'+_root.isIe,Debugger.CRITICAL,'main','ROOT'); -} - -Debugger.log("PRESENCE: connection info from controlFrame - " + userID + " " + firstName + " " + lastName + " " + presenceServerUrl, Debugger.MED,'main','ROOT'); - //Set stage alignment to top left and prent scaling Stage.align = "TL"; Stage.scaleMode = "noScale"; - //Start the application, passing in the top level clip, i.e. _root var app:Application = Application.getInstance(); app.main(this); @@ -81,30 +49,5 @@ var success = receive_lc.connect("learnerProgress_lc_" + uniqueID); -//Declaration of proxy object for javascript integration kit -var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this); -_root.proxy = proxy; - -function sendMessageToFlash(msg:String){ - Debugger.log("PRESENCE: from javascript - " + msg, Debugger.MED, 'sendMessageToFlash', 'ROOT'); -} - -function attemptRegistration(){ - Debugger.log("PRESENCE: registration caught in main", Debugger.MED, 'sendMessageToFlash', 'ROOT'); - app.getPresence().attemptRegistration(); -} - -function sendUsersToFlash(users:Array){ - Debugger.log('PRESENCE: ' + users, Debugger.MED, 'sendUsersToFlash', 'ROOT'); - - for (var i:Number = 0; i < users.length; i++) { - trace("1: " + users[i].nick); - users[i].nick = unescape(users[i].nick); - trace("2: " + users[i].nick); - } - - app.getPresence().setupDataGrid(users); -} - //Make app listener for stage resize events Stage.addListener(app); \ No newline at end of file