Connecting flash to a c++ library

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Connecting flash to a c++ library

    Hi,
    We are thinking of using FLASH of FLASH lite to create the standalone HMI in a
    powerful embedded linux system.
    But we cant use Webservices to access the data since the requirement for the
    response time
    is very high in our project. So we wish to connect to the FLash HMI for data
    access
    directly from the C++ library (Not activex dll ).

    Could we use External interface or Shared objects or any other technique to
    get the activescript<->c++ connectivity?

    also , Is there any vendor who has specialized in such data connectivities
    with Flash?



    kishore.s Guest

  2. Similar Questions and Discussions

    1. Connecting an XML File to Flash
      I have a news section in Flash in a website. I am allowing someone to input the news stories through a content management system, which would create...
    2. Connecting Flash CS3 (AS3) with Dbase (ASP)
      Hi, Can anyone help with connecting Flash CS3 using AS3 to a MSAccess Database using ASP? I see alot of demos/tutorials with MySQL and PHP and I...
    3. Connecting Flash with the DB thru Coldfusion
      Hello, I have been creating dynamic pages in ColdFusion and creating databases for years but as of yet I have not done any kind of Flash and...
    4. Flash connecting to web from within Director...Pl
      I have a swf file that contains the folling code... loadtextContent = new XML(); loadtextContent.ignoreWhite = true;...
    5. ~/Library/ vs ~/System/Library vs /User/Library/
      In article <110720031327074895%justin.c@se.net>, justin <justin.c@se.net> wrote: First off, you're a little bit confused. ~ means your home...
  3. #2

    Default Re: Connecting flash to a c++ library

    have you found any answer about this one? it would be awesome if you could connect flash to c++. Thanks phim onlinehttp://coiphimhay.com, have a good time and let us know :)

    Fantomknight10 Guest

  4. #3

    Default Re: Connecting flash to a c++ library

    I did this using sockets. You can create a TCP/IP connection between your C++
    application and your Flash user interface. I generated a fairly complex
    application with multiple Flash programs communicating with a single native
    application.

    I launched the flash interfaces from the C++ application and then monitored
    the connections to synchronize the termination of the programs.

    A big advantage I discovered is that the most OS specific piece of the code is
    usually the user interface. I was able to recompile my C++ application on
    different systems and it worked with no problems.

    Once I had the initial communications working the rest was pretty easy. I
    would share code with you, but I was working for someone else and don't own the
    code.

    - Tim

    TimKemp Guest

  5. #4

    Default Re: Connecting flash to a c++ library

    Hi Tim,
    Thanks for the reponse. I also found only sockets as viable solution until now
    for my needs.
    I guess u might have used XML Socket api and just wondering how good was it
    performance wise?
    my concern is XMLSocket had a overhead of sending lot of text on network as
    well as time marshalling and demarschalling the data.. so did you do any
    performance test or you pretty happy with the results?

    Also I thought to using XML-RPC where I can define the api in the higher
    level and leave the packing and unpacking to xml format to the library.But this
    also relies on XML Socket or HTTP for exchaning data ..so it has the same
    concern as the later ,but I have less to work abt packing/unpacking data
    in/from xml streams.


    But none of them are my favourite.I had expected there is actionscript-c++
    binding that would work on the fly.And im pretty dissapointed with the handful
    options I have with Flash.

    Regards,
    Kishore


    kishore.s Guest

  6. #5

    Default Re: Connecting flash to a c++ library

    Kishore,

    No I didn't use XML Sockets. I have used them in the past and was very
    disappointed with them. They were extremely slow. For very small bits of
    information they were OK, but when I sent more than a few hundred bytes it
    would hang for tens of seconds (or more) apparently at random. I?ve heard that
    they have corrected that in the new versions of Flash, but I still have a bad
    feeling.

    For the application I was working on I needed to transfer small bits of
    information quickly. The Flash application was purely the user interface and
    the native code was doing all the computation, so the communication had to be
    fast enough that there wouldn?t be a noticeable lag to the user.

    I used the Socket class in Flash with readUTF() and writeUTF() on the Flash
    side. This lets you send strings containing any arbitrary information.
    Handling UTF strings in the native code is simple. They have a 16 bit value at
    the beginning followed by the number of bytes specified by the value. This was
    very reliable and quick. I can?t recall having any problems with it once I
    figured out how to make it work.

    To bring up the combined ?Application?, I first launched the native code. The
    native code opened a socket and listened on it and then it launched the Flash
    pieces which connected to the socket. For synchronizing shutdown I just looked
    for the connections closing down.

    - Tim


    TimKemp Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139