Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 12th, 2008, 10:35 AM   #1
PoOoZaQ
Newbie
 
Join Date: Jul 2008
Posts: 1
Rep Power: 0 PoOoZaQ is on a distinguished road
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.

Last edited by PoOoZaQ; Jul 12th, 2008 at 10:47 AM. Reason: adding info
PoOoZaQ is offline   Reply With Quote
Old Jul 12th, 2008, 1:04 PM   #2
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 381
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
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.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Jul 12th, 2008, 4:17 PM   #3
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,010
Rep Power: 5 lectricpharaoh will become famous soon enough
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]
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with asp and flash skateare ASP 0 Nov 17th, 2007 1:25 AM
Free Flash Work Needed - Only Words bigguy Paid Job Offers 20 Aug 3rd, 2007 11:26 PM
Flash and Java Watts Java 5 Mar 2nd, 2006 11:14 PM
XML Integrating With Flash Rizma XML 5 Oct 31st, 2005 11:02 AM
Flash Ram drive as system disk? Jonnno Coder's Corner Lounge 1 Apr 16th, 2005 9:13 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:21 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC