1. Estoy desarrollando cursos para una plataforma de e-learning que funciona con php-mysql. La estructura cursos-plataforma funciona de la siguiente manera:
Curso (swf) > javascript -------> pagina.php --------> Mysql (Plataforma)
El curso es una película swf que a través de javascript pasa unos valores a un script php que guarda los datos en la mysql de la plataforma.
2. Los cursos se crean con Robodemo. Hay dos tipos de cursos, los de contenidos, y los de preguntas. En los cursos de contenido funciona todo correctamente, os voy a mostrar cómo funciona para que podáis ayudarme con los cursos de preguntas que es donde hay errores:
2a) Creo el curso de contenido "cap2.swf" con el Robodemo, y en la opción "qué hacer al final de la película" marco: Go to url e indico
Código PHP:
   JavaScript:document.test.submit(); 
    Código PHP:
   <?PHP include "../../../anema.inc.php";?>
<HTML><TITLE>curso</TITLE>
 
<BODY><form name="test" method=POST action="<?php echo $score_ganesha ?>&temps=100¬e=100">
 
</form>
 
<center><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="640" HEIGHT="480" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
 
<PARAM NAME=movie VALUE="cap2.swf">
 
<PARAM NAME=play VALUE=true>
 
<PARAM NAME=loop VALUE=false>
 
<PARAM NAME=quality VALUE=high>
 
<EMBED SRC="cap2.swf" WIDTH=640 HEIGHT=480 loop=false quality=high TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</center>
</BODY></HTML>   3. El problema aparece cuando temps y score no son 100, sino que dependen de los resultados que ha sacado el alumno en el ejercicio. El archivo ejercicio.swf va acompañado de un archivo.php que contiene:
Código PHP:
   <?PHP 
include "../../anema.inc.php";
 
if ( !Init($connexion,'','') ) {
 
        PageErreur(); 
 
        exit ();
}
?>
<HTML>
 
<HEAD>
 
<meta http-equiv=Content-Type content="text/html;  charset=ISO-8859-1">
 
<script language="JavaScript">
 
        nomFichierSWF=location.pathname.substr(1)       
 
        tableau = nomFichierSWF.split("/"); 
 
        nomFichierSWF = tableau[tableau.length-1]; 
 
        nomFichierSWF = nomFichierSWF.substr(0,nomFichierSWF.length-4)
 
document.writeln("<TITLE>" + nomFichierSWF + "</TITLE>");
 
function SauveResult()
 
{
 
//Conversion temps venant de MX
 
if (timeTotal.length==8) {
 
tableau=timeTotal.split(":")
 
timeTotal=parseInt(tableau[0]*3600)+parseInt(tableau[1]*60)+parseInt(tableau[2])
 
}
 
//window.open("<?PHP echo $score_ganesha ?>&temps=" + timeTotal + "¬e=" + scoreFin,"","toolbar=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=300");
 
window.location="<?PHP echo $score_ganesha ?>&temps=" + timeTotal + "¬e=" + scoreFin
 
}
 
</script>
 
</HEAD>
 
<BODY bgcolor="#ffffff">
 
<SCRIPT LANGUAGE=JavaScript>
 
<!--
 
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
 
// Handle all the the FSCommand messages in a Flash movie
 
eval('function '+nomFichierSWF+'_DoFSCommand(command, args) {var '+nomFichierSWF+'Obj = InternetExplorer ? '+nomFichierSWF+' : document.'+nomFichierSWF+'; if (command == "CMISetTime") {timeTotal = args}; if (command == "CMISetScore") {scoreFin = args; SauveResult()}}')
 
 
// Hook for Internet Explorer 
 
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
 
          navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
 
        document.write('<SCRIPT LANGUAGE=VBScript\> \n');
 
        document.write('on error resume next \n');
 
        document.write('Sub '+nomFichierSWF+'_FSCommand(ByVal command, ByVal args)\n');
 
        document.write('  call '+nomFichierSWF+'_DoFSCommand(command, args)\n');
 
        document.write('end sub\n');
 
        document.write('</SCRIPT\> \n');
 
}
 
//-->
        document.writeln('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"')
 
        document.writeln('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"')
 
        document.writeln('ID='+nomFichierSWF+' WIDTH="100%" HEIGHT="100%" ALIGN="">')
 
        document.writeln('<PARAM NAME=movie VALUE="'+nomFichierSWF+'.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#ffffff> <EMBED src="'+nomFichierSWF+'.swf" quality=high bgcolor=#ffffff  WIDTH="100%" HEIGHT="100%" ')
 
        document.writeln('swLiveConnect=true ID="'+nomFichierSWF+'" NAME="'+nomFichierSWF+'" ALIGN=""')
 
        document.writeln('TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>')
 
        document.writeln('</OBJECT>')
 
</SCRIPT>
</BODY>
</HTML>   Código PHP:
   JavaScript:document.temps+note.submit(); 
    Si alguien puede echarme una mano lo agradeceré enormemente, saludos y buen fin de semana a todos!!!!!
 
 
