Sending Parameter in LoadScene

  • Hi all,

    I have following code in my XML

    plugin[box].addIdItem(1, 'Scenery 1', loadscene(SceneName1, null, MERGE, BLEND(1)); );



    <scene name="SceneName1" onstart="action(startscene);">
    <action name="startscene">
    showtext('Title1', infostyle);
    plugin[box].selectIdItem(1);
    set(step,2);
    </action>
    <image type="SPHERE">
    <sphere url="VT\Scene1.jpg" />
    </image>
    <!-- view startup settings for little planets -->
    <view stereographic="true" fisheye="1.0" fov="150" fovmax="150" hlookat="0" vlookat="90" />
    <events onloadcomplete="delayedcall(1.0, normalview(show, 230));" />


    </scene>


    I have lots of scenes to show. So I want to make only one SCENE, and send the value need for those scenes as parameter from LOADSCENE.
    In above code i need red font as variables. How can i do that?

    I tried changing NULL variable of LoadScene to image.jpg=VT\Scenen1.jpg&action.showtext=Title1 something like this, but i think i am not doing right.
    Can anyone please help

    Thank you


  • Hi Klaus,

    Thank you for the prompt reply.

    I tried as you said, title parameter works, but for the image, no matter the path specified is correct, i always get "download of VT/Scene1.jpg failed.

    I even move image file to root folder and change the parameter as "sphere=Scene1.jpg" still i get cannot download error.

    Any suggestion?


    < Addtional information after few test >
    If i give the full path like "C:/SomeDirectory/SomeTest/plugins/VT/Scene1.jpg" it works.
    but this is not good if i want to put my work on website, right?

    [UPDATE]
    now i used "sphere=%SWFPATH%\VT\Scene1.jpg " and this worked.
    so this can be taken as solved.

    Once again Thank you Klaus.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!