# 2 classes, one method

**URL:** <https://forum.kirupa.com/t/2-classes-one-method/286830>\
**Category:** flash\
**Created:** [April 21, 2009, 6:03pm UTC](https://forum.kirupa.com/t/2-classes-one-method/286830 "2009-04-21T18:03:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deborah](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@Deborah](https://forum.kirupa.com/u/Deborah)\
**Post date:** [April 21, 2009, 6:03pm UTC](https://forum.kirupa.com/t/2-classes-one-method/286830/1 "2009-04-21T18:03:15Z")

</div>

I am currently attempting to move from timeline as3 to classes.

I have a class that is used to create some shapes, and another that is used to create some text.

I want a function that will check to see if the text has passed a shape on the layout - if so, the shape needs to move down. (the text is input by the user)

on the timeline everything worked fine - this is from the text class

```auto

public function uploadText(evt:MouseEvent):void{
    bodyText.text = "";
    bodyText.appendText(yourText.text);
    btHeight = bodyText.height;
    
    if (btHeight > 700){
        oBT = true;
        checkOBT();
    };
};

```

The function below should move the shape - where should it reside? (if I put it in the text class, it doesn’t know about the “TemplateHolder.foo” and if I put it in the shape class, it doesn’t have the oBT Boolean or the btHeight var.

```auto
public function checkOBT():void{
        if (oBT == true) {
            TemplateHolder.foo.y = btHeight + 210;
        };
    };

```

Thanks in advance - I’m close but feel so very confused about classes!
