PDA

View Full Version : 3D windows perspective...


mirws
06-14-2006, 09:00 PM
Hi guyss...!

.. any idea to make 3D windows perspective with laszlo...

I see windows vista feature that use something called "Flip 3D" or what.. to navigate through open windows using the scroll wheel on our mouse

perhap any how someone can make this feature with laszlo

bye

jstretch
06-28-2006, 01:37 PM
Something I put together quickly..can be done much more elegantly but I think it'll be a good learning tool/starting point. Use your mouse scrollwheel to fade in/out the box.



<canvas width="500" height="500">
<view name="win" width="100" height="100" x="150" y="150" bgcolor="0xEEEEEE">
<attribute name="locked" value="false" type="boolean" />
<method name="fadein">
if(this.locked == false) {
this.bringToFront();
this.setAttribute("width", 150);
this.setAttribute("height", 150);
this.setAttribute("x", 200);
this.setAttribute("y", 200);
this.setAttribute("opacity", 0);
width_in.doStart();
height_in.doStart();
x_in.doStart();
y_in.doStart();
op_in.doStart();
this.setAttribute("locked", true);
}
</method>
<method name="fadeout">
if(this.locked == false) {
this.setAttribute("width", 100);
this.setAttribute("height", 100);
this.setAttribute("x", 150);
this.setAttribute("y", 150);
this.setAttribute("opacity", 1);
width_out.doStart();
height_out.doStart();
width_out.doStart();
height_out.doStart();
x_out.doStart();
y_out.doStart();
op_out.doStart();
this.setAttribute("locked", true);
}
</method>

<animator name="width_in" attribute="width" duration="1000" to="100" start="false" onstop="parent.setAttribute('locked', false)" />
<animator name="height_in" attribute="height" duration="1000" to="100" start="false" />
<animator name="x_in" attribute="x" duration="1000" to="150" start="false" />
<animator name="y_in" attribute="y" duration="1000" to="150" start="false" />
<animator name="op_in" attribute="opacity" duration="1000" to="1" start="false" />

<animator name="width_out" attribute="width" duration="1000" to="50" start="false" onstop="parent.setAttribute('locked', false)" />
<animator name="height_out" attribute="height" duration="1000" to="50" start="false" />
<animator name="x_out" attribute="x" duration="1000" to="100" start="false" />
<animator name="y_out" attribute="y" duration="1000" to="100" start="false" />
<animator name="op_out" attribute="opacity" duration="1000" to="0" start="false" />

</view>


<method event="onmousewheeldelta" reference="LzKeys" args="d">
if(d &lt; 0)
win.fadein();
else
win.fadeout();
</method>


</canvas>

illogic_code
07-05-2006, 09:16 AM
NICE !!!! =))