# Where's the logic?

**URL:** https://forum.kirupa.com/t/wheres-the-logic/179084
**Category:** flash
**Created:** [February 16, 2006, 3:32pm UTC](https://forum.kirupa.com/t/wheres-the-logic/179084 "2006-02-16T15:32:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Claire\_murphy](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Claire\_murphy](https://forum.kirupa.com/u/Claire_murphy)
#### Post date: [February 16, 2006, 3:32pm UTC](https://forum.kirupa.com/t/wheres-the-logic/179084/1 "2006-02-16T15:32:53Z")

</div>

now i’m new to AS and am learning a great deal from trial and error and the wonderous ppl on here!! But when I try and impliment those things i’ve learnt it seems that my logic is different to AS writers!!

I have this code \>\>\>

[COLOR=red]this.onEnterFrame = function()  
{function wait()  
{\_root.btns\_container.btns.\_alpha = 0}  
{if (\_root.container1.SUB.\_x \> 440) {  
\_root.container1.SUB.\_x += -30;  
} else if (\_root.container1.SUB.\_x \> -30) {  
\_root.container1.PAGE.\_x += (-65-\_root.container1.PAGE.\_x)/8;  
\_root.container1.SUB.\_x += (0-\_root.container1.SUB.\_x)/2;  
else {delete this.onEnterFrame;  
}}}  
}  
[/COLOR]  
[COLOR=black]Which moves 2 objects from right to left with ease. Then on release of another button I want those button to move back in with ease. So i altered the code to the following \>\>\>[/COLOR]

[COLOR=red]this.onEnterFrame = function()  
{function wait()  
{\_root.btns\_container.btns.\_alpha = 0}  
{if (\_root.container1.PAGE.\_x \<= 0){  
\_root.container1.PAGE.\_x += 355;  
} else if (\_root.container1.PAGE.\_x \>= 30) {  
\_root.container1.SUB.\_x += (660-\_root.container1.SUB.\_x)/4;  
\_root.container1.PAGE.\_x += (307-\_root.container1.PAGE.\_x)/8;}  
else {delete this.onEnterFrame;}  
}}}[/COLOR]  
[COLOR=#ff0000][/COLOR]  
[COLOR=black]Most of it works, except PAGE doesn’t slide in anymore it just jumps from one position to another![/COLOR]

Am willing to send files via email incase anyone wants to have a look, but they r too big for attaching.

Much needed help.  
Claire
