2 Replies Latest reply: Oct 5, 2010 12:28 PM by NathanStryker RSS

    SCORM/Class File Problem

    NathanStryker Community Member

      I have a problem with a dynamic video player that I have created in flash. The video player is "SCORM" compliant so that when the user clicks the "exit" button a class file is called to mark the user complete in an LMS.

       

      I have tested the SCORM Code previously and it works with out issue. Usually I have the completion code embedded in an Actions Layer of the movie. This is the first time I have attempted to call the completion status in a class file, I have added a "trace statement" when the movie is tested within flash it runs the trace statement properly, but when uploaded to the LMS environment the course does not complete properly.

       

      I'm more then happy to post any code that people would need to help me trouble shoot this issue.

       

      Thanks for your time and consideration.

        • 1. Re: SCORM/Class File Problem
          Erik Lord CommunityMVP

          If the class is executing properly per your Flash tracing, then has to be something in the LMS communication...it would seem.

          Have you tested this in any other LMS aside from the one you have?

          Try SCORM Cloud, or perhaps a free trial of Inquisiq R3, and see if you get the same result.

          If so, a code issue. If not, an LMS issue. At least that'll help narrow it down...?

          Erik

          • 2. Re: SCORM/Class File Problem
            NathanStryker Community Member

            FlashImage.jpg

             

            Hey- Thanks for the reply:

             

            Yes I have tested the module using SCORM cloud (AKA SCORM.com), and on Moodle in addition to my companies LMS. I get the same results in every case. the course does not seem to be registering the mouse event (click).

             

             

            I am using the ActionScript to invoke a JavaScript file. I have been using the PipWerks Java files and SCORM 1.2.

             

            Here is the code:

             

            [B]Video playlist AS File[/B]

             

            [AS]package src

            {

            import flash.display.MovieClip;

            import flash.net.URLLoader;

            import flash.net.URLRequest;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import fl.controls.listClasses.CellRenderer;

            import fl.controls.ScrollBarDirection;

            import flash.text.TextFormat;

            import fl.controls.TextArea;

            import pipwerks.SCORM;

             

             

             

            public class VideoPlaylist extends MovieClip

            {

            private var xmlLoader:URLLoader;

            private var textStyle:TextFormat;

            private var description:TextArea;

             

            public var str:String;

             

            public var scorm:SCORM = new SCORM();

            public var lessonStatus:String;

            public var success:Boolean;

            public var lmsConnected:Boolean;

             

             

            public function VideoPlaylist():void

            {

            xmlLoader = new URLLoader();

            xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);

            xmlLoader.load(new URLRequest("xml/xmlData.xml"));

            tileList.setSize(250, 480);

            tileList.columnWidth=180;

            tileList.rowHeight=60;

            tileList.direction=ScrollBarDirection.VERTICAL;

            tileList.setStyle("cellRenderer", Thumb);

            textStyle = new TextFormat();

            textStyle.font="Tahoma";

            textStyle.color=0xFF0000;

            textStyle.size=11;

            tileList.setRendererStyle("textFormat", textStyle);

             

            exit_btn.addEventListener(MouseEvent.CLICK, callCourseExit);

             

            lmsConnected = scorm.connect();

             

             

            if(lmsConnected)

            {

            lessonStatus = scorm.get("cmi.core.lesson_status");

             

               if(lessonStatus == "completed" || lessonStatus == "passed")

            {

            success = scorm.set("cmi.core.lesson_status", "started");

            }

               else

            {

                  success = scorm.set("cmi.core.lesson_status", "started");

            }

            }

            else

            {

               trace("Could not connect to LMS.");

            }

             

            }

             

            public function initMediaPlayer(event:Event):void

            {

            var myXML:XML=new XML(xmlLoader.data);

            var item:XML;

            for each (item in myXML.vid)

            {

            var thumb:String;

            if (item.hasOwnProperty("@thumb")>0)

            {

            thumb=item.@thumb;

            }

            tileList.addItem({label:item.attribute("desc").toXMLString(),str:item.attribute("contenu") .toXMLString(),

            data:item.attribute("src").toXMLString(),source:thumb, description:item.attribute("description").toXMLString()});

             

            }

             

            tileList.selectedIndex=0;

             

            tileList.addEventListener(Event.CHANGE, listListener);

             

            myVid.source=tileList.selectedItem.data;

             

            myVid.pause();

             

            }

            function listListener(event:Event):void

            {

            myVid.play(event.target.selectedItem.data);

            var description:TextArea = new TextArea();

            description.setSize(490,75);

            description.move(25, 350);

            description.text=tileList.selectedItem.description;

            addChild(description);

            }

            function callCourseExit(e:MouseEvent)

            {

            var myExit:exitCourse;

            trace("clicked");

            myExit = new exitCourse();

            }

            }

             

            }

            [/AS]

             

            [B]Exit Course AS File[/B]

             

            [AS]package src

            {

             

            import flash.display.MovieClip;

            import flash.net.URLLoader;

            import flash.net.URLRequest;

            import flash.events.Event;

            import flash.events.MouseEvent;

            import fl.controls.listClasses.CellRenderer;

            import fl.controls.ScrollBarDirection;

            import flash.text.TextFormat;

            import fl.controls.TextArea;

            import pipwerks.SCORM;

             

            public class exitCourse extends MovieClip

            {

             

            public var scorm:SCORM = new SCORM();

            public var lessonStatus:String;

            public var success:Boolean;

            public var lmsConnected:Boolean;

             

            public function exitCourse ():void

            {

            success = scorm.set("cmi.core.score.raw", "100");

            success = scorm.set("cmi.core.score.min", "0");

                   success = scorm.set("cmi.core.score.max", "100");

            success = scorm.set("cmi.core.lesson_status", "passed");

            scorm.disconnect();

               lmsConnected = false;

            trace("Exit Clicked");

            }

            }

            }[/AS]

             

            Thanks again for the time everybody!