# Tween Class and Integer question

**URL:** <https://forum.kirupa.com/t/tween-class-and-integer-question/174194>\
**Category:** flash\
**Created:** [January 3, 2006, 5:54pm UTC](https://forum.kirupa.com/t/tween-class-and-integer-question/174194 "2006-01-03T17:54:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)\
**Post date:** [January 3, 2006, 5:54pm UTC](https://forum.kirupa.com/t/tween-class-and-integer-question/174194/1 "2006-01-03T17:54:37Z")

</div>

Ok so I have two basic questions (I think they are basic :sleep:)

1. I am using the tween class inside a for loop which is inside a function, to alpha fade in some sub menu options. Right now all sub menu options are fading in at the same time and I would like for them to fade in sequentially (i.e. one after the other) So I think what I need to do is pause the for loop and resume when onMotionFinished. But Im not quite sure how to do this. Ive tried using setInterval but I think it is too complicated and I’d rather use the onMotionFinished function since it is more dynamic… How can I do this?

2. I have an integer which might be positive and might be negative, how can I make sure it is ALWAYS positive? Right now I’m doing this:

[AS]  
if (tswLo \< 0){  
tswLo = (tswLo\*(-1));  
}  
[/AS]

But if my memory serves me correctly there is something like int(tswLo) which will convert a negative integer into a positive one, and do nothing to a positive one. What is the function for that?

Thank you!!
