# Component Live Preview

**URL:** https://forum.kirupa.com/t/component-live-preview/75018
**Category:** flash
**Created:** [January 5, 2005, 5:39am UTC](https://forum.kirupa.com/t/component-live-preview/75018 "2005-01-05T05:39:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Clown\_Staples](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@Clown\_Staples](https://forum.kirupa.com/u/Clown_Staples)
#### Post date: [January 5, 2005, 5:39am UTC](https://forum.kirupa.com/t/component-live-preview/75018/1 "2005-01-05T05:39:52Z")

</div>

Does anyone know how to make a component snap to the width of clip it is dropped on, like the scrollbar component does? I am pretty sure the code needs to go into the live preview swf, and I have already tried—

trace(this.\_parent[xch.\_targetInstanceName].\_width);

but that doesnt work, because “this” ends up referring to the \_root of the live preview movie, not the component clip on the stage in the authoring environment. So, “this.\_parent” doesn’t exist.

Even if you can point me to some good reference material or sites I would be grateful. Thanks,

Clown
