# Insert symbol

**URL:** https://forum.kirupa.com/t/insert-symbol/13961
**Category:** Uncategorized
**Created:** [February 20, 2003, 8:51am UTC](https://forum.kirupa.com/t/insert-symbol/13961 "2003-02-20T08:51:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![reverendflash](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@reverendflash](https://forum.kirupa.com/u/reverendflash)
#### Post date: [February 20, 2003, 8:51am UTC](https://forum.kirupa.com/t/insert-symbol/13961/1 "2003-02-20T08:51:06Z")

</div>

for example:

I have a MC named “ab1” in my library. I want to insert that MC into a target named “hole” on release of a button…

In Generator, I would code to insert symbol “ab1” into target “hole”. No problem.

How would I do this in MX syntax?

thanks in advance,

Rev ![](http://www.aulman.com/rev.gif)

---

<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: [February 20, 2003, 10:58am UTC](https://forum.kirupa.com/t/insert-symbol/13961/2 "2003-02-20T10:58:17Z")

</div>

Make sure your “ab1” in the library is also linked for actionscript if it isnt already (select the clip ion the library and chose ‘linkage’ from the library menu - export to actionscript with an ID name that can just as well be (and is easiest as) its name “ab1”).

Once thats done, you use AttachMovie to actually get it into hole. This is done through the hole clip like so:

hole.attachMovie(_ID name, new clip name, depth_);

The ID name is the linkage name given to the clip from the library. The new clip name is the instance name that you will use to reference this clip once its been attached and put in hole, and the depth is a number representing its arrangement order on the screen. So if your button is in the same timeline as the hole clip (which I assume it is) you can use

on(release){  
hole.attachMovie(“ab1”, “attachedab”, 1);  
}

note this will attach the clip at \_x =0 and \_y = 0. But you can change that immediately after attaching to move it somewhere else…

on(release){  
hole.attachMovie(“ab1”, “attachedab”, 1);  
hole.attachedab.\_x = 100;  
hole.attachedab.\_y = 50;  
}

as well as any other properties youd want to change.

- and that face isnt any less creepy :beam:

---

<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: [February 20, 2003, 7:07pm UTC](https://forum.kirupa.com/t/insert-symbol/13961/3 "2003-02-20T19:07:11Z")

</div>

Thanks a ton Sen…

I think I understand what you have here (I kinda figgerd it was attachmovie, the syntax was giving me fits, as usual), I’ll let you know how I do later on…

In some ways, Gen2 was a lot easier… plus it allowed me to use .png and .gif dynamically (that alone would save me over 8 hours work)…

But I digress, MX is here to stay, Gen2 is gone(-:

AND:

I think he’s kinda cute… poor kid…

Rev ![](http://www.aulman.com/rev.gif)

---

<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: [February 21, 2003, 1:43am UTC](https://forum.kirupa.com/t/insert-symbol/13961/4 "2003-02-21T01:43:42Z")

</div>

![](http://images.animfactory.com/animations/animals/foxes/fox_with_sheep_md_wht.gif)

Thanks Sen!

I brought you a gift…

[click here](http://www.aulman.com/autowraps/mxdab/skin1.html) if you want to see it in action (custom art) …

thanks again,

Rev ![](http://www.aulman.com/rev.gif)
