# Confused about interclass communication issue

**URL:** <https://forum.kirupa.com/t/confused-about-interclass-communication-issue/273240>\
**Category:** flash\
**Created:** [October 13, 2008, 2:58pm UTC](https://forum.kirupa.com/t/confused-about-interclass-communication-issue/273240 "2008-10-13T14:58:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caraticus](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/caraticus/32/4195_2.png) [@caraticus](https://forum.kirupa.com/u/caraticus)\
**Post date:** [October 13, 2008, 2:58pm UTC](https://forum.kirupa.com/t/confused-about-interclass-communication-issue/273240/1 "2008-10-13T14:58:11Z")

</div>

Hi,

I’m trying a very simple test where one class updates the property of another class using implicit accessors. I’m trying to animate an object on stage when I press a button. The testTween class is supposed to animate the object along the x axis, and testButton is supposed to set up a CLICK listener and send a value to testTween. My scene consists of a “circle” movie clip and a “button” Movieclip and that’s it. Everything fires fine, (all my traces return the proper values), but the “circle” does not animate. Any ideas?

```auto
package {
	import flash.display.*;
	import flash.events.*;
	import SceneNavigation;
	import fl.transitions.TweenEvent;
	import caurina.transitions.*;

	public class testTween extends MovieClip {
		
		private var _testVar:Number;

		public function testTween() {
			//The circle will animate if I call testFunction() from the constructor like this
			//so it should be working when the function is called from the accessor.
			//_testVar = 30;
			//testFunction();
		}
		
		public function testFunction(){
			Tweener.addTween(this, {x:_testVar, time:3});
			trace(_testVar);
		}
		
		public function set testVar(whichBtn:Number){
			_testVar = whichBtn;
			testFunction();
			trace(_testVar);
		}
		
		public function get testVar(){
			return testVar;
		}
	}
}

```

```auto
package {
	import flash.display.*;
	import flash.events.*;
	import testTween;
	import caurina.transitions.*;

	public class testButton extends MovieClip {
		
		private var _newTween:testTween = new testTween();

		public function testButton() {
			this.addEventListener(MouseEvent.CLICK, moveCircle); 
		}
		
		public function moveCircle(event:MouseEvent) {
			_newTween.testVar = 30;
			trace("changed property of testTween class");
		}
	}
}

```
