# Please help! Play Loaded swf loaded by XML

**URL:** <https://forum.kirupa.com/t/please-help-play-loaded-swf-loaded-by-xml/281280>\
**Category:** flash\
**Created:** [February 6, 2009, 8:34pm UTC](https://forum.kirupa.com/t/please-help-play-loaded-swf-loaded-by-xml/281280 "2009-02-06T20:34:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rooterman42](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rooterman42](https://forum.kirupa.com/u/rooterman42)\
**Post date:** [February 6, 2009, 8:34pm UTC](https://forum.kirupa.com/t/please-help-play-loaded-swf-loaded-by-xml/281280/1 "2009-02-06T20:34:35Z")

</div>

I have a movieclip on the stage called “anim\_mc1”. Inside it is another movieclip, “holder\_mc1”. Into this I’m loading an external swf via xml. The external swf has a stop(); in the first frame, and when the it is loaded into “holder\_mc1”, I want to start playing it within “holder\_mc1”. How do I code it so the swf will start playing when “holder\_mc1” reaches say frame ten? Basically, “holder\_mc1” is animated, and within that, the external swf will start playing when “holder\_mc1” reaches a certain frame. Here is the loader I’m using:

//----xml loader----  
//Create the loader, set dataFormat to text and listen when data is loaded  
var myLoader:URLLoader = new URLLoader();  
myLoader.dataFormat = URLLoaderDataFormat.TEXT;  
myLoader.addEventListener(Event.COMPLETE, onLoadXML);  
myLoader.load(new URLRequest(“xml/text.xml”));  
function onLoadXML(ev:Event) {  
try {  
//Convert the downloaded text into a new XML object  
var myXML:XML = new XML(ev.target.data);  
var list:XMLList = myXML.menu;  
//walks the XML list and shows in the textfields  
for (var i=0; i\<list.length(); i++) {  
//menu titles  
this[“Title\_txt”+i].text = list\*.name;  
//images  
var myLoader:Loader = new Loader();  
this[“anim\_mc” + i][“holder\_mc” + i].addChild(myLoader);  
myLoader.load(new URLRequest(list\*.image));  
}  
} catch (e:TypeError) {  
//Could not convert the data, probably because it’s not formatted correctly  
trace(“Could not parse the XML”);  
trace(e.message);  
}  
}

Any help would be greatly appreciated!

Thanks!

r
