в коде собственно смотреть нечего, но всё же:

Код AS3:
package controller {
import ...
public class LoadAdsCommand extends BaseCommand implements ICommand{
override public function execute(notification:INotification):void {
var adLoader:Loader = new Loader();
var urlRequest:URLRequest;
loadAd();
function loadAd():void {
urlRequest = new URLRequest(StringUtil.substitute("http://{0}/assets/ads/{1}"
, ApplicationFacade.URL, notification.getBody()..Img[0].@src));
adLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
adLoader.load(urlRequest);
}
function completeHandler(event:Event):void {
adLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
applicationProxy.ads.push((adLoader.content as Bitmap).bitmapData);
delete notification.getBody().child("Img")[0];
if(notification.getBody().hasOwnProperty("Img")) {
loadAd();
} else {
sendNotification(ApplicationFacade.SHOW_AD_CMD);
var adRollerTimer:Timer = new Timer(10000);
adRollerTimer.addEventListener(TimerEvent.TIMER, function(event:TimerEvent):void {
sendNotification(ApplicationFacade.SHOW_AD_CMD);
});
adRollerTimer.start();
}
}
}
}
}