# OOP targeting

**URL:** <https://forum.kirupa.com/t/oop-targeting/180135>\
**Category:** flash\
**Created:** [February 26, 2006, 12:05am UTC](https://forum.kirupa.com/t/oop-targeting/180135 "2006-02-26T00:05:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JUMBOshrimp](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@JUMBOshrimp](https://forum.kirupa.com/u/JUMBOshrimp)\
**Post date:** [February 26, 2006, 12:05am UTC](https://forum.kirupa.com/t/oop-targeting/180135/1 "2006-02-26T00:05:39Z")

</div>

I’m trying to use OOP to code a slider – Basically I want to attach the AS class to a movie called mc\_slider and within that MC will be mc\_knob and mc\_track

I have the code and kind of know where i need to go But I don’t undestand how I say something like this.knob\_mc.onPress when the syntax i’m supposed to be using is function onPress(){}

also if i were to say something like

```auto

class slider extends MovieClip {
 function onPress() {
  this.knob_mc.startDrag(false, 0, 0, 100, 0);
 }

```

it would tell me that there is no method called knob\_mc

Thanks  
JÜMBOshrimp
