|
|||
|
SWFKit Components
download the mxp installer, source code and sample(Updated at 2005.5.6, fixed a bug in the trigger component) SWFKit Components contain a series of Flash components provides features like protecting your swf movies in SWFKit, changing screen resolution, launching external executable files, calling action script functions and displaying windows dialog boxes such as message box, file open dialog box, file save dialog box and folder browsing box. In current version, all the components can work with SWFKit Express, SWFKit and SWFKit Pro. Note: the components must be work with SWFKit series, or it won't work. That is to say, unless you're preparing to convert the swf movies to exe files, the components are useless. 1. Protection The protection component makes your swf movies be blank out of swfkit. Just add a "Protection" into the first frame of your swf movie. It will always be blank unless it's converted to an executable file by using swfkit. 2. RunApp This components helps you to launch external executable files. The "exec" FSCommand of Flash has many restrictions, this component improves it. It has three properties ***i) Application - specifies the name of the application to run. E.g. ******c:\myapp\test.exe ******test.exe ******fscommand\test.exe ***ii) Parameters - specifies the parameters to be passed to the application to run ***iii) Path - It can be one of the following 4 values: ******a) Same of the application path: The "Application" method specifies an application in the same folder of the application which the swf movie is about to convert to. Note: the exec fscommand requires the exes to be in the "fscommand" folder, if you're rewriting the fscommand using this component, you must specify the proper exe name. E.g. ******fscommand:******fscommand("exec", "myapp.exe") ******RunApp component:***Application: fscommand\myapp.exe; Parameters blank);Path:Same of the app path******Of course you can move all the exe files in the fscommand folder to their parent folder and specify the "Application" property without "fscommand\", for the example, just "myapp.exe", no longer "fscommand\myapp.exe" ******b) In the attachment list: the applications are added into the attachment list of SWFKit ******c) Absolute path name: the "Application" property specifies a full path name, including the drive name ******d) System path: such as notepad, calculator, and so on ****** 3. Screen Resolution This component uses DirectX to change the screen resolution and make your application run in full screem mode. Some swf movies especially some games run fast in a low screen resolution or window mode and run slowly in full screen mode with a high screen resolution. This component helps you to choose a lower screen resolution and makes your application run in full screen mode as fast as in window mode. 4. Trigger This component makes the calling of the Action Scripts from within SWFkit easy. By specifying a TriggerHandler method or adding a handler method by using the "addHandler" method of this component, you can easily call the handler method by setting its "fArg" property. How to work with it: ***i) add a "Trigger" component into your swf movie and specify a name for it, for example "trigger" ***ii) add a handler method, there are two ways: ******a) set the "TriggerHandler" of the component to "onTrigger" and add an onTrigger method onto the stage *********function onTrigger(component, value) *********{ ************// the component parameter is the Trigger component itself ************// the value is a string passed by swfkit ************trace(value); *********} ********* ******b) leave the "TriggerHandler" property to blank, add the following code onto the stage *********function onTrigger(value) *********{ ************// the value is a string passed by swfkit ************trace(value); *********} *********trigger.addHandler(onTrigger); ********* ******in this way, you can add more than one handler for the trigger component. SWFKit will call all these handlers at one time ****** ***iii) create a new swfkit project with the swf movie ***iv) in ffish script use the following code to trigger the "Trigger" component, that is to say, call its handler. If you have added more than one handlers for the component, all of them will be called ******FlashPlayer.setVariable("trigger.fArg", "the string to pass to the handlers in action script"); ****** 5. Browse This component launches a folder browsing dialog box for choosing a folder and returns the folder name. It has the following properties ***i) title - the title of the dialog box ***ii) initPath - the pre-selected folder in the dialog box ***iii) CloseHandler - a callback method to receive the chosen folder name. This method will be called when the dialog box is closed and a folder has been chosen. If no folder has been chosen, it won't be called. E.g. *** ******function onClose(component, name) ******{ *********// component: this component *********// name: the name of the chosen folder *********trace(name); ******} ****** 6. FileOpen This component launches a file open dialog box for choosing a file or files to open and returns the file name(s). It has the following properties ***i) filter ***ii) default extension ***iii) multiple selection - if the dialog box allows to select more than one files. ***iv) CloseHandler - a callback method to receive the chosen file name. This method will be called when the dialog box is closed and at least one file has been chosen. If no file has been chosen, it won't be called. E.g. *** ******function onClose(component, filename) ******{ *********// component: this component *********// filename: an array contains the chosen files *********trace(filename); ******}********* ****** 7. FileSave This component launches a file save dialog box for choosing a file or files to save and returns the file name(s). It has the following properties ***i) filter ***ii) default extension ***iii) CloseHandler - a callback method to receive the chosen file name. This method will be called when the dialog box is closed and a file name has been specified. If no file has been specified, it won't be called. E.g. *** ******function onClose(component, filename) ******{ *********// component: this component *********// filename: the name of the specified file *********trace(filename); ******}********* 8. MessageBox This component launches a message box. When the message box is closed, it will call the close handler method. E.g. *** ******function onClose(component, result) ******{ *********// component: this component *********// result: the button clicked, it can be "OK", "Cancel", "Yes", "No", "Retry", "Abort", "Ignore" *********trace(result); ******}********* |
|
|||
|
Hi
@Luckyriz -> Adobe (Macromedia) Exchange 1.6 But all runapp, fileopen and more buttons work very slow with Flash 8. Why do you not work sample supporting Flash Player 8? Gb SnakeMedia
__________________
Sorry I am deaf! I have problem with eys... Thanks! |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|