NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Mon Jun 01, 2009 4:24 am Post subject: C# calling flash func |
|
|
I was told that you guys might know this better than the "flashers"
| CrisNMP wrote: | | What? You do realized that CallFunction is used to interact with flash and needs to be set up on both sides, it can't be used for calling any function you want in a swf. This goes to both of you since I'm not sure what OP wants. |
Ofc I use ExternalInterface to make the interaction. Bellow are parts of my code.
AS
| Code: | ExternalInterface.addCallback("Scan",null, function (Level : String) : String
{
//Scancode I no tell you.
});
|
c#
| Code: |
try
{
MessageBox.Show(axShockwaveFlash1.CallFunction("<invoke
name=\"Scan\" returntype=\"xml\"><arguments><string>" + test +
"</string></arguments></invoke>"));
}
catch(Exception ex)
{
MessageBox.Show("Fel" + ex.StackTrace, ex.Message );
}
|
| Epic Cat Garfield wrote: | | You should just use flash, its very simple than |
I allreday got it working without methods but now I would like to add interaction between c# and AS. Any help is appreciated.
edit :
Is this an invalid call? Becuase flash has a method called Scan which has a callback. It takes a string as a argument. The syntax looks 100% proper.
| Code: | | <invoke name="Scan" returntype="xml"><arguments><string>_root</string></arguments></invoke> |
_________________
Intel over amd yes. |
|