-
[F8] ExternalInterface with C#.NET ActiveX Container
I want to transmit JPEG image data from C# to Flash SWF, in order to display it in SWF.
After I had written a JPEG data as a file on hard disk in C#,
I sent the filepath to Flash SWF, by using AxShockwaveFlash like:
Code:
xmlRequest =
"<invoke name=\"DisplayJpeg\" returntype=\"xml\">" +
"<arguments>" +
"<string>C:\\temp\\thisimage.jpg</string>" +
"</arguments>" +
"</invoke>";
xmlResponse = oAxShockwaveFlash.CallFunction (xmlRequest);
And, in the ActionScript file in Flash, I used following code:
Code:
import flash.external.ExternalInterface;
...
ExternalInterface.addCallback ("DisplayJpeg", this, doDisplayJpeg);
...
public function doDisplayJpeg (filePath:String):Void
{
aLoader.contentPath = filePath;
...
}
It works fine, but it takes longer time due to the disk write/read operations.
Is there any way avoiding disk write/read to display JPEG image in the Flash SWF?
[Q1] Can I send binary data through AxShockwaveFlash CallFunction, from C# to Flash?
[Q2] Can I get the binary data in an ActionScript variable in Flash; and display it thru Loader, or thru other component?
Thanks,
Joseph
-
I know this is a very old post but It may help someone.
In terms of passing binary data, you can set the value of a textbox "VBCalling" in Flash from VB using something like this:
Code:
Call AxShockwaveFlash1.SetVariable("VBCalling", 1)
If you are looking to send a string you could do something like this:
Code:
Call AxShockwaveFlash1.SetVariable("VBCalling", yourString)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|