Alambik Club Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Search Home Logout  
Alambik Club : Powered by vBulletin version 2.2.5 Alambik Club > Alambik > Alambik Script help > how to use multiple layer in Alambik
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
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

Old Post August 2nd, 2004 12:01 PM
Alambik Script Team is offline Click Here to See the Profile for Alambik Script Team Click here to Send Alambik Script Team a Private Message Visit Alambik Script Team's homepage! Find more posts by Alambik Script Team Add Alambik Script Team to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 01:33 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Alambik Club >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.