# Trying to get one of my functions to automatically run when movie plays

**URL:** https://forum.kirupa.com/t/trying-to-get-one-of-my-functions-to-automatically-run-when-movie-plays/190700
**Category:** flash
**Created:** [June 14, 2006, 1:08am UTC](https://forum.kirupa.com/t/trying-to-get-one-of-my-functions-to-automatically-run-when-movie-plays/190700 "2006-06-14T01:08:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![messlah](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@messlah](https://forum.kirupa.com/u/messlah)
#### Post date: [June 14, 2006, 1:08am UTC](https://forum.kirupa.com/t/trying-to-get-one-of-my-functions-to-automatically-run-when-movie-plays/190700/1 "2006-06-14T01:08:22Z")

</div>

Hey all,

I am having some difficulty getting a function to run/work when my movie plays.

The function controls my menu and I need one of the options to start flashing automatically when my movie plays.

In this case I am forcing the controlling variable to equal “1” so the first menu option should start flashing.

\_root.menuvar = “1”; //controlling variable  
\_root.pt\_menu.ptmenumc.menufinal.menuchange(); //running my function

It must be something to do with where I am running the function from or?

My file is here:  
[URL=“[http://users.ncable.net.au/~timfrancis/final\_function\_call.fla](http://users.ncable.net.au/%7Etimfrancis/final_function_call.fla)”][http://users.ncable.net.au/~timfrancis/final\_function\_call.fla](http://users.ncable.net.au/~timfrancis/final_function_call.fla)

Any help would be great.
