# SWF Loader with variable loading?

**URL:** <https://forum.kirupa.com/t/swf-loader-with-variable-loading/329696>\
**Category:** flash\
**Created:** [October 3, 2012, 7:56pm UTC](https://forum.kirupa.com/t/swf-loader-with-variable-loading/329696 "2012-10-03T19:56:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngrinchenko](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@ngrinchenko](https://forum.kirupa.com/u/ngrinchenko)\
**Post date:** [October 3, 2012, 7:56pm UTC](https://forum.kirupa.com/t/swf-loader-with-variable-loading/329696/1 "2012-10-03T19:56:27Z")

</div>

I have my flash website composed from different labeled sections.  
One section (A) has SWF loader inside which different SWF’s can be loaded depending on what image is clicked from a thumbnail image scroller.  
Here is the code for it:

```auto
var xmlLoader:XMLLoader = new XMLLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/data.xml", {onComplete:_xmlCompleteHandler});
            xmlLoader.load();
        //}
        
         function _xmlCompleteHandler(event:LoaderEvent):void {
            _slides = [];
            var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded. 
            var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
            //loop through each <image /> node and create a Slide object for each.
            for each (var image:XML in imageList) {
                _slides.push( new Slide(image.@name,
                                        image.@description,
                                        new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg", 
                                                        {
                                                            name:image.@name + "Thumb", 
                                                            width:_THUMB_WIDTH, 
                                                            height:_THUMB_HEIGHT, 
                                                            //centerRegistration:true,
                                                            //x:260, y:320,//doesn't work here but works in line 69
                                                            scaleMode:"proportionalInside", 
                                                            bgColor:0x000000, 
                                                            estimatedBytes:13000, 
                                                            onFail:_imageFailHandler}),
                                        new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf", 
                                                      {
                                                          name:image.@name + "Image", 
                                                          width:_IMAGE_WIDTH, 
                                                          height:_IMAGE_HEIGHT, 
                                                          //centerRegistration:true,
                                                          x:-420, y:-260,
                                                          scaleMode:"proportionalInside", 
                                                          bgColor:0x000000, 
                                                          estimatedBytes:820000, 
                                                          onFail:_imageFailHandler}) 
                                        )
                            );
            }

```

Is it possible to call up a specific SWF inside this SWFLoader from another section (B)  
For now all I can do is to make a link and bring a user to section (A) which always opens with the default (first in order) SWF.  
I want to have a number of image buttons in section (B) and each button would open a different SWF inside SWF loader in section (A)  
Is it possible to resolve?
