# Positioning & Function Issue with Full Browser Flash

**URL:** <https://forum.kirupa.com/t/positioning-function-issue-with-full-browser-flash/193813>\
**Category:** flash\
**Created:** [July 18, 2006, 4:22pm UTC](https://forum.kirupa.com/t/positioning-function-issue-with-full-browser-flash/193813 "2006-07-18T16:22:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmart](https://avatars.discourse-cdn.com/v4/letter/c/977dab/32.png) [@cmart](https://forum.kirupa.com/u/cmart)\
**Post date:** [July 18, 2006, 4:22pm UTC](https://forum.kirupa.com/t/positioning-function-issue-with-full-browser-flash/193813/1 "2006-07-18T16:22:33Z")

</div>

Hi everyone, I’m having an issue with getting external .swf’s to load and position properly in my full browser flash site. I used a template I created for an XML slideshow which worked perfectly, but now the positioning and stage listener doesn’t seem to work properly.

Here is the AS in frame one of the stage. Content is to be externally loaded into an MC called “container”. The problem is, the container is not showing up initially until I resize the browser or .swf window, and when it does show up, the registration point is all wrong. I put the loadMovie script on a button since it was not loading at all with a simple loadMovie script on a keyframe. This seems to load the movie properly, but once it’s loaded, not only is it positioned to the bottom right of the screen, it doesn’t move at all when I resize the browser!

Any help is much appreciated.

Thanks!

[AS]

/////////////// Full Browser Control

//no scale

stop();  
Stage.scaleMode = “noScale”;  
Stage.align = “LT”;

//white background centered  
whiteBackground\_mc.\_y = Stage.height/2;  
whiteBackground\_mc.\_x = Stage.width/2;

//bottom nav centered  
bottomBar\_mc.\_y = Math.floor(Stage.height);  
bottomBar\_mc.\_x = 0;

//container centered  
container.\_x= Math.round(Stage.width/2 - this.\_width/2);  
container.\_y= Math.round(Stage.height/2 - this.\_height/2);

//EM logo top left  
badge\_mc.\_x= 0;  
badge\_mc.\_y= 0;

//counter bottom right  
counter.\_x= Math.floor(Stage.width);  
counter.\_y= Math.floor(Stage.height);

whiteBackground\_mc.onResize = function() {  
// white background is always centered  
this.\_y = Stage.height/2;  
this.\_x = Stage.width/2;  
};  
Stage.addListener(whiteBackground\_mc);  
//

container.onResize = function() {  
// main content is always centered  
this.\_y = Math.round(Stage.height/2 - this.\_height/2);  
this.\_x = Math.round(Stage.width/2 - this.\_width/2);  
};  
Stage.addListener(container);

bottomBar\_mc.onResize = function() {

this.\_y = Math.floor(Stage.height);  
this.\_x = 0;  
};  
Stage.addListener(bottomBar\_mc);

badge\_mc.onResize = function() {  
this.\_y = 0;  
this.\_x = 0;  
};  
Stage.addListener(badge\_mc);

counter.onResize = function() {  
this.\_y = Math.floor(Stage.height);  
this.\_x = Math.floor(Stage.width);  
};  
Stage.addListener(counter);

[/AS]

AS for a button to load for testing purposes.

[AS]on (release) {

```
_root.container.loadMovie("mockup.swf");

```

}  
[/AS]
