# Action-Script created MC 's -\> path

**URL:** <https://forum.kirupa.com/t/action-script-created-mc-s-path/42676>\
**Category:** Uncategorized\
**Created:** [February 11, 2004, 8:14pm UTC](https://forum.kirupa.com/t/action-script-created-mc-s-path/42676 "2004-02-11T20:14:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmasterj](https://avatars.discourse-cdn.com/v4/letter/w/e5b9ba/32.png) [@wmasterj](https://forum.kirupa.com/u/wmasterj)\
**Post date:** [February 11, 2004, 8:14pm UTC](https://forum.kirupa.com/t/action-script-created-mc-s-path/42676/1 "2004-02-11T20:14:20Z")

</div>

I really don’t know what the problem is here.  
The trace() function only gives me “0” as the output.  
I want to be able to reach the objects created and delete and change their \_x and \_y positions and all kinds of stuff. But it seems i can’t even get the \_width value.

[AS]/\*

- Creates a new news box for the calender  
\*/  
\_global.createNewsFrame = function(f\_x,f\_y,f\_width,f\_height,name)  
{  
MC\_obj = \_root.createEmptyMovieClip(name, 1);  
with (\_root[name])  
{  
beginFill (0xc0c0c0, 100);  
lineStyle (1, 0x000000, 100);  
moveTo (f\_x, f\_y); //1  
lineTo (f\_x + f\_width, f\_y); //2  
lineTo (f\_x + f\_width, f\_y + f\_height); //3  
lineTo (f\_x, f\_y + f\_height); //4  
endFill();  
}  
return MC\_obj;  
}

rect1 = createNewsFrame(0,0,300,300,rect1);  
rect2 = createNewsFrame(306,0,300,300,rect2);

trace(\_root.rect2.\_width);[/AS]

---

<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 12, 2004, 12:01am UTC](https://forum.kirupa.com/t/action-script-created-mc-s-path/42676/2 "2004-02-12T00:01:44Z")

</div>

maybe created mc’s always have 0 width??? (dont know)

maybe instead u should handle \_xscale

---

<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 12, 2004, 12:21am UTC](https://forum.kirupa.com/t/action-script-created-mc-s-path/42676/3 "2004-02-12T00:21:41Z")

</div>

could be a result of the invalid names (that is unless rect1 and rect2 are variables containing the names you want)
