# New to AS2

**URL:** <https://forum.kirupa.com/t/new-to-as2/287606>\
**Category:** Uncategorized\
**Created:** [May 4, 2009, 10:15am UTC](https://forum.kirupa.com/t/new-to-as2/287606 "2009-05-04T10:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dexs](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@dexs](https://forum.kirupa.com/u/dexs)\
**Post date:** [May 4, 2009, 10:15am UTC](https://forum.kirupa.com/t/new-to-as2/287606/1 "2009-05-04T10:15:46Z")

</div>

hello people,

I am new to actionscript and need a little help with they syntax of a little bit of code.

I have an MC on the main timeline. i want this mc to play only when i roll over so i have placed this code one the MC:

on (rollOver)  
{  
\_root.arazM.gotoAndPlay(2);  
}

This works without a problem.  
When i rolover the MC it plays and thats all good however if the animation is half way through and i rollover again the MC restarts.

I would like to add a condition statment that only allows the movie to play if its current frame is at 1 or only to play if it isnt currently playing.

I appologise if i havent explained it too well.

Thank you for your time

dexs
