2 Replies Latest reply on Oct 10, 2006 11:17 AM by mgason

    external api, flash ocx, visual basic

    mgason Level 1
      so I tracked down some references to using fscommand to send info from flash ocx to visual basic inside a vb application.

      Then I found this in the flash 8 help
      "NOTE
      The External API is a replacement for fscommand() in Flash 8 for interoperating with a HTML page or a container application. The External API offers more robust functionality than fscommand() in this situation
      "

      well I am a designer who has a fair grasp of actionscript, but not really any other code language.
      I am working with engineers who have a pretty good VB skills and no clue about flash.

      I can not make much of the examples given in flash, and they seem to always deal with java scrit and the container being a html page, as is probably the usual case.

      Can anyone build me a simple Visual Basic project example, where a frame in a flash movie running in the ocx on a vb form sets a value in Vb for a variable.
      Using the External Api referred to in the flash help

      Basically we just want to be able to say in VB somehing like if myVar = 1 do something.
      AND have flash set myVar in our VB app to 1 when it passes a certain frame.

      Please Help, I have been posting on various forums for a few days, no luck
      mark
        • 1. Re: external api, flash ocx, visual basic
          VisionaryStudios
          Hey Mark its actually pretty easy. You don't even have to use the external API functions. I have a pretty simple example but you should be able to make changes to suit your needs.


          With this VBScript in my HTML page:

          <script type="text/vbscript" language="VBScript">
          <!--
          Sub foobar (text)
          MsgBox text
          End Sub
          -->
          </script>


          I can call that script on a button in my swf with this code:

          on(release)
          {
          myVar = "Hello, world";
          getURL("javascript:foobar(\"" + myVar + "\")")
          }


          whatever myVar is will show up in a dialog box sent from the vbscript above, in this case it shows "Hello, World".

          However, that only works in IE, not in Firefox yet. I don't know what to do to get firefox to work with it yet.
          • 2. Re: external api, flash ocx, visual basic
            mgason Level 1
            Hi,
            I am admitting to be way out of my depth.
            most of what I find keeps referring to being in ahtml page and using javascript.
            My movie is inside a VB6 written windows application.
            Thanks for the reply. I will show it to our VB folk who are out of town for a couple of days.
            They may see the light ;-)