               PowerFlic 32bit Component v1.00beta for Delphi v3.00
                                      by
                                   Yaron Gur


                     E-Mail    : yaron@earthling.net

                     Home Page : http://bez.home.ml.org



Beta:

This is the first release of the PowerFlic component, and it may
contain bugs or "features" im not aware of, if you find any, please
email me.



Introduction:


The original PowerFlic was and is a stand alone program to play flic files under
windows 95 (and perhaps NT 4).

However,  a lot of people asked me how can they incorporate flic playing in their
own projects.

The answer is here, PowerFlic is a fully 32bit component with multithreaded
architecture.

Operating it is simple yet it features a lot of interactive options.




Features:

* Fully 32bit, no 16bit DLL lurking around.
* Interactive Real-Time Speed control.
* Interactive Real-Time Brightness control.
* Interactive Real-Time Contrast control.
* Fully multi-threaded architecture, play several flics at the same time.
* Supports events for Frame Advance, Loop Event and a Stop Event.
* Support easy retrival of flic information.




Limitations:

My stand alone player has been out on the market for over a year now,
and although i recieved nice comments about it, only one person actually
registered it.  Although the player was released as shareware i kept
it fully functional without any time limit.

However, this component will go out as an annoying shareware, this means
that if you really want it to be fully functional, you'll have to register it.

I have placed the following limitations

* Playback will stop automaticly at random intervals.
* The powerflic component interface will surface instead
  of a flic frame randomly.

Also, due to the multi-threading approach taken by this flic component,
i had to take out the 32bit ASM optimization i have in the stand alone
flic player.  The ASM optimization was making playback unreliable.

I've also noticed that if you play at VERY little delay (i.e. FAST)
on very small flics (like the ones i supplied with this component),
windows get confused and starts writting it's text output at the
top left part of the screen.  This is probably due to thread desync.

One more remark, when playing at 256 color modes, you CAN NOT play more
than one flic at a time since it's a 256 color mode, and does not have
512 colors for playing 2 flics at the same time.  You may be able to
play two or more flics if they all use the same palette.





Installation:

1. Load Delphi 3
2. Under components go the "Install Packages"
3. Press "ADD"
4. Go the the dir you unzipped the archive
5. Select PowerFlic.dpl
6. Press open

Note: Make sure your unzip program supports long file name,
      otherwise rename : PowerFl~.dcp -> PowerFlic.dcp
                         PowerFl~.dpl -> PowerFlic.dpl

The component should now appear in the "Samples" palette.

After installing the component, open up the sample.zip file
and then load fliccomp.dpr and run it.






Properties:

Color             : TColor  - Used only for designing comfort, 
                              has no effect on playback
FileName          : String  - The flic file name you are about to load.
Caption           : String  - The caption that appears at the center of
                              the component.  Again, only used for designing.
Contrast          : Double  - This Floating point number represnts the contrast
                              given to the flic output.  A contrast of "1.0" means
                              no difference.  Any number over 5 is somewhat useless.
                              This setting is interactive, and can be changed during
                              playback.
Brightness        : Byte    - This 0-255 number changes the brightness of the flic
                              output, a number of 255 will make the flic completely
                              white.  As with the contrast, this property is fully
                              interactive and can be changed during playback.
PlayFrom          : Other   - This two option selection allows you to select where
                              the flic will be played from.  Your option is either
                              the hard disk or from RAM.  RAM playback is A LOT
                              faster but ofcourse takes RAM (about the size of the
                              flic).  Do NOT change this setting during playback or
                              after you opened the flic.  You can change it while a
                              flic is open but you must call the open method again
                              for it to work corrently.
PlaySpeed         : Other   - This two option selection allows you to select how
                              PowerFlic will handle the playback speed.  You can
                              select either to play the flic using it's original
                              internal speed settings, or to use the custom speed
                              setting.
CustomSpeed       : Integer - This integer allows you to select the delay in
                              millisecond between each frame (only works in
                              PlaySpeed is set to plCustom).
