FKiSS 4 Specifications


 

FKiSS4

FKiSS4 was developed in two stages.  The first stage added attachment and keyboard commands and the second added cel groups, frames and the restriction of object movement. In this version, labels, alarms and variables can be up to 32 characters long, and have any name as long as it starts with a letter. Objects can be referenced through variables; a variable called "ThisVar" with value 10 can replace "#10" used as an argument. The same applies to alarms and labels: "timer(ThisVar,1000)" can set off either "alarm(10)" or "alarm(ThisVar)"; if both alarms exist, it's the alarm with the same name that will be triggered, so "alarm(ThisVar)" is fired and "alarm(10)" is ignored.

The commands marked "Extended" in this section existed in previous versions, but can now take a cel group as argument, which slightly changes their function.


Events (FKiSS 4)


apart() (Extended)

Syntax: apart(cel (group) 1,cel (group) 2)
Example: apart("fork.cel",!Food)

Triggered when either the cel or a cel in the cel group is moved so that its visible pixels no longer overlap with those of the other cel or member of the other cel group. (In this case, a mapped and completely transparent pixel that is not the cel transparent color does qualify as visible.)

Related events: apart() under FKiSS2, collide(), out()

catch() (Extended)

Syntax: catch(cel group)
Example: catch(!AllTheseCels)

Triggered when the user clicks on a cel in the cel group, except if the cel clicked on has the maximal fix value.

Related events: catch() in FKiSS, fixcatch(), press(), drop(), release()

collide() (Extended)

Syntax: collide(cel (group) 1,cel (group) 2)
Example: collide("fork.cel",!Food)

Triggered when either the cel or a cel in the cel group is moved so that its visible pixels overlap with those of the other cel or member of the cel group, if they didn't overlap before. (In this case, a mapped and completely transparent pixel that is not the cel transparent color does qualify as visible.)

Related events: collide() under FKiSS2, apart(), in()


detached()

