Flash over C++/Java?

Posted on 2006-05-07
Last Modified: 2008-03-17

I'm new to Flash and consider using it to develop a game. Outer skin should be Flash. Can all the logic be handled in Flash? logic involves complex physics...
I actually though the engine should be written in C++, but now I face the issue of how to communicate with the Flash.
I believe XMLSockets/communications to Javascript is not the solution I seek, but that's all I know there is.
So, what non-Flash modules can I embed inside the Flash application?

Elad Hollander.
Question by:eladho
    LVL 17

    Assisted Solution

    Yes you can handled all logics in Flash.

    If you properly design it no need to use C++ or Java. But if you want you can access those files using flash simple command's like getURL. And if you want you can access C++/Java libraries using "include". Flash action scripting is Object Oriented and its mostly like Java. But not that much difficult. Its very easy. Very user freindly enviroment is there for scripters.
    You can read more from

    BR Dushan
    LVL 5

    Accepted Solution


    You can't embed any modules inside flash. You can obviously delegate to an external module written in C++, VB, JAVA, C# etc.

    I can somewhat relate to the problem - have done 3d & physics engines in flash. Upto say 1000 polygons  is max you can squeeze out of flash. So in case your in not that complex then flash has adequate support to program - if performane and very complex models need to be done then delegate.

    If you are planning a standalone application then C++ container is the best way forward. The communication can happen directly using com events. Flash script has FSCommand function that can be used to notify the container - be it html, c++, vb, etc. On the other hand all the containers can access/manipulate variables inside the flash movie directly.

    Although the above solution is the best in terms of raw performace - you will need to implement it differently over different paltforms - win32, mac, linux etc.

    Another slightly unknown way is to hack into LocalConnection object. This object allows flash movies to communicate on a single machine using AMF. Although this is not documented officialy but has been publicly known for sometime. There is c/c++ code avialable that will allow you to use this communication channel to hook up flash with c++.

    if you are looking at online/ multi platform implementation then XMLSocket and Java is great. Don't get mislead by the name XMLSocket - it doesn't need to be XML data that you can send on it. You can send any custom format raw data and parse it :)

    hope this helps



    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now