# Trying to understand how the AS works

**URL:** <https://forum.kirupa.com/t/trying-to-understand-how-the-as-works/306690>\
**Category:** Uncategorized\
**Created:** [March 19, 2010, 11:50pm UTC](https://forum.kirupa.com/t/trying-to-understand-how-the-as-works/306690 "2010-03-19T23:50:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastienjb](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sebastienjb](https://forum.kirupa.com/u/sebastienjb)\
**Post date:** [March 19, 2010, 11:50pm UTC](https://forum.kirupa.com/t/trying-to-understand-how-the-as-works/306690/1 "2010-03-19T23:50:50Z")

</div>

I’m at my wits end,

I attached a code to “frame 1” in a movie clip, and the movie stops on frame 16, yet the rollover script is still running on frame 16.

How do I make sure it only runs when its on frame 1? or whatever set of frames it’s in?

so it looks like this  
LAYER FRAMES  
SCRIPT |1|  
BUTTON |1------------------16|

But the code in “script” is still active and running way passed frame 1, I don’t get it.

is their way to stop the code from running outside its assigned frame? like a stop command? I even used “if” conditions and it still runs the code.

And their is a stop command on frame 16 that so it’s not looping back to  
frame 1.

Thanks for reading, I’m really getting annoyed, haha.
