Suggestions on Storing Files

DLL Edition of the F-IN-BOX
zenkick
Posts: 6
Joined: Tue Sep 11, 2007 11:23 pm

Suggestions on Storing Files

Postby zenkick » Tue Sep 11, 2007 11:39 pm

I have a need to store a file that contains data generated from flash. The length of the data is arbitary.

If I use external interfaces, Flash tries to be "smart" about the data and attempts to type it prior to delivering to the external interface, resulting in a mess.

I don't have a problem book-keeping the actual type of the object and if necessary re-casting the object when flash wants to load it, but I can't find an easy way to handle creating a storage mechanism.

Poking around the source, it appears that I may be able to intercept CreateURLMoniker-- assuming that flash calls it internally. Would that be a decent path to take?

Any other suggestions?

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Sep 12, 2007 2:33 pm

Thank you for your question.

CreateURLMoniker is called when Flash tries to load something using URL.

Could you please explain me this moment:

If I use external interfaces, Flash tries to be "smart" about the data and attempts to type it prior to delivering to the external interface, resulting in a mess.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

zenkick
Posts: 6
Joined: Tue Sep 11, 2007 11:23 pm

Postby zenkick » Wed Sep 12, 2007 10:21 pm

Easiest explanation-- if I pass "foo" as an argument in an external interface, Flash sends it to the host as "<string>foo</foo>". If I pass a complex object, then Flash attempts to serialize it. If that object contains binary data, such as a bytearray, then all bets are off. If we encode that binary data with Base64, then it's better-- but it takes more memory.

We are now successfully intercepting flash.net.URLRequest from FiB, but still analyzing the payload of the com object so we can find the actual raw HTTP request. We have the source code, but it's slow going.

Since we are going to be dealing with data up to 20MB, I think it is a better approach to intercept an HTTP post than to use an external interface.

It also appears that we may be able to define our own URL "handler" eventually.

Thanks for a great product!


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 10 guests

cron