User Tools

Site Tools


album

Album

The Album element provides a list of display objects that can be scrolled horizontally or vertically using a drag gesture. It supports tweening and item snapping.

An Album element partway between a horizontal scroll of pictures
Album screenshot

Characteristic

Definition
Type Object
Category Element
Scope Local
Position *
Parents container
Children *
Gestures drag
Requirements none

Attribute

Type

Description
applyMask true/false Flag indicating whether the contents are masked
dragAngle number Intended to account for the rotation of the parent object to apply to drag transformations.
horizontal true/false Flag indicating the scroll axis
layout object reference The album element is intended for a ListLayout only
margin number Sets the margin between the child display objects

See Also: Display Attributes

Horizontal Album

<!--horizontal album-->
<Album x="625" y="50">                                                                                                                                 
    <Container width="500" height="300">                                                                   <!-- left arrow-->
        <Graphic shape="rectangle" lineStroke="0" width="500" height="300"/>
        <Graphic x="300" y="125" shape="triangle" color="0xFFFFFF" height="50" rotation="90"/>
        <Graphic x="200" y="137" shape="rectangle" width="50" height="25" color="0xFFFFFF"/>              
    </Container>
 
    <Image id="img1" src="library/assets/wb3.jpg" width="500" height="300" />
    <Image id="img1" src="library/assets/USS_Macon_over_Manhattan.png" width="500" height="300" />
    <Image id="img1" src="library/assets/wb3.jpg" width="500" height="300" />
 
    <Container width="500" height="300">                                                                     <!--right arrow-->
         <Graphic shape="rectangle" lineStroke="0" width="500" height="300"/>
         <Graphic x="200" y="175" shape="triangle" color="0xFFFFFF" height="50" rotation="-90"/>
        <Graphic x="250" y="137" shape="rectangle" width="50" height="25" color="0xFFFFFF"/>
    </Container>
</Album>

Vertical Album

<!--vertical album-->
<Album x="625" y="375" horizontal="false">
                 
    <Container width="500" height="300">                                                                      <!--down arrow-->
        <Graphic shape="rectangle" lineStroke="0" width="500" height="300"/>
        <Graphic x="275" y="200" shape="triangle" color="0xFFFFFF" height="50" rotation="180"/>
        <Graphic x="237" y="100" shape="rectangle" width="25" height="50" color="0xFFFFFF"/>           
    </Container>
 
    <Image id="img1" src="library/assets/wb3.jpg" width="500" height="300" />
    <Image id="img1" src="library/assets/USS_Macon_over_Manhattan.png" width="500" height="300" />
    <Image id="img1" src="library/assets/wb3.jpg" width="500" height="300" />
 
    <Container width="500" height="300">                                                                       <!--up arrow-->
        <Graphic shape="rectangle" lineStroke="0" width="500" height="300"/>
        <Graphic x="225" y="100" shape="triangle" color="0xFFFFFF" height="50"/>
        <Graphic x="237" y="150" shape="rectangle" width="25" height="50" color="0xFFFFFF"/>               
    </Container>
</Album>
album.txt · Last modified: 2015/09/18 12:10 by glass