# Strange framecontroll scripting

**URL:** <https://forum.kirupa.com/t/strange-framecontroll-scripting/120727>\
**Category:** Uncategorized\
**Created:** [August 26, 2004, 10:50pm UTC](https://forum.kirupa.com/t/strange-framecontroll-scripting/120727 "2004-08-26T22:50:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henxon](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@Henxon](https://forum.kirupa.com/u/Henxon)\
**Post date:** [August 26, 2004, 10:50pm UTC](https://forum.kirupa.com/t/strange-framecontroll-scripting/120727/1 "2004-08-26T22:50:22Z")

</div>

Hi!  
I use this code on my page:  
\*  
on(press) {  
\_root.play();  
\_root.gotoAndPlay(“studio\_in”);  
}  
\*  
When I press the button, it will play a fadeouteffect that’s positioned one frame after the currentframe.

1.It fades out the current shown image with _\_root.play();_  
2.It fades in the new image, with \*\_root.gotoAndPlay(“studio\_in”);

\*The problem is that it seems that it just runs \*\_root.gotoAndPlay(“studio\_in”); _and skipps the fadeout:_\_root.play();

\*If I just run _\_root.play();_[font=Arial] the fadeout works, but not if I run gotoAndPlay after the play() section. Howcome??

regards, henrik, sweden  
[/font]
