Engage Embedded Flash XML

Oct 11, 2011

Hello

I have an embedded flash file in my engage template.

The flash file has one connected xml file for text.

in flash the text input is ok when embedding the flash file in engage the text does not load and the swf file keeps looping like there is no stop keyframe.

do you know how to solve this?

i use the presenter to publish my presentation and i have tried to copy the swf to the folder that the presenter uses for the published presentation swf input.

16 Replies
Robert Eriksson

Thanks for feedback

I have another question...

I have converted the files now to as2...

I also published them for flash player 9

however when i try to embedd or add them to the engage presentation the engage program freezes...

so i can embedd as3 files but not as2? and as3 does not work...

ok so can you help me add as2 files to engage

David Burton

Robert,

This is possible. When the Engage interaction is hosted inside a Presenter presentation, the xml file has to be in the root folder or the same folder as the 'data' and 'player' folders.

NOT:

\course title XXXX\data\swf\engage_269\engage_content

In regard to the crashing, there might be something in your code that is in conflict. Without seeing this I don't know.

The sample code below is AS2 Flash Player 6. I have created 3 Dynamic Text boxes with  instance names (text_box1, text_box2, text_box3). I embedded this custom swf file into a Tab Interaction. This Tab Interaction is inserted into a Presenter slide.

// define an XML object called "my_xml"
my_xml = new XML();
// load data from an external XML file into "my_xml" object
my_xml.load("sample.xml");
// what to do when data is loaded ... Call a function ("my_function" in this case)
my_xml.onLoad = my_function;
// ignore "white spaces", text nodes that only contain white space are discarded
my_xml.ignoreWhite = 1;
// function contents
function my_function() {
// take the data from the XML lines (line 0,1,2) and place that data inside text fields
text_box1.text = my_xml.firstChild.childNodes[0].attributes.product_name;
text_box2.text = my_xml.firstChild.childNodes[1].attributes.product_name;
text_box3.text = my_xml.firstChild.childNodes[2].attributes.product_name;
}

The following file is a sample xml formatted file and should be used with the code above. This file was placed in my Presenter published root folder (same folder as the 'data' and 'player' folders.)

"

<?xml version="1.0" encoding= "UTF-8" ?>
<products>
    <product product_name="Flash Book" price="25.00"></product>
    <product product_name="Flash CD" price="10.00"></product>
    <product product_name="Dreamweaver CD" price="50.00"></product>
</products>
"

I hope this helps!

This discussion is closed. You can start a new discussion or contact Articulate Support.