flash to lectora

What you need to do is communicate through Lectora to the LMS the data that you need to resume the flash file.You don't want to use AICC_Lesson_Location to save the data in this instance, because whenever the course exits, Lectora will write to this variable the html location.So we need to create a custom variable. Create a variable called "flashholder"At the top of the title, create an action that inherits this variable through the title.Action Initialize FlashholderVariable: flashholderModify Variable: VAR(flashholder)Then on the flash page have a flash command action as such:On ShowFlash CommmandTarget: your flash movieCommand: Set VariableName: flashcontinue Value: VAR(flashholder);That is it for the Lectora code.Next we need to read variables from Flash.Find the html name of the flash file. Right click on the flash file in Lectora and open the propertiesOn the first frame you would need something like this:stop();import flash.external.*//Resume Functionfunction Resume(){ if ((flashcontinue ==undefined)or(flashcontinue==null)){ this.gotoAndStop(2); //I put 2 here, but replace it with whatever frame is the beginning frame.}else{ this.gotoAndStop(flashcontinue);}}//The next and back buttons//This will save the framenumberbn_next.onRelease = function(){ theString = "Varflashholder.set("+(_currentframe+1)+")"; ExternalInterface.call(theString); gotoAndStop(_currentframe+1);}bn_prev.onRelease = function(){ theString = "Varflashholder.set("+(_currentframe-1)+")"; ExternalInterface.call(theString); gotoAndStop(_currentframe-1);}Resume();[/CODE]Note, the flash code is a guess based on the structure of your flash file. It could be totally different based upon how you have the flash file structured.The ExternalInterface command makes the call to Lectora. This is the key to the code.*Edit: cleaned it up because of google chrome formattingEdited By: Xithis on 2009-3-9 8:33:51[CODE]stop();import flash.external.*//Resume Functionfunction Resume(){ if ((flashcontinue ==undefined)or(flashcontinue==null)){ this.gotoAndStop(2); //I put 2 here, but replace it with whatever frame is the beginning frame.}else{ this.gotoAndStop(flashcontinue);}}//The next and back buttons//This will save the framenumberbn_next.onRelease = function(){ theString = "Varflashholder.set("+(_currentframe+1)+")"; ExternalInterface.call(theString); gotoAndStop(_currentframe+1);}bn_prev.onRelease = function(){ theString = "Varflashholder.set("+(_currentframe-1)+")"; ExternalInterface.call(theString); gotoAndStop(_currentframe-1);}Resume();[/CODE]Note, the flash code is a guess based on the structure of your flash file. It could be totally different based upon how you have the flash file structured.The ExternalInterface command makes the call to Lectora. This is the key to the code.*Edit: cleaned it up because of google chrome formattingEdited By: Xithis on 2009-3-9 8:33:51

Discussions have been disabled for this post