I have designed a vb multiple choice quiz a and I include a diagram with the questions. The diagrams are place in a picture control. However, from time to time I wish to include a Flash animation instead. This requires that the picture control invisible and the Shockwave Flas control be visible. This works fine, except that when the Shockwvae Flash control always brings up the last animation. I include the code.
If ((Val(frmRefraction.txtquestNo.Text)) = 2) Then
frmRefraction.picImage.Visible = False
With frmRefraction.ShockwaveFlash1
.Height = 6015
.Left = 600
.Top = 720
.Width = 3015
.Visible = True
' .Movie = App.Path & "\ElectricityPictures\testshock.swf"
End With
frmRefraction.ShockwaveFlash1.Movie = App.Path & "\ElectricityPictures\testshock.swf"
frmRefraction.lblplay.Caption = "Play the animation"
frmRefraction.lblplay.Visible = True
Else
frmRefraction.ShockwaveFlash1.Visible = False
frmRefraction.picImage.Visible = True
End If
'End If
If ((Val(frmRefraction.txtquestNo.Text)) = 4) Then
frmRefraction.picImage.Visible = False
With frmRefraction.ShockwaveFlash1
.Height = 6015
.Left = 600
.Top = 720
.Width = 3015
.Visible = True
' .Movie = App.Path & "\ElectricityPictures\lens.swf"
'With frmRefraction
' .Caption = "Play the animation"
' .Visible = True
' End With
End With
frmRefraction.ShockwaveFlash1.Movie = App.Path & "\ElectricityPictures\lens.swf"
frmRefraction.lblplay.Caption = "Play the animation"
frmRefraction.lblplay.Visible = True
'----------------------------------------------------------
Else
frmRefraction.ShockwaveFlash1.Visible = False
frmRefraction.picImage.Visible = True
End If
Can someone help please? Am I missing something here?
Should I somehow delete the animation in in Shockwave Flash control and how? I welcome any suggestions. Thanks
VB and shockwaveFlash control
Page 1 of 11 Replies - 4900 Views - Last Post: 19 May 2010 - 02:23 AM
Replies To: VB and shockwaveFlash control
#2
Re: VB and shockwaveFlash control
Posted 19 May 2010 - 02:23 AM
carolus eric,
Try a blank path to clear the previous animation:
1) frmRefraction.ShockwaveFlash1.Movie = "" OR
2) frmRefraction.ShockwaveFlash1.LoadMovie 0, ""
Good Luck.
Try a blank path to clear the previous animation:
1) frmRefraction.ShockwaveFlash1.Movie = "" OR
2) frmRefraction.ShockwaveFlash1.LoadMovie 0, ""
Good Luck.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|