Hello Friends,
I have a main movie clip that loads the appropriate swfs based on the button click. The buttons and the corresponding swfs are loaded through XML. The method I adapted to achieve this can be found here : Sample Code
Now, this seems to be working just fine. But, my problem is instead, of calling a separate SWF for each button click, I want to maintain a common SWF and change only the appropriate XML content, sort of make it more dynamic.
This is where I'm stuck, I decided to add an ID to each button on the xml and pass it to the Common SWF (child swf), so that based on the ID, I can load the corresponding XML content, rather than call separate swfs for each button click. The XML now looks like this:
<?xml version="1.0" encoding="utf-8"?>
<menu>
<item>
<label>Gallery1</label>
<url><![CDATA[swf/gallery.swf]]></url>
<id>01</id>
</item>
<item>
<label>Gallery2</label>
<url><![CDATA[swf/gallery.swf]]></url>
<id>02</id>
</item>
</menu>
Now, I'm able to push this ID and also have it traced on the main movie clip, but don't know how to pass it to the Common/Child SWF. I'm no expert in AS3 and I'm learning it everyday. So, if someone can help me with this, I would really appreciate it. Thanks in advance.