LoopPlayback      : Boolean - If this option is enabled the flic will loop itself
                              when it finishes playing and will continue until the
                              program is terminated on the "Stop" method is called.
AutoSize          : Boolean - This option allows you select if the component
                              will resize itself to fit the flic size.  If this
                              option is off, the "OnNewSize" event would not be
                              called (Resizing occurs after calling "Open").
ReadBig           : Boolean - ReadBig effects the way a flic is read from the hard
                              disk.  Rather than loading the flic by reading it
                              chunk by chunk, ReadBig reads an entire frame and
                              pharses it in memory.  This MAY improve hard disk
                              playing speed, but will take a little more memory.
                              ReadBig has no effect when playing from memory.
Extend256Palette  : Boolean - This option is only useful in 256 color mode.
                              Since windows takes 20 colors out of the 256 color
                              palette PowerFlic is forces to map these 20 colors
                              into a 236 color palette thus reducing color quality.
                              With Extend256Palette, powerflic forces windows to
                              give it the remaining 20 colors, however, when using
                              this, windows itself will be forced to use the flic's
                              palette and map the windows interface into it.



Events:

OnLoop                      - When enabled with "LoopPlayback = True" this event
                              pops up each time a flic finishes a complete
                              playback loop (i.e. all frames have been played).
OnStop                      - This event pops whenever playback is stopped, either
                              by the flic finishing playback, or by a manual call.
OnNewSize                   - When a flic is opened and the AutoSize property is
                              enabled, the component resizes itself to fit the
                              width and height indicated by the flic header.
OnFrameChange               - This event pops whenever a flic has finished
                              displaying a single frame.



Methods:

Open                        - Opens the flic file indicated by the filename
                              property.  Make sure the file is actually there.
Play                        - This method starts the flic playback.
Stop                        - This method stops the flic playback.
QueryFlicInfo(InfoPtr)      - This method gets various info on the flic status
                              you pass it an address to a var of type TFlicQuery.



Structures:

PowerFlic contain only one structure, it is used to query the component
for various information reguarding playback and the flic internal settings.


  TFlicQuery  =
  Record
    Width         : Integer;
    Height        : Integer;
    Speed         : Integer;
    Frames        : Integer;
    CurrentFrame  : Integer;
    FramesPlayed  : Integer;
    Format        : (frOLD,frNEW);
    Status        : (stPlay,stStop,stNone);
  End;






Usage:

You can find an example project that shows most of the PowerFlic features.






Special Thanks:

I would like to thank all the people who mailed me, EMAIL is IMPORTANT.

Oh, and don't forget the people on #3dsmax & #delphi on Efnet, come visit
me there, my nick is [Bez].






Licence:

The PowerFliC 32bit component for Delphi 3.0 is released under the
Shareware Concept.  It may be tested for a 30 day trial period and
then registered or erased.

The author DOES NOT give warrenty to the functionability of this program.
It may, or may not work.  If handled incorrectly, it may even cause damage
(no damage should happen by this software, but i want to cover my back...).

Furthermore, this program was designed to work with Windows 95 and possibly
NT 4, and not on any other Operating System.  It will surely not work with
Windows 3.11 (even with the Win32s, and might not work on NT4).

The sample graphics used in both flic files is copyright by Yaron Gur
and may not be used for any purpose whatsoever without his concent.





Registeration:

For a single company productions  : 50$  (U.S.)
For the compelete source code     : 500$ (U.S.)

You may NOT under any condition sell, licence or loan any
registered code bought from this Author.


Money and Cashier cheque orders should be made out to:

Yaron Gur
17 Hatishbi st.
Haifa, israel
34527







Questions?  feedback? flaming?  the latest version???


If you have any questions, bug reports or you just want to comment about this software,
send internet e-mail to:

Yaron Gur at <yaron@earthling.net>

For links to the latest version, or just for kicks, visit my home page at:

http://bez.home.ml.org

On the page you will also find information on 3D design and rendering,
and some of my rendering works.
