|
|||
Version
www.capesoft.com Updated 16 November 2005 |
|||
Contents | |||
|
|||
|
The FeFlash Object | ||
|
The Templates | ||
|
|||
|
Useful References | ||
![]() |
Formerly known as the Flash file type / object, the FeFlash Object is used to display Macromedia Flash files. |
Class Methods | |||
name
|
description
|
||
Returns the number of the frame that is the flash movie is on. | |||
EventCallback | Used to trap events that the flash viewer generates and allow you to respond to them in your application. | ||
Retrieves various information from the Flash control. This is used to get the player settings and information. | |||
GetSWFHeader | Retrieves the file header information (includes information about the movie such as the size, framerate etc.) | ||
GetVariable | Gets the value of the variable in the Flash movie. These are variables used in any scripts that the file contains. | ||
Initialises the class, should be called before any other methods are (with the exception of GetSWFHeader). | |||
Cleans up and disposes allocated memory. If Init() is called then Kill() must be called before the procedure exits. | |||
Loads a file into the Flash control | |||
Moves forward or backward in the movie. Can move to the start or end as well as moving forward and backwardsby the specified number of frame. | |||
Pauses the playback of the currently loaded file | |||
Plays the currently loaded file | |||
Reload | Reloads the current file, resets the playback etc. | ||
Sets the value of a variable used in a Flash movie. Variables are declared in the Flash file and used in any scripts in the file. | |||
Stop | Stops playback | ||
Update | Updates the player settings and information, GetInfo retrieves this information and Update sets it. | ||
![]() CurrentFrame () ,long 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_MainExample procedure 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 code
|
EventCallback
( long EventID, string Parm1, string Parm2 )
,long ToDo
|
GetInfo
( )
ThisViewer1.GetInfo ( )
|
GetSWFHeader (*fwSWHeader pHeader)
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 *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 fHeader group(feSWFHeader)
|
GetVariable
( string pName ) ,string,proc
TempString = ThisViewer1.GetVariable ('Variable1')
|
Init
( long ParentControl, <string
LoadPath>, long Handle1=0, long
Handle2=0, byte SkipCallbacks=false ) ,byte,proc
ThisViewer1.Init (?feControl)
|
Kill
( )
ThisViewer1.Kill()
|
Load
( string CurrentPath, <long
CurrentControl> ) ThisViewer1.Load('c:\test.swf')
|
Navigate
( byte Location, <short PageNumber>, <string
Optionals> )
ThisViewer.Navigate(1)
|
Pause
( )
ThisViewer.Pause()
|
Play
( )
ThisViewer.Play()
|
Reload
( <long CurrentControl> )
ThisViewer.Reload()
|
SetVariable
( string pName, string pValue ) ,byte,proc
ThisViewer1.SetVariable
('Variable1',
'Hello world')
|
Stop
( )
ThisViewer.Stop()
|
Update
( string Property, string PropValue )
ThisViewer.Update('FlashQuality',1)
|
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. |
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.
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
See the FeFlash_Callbacks procedure in the feabc.app example application for more info.
Event Name: | Equate: | Description: |
OnReadyStateChange | fe:SWFEvt_OnReadyStateChange | |
OnProgress | fe:SWFEvt_OnProgress | |
FSCommand | fe:SWFEvt_FSCommand |
[end of document]