F-IN-BOX v4.8 for Delphi 10.3 Rio
F-IN-BOX v4.8 for Delphi 10.3 Rio
F-IN-BOX is a Delphi / C++ Builder / VCL component to enhance Macromedia / Adobe Flash Player ActiveX features. It does not use its own engine to display movies but provide a wrapper around official swflash.ocx/flash.ocx code instead. Thus it is possible to avoid certain Macromedia / Adobe Flash Player ActiveX limitations.
Features
Load flash movies directly from any source (no temporary files!). Protect your flash movies.
Create flash-enabled applications which are ready to work even when the Macromedia / Adobe Flash Player ActiveX is not installed!
Transparency is fully supported!
Ability to play Flash Video (FLV) from stream
Enable/disable flash sounds
Adjust sound volume
Get a snap image of the current flash movie frame
Write code which is compatible with any version of Macromedia / Adobe Flash Player ActiveX.
Flash External API
Streaming
Use Cases
How to play FLV (Flash Video) in Delphi?
How to play SWF files in Delphi?
Load flash movies directly from any source (no temporary files!). Protect your flash movies.
It is known fact that the Flash Player ActiveX is able to load movies at certain URLs only. You have to save the movie to a temporary location from your application's resource before you can load it. You'll have to generate a corresponding link that you can pass to the Flash Player ActiveX and then delete the movie after. You'll have to admit that this is extremely inconvenient. Apart from being inconvenient there is a chance you'll fail when you try to create a temporary file if you don't have the appropriate permission or don't have access to a temporary folder. It is definitely not an appropriate approach when security is an issue since your movie can be easily intercepted. There is a solution! F-IN-BOX uses a different approach of swflash.ocx/flash.ocx code loading. It is able to load your movies directly to the ActiveX thereby avoiding the temporary file step. Load flash movies from any TStream descendant (TResourceStream, TMemoryStream, etc.)! The advantages are pretty obvious. And you can also protect your movies from unauthorized access using your favourite software protection application.
Using the component you can load any flash movie from any stream object. Just use the LoadMovieFromStream and PutMovieFromStream methods. No temporary files! Load any flash movie on-the-fly from any supported source. For example, you can put one or more flash movies in the resource section of your application and then load it from the exe! That's the portability and power of F-IN-BOX!
Create flash-enabled applications which are ready to work even when the Macromedia / Adobe Flash Player ActiveX is not installed!
One of the biggest problem using the Flash Player ActiveX is the mandatory component registration. The common approach is to save swflash.ocx/flash.ocx code to temporary files and then register them. The disadvantages are the same as above mentioned - insufficient permissions to save and register an swflash.ocx/flash.ocx. Now you can forget about these problems! F-IN-BOX is able to use swflash.ocx/flash.ocx from any source. For example, you can put an swflash.ocx/flash.ocx code inside of your application's resources and instruct F-IN-BOX to use it. It is important to note that F-IN-BOX does not use temporary files and swflash.ocx/flash.ocx registration but loads and uses the code directly. No more user management rights problems - no more temporary files and no more component registrations. It is up to you to decide what swflash.ocx/flash.ocx to use - by default already registered component is used.
Traditionally, there are many obstacles or annoyances that one will encounter when using Macromedia / Adobe Flash Player ActiveX in an application.
The Application...
needs swflash.ocx/flash.ocx installed in the system before it will work.
has to work flawlessly with the already installed version of the Macromedia / Adobe Flash Player ActiveX.
has no easy way to prevent flash movies from being abused.
F-IN-BOX to the rescue. It solves these problems and more!
By default, the component will use the swflash.ocx/flash.ocx that's already installed on the system. The component can alternatively use any swflash.ocx/flash.ocx that you would like to provide it with using any supported source. An example of this how you can embed the flash.ocx into the resource section of your application's exe file and then load it at runtime. Using this method, your application will work even if the Macromedia / Adobe Flash Player ActiveX doesn't exist on the target system. With F-IN-BOX, hassling around with Macromedia / Adobe Flash Player ActiveX installation issues are a thing the past! It's so easy to do!
Transparency is fully supported!
Using FlashPlayerControl you are able to create applications based on transparent flash movies. You can create applications with translucency non-rectangle forms (windows). Use Flash to make applications with modern user interface, make a business logic using Delphi or Builder C++.
Use TTransparentFlashPlayerControl Component to work with transparency:
Put TTransparentFlashPlayerControl on a form.
Set MakeParentTransparent property to True. That's all!
Ability to play Flash Video (FLV) from stream
Using FlashPlayerControl you are able to play Flash Video (FLV) from external files, URL or directly from a TStream. When TFlashPlayerControl loads Flash Video no temporary files are created everything runs directly from memory. You can encrypt your video and put into application's resource - TFlashPlayerControl loads FLV without ever saving or extracting the file to disk. If you need to play a big FLV or the speed is not very good, read about Streaming feature.
Write code which is compatible with any version of Macromedia / Adobe Flash Player ActiveX
One of the problem with Macromedia / Adobe Flash Player ActiveX programming is that you have to control what version of Macromedia / Adobe Flash Player ActiveX you are using. For example, the property "Stacking" exists only in Macromedia / Adobe Flash Player ActiveX 5 but doesn't exist in later revisions. F-IN-BOX automatically detects what Macromedia / Adobe Flash Player ActiveX version is being used and prevents failure if access to non existant properties/methods is attempted. Applications using F-IN-BOX are not only compatible with any version of Macromedia / Adobe Flash Player ActiveX, but are also "smart" about how Macromedia / Adobe Flash Player ActiveX control is used. This makes your application more robust which can result in fewer technical support issues.
Streaming
Streaming is an ability to load the content in the asynchronous mode. If you load a movie using LoadMovieFromStream, the movie is loaded into LoadMovieFromStream. If your movie is large, it may take some time. Another example: you have encoded an SWF/FLV file and want to load it into the player. If you use LoadMovieFromStream, the player will play the file only after all of the data is decoded . That's why the ability to provide content in the asynchronous mode is important.
Loading an external resource (*.flv - flash video, *.swf, *.jpg, *.mp3) by full path (i.e. beginning with http://) in the asynchronous mode
Instruction:
set the global resource handler. Use the global procedure FlashPlayerControl.SetGlobalonloadExternalResourceHandlerEx;
a movie loads a flash video from a "private" URL ( http://FLV/FlashVideo.flv);
the handler is called. You compare the passed URL with "http://FLV/FlashVideo.flv". If they are equal, set bHandled to "true" and use the passed Stream to write the content of FLV;
after all the data has been provided, free the stream;
Remarks:
you get a stream assigned with a resource in a handler. Set the handler using the global FlashPlayerControl.SetGlobalonloadExternalResourceHandlerEx procedure;
if you write data in a separate thread, call Write using Synchronize;
if Write returns 0, loading has been cancelled (for example, another movie is being loaded);
free the stream when loading is finished. Even if loading has been cancelled;
A movie is loaded using LoadMovieFromStream, PutMovieFromStream, LoadMovieUsingStream or PutMovieUsingStream. A movie loads an external resource (*.swf, *.jpg, *.mp3, but except *.flv - flash video) using its relative path (i.e. something like "images/image1.jpg"). You should provide the resource in the asynchronous mode
In this case you should handle the event onloadExternalResourceEx.
Remarks:
you get stream assigned with a resource in a handler of the onloadExternalResourceEx event. Check the passed URL and if you are ready to provide the content, set bHandled, passed as a reference, to true, use the passed Stream to write the content;
if you write data in a separate thread, call Write using Synchronize;
if Write returns 0, loading has been cancelled (for example, another movie is being loaded). Don't forget to free the stream!
free the stream when all the content has been written;
Builder C++ only: sometimes Builder C++ creates onloadExternalResourceEx event handler with bool bHandled instead of bool& bHandled. If it happened, change bool to bool& in a header file and in a source file;
Only for V.I.P
Warning! You are not allowed to view this text.