# AS 2 Class Question

**URL:** <https://forum.kirupa.com/t/as-2-class-question/57783>\
**Category:** flash\
**Created:** [July 16, 2004, 2:45am UTC](https://forum.kirupa.com/t/as-2-class-question/57783 "2004-07-16T02:45:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daheroes](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@daheroes](https://forum.kirupa.com/u/daheroes)\
**Post date:** [July 16, 2004, 2:45am UTC](https://forum.kirupa.com/t/as-2-class-question/57783/1 "2004-07-16T02:45:23Z")

</div>

Ok… I have a question regarding methods within a class.

I currently have a class that has a method that creates new duplicates of a clip on the screen, changes some of their properties (such as color, and text display), and then arranges them in a straight column.

Inside that method, I have some clipEvent Statements for each button.

```auto

currentButton.onRollOver = function() {
	this._alpha = 70;
	expandButton(this);
};
currentButton.onRollOut = function() {
	this._alpha = 100;
	shrinkButton(this);
};

```

Now, the two functions that are called, expandButton() and shrinkButton(), will not execute. (they are other functions built into this class.)

What would cause this? And more importantly, how might I go about fixing it? 🙂 (Currently I’ve just copied the code from each function into the clipEvent functions, which works.) Is there any other way to remedy this?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2004, 2:59am UTC](https://forum.kirupa.com/t/as-2-class-question/57783/2 "2004-07-16T02:59:22Z")

</div>

try trace(shrinkButton), if returns undefined, check and see on what timeline are the functions declared, must be a referncing issue 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2004, 3:39am UTC](https://forum.kirupa.com/t/as-2-class-question/57783/3 "2004-07-16T03:39:04Z")

</div>

there isn’t a timeline though… this is inside a class. and the place i’m using the class is only one frame long. i’ll try the trace thing though. thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2004, 4:08am UTC](https://forum.kirupa.com/t/as-2-class-question/57783/4 "2004-07-16T04:08:52Z")

</div>

```auto
shrinkButton(this);

```

is not refering to any class

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 17, 2004, 2:05am UTC](https://forum.kirupa.com/t/as-2-class-question/57783/5 "2004-07-17T02:05:40Z")

</div>

yeah. i realized that late last night… i’m working to fix it. thanks for your help!
