Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8dbb64011c
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 185 lines (158 sloc) 7.423 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
<!--
Copyright 2011 Research In Motion Limited.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        <title>AliceJS Page Flipping</title>
        <link href="../favicon.ico" rel="icon" type="image/x-icon">
        <link rel="stylesheet" href="pageflip.css">
        <style type="text/css">
        body {
            background: #9C9C9C;
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 84%;
        }

        img {
            border: 0;
        }

        .options {
            position: absolute;
            right: 10px;
            text-align: left;
        }

        .controls {
            position: relative;
            top: 40px;
            text-align: center;
        }
        </style>
    </head>
    <body>
        <a href="../demos.html#pageflip"><img src="../images/back_btn.png" style="vertical-align: middle; margin-right: 10px;"></a>
        <div class="options">
            <form name="options">
                <p><b>Flip Direction:</b></p>
                <input type="radio" id="flip_direction_left_right" name="flip_direction" value="left" checked="checked"><label for="flip_direction_left_right">Left/Right</label><br>
                <input type="radio" id="flip_direction_up_down" name="flip_direction" value="up"><label for="flip_direction_up_down">Up/Down</label>
            </form>
        </div>

        <div id="pages" style="visibility: hidden; overflow: hidden;">
            <div style="background: #161513 url(../images/backgrounds/black_canvas.jpg) center top no-repeat; border: 3px outset #2D2C2A; color: #FFFFFF;">
                <h2 style="text-align: center;">AliceJS Page Flipping Demo</h2>
                <p>This example simulates the flipping of pages in a book.</p>
                <p>This effect can be useful for showing a gallery of photos or videos with captions.</p>
            </div>
            <div>
                <img src="common/images/photos/aerogel_flower.jpg">
                <label>Flower on Aerogel over a flame</label>
            </div>

            <div>
                <img src="common/images/photos/aurora_borealis.jpg">
                <label>The Aurora Borealis (Northern Lights) shines above Bear Lake</label>
            </div>

            <div>
                <img src="common/images/photos/buzz_aldrin_moon.jpg">
                <label>Buzz Aldrin on the Moon</label>
            </div>

            <div>
                <img src="common/images/photos/cartwheel_galaxy.jpg">
                <label>Cartwheel Galaxy from the Chandra X-ray Observatory</label>
            </div>

            <div>
                <img src="common/images/photos/earth_western_hemisphere.jpg">
                <label>Earth Western Hemisphere</label>
            </div>

            <div>
                <img src="common/images/photos/hurricane_katrina.jpg">
                <label>Hurricane Katrina</label>
            </div>

            <div>
                <img src="common/images/photos/mars_rover.jpg">
                <label>Artist's concept of Rover on Mars</label>
            </div>

            <div>
                <img src="common/images/photos/orion_iss.jpg">
                <label>Artist's concept of the Orion spacecraft approaching the ISS</label>
            </div>

            <div>
                <img src="common/images/photos/shuttle_cockpit.jpg">
                <label>The "glass cockpit" installed on the Space Shuttle</label>
            </div>

            <div>
                <img src="common/images/photos/solar_system.jpg">
                <label>Solar System</label>
            </div>

            <div>
                <video id="movie" width="480" height="360" controls="controls" preload="metadata" poster="common/videos/last_shuttle_liftoff.jpg">
                    <source src="common/videos/last_shuttle_liftoff.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
                </video>
                <label>Final Shuttle Mission</label>
            </div>

            <div>
                <video id="movie" width="480" height="360" controls="controls" preload="metadata" poster="common/videos/lunar_eclipse.jpg">
                    <source src="common/videos/lunar_eclipse.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
                </video>
                <label>Lunar Eclipse</label>
            </div>

            <div>
                <video id="movie" width="480" height="360" controls="controls" preload="metadata" poster="common/videos/tgf_antimatter.jpg">
                    <source src="common/videos/tgf_antimatter.m4v" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
                </video>
                <label>Terrestrial Gamma-ray Flashes Create Antimatter</label>
            </div>

            <div>
                <form>
                    <p>However, you're not limited to just photos and videos. You can also apply this to other HTML elements like forms.</p>
                    <table border="0" cellpadding="3" cellspacing="0">
                        <tr>
                            <td>Username:</td>
                            <td><input type="text" name="username" value="" size="15"></td>
                        </tr>
                        <tr>
                            <td>Password:</td>
                            <td><input type="password" name="password" value="" size="15"></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><input type="submit" value="Login"></td>
                        </tr>
                    </table>
                </form>
            </div>

            <div style="text-align: center;">
                <h2>The End</h2>
            </div>
        </div>

        <div class="controls">
            <input type="button" id="previous" value="&lt; Previous" onclick="previous();">
            <input type="button" id="next" value="Next &gt;" onclick="next();">
        </div>

        <!-- Feature Sniffer -->
        <script type="text/javascript" src="../lib/sniffer.js"></script>

        <script src="pageflip.js"></script>
        <script type="text/javascript">
        sniffer.init();

        function init () {
            getDirection();
            document.getElementById('previous').disabled = true;
            //alice.flip.init({id: 'pages', width: 640, height: 268, duration: 1});
            alice.flip.init({id: 'pages', width: 640, duration: 2.5});
            document.getElementById('pages').style.visibility = 'visible';
            document.getElementById('pages').style.overflow = 'visible';
        }

        window.onload = init;
        </script>
    </body>
</html>
Something went wrong with that request. Please try again.