+ Reply to Thread
Results 1 to 6 of 6

Thread: flash and CPP

  1. #1
    Member
    Join Date
    Oct 2005
    Location
    Ontario, Canada
    Posts
    47

    Default flash and CPP

    Does anyone here know if it is possible to imbed CPP function's into flash? I have a lot of CPP code that accesses custom hardware, that I would like to be able to call from within flash to make everything work together.
    Free OpenGL Game Development Tutorials at:
    www.marek-knows.com

  2. #2
    Senior Member
    Join Date
    Jul 2005
    Location
    UK
    Posts
    169

    Default

    Depends in how you are hosting the flash player... if you are talking about the bare bones player on a bare bones web page then not likely unless you can trap javascript commands via some java/ActiveX plugin.

    If however you are hosting the player through some kind of ActiveX method in your own executable then look into hooking the fscommand mechanism and use this to communicate back and forth with the flash player.

  3. #3
    Member
    Join Date
    Oct 2005
    Location
    Ontario, Canada
    Posts
    47

    Default

    OK. I'll take a look to see if I can find some examples of fscommand being used with CPP
    Free OpenGL Game Development Tutorials at:
    www.marek-knows.com

  4. #4
    Member
    Join Date
    Apr 2005
    Location
    Sydney, Australia
    Posts
    40

    Default

    Flash 8 has a more advanced implementation of FSCommand now, its the flash.external.ExternalInterface class, you can check out the Flash documentation here:

    http://livedocs.macromedia.com/flash...=00002200.html

    Additionally, you can make a simple XML Socket and go through that, a few small applications do that such as SOS, which allows trace commands outside of the Flash IDE.

    As for C++, I'm not sure how much documentation there is, but atleast in VC++ and VB it used to be incredibly easy to embed a Flash movie and call FSCommands, not sure about External Interface however.
    Christopher Rhodes
    squarecircleco.

  5. #5
    Member
    Join Date
    Oct 2005
    Location
    Ontario, Canada
    Posts
    47

    Default

    Quote Originally Posted by iopred
    Flash 8 has a more advanced implementation of FSCommand now, its the flash.external.ExternalInterface class, you can check out the Flash documentation here:

    http://livedocs.macromedia.com/flash...=00002200.html

    Additionally, you can make a simple XML Socket and go through that, a few small applications do that such as SOS, which allows trace commands outside of the Flash IDE.

    As for C++, I'm not sure how much documentation there is, but atleast in VC++ and VB it used to be incredibly easy to embed a Flash movie and call FSCommands, not sure about External Interface however.
    I'm very new to flash so I find building anything still to be a challenge.

    I took a look at flash.external.ExternalInterface however I don't have a clue what to do with it. I also couldn't find any examples.
    Free OpenGL Game Development Tutorials at:
    www.marek-knows.com

  6. #6

    Default

    In my current project i had that issue too, i used a little "trick"
    in flash i just have a "myaction" variable. I read every frame in my game.
    then a good old switch / case with all possibilities. and resets it to 0 if i processed the action. Not perfect, but that works and it's easy to set up.

    Jmc.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts