mbedded flash movie needs student name

In lectora create a new variable called "studentId"On the page with the flash movie put a page level action to:On: ShowAction: Modify VariableTarget: studentIdValue: VAR(AICC_Student_ID)Mod Type: Set Variable ContentsThat will include the value in the javascript on the page. Then from flash (this is using flash 8 AS2):

Code:

import flash.external.*;var flashStudentId;flashStudentId = ExternalInterface.call("VarstudentId.getValue");

That should get the value from Lectora and put it in the flashStudentId variable that you can use in your flash movie.Every once in a while I will try to do this and for some reason the variable I'm trying to get isn't updated in the JavaScript yet so I create a delay for a second with something like this:

Code:

import flash.external.*;var flashStudentId;var delayCount;this.onEnterFrame = function(){delayCount ++;if(delayCount > 20){delete this.onEnterFrame;}flashStudentId = ExternalInterface.call("VarstudentId.getValue");}

Try the first one and if that doesn't work try the second one. Hopefully that helps.

Discussions have been disabled for this post