# Import an swf into main swf

**URL:** <https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929>\
**Category:** Uncategorized\
**Created:** [July 7, 2003, 11:48am UTC](https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929 "2003-07-07T11:48:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![siew7t](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@siew7t](https://forum.kirupa.com/u/siew7t)\
**Post date:** [July 7, 2003, 11:48am UTC](https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929/1 "2003-07-07T11:48:43Z")

</div>

Hi anyone out there, I’m help…I was import an external swf into my main swf but the external swf -mc doesn’t randomly display. Is you know what mean there?  
Please help!!!

My using script below:  
onClipEvent (load) {  
clipCount = 0;  
}  
onClipEvent (enterFrame) {  
checker = random(100);  
if (checker\<=8) {  
clipCount += 1;  
duplicateMovieClip (\_root.snowFlake, “snowFlake”+clipCount, clipCount);  
if (clipCount == 100) {  
clipCount = 1;  
}  
}  
}: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:** [July 7, 2003, 1:08pm UTC](https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929/2 "2003-07-07T13:08:15Z")

</div>

I am having a little troubvle understanding you siew… you said something abot loading external swf… but you are just duplicating a movieclip… what are you trying to do exactly? :-\

btw… if u are saying you cant see the duplicated movieClips… I think they all have the same x and y when they are duplicated so u need to moved em…

to move you can do this…

[AS]  
randomX = random(0,300);  
randomY = random(0,300);  
\_root[“snowFlake” + clipcount].\_x = randomX;  
\_root[“snowFlake” + clipcount].\_y = randomY;  
[/AS]

and that sould go right after the "duplicatemovieClip satetment.

hope thats helps any…

-Aditya  
:thumb:

---

<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:** [July 9, 2003, 12:51am UTC](https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929/3 "2003-07-09T00:51:55Z")

</div>

This is what i mean I import external swf into my main swf, and in my external swf, it has action script to call the movieclip to duplicate, it work ok when it play itself. But when the external swf import the main swf, it isn’t work.!!! Does it mean sense to you\>\>\>

Is there the problems in tell target path in the duplicateMovieClip as below:  
duplicateMovieClip (\_root.snowFlake, “snowFlake”+clipCount, clipCount);

Please help, I very very very appreciate…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:** [July 9, 2003, 12:58am UTC](https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929/4 "2003-07-09T00:58:49Z")

</div>

actually… didn’t notice that…

if you are loading the external swf into an empty movie clip on the main swf… u need to use relative paths to the snow mc in your external swf. or you can say \_root.[name of mc into which external mc is being loaded].[name of snow mc]

-Aditya  
:thumb:  
P.S. someone correct me if I am wrong! too lasy to open up flash now 😛

---

<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:** [July 10, 2003, 7:58am UTC](https://forum.kirupa.com/t/import-an-swf-into-main-swf/24929/5 "2003-07-10T07:58:25Z")

</div>

Thanks, adityagaddam.  
I had sovle the problem!!!
