1 Replies - 4900 Views - Last Post: 19 May 2010 - 02:23 AM Rate Topic: -----

#1 carolus eric  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-May 10

VB and shockwaveFlash control

Posted 17 May 2010 - 10:19 PM

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

Is This A Good Question/Topic? 0
  • +

Replies To: VB and shockwaveFlash control

#2 bytelogik  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 212
  • Joined: 06-October 09

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1