Hi, everyone.
I found a way how to write Object Oriented Programing style in KRPano script.
This is just for fun.
----------
<pre>
Code
<krpano version="1.16" onstart="startup();">
<!-- class difinition -->
<class name="test"
property="123"
action="trace('action called:', %1 );"
/>
<action name="startup">
showlog();
<!-- create instances -->
copy( instance1.property, class['test'].property );
copy( instance2.property, class['test'].property );
copy( instance1.action, class['test'].action );
copy( instance2.action, class['test'].action );
<!-- set values to each property -->
set( instance1.property, 'def' );
set( instance2.property, 'ghi' );
<!-- call each method -->
instance1.action( instance1.property );
instance2.action( instance2.property );
</action>
</krpano>
Display More
</pre>
----
bye