<< Back
Message for this thread
Posted by Messages text
ee hang liang

Avatar
Total post : 144
> Profile
Written on : 15/03/2010 14:34 ( more than one month )
Object : Contribute Scorm 1.2 Flash Format [SOLVED]
Hi All,

Has anybody downloaded and tried the flash scorm sample (flash_sample.zip) given at docebo.org? Can that flash scorm be able to "Suspend and Resume"? If yes, do you mind to send me the file in macromedia MX 6 format.

I can't open the fla file. May be i am using Macromedia Flash MX 6, which is too old to open it.


From LiangEH
Message modified by : liangeh on : 23/03/2010 01:40
 
ee hang liang

Avatar
Total post : 144
> Profile
Written on : 15/03/2010 17:27 ( more than one month )
Object : Re: Contribute Scorm 1.2 Flash Format
Hi All,

I have done a Scorm Object in Flash format. Please go to download it http://www.cemtech.biz/tiki-list_file_gallery.php?galleryId=17

It work except the Suspend and Resume part. Hope someone can take a look.

The flash has a movieclip which has 5 pages in total.

Page 1 has next button which has the actionscript:
on (release) {
    fscommand("LMSSetValue","cmi.core.exit,suspend");
    fscommand("CMISetLocation","1");
    fscommand("CMISetData","1");
    fscommand("LMSCommit","");
    gotoAndPlay(2);
}



Page 2 (also page 3, 4) has Previous and Next buttons which have the actionscript:
on (release) {
    fscommand("LMSSetValue","cmi.core.exit,suspend");
    fscommand("CMISetLocation","2");
    fscommand("CMISetData","2");
    fscommand("LMSCommit");
    gotoAndPlay(3);
}

on (release) {
    gotoAndPlay(1);
}



Page 5 has Previous and Done buttons, which will send the "complete" signal back to docebo.
on(release)
{
    fscommand("CMISetLocation","5");
    fscommand("CMISetData","5");
   
    fscommand("CMISetCompleted","");
    fscommand("CMIFinish","");
    fscommand("CMIFinishFlag","");
    }

on (release) {
    gotoAndPlay(4);
}


At the keyframe1 of the movieclip, i have the following actionscript. This is to do resume part. So, I need to read the cmi.suspend_data value from docebo, and put it into a dynamic variable called 'dynamictext' (advised by someone at another site
http://adlcommunity.net/mod/data/view.php?d=27&mode=single&page=2).

_root.dynamictext="";
fscommand("LMSGetValue", "cmi.suspend_data,dynamictext");
//fscommand("msgbox",_root.dynamictext.text);
   
if (_root.dynamictext.text.length>0){
        gotoAndStop(_root.dynamictext.text);
} else {
        stop();
}

I just can't get the cmi.suspend_data value. Anything i have done wrong?

From LiangEH
Message modified by : liangeh on : 15/03/2010 17:38
 
ee hang liang

Avatar
Total post : 144
> Profile
Written on : 15/03/2010 18:23 ( more than one month )
Object : Re: Contribute Scorm 1.2 Flash Format
In the scormflash.html, around line 392.

I do a alert msgbox to see whether i can get the cmi.suspend_data value from docebo database. IT CAN! So, is not Docebo's problem. Wink

if ( cmd == "LMSGetValue") {
                alert(SCOGetValue(arg1));
                testObj.SetVariable(arg2, SCOGetValue(arg1));   //liangeh - used javascript setVariable to send data to flash

From LiangEH
 
ee hang liang

Avatar
Total post : 144
> Profile
Written on : 16/03/2010 17:24 ( more than one month )
Object : Re: Contribute Scorm 1.2 Flash Format
Hi All,

I read an article which explained that
"data passed into flash (into dynamic variable textbox) using SetVariable javascript, may not come in time. we need to put the dynamic variable textbox inside movieclip and use onClipEvent(data) to capture the "data came in" event."

So, here i try:

1. In main timeline, keyframe 1, i put actionscript:

_root.movie1.dynamictext.text="";
fscommand("LMSGetValue", "cmi.suspend_data,_root.movie1.dynamictext");

2. Choose the movieclip movie1, and put the actionscript:

onClipEvent(data){
    fscommand("msgbox", "Data arrived. you are at movie1 clip w value =" + movie1.dynamictext.text);
    if (movie1.dynamictext.text.length>0){
        fscommand("msgbox", movie1.dynamictext.text);
        gotoAndStop(movie1.dynamictext.text);
    }
}
 



Expected Result: When the data is successfully passed into the dynamic textbox, a message box shall appears..saying "Data arrived..." ..

Actual Result: No message box appear, it means the data never pass in.

What Var i shall put?

Hope someone can help.

From LiangEH
Message modified by : liangeh on : 16/03/2010 17:31
 
ee hang liang

Avatar
Total post : 144
> Profile
Written on : 23/03/2010 01:36 ( more than one month )
Object : Re: Contribute Scorm 1.2 Flash Format
Hi All,

I manage to solve the Suspend and Resume function in flash. I have uploaded the latest scorm flash at the same place.

I don't use Dynamic Variable at all. Just store the retrieved data cmi.suspend_data into a variable returnval).

On frame 1, i have the actionscript:
fscommand("LMSGetValue", "cmi.suspend_data,returnval");
this.onEnterFrame = function(){
        if (returnval == undefined){
            // do nothing, wait for the variable to be returned
        }else{
            //fscommand("msgbox", "Data arrived. you are at onEnterFrame =" + returnval);
            _root.movie1.gotoAndPlay(returnval);
            delete returnval;
            delete this.onEnterFrame;
        }
    }

Pls share your comment. Thanks.

I notice in Docebo Report..it got Score field. Hope one day i can work on setting the score in Flash.



From LiangEH
Message modified by : liangeh on : 23/03/2010 01:38
 
ee hang liang

Avatar
Total post : 144
> Profile
Written on : 29/03/2010 08:07 ( more than one month )
Object : Re: Contribute Scorm 1.2 Flash Format [SOLVED]
I uploaded the latest flash scorm. I change the Next button's actionscript as below, this make it more portable.

on (release) {
    fscommand("LMSSetValue","cmi.core.exit,suspend");
    fscommand("CMISetLocation",String(this._currentFrame+1));
    fscommand("CMISetData",String(this._currentFrame+1));
    fscommand("LMSCommit");
    gotoAndPlay(this._currentFrame+    1);
}


From LiangEH
 
<< Back