envets onloadcomplete..

  • Hi there

    I am using "Onloadcomplete events" for automatically loading the next scene and I'd like to add a pause button for it.. any ideas??

    such as like below!


    <events name="scene1" onloadcomplete="delayedcall(10, loadscene(scene1); );" />

    for the pause button,

    <plugin name="pause" url="img/pause.png" visible="true" align="righttop" height="prop" keep="true"
    onclick="if(autorotate.enabled,set(autorotate.enabled,false);,set(autorotate.enabled,true););"
    />


    thanks for reading! *smile*

  • Code
    <events name="scene1" onloadcomplete="set(waiting_load, true);delayedcall(delay_loading_scene,10, loadscene(scene1));" />
    Code
    <plugin name="pause_load" url="img/pause_load.png" visible="true" align="righttop" height="prop" keep="true"
    onclick="if(waiting_load,stopdelayedcall(delay_loading_scene),delayedcall(delay_loading_scene,2, loadscene(scene1)));switch(waiting_load);"/>

    Serge

  • Code
    Code
    <plugin name="pause_load" url="img/pause_load.png" visible="true" align="righttop" height="prop" keep="true" 
    onclick="if(waiting_load,stopdelayedcall(delay_loading_scene),delayedcall(delay_loading_scene,2, loadscene(scene1)));switch(waiting_load);"/>

    Serge</plugin>

    Thank you Serge for the reply *thumbsup*
    I'm just wondering how I can put those code if there are more than a single scene..
    For example, I just gave you an example as "events name="scene1" but there are also "scene2", "scene3" and more..

    delayedcall(delay_loading_scene,2, loadscene(scene1)) <- scene2, 3, 4 and 5... *confused*


    Thanks for reading!! *smile*

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!