<HTML dir=ltr><HEAD><TITLE>[Xerte] toggle button</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.17023" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText30065 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>use some code in the response to toggle</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>if (myIconID._visible == false){</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2> //make my items visible</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2> myIconID._visible = true;</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>} else {</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2> //make them invisible</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2> myIconID._visible = true;</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>}</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>the icons could be children of the button - or could be elsewhere,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>HTH,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>J</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk on behalf of Mary Ann Ahearn<BR><B>Sent:</B> Mon 12/04/2010 18:38<BR><B>To:</B> xerte@lists.nottingham.ac.uk<BR><B>Subject:</B> [Xerte] toggle button<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hi everyone.<BR>I've been preparing desktop xerte models to use in projects where a<BR>group of us will need to produce large amounts of content in short<BR>amounts of time. I want to make & save a model of a button<BR>interaction where the button is a toggle to display/hide a panel<BR>containing text and sometimes a graphic. Very simple.<BR><BR>Since a button's mission seems to be to display a response when<BR>clicked, I've been struggling to get it to act as a toggle and hide<BR>the response when clicked again. If I put a script on the button to<BR>always reverse the visibility of its child icons, I can't seem to get<BR>it to overcome its desire to make them visible.<BR><BR>If the panel/text/graphic are siblings of the interaction icon which<BR>contains the button rather than its children, the toggle works<BR>perfectly, but then we lose the ability to save the interaction icon<BR>as a tidy model with everything needed contained inside.<BR><BR>Is there a way to disable or replace a button's default behavior<BR>regarding it's children?<BR><BR>Thanks so much!<BR>ma<BR><BR>_______________________________________________<BR>Xerte mailing list<BR>Xerte@lists.nottingham.ac.uk<BR><A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR></FONT></P></DIV></BODY></HTML>