# Urgent help needed for AS3

**URL:** <https://forum.kirupa.com/t/urgent-help-needed-for-as3/221294>\
**Category:** flash\
**Created:** [April 3, 2007, 6:19am UTC](https://forum.kirupa.com/t/urgent-help-needed-for-as3/221294 "2007-04-03T06:19:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitm](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@amitm](https://forum.kirupa.com/u/amitm)\
**Post date:** [April 3, 2007, 6:19am UTC](https://forum.kirupa.com/t/urgent-help-needed-for-as3/221294/1 "2007-04-03T06:19:44Z")

</div>

Hi,

I am new to AS3 and experienced in AS2. Now I am migrating one of my project to AS3.

I have a structure of one main movieclip attached to class MainApp, which is having some movieclips each of those attached to some classes (say MyItem class). Now I am getting two problems,

1. I have some simple movieclip in my MyItem movieclip. The instance name say bg\_mc. Now in my MyItem class in AS2 I used to write something like :

private var bg\_mc:MovieClip;

and then make visible true or false depending on some action.

If I am trying to do the same in AS3, it is showing me error saying :

“1151: A conflict exists with definition bg\_mc in namespace internal.”

If I am attaching the movieclip using addChild then it is fine. But for my app this will be a hectic job as I have atleast 40 of such items and the shape are different. So I have manually placed those movieclips inside whatever designers have given me.

How to solve this effectively? Can’t we have simple movieclips in a AS3 class without doing addChild?

My next problem is how to call a method from MyItem to MainApp.

In AS2 I used to call something like :

\_parent.onItemSelection (this);

In AS3 the same is throwing some error though I have the method in my MainApp.as file.

Both my classes are extending MovieClip class.

Please suggest me the best approach.

thanks in advance.
