Alambik Script Team
Alambik Staff

Registered: Feb 2002
Location:
Posts: 15 |
how to use multiple layer in Alambik
/*
* layers.tv
*
* Copyright (C) 2004, Alambik Ltd. all rights reserved.
* http://www.alambik.com
*
* This code and information is provided "AS IS" without warranty of
* any kind, either expressed or implied, including but not limited to
* the implied warranties of merchantability and/or fitness for a
* particular purpose.
*
* Description:
*
* The Layers.tv demonstrates how to use multiple layer in Alambik.
*
*/
//Each of the three Alambik screens (MID, BACK and FRONT) can manage up to 65,535 layers.
#define RES_X 320
#define RES_Y 240
screen.resolution.set(RES_X, RES_Y); setup the screen resolution
@picture2 = icon.load ("Icon\Ground.png") ; load files
@picture1 = icon.load ("Icon\Mountain2.png")
icon.persistence.set (@picture1,ON);This instruction sets the persistence mode of an icon.
icon.persistence.set (@picture2,ON);It indicates whether the icon will have to be displayed again every time the screen is updated
icon.display (@picture1,0,100)
icon.display (@picture2,0,150)
repeat ()
icon.layer.set (@picture1,1); you're picture1 is now on the *first* layer
icon.layer.set (@picture2,2); you're picture2 is now on the *second* layer
time.wait (0.5)
icon.layer.set (@picture1,2); you're picture1 is now on the *second* layer
icon.layer.set (@picture2,1); you're picture2 is now on the *first* layer
time.wait (0.5)
until (keyboard.get()==KEY_ESCAPE) ; wait for escape key to leave the loop
keyboard.wait ()
script.stop ()
Attachment: layers.zip
This has been downloaded 2 time(s).
Report this post to a moderator | IP: Logged
|