Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: [SOLVED] Cannot share functions between brs files in source folder

Hmm, I didn't understand the solution,
In /source I have A.brs, B.brs, and main.brs. For A.brs to call function from B.brs, I have to create A.xml and import B.brs?
I don't think A.xml will get initialized unless you call CreateObject("A") right??

If main.brs can already statically call methodFromA() so I don't really know why you would need to call CreateObject("A").
Sorry, kinda new to this.
Reel Rookie

Re: [SOLVED] Cannot share functions between brs files in source folder

I think the author of the question ended up copying one brightscript into the other, instead of actually importing.


I have a very large .brs file and would like to split in multiple scripts.


Is there a way to have 1 .brs file that imports others into it? And so finally import a single .brs file while keeping things organized?

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.