# Loading swf into frame

**URL:** https://forum.kirupa.com/t/loading-swf-into-frame/12171
**Category:** Uncategorized
**Created:** [January 27, 2003, 10:21pm UTC](https://forum.kirupa.com/t/loading-swf-into-frame/12171 "2003-01-27T22:21:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thomie](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@thomie](https://forum.kirupa.com/u/thomie)
#### Post date: [January 27, 2003, 10:21pm UTC](https://forum.kirupa.com/t/loading-swf-into-frame/12171/1 "2003-01-27T22:21:34Z")

</div>

Working in Flash5 - I have an swf file that’s like a movie screen the I want movies (external swf) to load into-but I want these movies to fit within a particular area centered on the screen.

To test this out I have created 3 animations photo1.swf thru photo3.swf and the screen photogaller.swf.

The photogaller.swf starts at a blank screen and has a forward and back button. In the forward button I have this code modified appropriately for each frame:  
//this is in frame 2  
on (release) {  
unloadMovie (“photo1.swf”);  
loadMovie (“photo2.swf”, “frame”);  
gotoAndStop (3);  
}

In the back I have:  
//this is in frame 3  
on (release) {  
unloadMovie (“photo2.swf”);  
loadMovie (“photo1.swf”, “frame”);  
gotoAndStop (2);  
}

//”frame” is a movie clip in photogaller.swf

MAIN PROBLEM: Movies load actual size from top corner/centerpoint of “frame”  
Is there code to fix and modify size and alignment of loaded swf so I don’t have to change the size of the original (i.e. photo1.swf)?

SILLY PROBLEM: When I use the back buttons to unload the swf and I get to the back button before the blank screen frame I have this code:

on (release) {  
unloadMovie (“photo1.swf”);  
gotoAndStop (1);  
}

but the movie stays loaded??? Any thoughts here?

Sorry so long!  
Thomie  
☹
