Taurian
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2018
11:16 PM
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.
Thanks,
-T
//main.brs
scene = screen.CreateScene("HomeScene") //Function is located in the "HomeScene.brs, not the .xml"
scene.myfunction() <-- Error
Thanks,
-T
2 REPLIES 2
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2018
07:11 AM
Re: Calling a function from main.brs
did you try this?
https://sdkdocs.roku.com/display/sdkdoc/interface
Add to your HomeScene xml:
Does it work from scene?
https://sdkdocs.roku.com/display/sdkdoc/interface
Add to your HomeScene xml:
<interface>
<function name="myfunction" />
</interface>
Does it work from scene?
aspiring
Taurian
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2018
08:36 AM
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.
https://sdkdocs.roku.com/display/sdkdoc ... onalFields
and this:
scene.callFunc("myfunction")
Thanks.