[Flashcoders] how do I setvalue and then getvalue between flash and scorm server

2007-02-01 Thread Zhu dan

Hello all,
I am working on a flash video learning program. I have encoded the FLV video 
with 5 cuepoints that set to navigation cuepoint. I have full playback 
features for this video and five buttons to let the audiences to directly go 
to the cuepoint if they want to.


Here is my problem, I can't get the FSCommand to track and record the 
prograss of the video. And if I can use FSCommand to track and record 
prograss, can I use this track information to resume video playback? For 
example, an audience closed the webpage at cuepoint 3, is it possible I can 
use the FSCommand's tracking information to let the audience resume where he 
stopped? The code I have is below without the resume playback part. Thank 
you very much.



Here is the code I have so far.
video learning program. I have encoded the FLV video with 5 cuepoints that 
set to navigation cuepoint. I have full playback features for this video and 
five buttons to let the audiences to directly go to the cuepoint if they 
want to.


Here is my problem, I can't get the FSCommand to track and record the 
prograss of the video. And if I can use FSCommand to track and record 
prograss, can I use this track information to resume video playback? For 
example, an audience closed the webpage at cuepoint 3, is it possible I can 
use the FSCommand's tracking information to let the audience resume where he 
stopped? The code I have is below without the resume playback part. Thank 
you very much.



Code:
import mx.video.FLVPlayback;
var my_flvPb:FLVPlayback;
my_flvPb.autoPlay = false;
btn1.label = Part1;
btn2.label = Part2;
btn3.label = Part3;
btn4.label = Part4;
btn5.label = Part5;
function clickMe1() {
my_flvPb.seekToNavCuePoint(cue1);
trace(Cue point 1)
FSCommand(LMSSetValue,cmi.core.score.raw, 20);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe2() {
my_flvPb.seekToNavCuePoint(cue2);
trace(Cue point 2)
FSCommand(LMSSetValue,cmi.core.score.raw, 40);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe3() {
my_flvPb.seekToNavCuePoint(cue3);
trace(Cue point 3)
FSCommand(LMSSetValue,cmi.core.score.raw, 60);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe4() {
my_flvPb.seekToNavCuePoint(cue4);
trace(Cue point 4)
FSCommand(LMSSetValue,cmi.core.score.raw, 80);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe5() {
my_flvPb.seekToNavCuePoint(cue5);
trace(Cue point 5)
FSCommand(LMSSetValue,cmi.core.score.raw, 100);
FSCommand(LMSSetValue,cmi.core.lesson_status, finished);
}
btn1.addEventListener(click, clickMe1);
btn2.addEventListener(click, clickMe2);
btn3.addEventListener(click, clickMe3);
btn4.addEventListener(click, clickMe4);
btn5.addEventListener(click, clickMe5);

the FSCommand works everytime I click on the button, how can I make them 
work when the video playback reach a cuepoint automatically?


Thanks.

Sincerely,
Daniel Zhu

_
Check out all that glitters with the MSN Entertainment Guide to the Academy 
Awards®   http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] how do I setvalue and then getvalue between flash and scorm server

2007-02-01 Thread Alain Rousseau
if you can use ExternalInterface (Flash 8)  or the Javascript 
Integration Kit (http://osflash.org/flashjs) to communicate back and 
forth with your LMS.
As for having cuepoints triggering your actions you should look up 
FLVPlayback.cuePoint events

http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=3488.html#wp3773909

// from livedocs

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
   trace(Elapsed time in seconds:  + my_FLVPlybk.playheadTime);
   trace(Cue point name is:  + eventObject.info.name);
   trace(Cue point type is:  + eventObject.info.type);
}
my_FLVPlybk.addEventListener(cuePoint, listenerObject);

inside your listener function you could define your LMS actions.

Zhu dan wrote:

Hello all,
I am working on a flash video learning program. I have encoded the FLV 
video with 5 cuepoints that set to navigation cuepoint. I have full 
playback features for this video and five buttons to let the audiences 
to directly go to the cuepoint if they want to.


Here is my problem, I can't get the FSCommand to track and record the 
prograss of the video. And if I can use FSCommand to track and record 
prograss, can I use this track information to resume video playback? 
For example, an audience closed the webpage at cuepoint 3, is it 
possible I can use the FSCommand's tracking information to let the 
audience resume where he stopped? The code I have is below without the 
resume playback part. Thank you very much.



Here is the code I have so far.
video learning program. I have encoded the FLV video with 5 cuepoints 
that set to navigation cuepoint. I have full playback features for 
this video and five buttons to let the audiences to directly go to the 
cuepoint if they want to.


Here is my problem, I can't get the FSCommand to track and record the 
prograss of the video. And if I can use FSCommand to track and record 
prograss, can I use this track information to resume video playback? 
For example, an audience closed the webpage at cuepoint 3, is it 
possible I can use the FSCommand's tracking information to let the 
audience resume where he stopped? The code I have is below without the 
resume playback part. Thank you very much.



Code:
import mx.video.FLVPlayback;
var my_flvPb:FLVPlayback;
my_flvPb.autoPlay = false;
btn1.label = Part1;
btn2.label = Part2;
btn3.label = Part3;
btn4.label = Part4;
btn5.label = Part5;
function clickMe1() {
my_flvPb.seekToNavCuePoint(cue1);
trace(Cue point 1)
FSCommand(LMSSetValue,cmi.core.score.raw, 20);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe2() {
my_flvPb.seekToNavCuePoint(cue2);
trace(Cue point 2)
FSCommand(LMSSetValue,cmi.core.score.raw, 40);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe3() {
my_flvPb.seekToNavCuePoint(cue3);
trace(Cue point 3)
FSCommand(LMSSetValue,cmi.core.score.raw, 60);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe4() {
my_flvPb.seekToNavCuePoint(cue4);
trace(Cue point 4)
FSCommand(LMSSetValue,cmi.core.score.raw, 80);
FSCommand(LMSSetValue,cmi.core.lesson_status, failed);
}
function clickMe5() {
my_flvPb.seekToNavCuePoint(cue5);
trace(Cue point 5)
FSCommand(LMSSetValue,cmi.core.score.raw, 100);
FSCommand(LMSSetValue,cmi.core.lesson_status, finished);
}
btn1.addEventListener(click, clickMe1);
btn2.addEventListener(click, clickMe2);
btn3.addEventListener(click, clickMe3);
btn4.addEventListener(click, clickMe4);
btn5.addEventListener(click, clickMe5);

the FSCommand works everytime I click on the button, how can I make 
them work when the video playback reach a cuepoint automatically?


Thanks.

Sincerely,
Daniel Zhu

_
Check out all that glitters with the MSN Entertainment Guide to the 
Academy Awards®   
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com