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,
- 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.