HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Comunicating with embeded swf
Comunicating with embeded swf
  View type:
Hi! I have a swf file with ExternalInterface enabled, wich actually works with Javascript in a webpage. In this swf i have a function that returns (via ExternalInterface) a Number. I can receive this number in my webpage via Javascript pretty well. Now, the question is, how can i call that function from this swf embeded in courselab? I need to call that function in corselab and receive that number. [:confused:]

Thanks!
 
Luciano if you are using flash and javascript to pass variables then .... You either understand how this will work and will start to fall over on more and more platforms OR you just copied it from somewhere and don't understand.
As you are having to ask then flash and javascript maybe aren't your strong point.
=====
Now things to remember...
First and important to note is that flash is effectively dead on ipad and android, I'd suggest getting used to NOT using it as it will become more marginalised by HTML5.
Second the courselab pages are generated in a web browser window so much (note MUCH) of the normal browser functionality is available depending on the browser and revison.
Lastly the page display is generated in the web browser using javascript from xml and there is the javascript SCORM API to handle comminications and some other functions needed for the modules to work.
====
So embed the flash and capture the output stream by an extension to the API.
As I remember someone has done this or something very similar before and there is a strand here about this. Google for it.
====
It is really unclear from your post why you are sending a variable back to the page using a convoluted route like this. You can probably have courselab do the same thing using the built in scripting so it is platform independant, it will be quicker, use less host system resouce and not depend on an external service (flash) that might not be present on the host device.
Subject:
Message options
No additional options