Explore the community Forums Lectora Tips and tricks Flash Commands with Lectora

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #272524 Score: 6
    Profile photo of xithis
    xithis
    Member
    122 pts
    @xithis

    Since people have been asking me about it, here are some common Flash commands for communicating with Lectora that I use.
    I will use a generic “objectname” that you can can replace with the HTML name that Lectora assigns.

    This refers to images/groups/text boxes/buttons/anim objects/external htmlNote: if you want to use javascript just use what is in the quotes, that is the javascript command.

    Note 2: you need this code on the pages where you use these functions: import.flash.external.*
    List:
    Hide an object: ExternalInterface.call(“objectname.actionHide()”);
    Show an object: ExternalInterface.call(“objectname.actionShow()”);
    Next Page: ExternalInterface.call(“trivNextPage()”);
    Previous Page: ExternalInterface.call(“trivPrevPage()”);
    Go to a Specific Page in Lectora (see page name rules):ExternalInterface.call(“trivExitPage(‘htmlpagename.html’, true)”);
    Move an Object on stage (xval=the new xcoordinates, yval=the new ycoordinates): ExternalInterface.call(“objectname.objLyr.moveTo(xval,yval)” );
    ExternalInterface.call(“objectname.objLyr.hasMoved=true”);
    ExternalInterface.call(“objectname.objLyr.newX=xval”)
    ExternalInterface.call(“objectname.objLyr.newY=yval”);

    Talk to another Flash object (using Lectora’s tools, I know there are other ways), set variable: ExternalInterface.call(“objectname.setFlashVar(‘thevariable’ ,thevalue)”);
    Grab a value from Lectora and assign it to a variable in Flash:See Mark’s post below.
    Set a Lectora variable from flash:ExternalInterface.call(“Varvariablename.set(‘value’)”);
    Run a Lectora Action Group: ExternalInterace.call(“runGroup_objectname()”);

    Page Name Rules: You can control page naming by setting up a system of chapeters and sections. Make sure you don’t have duplicate names, or else it will publish as ascii. Example for a SCORM/AICC course:Chapter Name (mod1)Section Name (sec1)Page Name (page1)This structure would give you an html page name as: a001_mod1_sec1_page1.htmlWhere a001 is the assignable unit. Keeping uniformed and controled page naming allows for some neat interactions with flash because you always know where every page is. Let your imagination run wild 🙂 Example: I have created a dynamic flash menu for every page within the course, that also updates based upon your location in the course.Post here if you want me to add any more. I’ll update the post.

    Thanks!
    *Updated for new forum

    This post has received 6 votes up.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.