Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi,
Can you please explain what do you want to do with captivate quiz?
Copy link to clipboard
Copied
Thank for your concern.
I am going to develop flex application which lets the students to take quiz. The questions type can be MCQ or short answer questions. For the short answer questions i store the students given answer in data base. For some short questions student may upload some file. I know that captivte quiz out put is a swf file. I want to access particular question in this swf file. I do not know it is possible me to access particulare question in this swf file. How ever to achieve my goal i need more control on this swf file. Please tell me if those are possible or not. If those are possible tell me the location where can i find help material. Thank you.
Copy link to clipboard
Copied
Hi,
You can access your Captivate swf from Flex or Flash or JS using Captivate variables. There are numerous Captivate system variables that you can access to achieve your purpose. For the complete list of System variables and their description, you may refer to Captivate Help or this page
To access Captivate variables, your Flash/Flex code will have to be something like the one below.
Here, I have an user variable called testing in my Captivate swf and I am accessing it using ActionScript.
----------------
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loadedSWF);
ldr.load(new URLRequest("var_test.swf"));
function loadedSWF(evt:Event):void
{
trace("testing = "+ldr.content.root.testing);
}
---------------
Note that you have to access the Captivate variable using <loader_name>.content.root.<variable_name>
I hope this helps.
Thanks.
Copy link to clipboard
Copied
The content you sent me was really helpful. Thank you
Janaka
Copy link to clipboard
Copied
I'm interested in using FLEX to create a widget that I load INTO a Captivate project. How would that change this approach?
Also, I've attempted to build a Flex 4 project (sdk 4.1) with this code, and it's generating the following errors:
Description | Resource | Path | Location | Type |
---|---|---|---|---|
1119: Access of possibly undefined property testing through a reference with static type flash.display:DisplayObject | Cp5Widget.mxml | /Cp5Widget2/src | line 26 | Flex Problem |
1120: Access of undefined property ldr | Cp5Widget.mxml | /Cp5Widget2/src | line 20 | Flex Problem |
1120: Access of undefined property ldr | Cp5Widget.mxml | /Cp5Widget2/src | line 21 | Flex Problem |
1120: Access of undefined property loadedSWF | Cp5Widget.mxml | /Cp5Widget2/src | line 20 | Flex Problem |
I've created the var_text.swf by creating a CP5 project that has the variable with a pre-defined value, and a button to set a new value.
Unfortunately, the project doesn't appear to load due to the errors present.
If you could find time to post a couple sample files, it may help us beginners!
Copy link to clipboard
Copied
I just wrote a blog on how to integrate captivate with flex. It makes captivate very powerful, In my application I have created UIs and other comps in flex along with captivate
http://riajava.blogspot.com/2011/03/embeding-captivate-files-into-flex.html
Copy link to clipboard
Copied
Any updates on how to circumvent the access to undefined property? The suggested method kind of doesn't work (at least when applied literally).