# When externaly loading an swf, pointing to a particular frame

**URL:** https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752
**Category:** flash
**Created:** [August 31, 2004, 2:29am UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752 "2004-08-31T02:29:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![malidia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/malidia/32/684_2.png) [@malidia](https://forum.kirupa.com/u/malidia)
#### Post date: [August 31, 2004, 2:29am UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752/1 "2004-08-31T02:29:30Z")

</div>

Okay, i was curious, (cause this would help me a lot) \> if you are loading an external swf to a target or container or what have you, can point it to a particuar frame or scene in that swf?

thank you,

---

<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: [August 31, 2004, 9:01am UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752/2 "2004-08-31T09:01:49Z")

</div>

just \_root.mycontainer.gotoAndPlay(4);

---

<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: [August 31, 2004, 2:13pm UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752/3 "2004-08-31T14:13:58Z")

</div>

cool, that helps. :thumb:

what about an swf loaded into a blank movie clip without a container:q:

---

<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: [August 31, 2004, 4:54pm UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752/4 "2004-08-31T16:54:41Z")

</div>

even a blank movieclip has to have a name. same thing

\_root.createEmptyMovieClip(…

\_root.myblankmovieclip.loadmovie(“ddd.swf”);

wait while it loads.

then

\_root.myblankmovieclip.gotoAndPlay(4);

---

<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: [August 31, 2004, 5:59pm UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752/5 "2004-08-31T17:59:44Z")

</div>

okay, then if i had this random swf code like this:

choice = Math.round(Math.random()\*5);  
switch (choice) {  
case 0 :  
location.loadMovie(“image0.swf”);  
break;  
case 1 :  
location.loadMovie(“image1.swf”);  
break;  
case 2 :  
location.loadMovie(“image2.swf”);  
break;  
case 3 :  
location.loadMovie(“image3.swf”);  
break;  
case 4 :  
location.loadMovie(“image4.swf”);  
break;  
case 5 :  
location.loadMovie(“image5.swf”);  
break;  
}

then, i would put \_root.location.gotoAndPlay(4); after each location.loadMovie(“image0.swf”)

but then, wouldn’t it hit the first from of the swf then go to and play 4? or would i just go to and play 4?

---

<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: [September 1, 2004, 4:12am UTC](https://forum.kirupa.com/t/when-externaly-loading-an-swf-pointing-to-a-particular-frame/62752/6 "2004-09-01T04:12:02Z")

</div>

> [@malidia](#):
>
> okay, then if i had this random swf code like this:
> 
> choice = Math.round(Math.random()\*5);  
> switch (choice) {  
> case 0 :  
> location.loadMovie(“image0.swf”);  
> break;  
> case 1 :  
> location.loadMovie(“image1.swf”);  
> break;  
> case 2 :  
> location.loadMovie(“image2.swf”);  
> break;  
> case 3 :  
> location.loadMovie(“image3.swf”);  
> break;  
> case 4 :  
> location.loadMovie(“image4.swf”);  
> break;  
> case 5 :  
> location.loadMovie(“image5.swf”);  
> break;  
> }
> 
> then, i would put \_root.location.gotoAndPlay(4); after each location.loadMovie(“image0.swf”)
> 
> but then, wouldn’t it hit the first from of the swf then go to and play 4? or would i just go to and play 4?

frame 1-10 ( do anything )  
frame 11 ( \_root.oMovie.loadMovie"image5.swf"); )  
frame 13 ( if(\_root.oMovie.bytes \< total bytes etc) go back to **frame 12** )  
frame 14-25 ( do anything )

sometimes .bytes and total bytes are less than 0 or -1 so watchout for that
