| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Nov 2004
Posts: 1
|
I am currently developing eLearning modules using Flash and the SCORM standard. SCORM requires FLash and javascript to communicate. The method currently employed by most it seems is fscommand. I would prefer to use GET and POST with sendAndLoad, since fscommand has platform and browser issues (not that get and post don't). I have used GET and POST successfully with PHP etc but not with javascript the following example illustrates my point.
Actionscript: ActionScript Code:
HTML/Javascript: HTML Code:
<HTML> <HEAD> <meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1"> <script language="javascript"> function hello() { alert("hello"); } </script> </HEAD> <BODY bgcolor="#FFFFFF"> <!-- URL's used in the movie--> <!-- text used in the movie--> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="800" HEIGHT="600" id="Untitled-1" ALIGN=""> <PARAM NAME=movie VALUE="Untitled-1.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="Untitled-1.swf" quality=high bgcolor=#FFFFFF WIDTH="800" HEIGHT="600" NAME="Untitled-1" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> </BODY> </HTML> Any ideas ..... Last edited by CyanBlue; 02-11-2005 at 03:33 PM.. Reason: AS tag is applied |
|
|
|
|
|
#2 |
|
Senior Member
|
Just a note to those who may run a search on SCORM, there is no SCORM conformant method for Flash content to communicate with a LMS through methods such as Web services or HTTP requests. Data element parameters must be sent through an API for communication to occur between a SCO and the LMS.
__________________
SCORM School:http://academiccolab.org/scormschool |
|
|
|
|
|
|
|
|
#3 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
here's an example of something you might try...
this is what i did on a project i wrote about 2-3 years ago: Code:
//html file that holds the flash file
<script language="JavaScript">
<!--//hide
function centerMe(){
var moveToX, moveToY;
moveToX=(window.screen.availWidth-870)/2;
moveToY=(window.screen.availHeight-600)/2;
window.moveTo(moveToX,moveToY);
}
//set up a function to tell the page that opened this page to load the selected provider
//then close this page
function openParent(pcsa,pn){
window.opener.location.href="../match.cfm?pcsa="+pcsa+"&prov="+pn;
window.close();
}
//unhide -->
</script>
ActionScript Code:
sometimes you may need to add void(0); to your getURL... like: getURL("javascript: myfunction();void(0);");
__________________
tg --- what the hell was i thinking? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|