<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>data_loader es</name>
    <events>
        <event-group description="" sid="468214047272921" title="load data">
            <sub-events>
                <event-block sid="313511724908737">
                    <conditions>
                        <condition id="-2" name="On start of layout" sid="444086038908486" type="System" />
                    </conditions>
                    <actions />
                    <sub-events>
                        <comment>clear multies array</comment>
                        <event-block sid="694060812863149">
                            <conditions />
                            <actions>
                                <action id="1" name="Set size" sid="725614516266876" type="arrQstRef">
                                    <param id="0" name="Width">0</param>
                                    <param id="1" name="Height">1</param>
                                    <param id="2" name="Depth">1</param>
                                </action>
                                <action id="1" name="Set size" sid="786693815845815" type="arrOptRef">
                                    <param id="0" name="Width">0</param>
                                    <param id="1" name="Height">1</param>
                                    <param id="2" name="Depth">1</param>
                                </action>
                            </actions>
                        </event-block>
                        <comment>set dataCount to show preloader animation</comment>
                        <event-block sid="882094666345695">
                            <conditions>
                                <condition id="-14" name="Compare variable" sid="563586564283764" type="System">
                                    <param id="0" name="Variable">dataCount</param>
                                    <param id="1" name="Comparison">0</param>
                                    <param id="2" name="Value">0</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-10" name="Add to" sid="101577030877048" type="System">
                                    <param id="0" name="Variable">dataCount</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="475924781530258">
                            <conditions />
                            <actions>
                                <action id="1" name="Request project file" sid="739395006279401" type="AJAX">
                                    <param id="0" name="Tag">&quot;xmlData&quot;</param>
                                    <param id="1" name="File">data.xml</param>
                                </action>
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="690640536008213">
                    <conditions>
                        <condition id="0" name="On completed" sid="960732592105974" type="AJAX">
                            <param id="0" name="Tag">&quot;xmlData&quot;</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="14" name="Log" sid="226943064928311" type="Browser">
                            <param id="0" name="Type">0</param>
                            <param id="1" name="Message">&quot;loaded xml&quot;</param>
                        </action>
                    </actions>
                    <sub-events>
                        <variable constant="0" name="gameID" sid="593494834861543" static="0" type="number">0</variable>
                        <variable constant="0" name="optUID" sid="503636705620352" static="0" type="number">0</variable>
                        <variable constant="0" name="qstUID" sid="399721151152108" static="0" type="number">0</variable>
                        <variable constant="0" name="qstType" sid="641497496992863" static="0" type="number">0</variable>
                        <variable constant="0" name="useOptColor" sid="777928807414464" static="0" type="number">0</variable>
                        <event-block sid="602788197014666">
                            <conditions />
                            <actions>
                                <action id="0" name="Load" sid="789997277381090" type="xmlData">
                                    <param id="0" name="XML">AJAX.LastData</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="995894060991246">
                            <conditions />
                            <actions />
                        </event-block>
                        <event-block sid="488366133309574">
                            <conditions />
                            <actions>
                                <action id="-9" name="Set value" sid="917057977206551" type="System">
                                    <param id="0" name="Variable">timeDuration</param>
                                    <param id="1" name="Value">xmlData.NumberValue(&quot;/data/config/time/@duration&quot;)</param>
                                </action>
                                <action id="-9" name="Set value" sid="932628513874761" type="System">
                                    <param id="0" name="Variable">timeHurryup</param>
                                    <param id="1" name="Value">xmlData.NumberValue(&quot;/data/config/time/@hurryup&quot;)</param>
                                </action>
                                <action id="-9" name="Set value" sid="495703232538234" type="System">
                                    <param id="0" name="Variable">maxScore</param>
                                    <param id="1" name="Value">xmlData.NumberValue(&quot;/data/config/score/@maxScore&quot;)</param>
                                </action>
                                <action id="-9" name="Set value" sid="489911129200249" type="System">
                                    <param id="0" name="Variable">goodScore</param>
                                    <param id="1" name="Value">xmlData.NumberValue(&quot;/data/config/score/@goodScore&quot;)</param>
                                </action>
                            </actions>
                        </event-block>
                        <comment>struct of arrOptInfoTyp1=&gt;[gameID, questionID, corr array iid, incorr array iid, already showed count]</comment>
                        <event-block sid="220427941435050">
                            <conditions>
                                <condition id="-14" name="Compare variable" sid="703848577792401" type="System">
                                    <param id="0" name="Variable">previewMode</param>
                                    <param id="1" name="Comparison">0</param>
                                    <param id="2" name="Value">1</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-9" name="Set value" sid="973064286504235" type="System">
                                    <param id="0" name="Variable">imgFolder</param>
                                    <param id="1" name="Value">&quot;&quot;</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="436635321707927">
                            <conditions>
                                <condition id="-22" name="Else" sid="876580505809951" type="System" />
                            </conditions>
                            <actions>
                                <action id="-9" name="Set value" sid="656023320372781" type="System">
                                    <param id="0" name="Variable">imgFolder</param>
                                    <param id="1" name="Value">xmlData.StringValue(&quot;/data/config/path/@questionImgUrl&quot;)</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="305950469094842">
                            <conditions>
                                <condition id="0" name="For each node" sid="909041953566532" type="xmlData">
                                    <param id="0" name="XPath">&quot;/data/game/questions/question&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="856541409365087">
                                    <conditions />
                                    <actions>
                                        <action id="5" name="Push" sid="708850935334280" type="arrQstRef">
                                            <param id="0" name="Where">0</param>
                                            <param id="1" name="Value">int(xmlData.NumberValue(&quot;@id&quot;))</param>
                                            <param id="2" name="Axis">0</param>
                                        </action>
                                    </actions>
                                </event-block>
                                <comment>preload images to chopsure</comment>
                                <event-block sid="943384294291644">
                                    <conditions>
                                        <condition id="-8" name="Compare two values" sid="256490212112489" type="System">
                                            <param id="0" name="First value">xmlData.StringValue(&quot;@img&quot;)</param>
                                            <param id="1" name="Comparison">1</param>
                                            <param id="2" name="Second value">&quot;&quot;</param>
                                        </condition>
                                        <condition id="3" inverted="1" name="Has key" sid="249322356736235" type="dictData">
                                            <param id="0" name="Key">xmlData.StringValue(&quot;@img&quot;)</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="0" name="Add key" sid="861291748940213" type="dictData">
                                            <param id="0" name="Key">xmlData.StringValue(&quot;@img&quot;)</param>
                                            <param id="1" name="Value">xmlData.StringValue(&quot;@img&quot;)</param>
                                        </action>
                                        <action id="0" name="Call function" sid="443457054833160" type="Function">
                                            <param id="0" name="Name">&quot;preload image&quot;</param>
                                            <param id="1" name="Parameter {n}">xmlData.StringValue(&quot;@img&quot;)</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <event-block sid="878684400963506">
                            <conditions>
                                <condition id="0" name="For each node" sid="791951338404942" type="xmlData">
                                    <param id="0" name="XPath">&quot;/data/game/options/option&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="370072043343676">
                                    <conditions />
                                    <actions>
                                        <action id="5" name="Push" sid="123784337287650" type="arrOptRef">
                                            <param id="0" name="Where">0</param>
                                            <param id="1" name="Value">int(xmlData.NumberValue(&quot;@id&quot;))</param>
                                            <param id="2" name="Axis">0</param>
                                        </action>
                                    </actions>
                                </event-block>
                                <comment>preload images to chopsure</comment>
                                <event-block sid="666517655612135">
                                    <conditions>
                                        <condition id="-8" name="Compare two values" sid="325449321790971" type="System">
                                            <param id="0" name="First value">xmlData.StringValue(&quot;@img&quot;)</param>
                                            <param id="1" name="Comparison">1</param>
                                            <param id="2" name="Second value">&quot;&quot;</param>
                                        </condition>
                                        <condition id="3" inverted="1" name="Has key" sid="608996780438636" type="dictData">
                                            <param id="0" name="Key">xmlData.StringValue(&quot;@img&quot;)</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="0" name="Add key" sid="923292458353557" type="dictData">
                                            <param id="0" name="Key">xmlData.StringValue(&quot;@img&quot;)</param>
                                            <param id="1" name="Value">xmlData.StringValue(&quot;@img&quot;)</param>
                                        </action>
                                        <action id="0" name="Call function" sid="821104330574035" type="Function">
                                            <param id="0" name="Name">&quot;preload image&quot;</param>
                                            <param id="1" name="Parameter {n}">xmlData.StringValue(&quot;@img&quot;)</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="278234528553530">
                    <conditions />
                    <actions />
                </event-block>
            </sub-events>
        </event-group>
        <event-group description="" sid="543223802647887" title="preload img">
            <sub-events>
                <event-block sid="761681466896397">
                    <conditions>
                        <condition id="0" name="On function" sid="275837321254884" type="Function">
                            <param id="0" name="Name">&quot;preload image&quot;</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action disabled="1" id="14" name="Log" sid="109001637580210" type="Browser">
                            <param id="0" name="Type">0</param>
                            <param id="1" name="Message">&quot;loaded img: &quot; &amp; function.param(0)</param>
                        </action>
                    </actions>
                    <sub-events>
                        <comment>preload image to chop suey</comment>
                        <event-block sid="720322145271916">
                            <conditions />
                            <actions>
                                <action id="10" name="Image load" sid="421663623187391" type="ChopSuey">
                                    <param id="0" name="Image name">imgFolder &amp;Function.Param(0)</param>
                                </action>
                                <action id="-10" name="Add to" sid="324517646893069" type="System">
                                    <param id="0" name="Variable">dataCount</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-group>
    </events>
</c2eventsheet>
