building a new button

  • Hi guys,

    As I am a beginer in coding, I need some help! I would like to build up a new button in a virtual tour. This button: "info" will show a notice who shows how to use a virtual tour.
    onclick it open the picts, onclick again to close it.
    I found the first part, to open it, but I can't find a way to close it... here it is:

    <plugin name="openhelp" align="bottom" blendmode="screen" keep="true" url="tdata/graphics/menu/help.png" onclick="set(plugin[notice].visible,true);" x="40" y="10"/>
    <plugin name="notice" width="55%" height="prop" url="tdata/graphics/notice.png" visible="false"/>

    Thanks a lot for your help!

  • Hi downtp

    There's a few ways to do this but need to check with you what exactly you are doing if your creating two seperate objects one an info button the other an info window with one opening and closing opposite to the other there's no probs at all have you looked at the textfield plugin examples of masking and scrollable text are there.

    Check out an example I've used if you like at http://www.zodiacblue.com/Stanmer/FlashHouseTour.html

    Just adding some code to what you've already created I'd probably use something like this:

    <plugin name="openhelp" align="bottom" blendmode="screen" keep="true" url="tdata/graphics/menu/help.png" onclick="action(opennotice);" x="40" y="10"/>
    <plugin name="notice" width="55%" height="prop" url="tdata/graphics/notice.png" visible="false" onclick="action(closenotice);"/>

    <action name="opennotice">
    set(plugin[openhelp].visible, false);
    set(plugin[notice].visible, true);
    </action>

    <action name="closenotice">
    set(plugin[openhelp].visible, true);
    set(plugin[notice].visible, false);
    </action>

    You could create one action to reference called infotoggle or something like that and apply an if statement to toggle between the info button and the notice but as your a beginner the above is prob best option for now. *thumbsup*

    let me know how you get on

  • Hi ZodiacBlue,

    Thanks for your reply and sorry for the delay of my answer.

    Thx for your exemple and code, this is excatly what I am trying to do! I am soon gonna work on that, I'll let you know how it works.

    Nice website by the way!

Jetzt mitmachen!

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