# Embed component v. calling it in dynamically

**URL:** https://forum.kirupa.com/t/embed-component-v-calling-it-in-dynamically/134760
**Category:** Uncategorized
**Created:** [January 21, 2005, 7:18am UTC](https://forum.kirupa.com/t/embed-component-v-calling-it-in-dynamically/134760 "2005-01-21T07:18:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fumeng](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@fumeng](https://forum.kirupa.com/u/fumeng)
#### Post date: [January 21, 2005, 7:18am UTC](https://forum.kirupa.com/t/embed-component-v-calling-it-in-dynamically/134760/1 "2005-01-21T07:18:55Z")

</div>

hi.

got a quick question about the difference between embedding a component in an .fla or loading it dynamically via:

```auto

placeholder.loadMovie("myComponent.swf");

```

the situation is that i have – loader.swf – which calls in – stream.swf

stream.swf has a tracking component that i place on a layer and on frame 1 i have my tracking component connect to my gateway:

```auto

myTrackerComponent.connect();

```

it works great and it connects to my app server via flash remoting. but what i want to do is now call it in dynamically and here’s where it breaks. i do it like this:

```auto

placeholder.loadMovie( "myTrackerComponent.swf" ) 

```

and in myTrackerComponent.swf i have, on frame 1:

```auto

myTrackerComponent.connect();

```

it connects via remoting great during from flash IDE, but when i put it on a live web server, it doesn’t work. it only works when i embed the component in my stream.swf file.

i’m calling in the TrackerComponent.swf wrong, aren’t i??? because i’m pretty sure that i should be able to do what i want…right?? also, why would it work in the flash IDE but not on a live web server? that’s where i’m really lost. my assumption is that anything that works out of the IDE should easily translate to a web server? am i being naive??

thanks for reading along.

fumeng.
