unfortunately , I still have problems implementing the difference with private and public variables in b4a.
in vb6 I used to create an external module and declare there the public variables (to be accessed from anywhere)
in vb4a I have two variables. let's say :
I try to put those in the starter module inside the Sub Process_Globals
but when I try to access it from another activity - it won't work.
the only way I could compile it is by declaring it in the main module in the Sub Process_Globals
and then use :
So
where would I declare MuteFlag and call it from any module by it's name (without the Main.Muteflag)
lots of text for a newbie question, I know.
any kind of example codes or help or a link to a tutorial will be very appreciated
Thanks
in vb6 I used to create an external module and declare there the public variables (to be accessed from anywhere)
in vb4a I have two variables. let's say :
B4X:
MP As MediaPlayer
Public MuteFlag As Boolean
I try to put those in the starter module inside the Sub Process_Globals
but when I try to access it from another activity - it won't work.
the only way I could compile it is by declaring it in the main module in the Sub Process_Globals
and then use :
B4X:
Main.MP.Load (File.DirAssets, "sound.wav")
If Main.MuteFlag = False Then
Main.MP.Play
End If
So
where would I declare MuteFlag and call it from any module by it's name (without the Main.Muteflag)
lots of text for a newbie question, I know.
any kind of example codes or help or a link to a tutorial will be very appreciated
Thanks