Why is Konfabulator "Pretty?"
Bill Marriott
wjm at wjm.org
Tue Dec 6 15:59:22 EST 2005
Yes, Tom, thanks for asking about this.
A K. distribution is very simple:
- a .widget file, which is exactly a .zip file,
containing:
- a folder of resources (images, sounds)
- a .kon file, which is an XML file encapsulating attributes for the objects
and JavaScript.
If you have K. installed just "unzip" the AnalogClock.widget file or, run
the Widget_Converter widget and drop the AnalogClock.widget file on top of
it.
In the case of the clock, you have 16 PNG files representing the clock
elements, plus an /mp3 file for the chime.
These are referenced in the .kon file like this:
<image src="Resources/AnalogClock/Background.png">
<name>background</name>
<hOffset>0</hOffset>
<vOffset>0</vOffset>
</image>
<image src="Resources/AnalogClock/Minute.png">
<name>minuteHand</name>
<hOffset>55</hOffset>
<vOffset>52</vOffset>
<hRegistrationPoint>2</hRegistrationPoint>
<vRegistrationPoint>41</vRegistrationPoint>
</image>
Pretty much straight XML.
The code is also embedded in XML.
<timer name="timeTicker" interval="1" ticking="true">
<onTimerFired>
updateTime();
</onTimerFired>
</timer>
The images do truly rotate, as evidenced in this code snippet:
secondHand.rotation = secondHandShadow.rotation = ((theSeconds)*6);
minuteHand.rotation = minuteHandShadow.rotation =
((theMinutes)*6)+(theSeconds*.1);
...which moves both the Hand and its Shadow at once, one line for the
seconds, one line for the minutes.
The hands rotate precisely, like a real clock would.
Bill
"Thomas McGrath III" <3mcgrath at adelphia.net>
wrote in message news:7149380D-452C-4A0E-9030-CF82F713D26D at adelphia.net...
> Bill,
>
> Do you know for certain that K does images in this way? I mean we know
> about this problem in Rev and I haven't used K to build widgets, But I do
> like the look and feel of them. When you build in K do the images truly
> rotate? or do they do something to them to look like they rotate?
>
> I am very interested in this thread and the possibilities in Rev. I would
> be willing to work on a solution here.
>
> Tom McGrath
>
> On Dec 6, 2005, at 1:00 PM, Bill Marriott wrote:
>
>> - The rotate command will obliterate the image, bring the computer to a
>> standstill, and consume vast amounts of memory.
>>
>> - Setting the angle of an image will result in extreme jaggies at
>> non-orthogonal angles.
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list