Page 1 of 1

Data exchange Delphi-Flash

PostPosted: December 9th, 2010, 9:42 am
by informaticagm
Hello everybody,

I am developing an application in Delphi, that obtains external data in real-time. I need to pass this data to a flash movie, or in other words: to pass variables from Delphi to Flash.

I have tested the GetVariable, SetVariable methods, but its doesn´t work; I also have tested the FlashVars method, but only works once (the first time I execute it).

I have read that the solution is in ExternalInterface of Flash but, ¿can anyone help me on how use it? ¿any other solutions?

Thanks a lot.

Re: Data exchange Delphi-Flash

PostPosted: December 12th, 2010, 2:06 am
by mathgod
I looked for something similar many months ago. I still haven't found anything useful. Look for AMF, Action Message Format, and Delphi components that purport to communicate with AMF. I know for a fact that such Flash / Delphi communication is possible because I know of at least two applications coded in Delphi that interacts with a facebook game. FarmHelper is coded in Delphi and the author is useless. He claims that AMF protocol is a "trade secret". FarmVilleBot is also coded in Delphi but the author never responds to questions about AMF or how to write Delphi code for AMF.

I know this is a Delphi forum but you may have better luck looking solutions in Python or PHP. If you happen to luck out with getting a tutorial or demo for coding a Delphi app that does AMF, please send a PM to me because I want to know too.

Re: Data exchange Delphi-Flash

PostPosted: December 13th, 2010, 9:09 am
by informaticagm
Thanks for your reply.

I will investigate on AMF and, for sure, if I found any solution I will send it to you. Anyway, I read about using ExternalInterface and people says that it works!

Let´s investigate it.

Thanks a lot.

Re: Data exchange Delphi-Flash

PostPosted: December 16th, 2010, 2:26 pm
by informaticagm
Hi guys,

I find a solution, but it isn´t the best:

Instead of call a flash function from delphi (I don´t know why it doesn´t work), I call a delphi function from flash, such that in Delphi I catch the "OnFlashCall" event, and I use the "SetReturnValue" method to send the data I want to send to Flash by a XML formatted string.

I still want to know why CallFunction in Delphi doesn´t work....