![]() |
Outputting C# to Flash
I am writing a game with some friends, and it requires outputting from C# to Flash.
As I am writing the C# logic, i am responsible for the output part. Basically I want to be able to somehow send, lets say - a string from my C# development project to a Flash project for further actions. I am familiar with C# as well as other languages, though not with Flash. (info thats designed for someone who is familiar with Flash is useful as well). Any help would be appreciates, as well as links to tutorials and other detailed informatics / articles. Thanks. |
Re: Outputting C# to Flash
probably you will write the output to a file, and the flash program reads it from there. Otherwise ... I don't really see a way.
|
Re: Outputting C# to Flash
I honestly don't see how they (being the others involved with the project) can expect you to produce output for software in some mystery format.
You're going to need to find out how Flash expects input, and what sources it can use. You're also going to need to determine if there are any special requirements for this data, for example whether numbers are big-endian or little endian, whether it uses 8-bit bytes for characters or wide 16-bit ones (or something else), and so on. It might be possible to write to a file and have the Flash app read this file, but this raises performance questions as well as issues regarding exclusivity of file access. Another potential option is a pipe, where the standard output from your C# program becomes the standard input of the Flash app, but I have no idea if this is possible. Perhaps your best, safest, and most robust option is to use sockets. I know Flash apps can use sockets to communicate (look at YouTube and similar sites, where the Flash app grabs the video data from the remote host), and C# (well, .NET in general) has extensive support for sockets as well. This would seem to be your best bet. [edit] If you go for the sockets option, you'll probably want to have the Flash app initiate communication, while your C# app listens for incoming requests and accepts them. In other words, the C# app acts as a server, while the Flash app acts as a client. [/edit] |
| All times are GMT -5. The time now is 1:13 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC