# Using a movie to call a function

**URL:** <https://forum.kirupa.com/t/using-a-movie-to-call-a-function/258271>\
**Category:** Uncategorized\
**Created:** [April 22, 2008, 4:42pm UTC](https://forum.kirupa.com/t/using-a-movie-to-call-a-function/258271 "2008-04-22T16:42:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashAndy](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FlashAndy](https://forum.kirupa.com/u/FlashAndy)\
**Post date:** [April 22, 2008, 4:42pm UTC](https://forum.kirupa.com/t/using-a-movie-to-call-a-function/258271/1 "2008-04-22T16:42:30Z")

</div>

I have some actionscript that checks for installations of Acrobat Reader I’m using in a Projector project.

This code executes by pushing a button. I want to use a movie (like a preloader) to execute the script.

i.e. when the movie reaches frame 50 execute the fucntion to check for acrobat reader

I have it working fine using a button

test\_btn.onRelease = function . . . . .

But I can’t seem to get it to work with a movie.

I need to set up way to check what frames is loaded and if it is all loaded then execute the function.

something like

if (test\_mov.\_currentframes == 50){execute function}

This is probly really simple but I can’t seem to get it working.

Any thoughts??

Andy

P.S. the script is all on frame 1 of main timeline.
