# Object reference

**URL:** https://forum.kirupa.com/t/object-reference/169707
**Category:** Uncategorized
**Created:** [November 18, 2005, 3:49pm UTC](https://forum.kirupa.com/t/object-reference/169707 "2005-11-18T15:49:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![egeshia](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@egeshia](https://forum.kirupa.com/u/egeshia)
#### Post date: [November 18, 2005, 3:49pm UTC](https://forum.kirupa.com/t/object-reference/169707/1 "2005-11-18T15:49:03Z")

</div>

Hi all!

I need to set multiple measurement markers in my Flash app. It measures distance between them.

The problem I’m experiencing is that I can not refer to MC that I create at runtime with createEmptyMovieClip. It’s got a name “marker1\_mc”. Then I need to create secont with name “marker2\_mc”. They’re created fine but I cannot refer to their methods to draw a marker line. I can draw line only if I’m creating only one movie and refering to it’s methods. How can I add more marker pairs to calculate more than one distance?

> 

[size=1]values.markers[markerNum] = new Array();[/size]  
[size=1]values.markers[markerNum].markerStartX = markerStartX;[/size]  
[size=1]values.markers[markerNum].markerStartY = markerStartY;[/size]  
[size=1]values.markers[markerNum].markerName = “markerLine”+markerNum+“\_mc”;[/size]  
[size=1]values.markers[markerNum].markerNameRel = “\_root.image\_mc.markerLine”+markerNum+“\_mc”;[/size]

**How to refer to** [color=sienna][color=black]“[/color][/color][color=red]\_root.image\_mc.markerLine”+markerNum+“\_mc[/color][color=black]” **?** [/color]

You’ll assist me alot if help me to solve this issue.

Thank you.
