Random transition

  • 10 posts
  1. xender

    10 months ago

    Would be great also to set random transition between each slides.

    Thx

  2. manic

    9 months ago

    Hi,

    If you want, I've made a php script that lists a folder (and subfolders) with pictures and then creates an XML file with random transitions.

    You'll have to have apache and php configured locally to make it work, but I can send it to you...

  3. LimitedEdition

    9 months ago

    I'm interested in this PHP file too. Would be great to have it! sebastian.schoene@gmx.de

  4. OK this is PHP code

    -------------------------------------------
    <?php

    header('Content-type:text/xml');

    ?>
    <cu3er>
    <settings>
    <auto_play>
    <defaults symbol="circular" />
    <tweenOver alpha="1" />
    </auto_play>
    <prev_button>
    <defaults round_corners="5,5,5,5"/>
    <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
    <tweenOut tint="0x000000" />
    </prev_button>

    <prev_symbol>
    <tweenOver tint="0x000000" />
    </prev_symbol>

    <next_button>
    <defaults round_corners="5,5,5,5"/>
    <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
    <tweenOut tint="0x000000" />
    </next_button>

    <next_symbol>
    <tweenOver tint="0x000000" />
    </next_symbol>

    </settings>
    <slides>
    <?php
    $a1 = "<transition num=\"4\" direction=\"right\" shader=\"flat\" />";
    $a2 = "<transition num=\"3\" slicing=\"vertical\" direction=\"down\"/>";
    for($i=0;$i<=39;$i++){
    $r = rand(1,6);
    ?>
    <transition num="<?php echo $r;?>"/>
    <slide>
    <url>show/<?php echo $i; ?>.jpg</url>
    </slide>

    <?php
    }
    ?>
    </slides>
    </cu3er>
    ----------------------------------------------------------

  5. If you have a problem tell me: kongoon@hotmail.com

  6. OK this is Perfect code,
    <?php

    header('Content-type:text/xml');

    ?>
    <cu3er>
    <settings>
    <auto_play>
    <defaults symbol="circular" />
    <tweenOver alpha="1" />
    </auto_play>
    <prev_button>
    <defaults round_corners="5,5,5,5"/>
    <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
    <tweenOut tint="0x000000" />
    </prev_button>

    <prev_symbol>
    <tweenOver tint="0x000000" />
    </prev_symbol>

    <next_button>
    <defaults round_corners="5,5,5,5"/>
    <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
    <tweenOut tint="0x000000" />
    </next_button>

    <next_symbol>
    <tweenOver tint="0x000000" />
    </next_symbol>

    </settings>
    <slides>
    <?php
    $sl[] = "horizontal";
    $sl[] = "vertical";

    $d[] = "left";
    $d[] = "right";
    $d[] = "up";
    $d[] = "down";

    $sh[] = "none";
    $sh[] = "flat";
    $sh[] = "phong";

    for($i=0;$i<=33;$i++){
    $r = rand(1,6);
    $rsl = rand(1,2);
    $rd = rand(1,4);
    $rsh = rand(1,3);
    ?>
    <transition num="<?php echo $r;?>" direction="<?php echo $d[$rd];?>" shader="<?php echo $sh[$rsh];?>"/>
    <slide>
    <url>show/<?php echo $i; ?>.jpg</url>
    </slide>

    <?php
    }
    ?>
    </slides>
    </cu3er>

  7. $r = rand(1,6);
    $rsl = rand(0,1);
    $rd = rand(0,3);
    $rsh = rand(0,2);

  8. <transition num="<?php echo $r;?>" slicing="<?php echo $sl[$rsl];?>" direction="<?php echo $d[$rd];?>" shader="<?php echo $sh[$rsh];?>"/>

  9. tainodavi

    6 months ago

    hello kongoon,

    I am very new to all this and want to make the images random but i dont understand what you put up there or how to put it on my site to work please explain in beginners terms and if you can really help me out here is my email tainodavi@yahoo.com thank you.

  10. This code is for transition random or for images random? I would make images appear randomly. Is possible?


Reply

You must log in to post.