Re: Controlling Flash with VB in Powerpoint

  • Thread starter Thread starter Shyam Pillai
  • Start date Start date
S

Shyam Pillai

The Flash Control has the SetVariable method which can be used to pass a
value for a variable in the Flash file.

Call ShockWaveFlash.SetVariable("VariableName","This is the value")
 
Does this have to be in a Sub. Example:

Private Sub ShockwaveFlash1_OnReadyStateChange(ByVal newState As Long)
Call ShockwaveFlash1.SetVariable("myVar", "Please Work")
End Sub

When I just have

Call ShockwaveFlash1.SetVariable("myVar", "Please Work")

I get a 'Compile error: Invalid outside procedure'.

Total newbie at VB programing in Powerpoint.

Thanks for the help,

Rich
 
Does this have to be in a Sub. Example:

Private Sub ShockwaveFlash1_OnReadyStateChange(ByVal newState As Long)
Call ShockwaveFlash1.SetVariable("myVar", "Please Work")
End Sub

When I just have

Call ShockwaveFlash1.SetVariable("myVar", "Please Work")

I get a 'Compile error: Invalid outside procedure'.

Yes, virtually all code needs to be in a Sub or Function.
 
Back
Top