home *** CD-ROM | disk | FTP | other *** search
- function initGAB()
- {
- var _loc3_ = new MovieClipLoader();
- var _loc5_ = new Object();
- _loc5_.activityFile = "xml/blank.xml";
- _loc5_.parent = this;
- _global.startTime = getTimer();
- _loc5_.onLoadInit = function(mc)
- {
- mc._visible = false;
- mc._lockroot = true;
- mc.activityFile = this.activityFile;
- mc.eventListeners = [{type:"onActivityLoaded",listener:this.parent},{type:"onCallFunction",listener:this.parent},{type:"onScores",listener:this.parent}];
- };
- _loc3_.addListener(_loc5_);
- var _loc4_ = _global.OS != "Mac" ? "swf/preview.swf" : "swf/preview.swf";
- _loc3_.loadClip(_loc4_,unitData.theGABmc);
- playerType = "GAB";
- }
- function onFileClicked(fileData)
- {
- trace("broadcasted");
- Dump.dumpThis(fileData);
- previousFileObject = currentFileObject;
- currentFileObject = fileData;
- unitData.activityOnLoad(fileData);
- headerActive = false;
- if(fileData.link.url == "test.swf")
- {
- trace("test.swf");
- if(_global.OS == "Windows")
- {
- trace("win");
- mdm.System.exec(mdm_appdir + "fscommand\\shell.exe");
- }
- else if(bLinuxSystem)
- {
- blue._visible = true;
- loadMovieNum("shell.swf",20,"GET");
- }
- else
- {
- trace("mac");
- mdm.exec(_level0.mdm_appdir + "fscommand:shell.osx");
- }
- }
- }
- function drawBaseNav()
- {
- if(currentFileObject != undefined)
- {
- unitData.activityLoadComplete(currentFileObject);
- }
- }
- function onActivityLoaded(eventObject)
- {
- cv.swapDepths(0);
- cv.removeMovieClip();
- checkVisible = _root.createEmptyMovieClip("cv",_root.getNextHighestDepth());
- checkVisible.count = 0;
- checkVisible.onEnterFrame = function()
- {
- trace(this.count++);
- if(this.count > 2)
- {
- drawBaseNav();
- delete this.onEnterFrame;
- }
- };
- loading_mc._visible = false;
- }
- function onScores(eventObject)
- {
- trace("onScores: " + eventObject.totalCorrect + "/" + eventObject.totalAvailable);
- unitData.onScores(eventObject.totalCorrect,eventObject.totalAvailable);
- }
- function onCallFunction(eventObject)
- {
- trace("onCallFunction: ");
- trace("functionName: " + eventObject.functionName);
- trace("params: " + eventObject.params);
- }
- function loadActivities(fileData)
- {
- if(fileData.link.url == "activities.swf")
- {
- unitData.createActivityNav(fileData.arrActivities,fileData.nodePath);
- }
- else if(fileData.link.url == "preview.swf")
- {
- loadGABPlayerFile(fileData.link.activityFile);
- }
- else if(fileData.link.url == "Grammar.swf")
- {
- loadGrammarSWF(fileData.link.activityFile);
- }
- else if(fileData.link.url == "grammar.swf")
- {
- loadGrammar(fileData.link.pdf[0].unit);
- }
- else if(fileData.link.url == "phonetic.swf")
- {
- loadPhoneticChart();
- }
- else if(fileData.link.url == "crossword.swf")
- {
- loadCrossword(fileData.link.activityFile);
- }
- else if(fileData.link.url == "pelmanism.swf")
- {
- loadPelmanism(fileData.link.activityFile);
- }
- else if(fileData.link.url == "wordsearch.swf")
- {
- loadWordSearch(fileData.link.activityFile);
- }
- else if(fileData.link.url == "html.swf")
- {
- loadHTML(fileData.link.activityFile);
- }
- else if(fileData.link.url == "matching.swf")
- {
- loadMatching(fileData.link.activityFile);
- }
- else if(fileData.link.url == "cando.swf")
- {
- loadPhoneticChart;
- activityHeader._visible = false;
- loadCando(fileData.link.activityFile);
- }
- else if(fileData.link.url == "phonetic_chart.swf")
- {
- loadPhoneticChart();
- }
- else if(fileData.link.url == "minidict.swf" || fileData.dictionary == true)
- {
- loadMiniDictionary();
- }
- else if(fileData.link.url == "DiaryMain.swf")
- {
- loadDiary(fileData.link.activityFile,fileData.nodePath[1]);
- }
- else if(fileData.link.url.indexOf("Mod") != -1)
- {
- loadSWF(fileData.link.url);
- }
- }
- function loadGABPlayerFile(link)
- {
- printObj = {};
- printObj.scale = 80;
- printObj.gab = true;
- printObj.path = unitData.theGABmc;
- loading_mc._visible = true;
- unitData.theGABmc.activityFile = "xml/" + link;
- }
- function loadPhoneticChart()
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- var _loc1_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- target_mc._xscale = 95;
- target_mc._yscale = 95;
- };
- _loc1_.addListener(_loc2_);
- _loc1_.loadClip("swf/phonetic_chart.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadMiniDictionary()
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- var _loc1_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.theNonGABmc._visible = true;
- target_mc._lockroot = true;
- target_mc._x -= 25;
- target_mc._y -= 35;
- };
- _loc1_.addListener(_loc2_);
- _loc1_.loadClip("swf/minidict.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadCrossword(link)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- var _loc1_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._lockroot = true;
- target_mc._xscale = 85;
- target_mc._yscale = 85;
- target_mc._x += 10;
- target_mc._y -= 5;
- trace("loading file: xml/" + link);
- target_mc.myXml.load("xml/" + link);
- };
- _loc1_.addListener(_loc2_);
- _loc1_.loadClip("swf/crossword.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadPelmanism(link)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- trace("loading pelmanism");
- var _loc2_ = new Object();
- var _loc1_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._lockroot = true;
- target_mc._x += 20;
- target_mc._y += 55;
- target_mc._xscale = 65;
- target_mc._yscale = 65;
- trace("loading file: xml/" + link);
- target_mc.xmlPath = "xml/" + link;
- };
- _loc1_.addListener(_loc2_);
- _loc1_.loadClip("swf/pelmanism.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadWordSearch(link)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc3_ = new Object();
- var _loc2_ = new MovieClipLoader();
- _loc3_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._lockroot = true;
- target_mc.parent = _root;
- target_mc._x += 12;
- target_mc._y += 10;
- target_mc.xOffSet = target_mc._parent._x + 12;
- target_mc.yOffSet = target_mc._parent._y + 10;
- trace("loading file: xml/" + link);
- target_mc.wordSearchXml.load("xml/" + link);
- };
- _loc2_.addListener(_loc3_);
- _loc2_.loadClip("swf/wordsearch.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadHTML(link)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- _loc2_.movieClip = this;
- var _loc3_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- target_mc._lockroot = true;
- target_mc.movieClip = this.movieClip;
- target_mc._y -= 8;
- trace("loading file: xml/" + link);
- target_mc.htmlXML.load("xml/" + link);
- };
- _loc3_.addListener(_loc2_);
- _loc3_.loadClip("swf/html.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadMatching(link)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc3_ = new Object();
- _loc3_.movieClip = this;
- var _loc4_ = new MovieClipLoader();
- _loc3_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._lockroot = true;
- target_mc.parent = _root;
- target_mc._x += 10;
- target_mc._y -= 35;
- target_mc.xOffSet = target_mc._parent._x + 10;
- target_mc.yOffSet = target_mc._parent._y - 35;
- target_mc.wordsXml.load("xml/" + link);
- };
- _loc4_.addListener(_loc3_);
- _loc4_.loadClip("swf/matching.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadCando(link)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- var _loc1_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- target_mc._lockroot = true;
- target_mc._xscale = 100;
- target_mc._yscale = 100;
- target_mc.candoXML.load("xml/" + link);
- trace("xml/" + link);
- };
- _loc1_.addListener(_loc2_);
- _loc1_.loadClip("swf/cando.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadSWF(file)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- unitData.theNonGABmc._lockroot = true;
- trace("loading movie: swf/" + file);
- unitData.theNonGABmc.loadMovie("swf/" + file);
- unitData.theNonGABmc._y += 25;
- playerType = "External";
- }
- function loadDiary(link, unitNo)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- _loc2_.unitNo = unitNo;
- var _loc3_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._lockroot = true;
- target_mc.xmlObject.load("xml/" + link);
- target_mc.unitNum = Number(this.unitNo);
- trace("xml/" + link);
- };
- _loc3_.addListener(_loc2_);
- _loc3_.loadClip("swf/DiaryMain.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadGrammar(unit, sub)
- {
- trace("LOADING GRAMMAR: " + unit + "," + sub);
- printObj = {};
- var _loc2_ = new Object();
- _loc2_.movieClip = this;
- var _loc3_ = new MovieClipLoader();
- _loc2_.unit = unit;
- _loc2_.sub = sub;
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._lockroot = true;
- target_mc.movieClip = this.movieClip;
- target_mc._y -= 8;
- target_mc.loadGrammar(this.unit,this.sub);
- };
- _loc3_.addListener(_loc2_);
- _loc3_.loadClip("swf/grammar.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- function loadGrammarSWF(file)
- {
- printObj = {};
- printObj.path = unitData.theNonGABmc;
- printObj.scale = 80;
- printObj.gab = false;
- var _loc2_ = new Object();
- var _loc1_ = new MovieClipLoader();
- _loc2_.onLoadInit = function(target_mc)
- {
- trace("movie loaded");
- unitData.activityLoadComplete(currentFileObject);
- target_mc._xscale = 90;
- target_mc._yscale = 90;
- target_mc.audiopath = "audio/";
- target_mc.grammarXML.load("grammar/" + file);
- };
- _loc1_.addListener(_loc2_);
- _loc1_.loadClip("swf/grammar.swf",unitData.theNonGABmc);
- playerType = "External";
- }
- stop();
- var my_cm = new ContextMenu();
- my_cm.hideBuiltInItems();
- my_cm.builtInItems.print = true;
- this.menu = my_cm;
- mdm.setwindowtitle("GOLD FCE");
- mdm.setapplicationtitle("GOLD FCE");
- var bLinuxSystem = false;
- _root.txt_linux = _global.OS;
- _root.txt_linux = System.capabilities.os;
- if(System.capabilities.os.indexOf("Linux") != -1)
- {
- bLinuxSystem = true;
- _root.topNav.quitBtn._visible = false;
- }
- blue._visible = false;
- var lineColour = 5221062;
- var bgColour = 16777215;
- var headerTypeColour = "FFFFFF";
- var drawBNInt;
- var unitData = new UnitData(_root.activity_holder.createEmptyMovieClip("activity",1),_root.activity_holder1.createEmptyMovieClip("activity",1));
- var navigation = new Friends_navigation(nav);
- var printObj;
- var currentFileObject;
- var printcontent;
- var currentHolder;
- var headerActive;
- var previousFileObject;
- var currentLoadedActivity;
- embed._visible = false;
- printCov._visible = false;
- loading_mc._visible = false;
- playerType = undefined;
- var navXML = new XML();
- navXML.ignoreWhite = true;
- navXML.onLoad = function()
- {
- navigation.parseXML(this);
- languageActivator();
- unitData.parseXML(unitXML);
- };
- navXML.load("xml/Navigation.xml");
- initGAB();
-