Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Functions (a stupid question)

Status
Not open for further replies.

jocoutts

Technical User
Feb 5, 2002
32
GB
A very simple question:

I've only started getting into functions.
If you write a function, can you call it up from anywhere? Where is best to store a function? On the main timeline on a frame? In a separate movie?
I've written a function, that ideally needs to be called up from different movie's all sitting on the main timeline.
Your help would be appreciated.
Thanks
 
Yes, IMHO, it would be easier to all concentrate your functions in the first (or first few) frame(s) of your main movie, and yes they can be called fron anywhere...


...A function can be called from a button action or a frame action. Functions can also be called from inside movie clips or from loaded movies. However, the path to the function must be used. If all functions are created and stored on the main timeline (_level0) then they can be called from any movie clip or loaded movie using the following syntax:

_level0.functionName();...


For more info check this:


Regards,

new.gif
 
Thank you oldnewbie.
You've helped me out before and I really appreciate it.
You certainly know your Flash.
Jo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top