User Tools

Site Tools


stack

Stack

The Stack element is a container that gathers its children into a stack, and allows the user to move through the list using a specified user input.

A stack showing a slide made from a container holding text and an image.
Stack screenshot
Characteristic Definition
Type Display Object
Category Element
Scope Local
Position *
Parents Container
Children Images, graphics
Gestures none
Requirements none

Attribute

Type

Description
loop true/false specifies whether the stack loops to the beginning and continues while toggling
toggle text sets the toggle event by string name: mouseOver, mouseDown, mouseUp, touchDown, touchUp, down, and up (the last two auto-switch between input device)

See Also: Display Attributes

<Stack toggle="up" x="700" y="150" loop="false">
    <Text text="This the top of the stack. Click or touch here to advance to the next cml child." color="0xFFFFFF" fontSize="20" width="250" height="700" wordWrap="true" multiline="true" selectable="false" textAlign="justify" />
    <Image src="images/Helicopter.png" height="500"/>
    <Text text="The children can be any display object." color="0xFFFFFF" fontSize="20" width="250" textAlign="justify" wordWrap="true" multiline="true" selectable="false" />
    <Graphic shape="rectangle" width="200" height="200" color="0xAA2222" />
    <Image src="images/500px-Bi-crystal.jpg" height="500"/>
    <Text text="This is the bottom of the stack." color="0xFFFFFF" fontSize="20" width="250" height="700" wordWrap="true" multiline="true" selectable="false" textAlign="justify" />
</Stack>
stack.txt · Last modified: 2015/09/18 17:21 by glass