# This.onEnterFrame issue....?

**URL:** <https://forum.kirupa.com/t/this-onenterframe-issue/212546>\
**Category:** Uncategorized\
**Created:** [January 11, 2007, 10:26pm UTC](https://forum.kirupa.com/t/this-onenterframe-issue/212546 "2007-01-11T22:26:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![calverphoto](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@calverphoto](https://forum.kirupa.com/u/calverphoto)\
**Post date:** [January 11, 2007, 10:26pm UTC](https://forum.kirupa.com/t/this-onenterframe-issue/212546/1 "2007-01-11T22:26:11Z")

</div>

Hi,

The code below almost works as I want it to (still in early stages), when the “fstop\_tn” moves past \_x 176 it needs to fade out then become invisible, which it does, then become visible again and fade in when it returns, which it does… however there is a massive delay before it fades in/out…?

It seems to be something to do with the onEnterFrame bit… any ideas?

```auto
stop();

next_tn.onRelease = function() {
	fstop_tn.tween("_x", fstop_tn._x-117, stageResizeTweenSpeed, stageResizeTween);
	sublime_tn.tween("_x", sublime_tn._x-117, stageResizeTweenSpeed, stageResizeTween);
	scape_tn.tween("_x", scape_tn._x-117, stageResizeTweenSpeed, stageResizeTween);
	moon_tn.tween("_x", moon_tn._x-117, stageResizeTweenSpeed, stageResizeTween);
	jess_tn.tween("_x", jess_tn._x-117, stageResizeTweenSpeed, stageResizeTween);

};
previous_tn.onRelease = function() {
	fstop_tn.tween("_x", fstop_tn._x+117, stageResizeTweenSpeed, stageResizeTween);
	sublime_tn.tween("_x", sublime_tn._x+117, stageResizeTweenSpeed, stageResizeTween);
	scape_tn.tween("_x", scape_tn._x+117, stageResizeTweenSpeed, stageResizeTween);
	moon_tn.tween("_x", moon_tn._x+117, stageResizeTweenSpeed, stageResizeTween);
	jess_tn.tween("_x", jess_tn._x+117, stageResizeTweenSpeed, stageResizeTween);
};

this.onEnterFrame = function() {
	if (fstop_tn._x<176) {
		fstop_tn._alpha -= 10;
	} 
	if (fstop_tn._alpha<1) {
		fstop_tn._visible = false;
	}
	if (fstop_tn._x>175) {
		fstop_tn._alpha += 10;
	}
	if (fstop_tn._alpha>1) {
		fstop_tn._visible = true;
	}
};

fstop_tn.onRollOver = function() {
};

```

Here’s a screen grab of how it visually looks if that helps (the skater is the fstop\_tn):

![](http://www.paulcalver.eu/temp/as.jpg)

actionscript will become my friend! (flash 8, mac)

Thank you,  
Paul.
