Source language: Translate to:

New Plugin "nzPlugin Flash Media" released !

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Postby Gaev » Fri Apr 28, 2006 6:51 am


Thank you for the useful tip.

1) If I place this command in the last frame of my Main.swf file ... with the Flash object configured NOT to Loop ...

- Main.swf will freeze on the last frame
- But myOther.swf will "disappear" (not freeze)

2) Say I have this scenario ...

- Main.swf plays for 10 seconds
- MyOther.swf is started in _level1 after 5 seconds
- MyOther.swf plays for 4 seconds

If user invokes FlashPause/FlashStop ...

a) before 5 seconds ...

- animation will freeze at the current frame ; this is as expected

b) after 5 seconds but before 9 seconds ...

- Main.swf will freeze at current frame
- but MyOther.swf will continue playing until the 9 second mark (5 plus 4)
- and MyOther.swf will then "disappear" (not freeze on its last frame image)

Is there any way to "consistently" have "the main" and "all subordinate" movies play/pause in sync. ?

On the subject of my other previous post on this forum (i.e. suggested enhancement about "scene" commands), can you share your thoughts/response ? ... if you do not anticipate making such an enhancement, I will look elsewhere (external program or another plugin) to do the heavy lifting (Loop'ing) to generate the thousands of nz_SWF_LAYER commands ... which I will then feed into your plugin.
User avatar
Posts: 3757
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Chris » Mon May 01, 2006 7:55 am


nzPluginFlashcreate UPDATE.

Add a nz_SWF_WAIT function to pause in a flash file write with plugin.

nz_SWF_WAIT(2, return) pause movie 2 seconds in flash animation.

To wait, this function add the (FPS * second) last frame drawed in your flash file ...

Register user receive plugin Update

User avatar
Posts: 22
Joined: Sun Oct 30, 2005 5:02 am
Location: France

Postby Gaev » Fri May 05, 2006 1:04 pm


a) Another suggestion ...

For the plugin commands nz_SWF_LINK and nz_SWF_ACTION ... would it be possible to specify "internal flash commands" ? ... e.g. ...
Code: Select all
nz_SWF_ACTION "flash:GoToFrame" "120" "[nzReturn]"

nz_SWF_ACTION "flash:Pause" "" "[nzReturn]"
nz_SWF_ACTION "flash:Stop" "" "[nzReturn]"
nz_SWF_ACTION "flash:Play" "" "[nzReturn]"

nz_SWF_ACTION "flash:Sound.Start" "objectID" "[nzReturn]"
nz_SWF_ACTION "flash:Set.Volume" "0 ... 100" "[nzReturn]"
nz_SWF_ACTION "flash:Sound.Stop" "objectID" "[nzReturn]"

... I know (some of) this can be accomplished by calling a function in the movie's projector (Internet Explorer or NeoBook etc.) ... and have them make the same request to the Flash Player ... but being able to do it from inside the movie would be more convenient and generic ... would work even if someone double clicked on the .swf file (without a container).

b) Follow up ...

Do you have any response to my previous observation about behaviour of _level1 (... to _levelN) movies vs. the main movie ... when you "Pause/Stop" the main movie ... the problem I described makes such a facility of limited use ... however, if you are working on a fix, it would be nice to know.
User avatar
Posts: 3757
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Gaev » Thu May 11, 2006 6:33 pm


a) Still awaiting response to my previous enquiries ...

b) Additional enquiry related to "time to build a .swf file"

On my Athlon 3500 machine, a movie that required 744 nz_SWF_LAYER commands and 81 nz_SWF_FRAME commands took 5 seconds to execute ... data for the 744 nz_SWF_LAYER commands was read from a text file containing information in a csv format.

This may not sound too bad ... but this was just a 4 second movie (at 20 FPS) ... and on a more average machine (say half as fast), the time taken to build such files may prove to be unappealing.

I realize that NeoBook scripts were not developed for this kind of heavy lifting ... I have laready off loaded the creation/sorting of the csv format records to an AutoIt program (which does it in less than 1 second) ... and was wondering if the plugin (which is just a renamed dll file) can be called from AutoIt as well ... which has the following command to define a "dll interface" ...

DllCall ( "dll", "return type", "function" [, "type1", param1 [, "type n", param n]] )

... I have taken the liberty of reproducing the detailed help for this command ...
dll - The filename of the DLL to use. eg. "user32.dll". A handle obtained from DllOpen can also be used (See Remarks).
return type The return type of the function (see below).

function - The name of the function in the DLL to call, eg. "MessageBox"

type - [optional] The type of the parameter (see remarks).

param - [optional] The actual parameter (see remarks).

Return Value

If a dll filename is given then the DLL is automatically loaded and then closed at the end of the call. If you want to manually control the loading and unloading of the DLL then you should use DllOpen and DllClose and use a handle instead of a filename in this function.

