# Targeting Instances within Assets through Classes

**URL:** <https://forum.kirupa.com/t/targeting-instances-within-assets-through-classes/225140>\
**Category:** flash\
**Created:** [May 9, 2007, 3:20am UTC](https://forum.kirupa.com/t/targeting-instances-within-assets-through-classes/225140 "2007-05-09T03:20:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![exdsmile](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/exdsmile/32/3599_2.png) [@exdsmile](https://forum.kirupa.com/u/exdsmile)\
**Post date:** [May 9, 2007, 3:20am UTC](https://forum.kirupa.com/t/targeting-instances-within-assets-through-classes/225140/1 "2007-05-09T03:20:38Z")

</div>

Ok, Here’s the situation:

In my Library there is a movieclip(temp\_mc) that I’ve linked to an AS class(Temp) that extends MovieClip. On the STAGE of that library asset is a TextField I’ve named dynamTxt.

On the MAIN timeline, I have code to attach the library asset through code only:

import Temp;

var g:Temp = new Temp();  
addChild(g);  
g.dynamTxt.text = “Display Me”;

However, I cant target the textfield within ‘g’. I’ve tried naming a variable in the class definition the same, but it stil doesnt work. How can you target a stage instance within a library asset that’s linked to an external class?
