Hi,
I have a problem to solve this, when the 1st language button clicked it should carry the language that already specified in xml but it seems my code doesn't work in that way. Can you help me please !
Form1
Private Sub FlashObj_FSCommand(ByVal sender As Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent) Handles FlashObj.FSCommand If e.command = "LinkApp" Then Select Case e.args Case "1" Call CurrLanguage("Malay") Case "2" Call CurrLanguage("English") Case "3" Call CurrLanguage("Chinese") Case "4" Call ExitApplication("Exit") End Select End If Call resettimer() End Sub Private Function CurrLanguage(ByVal str As String) If str = "Malay" Then CurrLanguage = LANG_MALAY ToNextScreen() ElseIf str = "English" Then CurrLanguage = LANG_ENG ToNextScreen() ElseIf str = "Chinese" Then CurrLanguage = LANG_CHINESE ToNextScreen() End If Return ("") Call resettimer() End Function
Form2
Private Sub PlayFlash() FlashObj.Stop() If CurrLanguage = LANG_MALAY Then FlashObj.Movie = MultimediaPath & "\Ezy1-agency-Bahasa.swf" ElseIf CurrLanguage = LANG_ENG Then FlashObj.Movie = MultimediaPath & "\Ezy2-agency-English.swf" ElseIf CurrLanguage = LANG_CHINESE Then FlashObj.Movie = MultimediaPath & "\Ezy3-agency-Chinese.swf" End If FlashObj.Play() End Sub Private Sub frmStep1_AgencyDirect_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Dim nTotrec As Integer ReadPATCfgXML(4) Call ReadISTPosMalaysiaXML(0) If CurrLanguage = LANG_MALAY Then LANG_MALAY = "Malay" 'FlashObj.Movie = MultimediaPath & "\Ezy1-agency-Bahasa.swf" ElseIf CurrLanguage = LANG_ENG Then LANG_MALAY = "English - US" 'FlashObj.Movie = MultimediaPath & "\Ezy2-agency-English.swf" ElseIf CurrLanguage = LANG_CHINESE Then LANG_MALAY = "Chinese Simplified" ' FlashObj.Movie = MultimediaPath & "\Ezy3-agency-Chinese.swf" End If PlayFlash() Me.Visible = False countvar = 0 tmrShowTimeOutDlg.Enabled = True end sub
k