Page 1 of 2

Builder 5 Demo

Posted: Wed Mar 26, 2008 9:40 pm
by Searisen
Hi, I'm trying out your application component

I have tried your application using the pre-compiled versions, and the only way I could get my SWF file to load was to encode it using your Sample8 program, then run the encoded version.

Going from that, at least I got that to work, do I have to do the same with the component I have using Builder5?

I see the SWF file working just fine on the Form, but when I compile and run the program, I just get a blank form.

What is encoding, and what does it do? Why is it needed?

---

I also have Builder 2007, do you have a version for that yet?

Posted: Wed Mar 26, 2008 9:44 pm
by Searisen
I tried the encoded.eff in place of my swf file in the Movie box, it didn't work.

Posted: Thu Mar 27, 2008 6:55 pm
by Softanics
Thank you for your questions.

I've just downloaded the latest version. I installed the component into Builder C++ 5, added a TFlashPlayerControl to a form, set movie property to movie's path and built the project. The final EXE shows the movie as expected.

Re: Builder 5 Demo

Posted: Thu Mar 27, 2008 6:57 pm
by Softanics
Searisen wrote:I see the SWF file working just fine on the Form, but when I compile and run the program, I just get a blank form.


Just a blank form? You even don't see "DEMO VERSION" label at the center of a TFlashPlayerControl?

Searisen wrote:What is encoding, and what does it do? Why is it needed?


Do you mean the sample Sample8_Streaming?

Searisen wrote:I also have Builder 2007, do you have a version for that yet?


Not yet... We will upload the new version in the nearest time, it will support all new versions of Delphi and Builder.

Posted: Thu Mar 27, 2008 7:37 pm
by Searisen
I see the words DEMO VERSION in the middle of the otherwise blank form.

And yes the Example8_Streaming.

--

And when you said you downloaded the latest version, was that the latest demo version?

Posted: Thu Mar 27, 2008 7:57 pm
by Softanics
Searisen wrote:And yes the Example8_Streaming.


Sample #8 shows how to load a movie or a flash video byte-by-byte. In this example, the program loads encypted files, then decrypts it on the fly and pass it to the Flash Player.

Searisen wrote:And when you said you downloaded the latest version, was that the latest demo version?


Yes, I've just downloaded it from the http://f-in-box.com/delphi/download.html -- to be sure that we use the same versions.

Posted: Thu Mar 27, 2008 9:22 pm
by Searisen
Another question:

Q: Can I get information from Flash into Builder with your component?

Posted: Fri Mar 28, 2008 6:07 am
by Softanics
Searisen wrote:Another question:

Q: Can I get information from Flash into Builder with your component?


Yes, of course. Use fsommand, for example. In AS you write:

Code: Select all

fscommand("command", "arg");


In Builder, you handle OnFSCommand event.

Posted: Fri Mar 28, 2008 6:56 pm
by Searisen
After looking up fscommand() on adobe's help docs, they suggest using ExternalInterface class instead, as fscommand is no longer recommended. Does ExternalInterface work with your component?

Posted: Fri Mar 28, 2008 7:07 pm
by Searisen
Also, trying to get my client to view a compiled version of Builder, with your component running the SWF, do I need to send him the SWF? Or is the SWF compiled into the source?

Posted: Fri Mar 28, 2008 10:00 pm
by Searisen
I got FScommand to work, thanks for that help. I'm sure you have built in communication going from Builder to Flash. Can you point me in that direction?

Also I'm back to having problems loading the Flash app from the hard drive. I have absolutely no problem loading the file from my website, but for some reason I cannot use the same file from my hard drive no matter how I set the path. Even using a url from my home computer webserver, localhost/filepath.swf doesn't work. Its mind boggling to me.

Posted: Fri Mar 28, 2008 11:14 pm
by Searisen
I'm using...

Code: Select all

    AnsiString XML = "<point><x>25</x><y>-50</y></point>";
    FlashPlayerControl1->SetVariable("XML_String",XML);
    FlashPlayerControl1->CallFunction("BorlandDoCommand");


If this is the right method, I'm getting unable to find FLASHPLAYERCONTROL.PAS

when I try to execute that code.

Edit: Adding actionscript code so to help you see what I have going.

Code: Select all

         // testing fscommand coming back
         public var XML_String:String;
         
         public function BorlandDoCommand
         (
         )
         :void
         {
            fsCommand.text = "Received";
         }

Posted: Sat Mar 29, 2008 11:28 am
by Softanics
Searisen wrote:After looking up fscommand() on adobe's help docs, they suggest using ExternalInterface class instead, as fscommand is no longer recommended. Does ExternalInterface work with your component?


Yes, ExternalInterface is fully supported. See Samples\Builder6\Sample7_ExternalInterface from the demo zip, for example.

Posted: Sat Mar 29, 2008 11:31 am
by Softanics
Searisen wrote:Also, trying to get my client to view a compiled version of Builder, with your component running the SWF, do I need to send him the SWF? Or is the SWF compiled into the source?


It depends on how do you load the SWF. If you include the SWF into resource and load it from resource -- in this case, the SWF is embedded into final EXE and you don't need to provide the SWF with the application. If you load from the local file system, you should provide the SWF with the application.

Posted: Sat Mar 29, 2008 11:38 am
by Softanics
Searisen wrote:I got FScommand to work, thanks for that help. I'm sure you have built in communication going from Builder to Flash. Can you point me in that direction?


Yes, of course. Could you please explore this example from the demo zip:
Samples\Builder6\Sample7_ExternalInterface

It's for Builder 6, but it should help you to understand how to pass data from the builder code to flash and vs.

Searisen wrote:Also I'm back to having problems loading the Flash app from the hard drive. I have absolutely no problem loading the file from my website, but for some reason I cannot use the same file from my hard drive no matter how I set the path. Even using a url from my home computer webserver, localhost/filepath.swf doesn't work. Its mind boggling to me.


Could please send me this SWF to support (at) f-in-box.com -- I will test it.