You can have as many "types" and "param" as you like. See the examples below that use a number of parameters.

Valid Types are:
none - no value (only valid for return type - equivalent to void in C)
short - a 16 bit integer
int - a 32 bit integer
long - a 32 bit integer
short_ptr - a pointer to a 16 bit integer
int_ptr - a pointer to a 32 bit integer
long_ptr - a pointer to a 32 bit integer
str - a string
wstr - a wide character string (converted to/from an ANSI string during the call)
hwnd - a window handle
ptr - a general pointer (void *)

If the function call fails then @error is set to 1. Otherwise an array is returned that contains the function return value and a copy of all the parameters (including parameters that the function may have modified).
$return[0] = function return value
$return[1] = param1
$return[2] = param2
$return[n] = paramn

; Example 1 - calling the MessageBox API directly
$result = DllCall("user32.dll", "int", "MessageBox", "hwnd", 0, "str", "Some text", "str", "Some title", "int", 0)

; Example 2 - calling a function that modifies parameters
$hwnd = WinGetHandle("Untitled - Notepad")
$result = DllCall("user32.dll", "int", "GetWindowText", "hwnd", $hwnd, "str", "", "int", 32768)
msgbox(0, "", $result[0]) ; number of chars returned
msgbox(0, "", $result[2]) ; Text returned in param 2
... if this is possible, could you provide details of the DllCall command that should be used for each of the nz_SWF_xxxx commands ?
User avatar
Posts: 3757
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Gaev » Tue Jun 06, 2006 5:31 am


By the time you read this you might already be aware of this situation vis-a-vis your nbPluginSWFcreate plugin (as I had discussed it with Dave first).

Starting with v5.0.4, NeoBook has enhanced the interactions possible with the swf movie playing in its Flash Objects i.e. instead of just servicing FSCommands with a command-value of "NeoBook" (and any argument-values), it can now service FSCommands with ANY command-value and ANY argument-value.

NeoBook developers can receive command and argument values in reserved variables [ObjectName.fsCommand] and [ObjectName.fsArgs] ... and process such requests via a reserved subroutines named ObjectName_FSCommand ... where ObjectName is whatever the object is named ... this is a big improvemnt as it allows swf files that run under other hosts (like Internet Explorer) to run inside NeoBook objects WITHOUT modification to any FSCommands.

However, in order to maintain compatibility with older versions of NeoBook, FSCommands passed with command-values of "NeoBook" are still processed the old way ... i.e. the argument-value is evaluated for NeoBook script commands ... only FSCommands passed with command-values other than "NeoBook" are handled in this new and convenient manner.

Your plugin makes some assumptions about the values entered within the nz_SWF_LINK and nz_SWF_ACTION commands that prevents NeoBook developers from exploiting this new/convenient facility in v5.0.4 ... using the documentation in your .rtf file ...
Code: Select all
Example :
nz_SWF_LINK "Http://" "_parent" "255" "255" "255" "rImage" "Result"             Open an url in a new window
nz_SWF_LINK "MyFlash.swf" "_level0" "255" "255" "255" "rImage" "Result"                                      Open a new flash file in the same object
nz_SWF_LINK "MyFlash.swf" "_level1" "255" "255" "255" "rImage" "Result"                                      Open and Add a flash file in the same object ( _level2 _level3 etc)
nz_SWF_LINK "Neobook" "AlertBox 'Titre' 'Message'" "255" "255" "255" "rImage" "Result"
... it looks like the plugin assumes the first format if it is not any of the others ... and then wraps the http:// stuff around whatever was coded ... so if I code..
Code: Select all
nz_SWF_LINK "doSomething" "" "255" "255" "255" "rImage" "Result"
... the plugin sends out a request for http://doSomething.

Perhaps, you might change your plugin so there is a manner for NeoBook developers to specify values that will be passed without modification ... NeoBook's syntax interpreter will consider parameter values begining with "!" as indication not to do any "math" on the subsequent text ... perhaps you can implement a similar scheme ... so, for example ...
Code: Select all
nz_SWF_LINK "^doSomething" "a,b" "255" "255" "255" "rImage" "Result"
... would pass the command value of "doSomething" and argument value of "a,b" ... and developers could still use something like ...
Code: Select all
nz_SWF_LINK "!^14/2" "!a+b" "255" "255" "255" "rImage" "Result"
... and receive values of "14/2" and "a+b" (as text strings).

P.S. Still awaiting responses to some of my previous questions/suggestions ... you have a very unique and beneficial product, but given the current durations of responses to enquiries, it is difficult to make a commitment to deploying it in commercial environments.
User avatar
Posts: 3757
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to PlugIn Discussions

Who is online

Users browsing this forum: Bing [Bot] and 1 guest