# Postion of .swf in flash on load

**URL:** https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241
**Category:** Uncategorized
**Created:** [June 27, 2003, 5:51pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241 "2003-06-27T17:51:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![AbstRacTion](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@AbstRacTion](https://forum.kirupa.com/u/AbstRacTion)
#### Post date: [June 27, 2003, 5:51pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/1 "2003-06-27T17:51:41Z")

</div>

I have a button that loads a .swf in a scene. The problem is it load into a default position. How do I get it to load to a location of my choosing? If it is action script, could anyone help with the code, I dont know AS very well. Thanks

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 27, 2003, 5:59pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/2 "2003-06-27T17:59:12Z")

</div>

for example

```php
_root.createEmptyMovieClip("mc",1000);
mc.loadMovie("test.swf");
this.onEnterFrame = function(){
        var l=mc.getBytesLoaded();
        var t=mc.getBytesTotal();
        if (l && l>= t){
mc._x=?;
mc._y=?;
         delete this.onEnterFrame;
        }
}

```

i learn from kirupaForum :trout: , hope it helps:trout:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 27, 2003, 6:25pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/3 "2003-06-27T18:25:09Z")

</div>

This is what my code looks like after I have added the script given:

on (release) {  
loadMovieNum(“resume.swf”, 1);  
\_root.createEmptyMovieClip(“mc”,1000);  
mc.loadMovie(“resume.swf”);  
this.onEnterFrame = function(){  
var l=mc.getBytesLoaded();  
var t=mc.getBytesTotal();  
if (l && l\>= t){  
mc.\_x=255.8;  
mc.\_y=68.3;  
delete this.onEnterFrame;  
}  
}}

+++ It still does not load to the X, Y coordinates. Resume.swf is the swf file that I am trying to load to the specific position in my Scene. Can anyone help me out with this— THANK YOU so much in advance!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 27, 2003, 6:35pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/4 "2003-06-27T18:35:35Z")

</div>

on (release) {  
\_root.createEmptyMovieClip(“mc”,1000);  
mc.loadMovie(“resume.swf”);  
this.onEnterFrame = function(){  
var l=mc.getBytesLoaded();  
var t=mc.getBytesTotal();  
if (l && l\>= t){  
mc.\_x=255.8;  
mc.\_y=68.3;  
delete this.onEnterFrame;  
}  
}}

try this

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 27, 2003, 7:23pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/5 "2003-06-27T19:23:08Z")

</div>

When I put the code in the button does now bring up the resume.swf at all. I am stumped.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 27, 2003, 9:46pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/6 "2003-06-27T21:46:59Z")

</div>

on (release) {  
\_root.createEmptyMovieClip(“mc”,1000);  
mc.\_x=255.8;  
mc.\_y=68.3;  
mc.loadMovie(“resume.swf”);  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 27, 2003, 10:58pm UTC](https://forum.kirupa.com/t/postion-of-swf-in-flash-on-load/24241/7 "2003-06-27T22:58:38Z")

</div>

check out your registration points…
