# Three basic-level questions

**URL:** <https://forum.kirupa.com/t/three-basic-level-questions/312405>\
**Category:** flash\
**Created:** [August 2, 2010, 6:32pm UTC](https://forum.kirupa.com/t/three-basic-level-questions/312405 "2010-08-02T18:32:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Setup56](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@Setup56](https://forum.kirupa.com/u/Setup56)\
**Post date:** [August 2, 2010, 6:32pm UTC](https://forum.kirupa.com/t/three-basic-level-questions/312405/1 "2010-08-02T18:32:16Z")

</div>

The following is that long only because I gave examples of what I want to know, not because it is complex ^^

I have three basic questions regarding AS 3.0 classes, and I would like simplest examples possible (please, not links, unless they answer directly to the questions) to answer my example questions. Thanks in advance.

1. How can I make a class object interact with an object on stage?

For example, when I have a square (mc\_Square) with class “square” attached to it and I want it to trace “Colliding!” and print the X and Y of the mc\_Box on contact with an on-stage _hollow_ box (mc\_Box) that has no class attached to it.

Having a answer on how to do it vice-versa would also be awesome ![](http://forum.kirupa.com/uploads/kirupa/798/c985a958819d8917.gif).

1. How can I make a class object interact with the same class object?

For example, when I have two squares (mc\_Square) that both have the class “square” attached to it and when they collide, it prints the X and Y of both of them.

1. How can I make a class object interact with a different class object?

For example, when I have two squares mc\_Square1 with class “square1 (that also has a variable Primary=true written in it)” and a mc\_Square2 with class “square2”; When they collide, the one with Primary=true would be removed and it’s X,Y position traced.

If I would get examples (if possible then .fla) that do exactly as I ask in my examples, I would be very grateful ![](http://forum.kirupa.com/uploads/kirupa/798/c985a958819d8917.gif)!
