Is there any method to save files in local disk directly?

F-IN-BOX for Delphi / Builder C++ / VCL
lakeman2000
Posts: 1
Joined: Thu May 28, 2009 3:32 am

Is there any method to save files in local disk directly?

Postby lakeman2000 » Thu May 28, 2009 3:41 am

On the f-in-box platform,is there any method to save files(png file etc.) in local disk directly except using sharedObject, externalinterface?
Or,is there any method to enable the sharedObject works properly without Error #2130( Unable to flush sharedObject ) occurs?

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

Postby Softanics » Thu May 28, 2009 9:00 am

Thank you for your question.

Yes, it's possible.

The main idea is that you can send commands to your Delphi application from flash, so all the job in saving files can be done by your Delphi code.

Regarding your task. I suggest you the following way.

Use External Interface:
http://www.f-in-box.com/delphi/features ... _app2flash
to pass data from a movie to an application.

You can encode the binary data into a text form (like this "\x45\x56\x89"), then decode it into the application and save the data into a file.

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

andreaarg
Posts: 14
Joined: Tue Aug 26, 2008 11:53 pm

Postby andreaarg » Thu Jul 16, 2009 7:28 pm

I've tried this encoding binarydata using base64, but when delphi receives the flashcall event, the line feed/carriage return characters are missing, replaced by blank spaces, and the string is not decodable.
I've solved it using a StringReplace to restore the characters, but when sending a large amount of data, StringReplace is really slow.
I also tried to use "escape" and "HTTPDecode" (URLEncode), but it doesn't work, resulting string after HTTPDecode is not base64 decodable.

Can you recommend any other way to solve this? maybe using a different encoding that doesn't introduce line feeds?

Thanks in advance.

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

Postby Softanics » Fri Jul 17, 2009 1:00 pm

Thank you for your question.

Frankly speaking, I have no ideas how to avoid this problem.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

andreaarg
Posts: 14
Joined: Tue Aug 26, 2008 11:53 pm

Postby andreaarg » Tue Oct 06, 2009 1:29 pm

I've found a solution to my problem with StringReplace: using FastCode Project StringReplace instead of the standard Delphi one.
Just in case someone else has this problem...: http://fastcode.sourceforge.net/

Regarding lakerman2000 problem, Flash 10 introduces FileReference class which let's you save files directly to disk. I've tried it and it woks fine when running the Flash movie within a Delphi application using F-IN-BOX.



Andrea.


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 25 guests

cron