# If commands to get the current frame number

**URL:** <https://forum.kirupa.com/t/if-commands-to-get-the-current-frame-number/241209>\
**Category:** Uncategorized\
**Created:** [October 10, 2007, 10:37pm UTC](https://forum.kirupa.com/t/if-commands-to-get-the-current-frame-number/241209 "2007-10-10T22:37:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANEWIDEACo](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@ANEWIDEACo](https://forum.kirupa.com/u/ANEWIDEACo)\
**Post date:** [October 10, 2007, 10:37pm UTC](https://forum.kirupa.com/t/if-commands-to-get-the-current-frame-number/241209/1 "2007-10-10T22:37:41Z")

</div>

I’m using wonderful FSCommands to communicate between the JS world and the AS world. How do I get: goToTFrameNumber(’\_root.main,3,0’); to activate when the flash movie reaches Scene1,2 (also frame 54 if there are no scenes).

Here is the code on my html page containing the flash object:

\<SCRIPT LANGUAGE=“JavaScript” SRC=“affsclib.js”\>  
if (currentFrameNumber(0) = Scene1,2){  
goToTFrameNumber(’\_root.main,3,0’);}  
\</SCRIPT\>  
\</HEAD\>  
\<BODY bgcolor="#333333" onLoad=“setMovieRef(‘ani\_header’,0);”\>

I need a lot of help, I suck at anything beyond basic javascript.

Thanks in advance 😃
