Skip to main content
Participant
July 17, 2013
Question

How to call a function in a class from the main timeline?

  • July 17, 2013
  • 2 replies
  • 418 views

Hey Guys


I have a project in Flash with four external AS files, which are linked to items in the library using AS linkage.


What I want to do is call a function in one of these files from the main timeline, how would I go about doing this? I'm not currently using a document class, most of the code is in Frame 1 of the main timeline.


Thanks

This topic has been closed for replies.

2 replies

sinious
Legend
July 17, 2013

// change type to the class name from the instance

ClassNameHere(this.getChildByName('instance_name')).SomeFunction();

kglad
Community Expert
Community Expert
July 17, 2013

you would use the appropriate timeline instance name and the function needs to be public.