# Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for
Did you mean:
Level 7

## Calling a function from main.brs

Hi, I have a dumb question. I'm trying to call a function from main.brs, getting the usual error about it unable to see it.

`//main.brsscene = screen.CreateScene("HomeScene") //Function is located in the "HomeScene.brs, not the .xml"scene.myfunction() <-- Error`

Thanks,

-T
2 Replies
Level 10

## Re: Calling a function from main.brs

did you try this?
https://sdkdocs.roku.com/display/sdkdoc/interface

`<interface>   <function name="myfunction" /></interface>`

Does it work from scene?
aspiring
Highlighted
Level 7

## Re: Calling a function from main.brs

No, but that did lead me to this:
https://sdkdocs.roku.com/display/sdkdoc ... onalFields

and this:
scene.callFunc("myfunction")

Thanks.