CurrentFrame
CurrentFrame () ,long
Description
Call this method to establish the currently loaded
frame of the flash file which is playing. The method returns the
number of the frame that flash movie is currently at.
TIP: See the
FeFlash_MainExampleprocedure
in the
feabc.app example application to see this method being used.
Parameters
None
Return Value
The return value is a long indicating which frame the movie is on,
with the movie starting at frame 1 and playing until
the last frame.
Example
Example |
code
if
FlashPlayer.CurrentFrame()
= FlashPlayer.GetInfo(FlashTotalFrames)
if
Message('Playback
Complete, would you like to play the movie again?',
'Play
Again?', Icon:Question,
Button:Yes +
Button:No) =
Button:Yes
FlashPlayer.Navigate(1)
FlashPlayer.Play()
else
FlashPlayer.Stop()
end
end |
EventCallback
EventCallback ( long EventID, string Parm1, string Parm2 ),long
Description
- Handles events fired by the Flash object. Each
time the Flash object (ocx) fires an event, this virtual method is
called, so
you can embed code in this virtual method to deal with those events.
- TIP: See the FeFlash_Callbacks
procedure in the feabc.app example application to see this method being
used.
GetInfo
GetInfo ( )
Description
- This method sort of has the "opposite
effect" to the Update
method, in that it "updates" certain
properties according to their current state at the moment in time
when you call the GetInfo
method. The following properties
are updated when you call this method:
- FlashTotalFrames
- FlashPlaying
- FlashQuality
- FlashScaleMode
- FlashAlignMode
- FlashBackgroundColor
- FlashLoop
- FlashMoviePath
- TIP: See the FeFlash_MainExample
procedure in the
feabc.app example application to see this method being used.
Example
Example |
ThisViewer1.GetInfo ( ) |
GetSWFHeader
GetSWFHeader (*fwSWHeader pHeader)
Description
Used to retrieve the header information from a SWF
File. This method reads a SWF file from disk and extracts the header
information from it. Becuase this method interacts with an actual
file on disk it is the only method in the class that can be called
without calling the Init method or even having a control on the window.
You can declare a class and use this method as a "standalone" way
to read the header information from an SWF file on disk.
Parameters
Parameter |
Description |
*fwSWHeader pHeader | :
A feSWFHeader group that contains the path of the SWF File to read. All other
fields in the feSWFHeader group are filled by the function with
the values retrieved from the SWF file. |
Return Values
Returns 1 for sucess and zero if the function
failed. If the method fails it calls the DbgMsg function to print
an error message in debug mode. The debug information can displayed
using a utility such as DebugView from www.sysinternals.com. See
the Debug and Logging section in the main documnetatio for more
information.
Example
Example |
fHeader group(feSWFHeader) end
ThisFlash class(feFlash)
code
fHeader.FilePath = LongPath() & '\Movie.swf'
if not ThisFlash.GetSWFheader(fHeader)
Message('Could not retrieve the header information for the selected SWF file')
end |
GetVariable
GetVariable ( string pName ),string,proc
Description
- TIP: See the FeFlash_Callbacks
procedure
in the feabc.app example application to see this method being
used.
Example
Example |
TempString = ThisViewer1.GetVariable ('Variable1') |
Init
Init ( long ParentControl, <string LoadPath>, long Handle1=0, long
Handle2=0, byte SkipCallbacks=false ),byte,proc
Description
- Handles initialization for the object, must be called
before you call any other methods.
Example
Example |
ThisViewer1.Init (?feControl) |
Kill
Kill ()
Description
- Handles the "closing down" of an object. Must be
called (typically) as the window which hosts the object is closed.
Example
Example |
ThisViewer1.Kill() |
Load
Load ( string CurrentPath, <long CurrentControl> )
Description
- Loads a document into the object.
- Do not pass anything in the second parameter. This
parameter should never be used, and is currently reserved.
Example
Example |
ThisViewer1.Load('c:\test.swf') |
Navigate
Navigate ( byte Location, <short PageNumber>, <string Optionals>)
Description
- Use this method to navigate within
a loaded file. TheLocation parameter can be one of the following:
- Goto the beginning of the loaded file
- Goto the previous page, or back one "step" or "frame"
- Goto the next page, or forward one "step" or "frame"
- Goto the end of the loaded file
- TIP: See the FeFlash_MainExample
procedure in thefeabc.app example application to see this method being used.
Example
Example |
ThisViewer.Navigate(1) |
Pause
Pause ( )
Description
- This method pauses the currently playing file.
Example
Example |
ThisViewer.Pause() |
Play
Play ( )
Description
- This method plays the loaded file.
Example
Example |
ThisViewer.Play() |
Reload
Reload ( <long CurrentControl> )
Description
- This method reloads the last document which you
loaded into the object.
- Do not pass anything in the second parameter. This
parameter should never be used, and is currently reserved.
Example
Example |
ThisViewer.Reload() |
SetVariable
SetVariable ( string pName, string pValue ),byte,proc
Description
- TIP: See the FeFlash_Callbacks
procedure
in the feabc.app example application to see this method being
used.
Example
Example |
ThisViewer1.SetVariable
('Variable1','Hello world') |
Stop
Stop ( )
Description
- This method stops playing the currently playing file.
Example
Example |
ThisViewer.Stop() |
Update
Update ( string Property, string PropValue )
Description
- Use this method to update various "properties" / "values"
for the object. Some times
these "values" are actual
properties of the File Explorer class, sometimes not. The reason
you use this method and don't just change the properties "directly"
is because using this method results in the changes being implemented
"immediately",
and not for instance only coming into effect the next time you load
a document into the object which is often the
"default" behavior. The Property parameter can be
one of the following:
- Html1PrinterHeader
- Html1PrinterFooter
- Html1PrinterOrientation
- FlashQuality
- FlashScaleMode
- FlashBackgroundColor - takes a numeric value, e.g.
ThisFEObject.Update('FlashBackgroundColor',0FFFFFFH)
for a white background - note: no quotes.
- FlashLoop
- TIP: See the FeFlash_MainExample
procedure in the
feabc.app example application to see this method being used.
Example
Example |
ThisViewer.Update
('FlashQuality',1) |
FeFlash - Properties (alphabetical)
FlashTotalFrames (Long) | This property holds the number of frames
which the currently loaded Flash file contains. Use the GetInfo
method to update the value of this property. |
FlashPlaying (Byte) | Holds true (1) if a file is currently
playing, or false (0) if not, or if a loaded file is paused. Use
the GetInfo
method to update the value of this property. |
FlashLoop (Byte) | Sets whether the loaded flash file will play
once, or loop continuously. Use the GetInfo
method to update the value of this property. |
FlashMoviePath (String) | Holds the path / url of the loaded flash
file. Use the GetInfo
method to update the value of this property. |
Class Properties
This section lists useful properties of the class that can be set directly. In
many cases the class properties are set by methods, which may also modify other
associated properties etc. Properties that should not be modified without using
the methods provided are not covered in this section
.
Data Types and Equates
This section lists useful properties of the class that can be set directly. In many
cases the class properties are set by methods, which may also modify other
associated properties etc. Properties that should not be modified without using
the methods provided are not covered in this section
.
feSWFHeader group, type
The SFWHeader group is used in conjunction with GetSWFHeader method to get the
header information from an SWF file. The GetSWFHeader supports both
compressed and uncompressed SWF files, and loads the file from disk, so you
don't actually need an feFlash control, and feFlash.Init() does not need to
be called in order to use this method.
Fields
Fields |
Name | Data type |
Description |
FilePath | string(300) | The path of the file to load and retrieve the header information for. If the
file is in the current path this can be the name of the SWF file, otherwise
the SWF filename and the full path should be used. |
Signature | string(3) | A three character string that contains the SWF signature indicating that the
file is a SWF file. If this is a standard Flash file the signature will
be 'FWS', if it is a compressed Flash file it will be 'CWS'. Any other
value indicates an invalid file. |
Version | byte | The Flash version of this file. |
FileSize | ulong | The size of the file. |
DiskFileSize | ulong | The actual size of the SWF on disk. |
Width | long | The width of the movie in pixels. |
Height | long | The height of the movie in pixels. |
Rate | decimal(4,2) | The frame rate that the movie plays back at. |
Count | ushort | The total number of frames in the movie. |
Example
fHeader group(feSWFHeader)
end
ThisFlash class(feFlash)
code
fHeader.FilePath = LongPath() & '\Movie.swf'
if not ThisFlash.GetSWFheader(fHeader)
Message('Could not retrieve the header information for the selected SWF file')
end
At this time there is quite an overlap
in terms of multiple File Explorer classes being implemented by the same templates.
In the future we may revisit this, but for now all templates are covered in
the main (FileExplorer.htm) help document, please click
here.
SWFHeader