# Can't Access Timeline Variable

**URL:** <https://forum.kirupa.com/t/cant-access-timeline-variable/222504>\
**Category:** Uncategorized\
**Created:** [April 14, 2007, 12:15am UTC](https://forum.kirupa.com/t/cant-access-timeline-variable/222504 "2007-04-14T00:15:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgjb007](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tgjb007](https://forum.kirupa.com/u/tgjb007)\
**Post date:** [April 14, 2007, 12:15am UTC](https://forum.kirupa.com/t/cant-access-timeline-variable/222504/1 "2007-04-14T00:15:21Z")

</div>

I have a movie clip I’m duplicating.

This movie clip is only one frame long and has a couple  
variables and functions in an actions layer on that  
first frame.

When I duplicate the movie clip I can’t access either  
the variables on the timeline or the functions. What  
am I doing wrong here.

MovieClipA  
var blee  
var blah

var tempClip:MovieClip = MovieClipA.duplicateMovieClip(‘createdClip’, 100);

trace(tempClip.blee) // This comes back undefined.

Is it not possible to retain the variables and functions  
inside a movie clip when it gets duplicated?

I know you can define the variables and functions after  
the duplication but I’d like to be able to have them almost  
like class attributes / methods for when a new clip is duplicated.

Let me know if this is possible or if I’m smokin’ crack.

Thanks.
