Running img add ver

From Sim Innovations Wiki
Revision as of 10:25, 12 July 2018 by Admin (talk | contribs) (→‎Return value)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


running_img_id = running_img_add_ver(filename, x,y,nr_visible_items,item_width,item_height)

running_img_add_ver is used to add a running image object. Running imagecan be used to make multiple image objects scrollable vertically.

Return value

Argument Type Description
running_img_id ID This value can be used for further reference. Functions such as running_img_move_carot can use this running_img_id. Its good practice to store this running_img_id in your logic code.


# Argument Type Description
1 filename String This is the filename of the image you would like to show. Note that this is both filename and extension. Its good practice to always the PNG format for images. JPG and BMP are also supported, but not recommended.
2 x Number This is the most left point of the canvas where your running image should be shown.
3 y Number This is the most top point of the canvas where your running image should be shown.
4 nr_visible_items Number Number of image items that should be shown.
5 item_width Number The width of every image object in pixels.
6 item_height Number The height of every image object in pixels.


-- This will generate 7 image_objects vertically.
my_running_img_id = running_img_add_ver("picture.png",100,100,7,200,100)

-- Set carot to 1
running_img_move_carot(my_running_img_id , 1)

-- Or to 2...
running_img_move_carot(my_running_img_id , 2)