Syntax: detached(object)
Example: detached(#18)

Triggered when the object is detached from its parent, whether through a mouse drag, a move() action, detach(), or attach() and glue() (even when the last two are used to reattach the object to its parent).

Related actions: detach(), attach(), glue(), letparent()

drop() (Extended)

Syntax: drop(cel group)
Example: drop(!AllTheseCels)

Triggered when the user loses control of any cel in the cel group that is being dragged, either because the mouse button is released (unfixed cel) or because a fixed cel snaps back into place. Doesn't work on cels with a maximum fix value, since these are completely undraggable.

Related events: drop() in FKiSS, fixdrop(), release(), catch(), press()

fixcatch() (Extended)

Syntax: fixcatch(cel group)
Example: fixcatch(!AllTheseCels)

Triggered when the user clicks on a cel in the cel group which doesn't have a maximum fix value.

Related events: fixcatch() in FKiSS, catch(), press(), fixdrop(), release()

fixdrop() (Extended)

Syntax: fixdrop(cel group)
Example: fixdrop(!AllTheseCels)

Triggered when the user releases a cel in the cel group which doesn't have a maximum fix value.

Related events: fixdrop() in FKiSS, drop(), release(), fixcatch(), press()

keypress()

Syntax: keypress(keyboard character 0-9, A-Z, cursor keys)
Example: keypress("a"), keypress("2"), keypress("right")

Triggered by pressing the key with that letter/number. There is no autorepeat and no difference between uppercase and lowercase characters. Cursor keys are written out as "left", "right", "up" and "down".

Related events: keyrelease()
Related actions: letkey(), letkeymap()

keyrelease()

Syntax: keyrelease(keyboard character 0-9, A-Z, cursor keys)
Example: keyrelease("a"), keyrelease("2"), keyrelease("right")

Triggered by releasing the key with that letter/number. There is no difference between uppercase and lowercase characters. Cursor keys are written out as "left", "right", "up" and "down".

Related events: keypress()
Related actions: letkey(), letkeymap()

mousein()

Syntax: mousein(celname/object/cel group)
Example: mousein("bread.cel"), mousein(#101), mousein(!Food)

Triggered when the mouse pointer moves over a cel, object or member of the cel group that can be clicked on (ie. it is mapped and not covered by other, unghosted cels).

Related events: mouseout()
Related actions: letcatch()

mouseout()

Syntax: mouseout(celname/object/cel group)
Example: mouseout("bread.cel"), mouseout(#101), mouseout(!Food)

Triggered when the mouse pointer away from a cel, object or member of the cel group that it was previously over, and can trigger a mousein() (ie. it is mapped and not covered by other, unghosted cels).

Related events: mousein()

press() (Extended)

Syntax: press(cel group)
Example: press(!AllTheseCels)

Triggers when the user clicks on a cel in that cel group, no matter what its fix value is.

Related events: press() under FKiSS, release(), catch(), fixcatch()

release() (Extended)

Syntax: release(cel group)
Example: release(!AllTheseCels)

Triggers when the user releases the mouse button on an object/cel previously clicked on, no matter what its fix value is. For cels/objects that don't have the maximum fix value, drop() may be a better alternative, as some viewers don't trigger release() under certain circumstances. 

Related events: release() under FKiSS, press(), drop(), fixdrop()

unfix() (Extended)

Syntax: unfix(cel group)
Example: unfix(!AllTheseCels)

Triggered when the lock value of the cel in the cel group turns to zero, and it becomes draggable.

Related actions: unfix() under FKiSS, setfix(), letfix()



Actions (FKiSS 4)


altmap() (Extended)

Syntax: altmap(celname/object)
Example: altmap("celB.cel"), altmap(#6)

On every page, maps the cels in the cel group that were unmapped, and unmaps those that were mapped.  Note that collision events can be fired on object visibility changes.

Related actions: altmap() under FKiSS, map(), unmap(), ifmapped(), ifnotmapped()

attach()

Syntax: attach(child,parent)
Example: attach(#99,#5)

Attaches an object to another object, making them child and parent, after detaching the child object from any previous parent. The child can be detached again by another attach() (even if to the same parent), by the detach() action, or by moving it either through FKiSS actions or with the mouse.

Related events: detached()
Related actions: glue(), detach(), letchild(), letparent(), letsibling()

detach()

Syntax: detach(child)
Example: detach(#99)

Detaches an object from any parent object.  Objects can be automatically detached if a movement restriction is set on any parent object or child object and the movement restriction is unsatisfiable.

Related events: detached()
Related actions: attach(), glue(), letchild(), letparent(), letsibling()

elseifequal()

Syntax: elseifequal(integer/variable A,integer/variable B)
Example: elseifequal(NumberOfCarrots,9)

An extended else() statement; the actions under it are carried out if the first and second value are the same. Requires an "if" statement and endif().

Related actions: ifequal(), else(), endif(), elseifnotequal(), elseifgreaterthan(), elseiflessthan()

elseifgreaterthan()

Syntax: elseifgreaterthan(integer/variable A,integer/variable B)
Example: elseifgreaterthan(NumberOfCarrots,9)

An extended else() statement; the actions under it are carried out if the first value is higher than the second. Requires an "if" statement and endif().

Related actions: ifgreaterthan(), else(), endif(), elseifequal(), elseifnotequal(), elseiflessthan()

elseiflessthan()

Syntax: elseiflessthan(integer/variable A,integer/variable B)
Example: elseiflessthan(NumberOfCarrots,9)

An extended else() statement; the actions under it are carried out if the first value is lower than the second. Requires an "if" statement and endif().

Related actions: iflessthan(), else(), endif(), elseifequal(), elseifnotequal(), elseifgreaterthan()

elseifnotequal()

Syntax: elseifnotequal(integer/variable A,integer/variable B)
Example: elseifnotequal(NumberOfCarrots,9)

An extended else() statement; the actions under it are carried out if the first and second value are not the same. Requires an "if" statement and endif().

Related actions: ifnotequal(), else(), endif(), elseifequal(), elseifgreaterthan(), elseiflessthan()

glue()

Syntax: glue(child,parent)
Example: glue(#99,#5)

Attaches an object to another object, making them child and parent after detaching the child object from any previous parent. The child can be detached again by another attach() (even if to the same parent), and by the detach() action, but moving it doesn't break the attachment.    Glued objects can be automatically detached if a movement restriction is set on any parent object or child object and the movement restriction is unsatisfiable.

Related events: detached()
Related actions: attach(), detach(), letchild(), letparent(), letsibling()

ifmapped() (Extended)

Syntax: ifmapped(cel group,alarm,duration)
Example: ifmapped(!ThisGroup,1,5000)

Sets a timer if all cels in the cel group are mapped.

Related events: alarm()
Related actions: ifmapped() under FKiSS2.1, ifnotmapped(), timer()

ifnotmapped() (Extended)

Syntax: ifnotmapped(cel group,alarm,duration)
Example: ifnotmapped(!ThisGroup,1,5000)

Sets a timer if none of the cels in the cel group is mapped.

Related events: alarm()
Related actions: ifnotmapped() under FKiSS2.1, ifmapped(), timer()

letchild()

Syntax: letchild(variable,parent)
Example: letchild(Var,#1)

Sets the variable value to the currently attached object with the lowest number, or to -1 if no object is attached.

Related actions: attach(), glue(), letparent(), letsibling()

letcollide() (Extended)

Syntax: letcollide(variable,cel (group) 1,cel (group) 2)
Example: letcollide(Bang,!Door,"wall.cel")

Sets variable to 1 if any visible part of the first cel or cel group overlaps with any visible part of the second cel or cel group, otherwise to 0.

Related events: collide(), apart()
Related actions: letcollide() under FKiSS3

letframe()

Syntax: letframe(variable,cel group)
Example: letframe(WhichStep,!RunningFigure)

Sets the variable to the value of the current frame of the cel group, or, if the cel group hasn't been set to a frame or has no frames, to -1.

Related actions: setframe()
Related tags: !

letheight()

Syntax: letheight(variable,object)
Example: letheight(Height,#51)

Sets the variable to the height of all mapped cels in the object.

Related actions: letwidth()

letinitx()

Syntax: letinitx(variable,object)
Example: letinitx(WhatWasX,#73)

Fills the variable with the object's initial X coordinate on the current page.

Related actions: letinity(), letobjectx()

letinity()

Syntax: letinity(variable,object)
Example: letinity(WhatWasY,#73)

Fills the variable with the object's initial Y coordinate on the current page.

Related actions: letinitx(), letobjecty()

letkey()

Syntax: letkey(variable,list of keyboard characters)
Example: letkey(LastKey,"a"), letkey(LastKey,"012345xyzabcupdown"),

Sets the variable to the position in the keylist of the key last pressed, going from left to right. So, in the example, after pressing "A", the first action would return 1, and the second 10 (because "A" is then tenth item in the list). Pressing "B" would return the values 0 (not in the list) and 11. Pressing "A" and "2" at the same time would return 1 and 3, because the "2" key comes before the "A" key in the second list. There is no difference between uppercase and lowercase characters. Cursor keys are written out as "left", "right", "up" and "down".

Related events: keypress(), keyrelease()
Related actions: letkeymap()

letkeymap()

Syntax: letkeymap(variable,list of keyboard characters)
Example: letkeymap(LastKeys,"a"), letkeymap(LastKeys,"012345xyzabcupdown"),

Sets the variable to the added binary value of the positions in the keylist of the last keys pressed (so it's pointless to have a keylist of only one key): position 1 equals 1, position 2 equals 2, position 3 equals 4, position 4 equals 8 etc. If the key at a certain position in the list is pressed, the binary value represented by that position is added tot the variable's value; if the key wasn't pressed, 0 is added. So if the variable's is 13, the keys pressed must have been at positions 1, 3 and 4 (binary values: 1, 4 and 8) which means the user pressed "023".  This action serves to detect key combinations. There is no difference between uppercase and lowercase characters. Cursor keys are written out as "left", "right", "up" and "down".

Related events: keypress(), keyrelease()
Related actions: letkey()

letmapped() (Extended)

Syntax: letmapped(variable,cel group)
Examples: letmapped(M1,!Food)

Sets the variable to the number of cels in the cel group that are mapped.

Related actions: letmapped() under FKiSS3, map(), unmap(), altmap(), ifmapped(), ifnotmapped()

letparent()

Syntax: letparent(variable,child)
Example: letparent(ParentNo,#10)

Fills the variable with the object number of the object's parent, or with -1 if the object has no parent.

Related actions: attach(), glue(), letchild(), letsibling()

letsibling()

Syntax: letsibling(variable,child)
Example: letsibling(SiblingNo,#3)

Fills the variable with the object number of the first other child of the child's parent to have a higher object number, or to -1 if the child is the only/highest object; so if objects #3, #5 and #6 share a parent, "letsibling(SiblingNo,#3)" will return 5, "letsibling(SiblingNo,#5)" will return 6 and "letsibling(SiblingNo,#6)" will return -1. Using the number of an object that isn't attached also returns -1.

Related actions: attach(), glue(), letchild(), letparent()

lettimer()

Syntax: lettimer(variable,variable/alarm)
Example: lettimer(N,10), lettimer(T,Alarm1), lettimer(T,V) 

Returns the time remaining on the specified alarm before the alarm is fired.  The time is in milliseconds.  If the alarm has not been scheduled or has terminated this action returns -1.  If the alarm is actively running this action returns 0.

Related events: alarm()
Related actions: timer(), randomtimer(), iffixed(), ifnotfixed(), ifmapped(), ifnotmapped(), ifmoved(), ifnotmoved()

lettransparent() (Extended)

Syntax: lettransparent(variable,cel group)
Example: lettransparent(Transp,!Raindrops)

Sets the variable to the transparency value of the cels in the cel group if they all have the same transparency, and otherwise to -1.

Related actions: lettransparent() under FKiSS3, transparent()
Related tags: %t

letwidth()

Syntax: letwidth(variable,object)
Example: letwidth(Width,#51)

Sets the variable to the width of all mapped cels in the object.

Related actions: letheight()

map() (Extended)

Syntax: map(cel group)
Example: map(!AllTheseCels)

Maps all cels in the cel group, on every page.  Note that collision events can be fired on object visibility changes.

Related actions: map() under FKiSS, unmap(), altmap(), ifmapped(), ifnotmapped()

restrictx()

Syntax: restrictx(object,left X coordinate,right X coordinate)
Example: restrictx(#23,100,200)

Sets a maximum and minimum X coordinate for an object. If the object is moved out of this range, it snaps back to the closest X coordinate within this range. If the left X coordinate is higher than the right, this effectively cancels the range and frees the object.  

Related actions: restricty()

restricty()

Syntax: restricty(object,top Y coordinate,bottom Y coordinate)
Example: restricty(#23,160,400)

Sets a maximum and minimum Y coordinate for an object. If the object is moved out of this range, it snaps back to the closest Y coordinate within this range. If the top Y coordinate is higher than the bottom, this effectively cancels the range and frees the object.  

Related actions: restrictx()

setframe()

Syntax: setframe(cel group,frame)
Example: setframe(!RunningFigure,8)

Sets the cel group frame to the value of the specified variable.  All cels in this group with the required frame are mapped and all cels in this group not in this frame are unmapped.  If the cel group is set to an invalid frame all cels will be unmapped.

Related actions: letframe()
Related tags: !

unmap() (Extended)

Syntax: unmap(cel group)
Example: unmap(!AllTheseCels)

Unmaps all cels in the cel group, on every page.  Note that collision events can be fired on object visibility changes.

Related actions: unmap() under FKiSS, map(), altmap(), ifmapped(), ifnotmapped()



Tags (FKiSS 4)


%g

Syntax: ;%g

Ghosts the cel. This tag follows the %t tag, if any, and comes before the cel group tag.

Related actions: ghost()

%u

Syntax: ;%u

Unmaps the cel. This tag follows the %g tag, if any, and comes before the cel group tag.

Related actions: map()


! (the cel group tag)

Syntax: ; !<name> [: n1 n2 n3]
Example: ; !AllTheseCels : 0 2 6
; !ThisGroupToo

This tag is the cel group name starting with an exclamation mark, and optionally, a frame definition: a colon followed by frame numbers. As the example shows, one cel instance can be assigned to different cel groups, and cel group definitions can start on a new line, as long as they follow a semicolon.  

Related actions: letframe(), setframe()




Next Document:  FKiSS 5 Specifications
Next Document:  FKiSS 3 Specifications

Copyright (c) 2002 WSM Information System Inc.