<HTML dir=ltr><HEAD><TITLE>RE: [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=idOWAReplyText44994 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>I think of a frame as a cycle: 24 times a second Xerte thinks 'is there anything I need to do around here?'</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 Dave Burnett<BR><B>Sent:</B> Tue 13/04/2010 20:02<BR><B>To:</B> Xerte list<BR><B>Subject:</B> RE: [Xerte] toggle button<BR></FONT><BR></DIV>
<DIV><BR><BR>
<P><FONT size=2>That's good to know.<BR><BR>Now if I could only be sure of what in Xerte constitutes a "frame".<BR>They are little gray boxes in Flash. :-)<BR><BR>________________________________<BR>> Subject: RE: [Xerte] toggle button<BR>> Date: Tue, 13 Apr 2010 19:52:40 +0100<BR>> From: Julian.Tenney@nottingham.ac.uk<BR>> To: xerte@lists.nottingham.ac.uk<BR>><BR>><BR>><BR>> the thing is, in the Flash Player, each frame runs: first all code is executed, then all the graphics are updated, so just because something is instantiated, it isn't necessarily visible when your code executes. So each time a new bit of flow is parsed, all of that code (including any recursive function calls) is executed; and then, the graphics are updated.<BR>><BR>> J<BR>><BR>> ________________________________<BR>> From: xerte-bounces@lists.nottingham.ac.uk on behalf of Dave Burnett<BR>> Sent: Tue 13/04/2010 19:45<BR>> To: Xerte list<BR>> Subject: RE: [Xerte] toggle button<BR>><BR>><BR>><BR>><BR>> In your original case, you would be telling children that hadn't been instantiated yet to do something.<BR>> So they get drawn regardless of what you tell them before hand.<BR>><BR>> In the second example, with the code below the object, we get a case of this flow:<BR>> Draw me> am I visible?> Yes> Hide me!<BR>> So you would never see the object.<BR>><BR>> In both my and Julian's examples, the re-drawing issue is taken out of the equation.<BR>> Julian ignores the _visible state and uses an independent variable to toggle it, my example draws it once separately from the toggling sequence, so the _visible state can be reliably tested.<BR>><BR>> HTH,<BR>> Dave<BR>><BR>><BR>><BR>><BR>><BR>><BR>> ________________________________<BR>>> Date: Tue, 13 Apr 2010 14:21:55 -0400<BR>>> To: xerte@lists.nottingham.ac.uk<BR>>> From: maryann@moberg.com<BR>>> Subject: RE: [Xerte] toggle button<BR>>><BR>>><BR>>><BR>>> Separating the flag from the visible state of the text must be the<BR>>> key. It even works if the script that initializes the flag is<BR>>> removed since it must be initialized to all zeros when it's<BR>>> created.<BR>>><BR>>><BR>>> Thanks!<BR>>><BR>>> ma<BR>>><BR>>><BR>>> At 04:26 PM 4/13/2010 +0100, you wrote:<BR>>><BR>>> See attached. I think when the<BR>>> code runs, p1_visible is not true. That’s because (I think) it hasn’t<BR>>> been drawn to the screen yet.<BR>>><BR>>><BR>>><BR>>> From: xerte-bounces@lists.nottingham.ac.uk<BR>>> [<BR>>> <A href="mailto:xerte-bounces@lists.nottingham.ac.uk">mailto:xerte-bounces@lists.nottingham.ac.uk</A>] On Behalf Of Mary<BR>>> Ann Ahearn<BR>>><BR>>> Sent: Tuesday, April 13, 2010 3:34 PM<BR>>><BR>>> To: Xerte discussion list<BR>>><BR>>> Subject: RE: [Xerte] toggle button<BR>>><BR>>><BR>>><BR>>> Thanks, Julian, but I must be doing something very wrong because I cannot<BR>>> get it to work if the panel is a child of the button.<BR>>><BR>>><BR>>> I made a very simple test - if I move p1 outside of the interaction icon<BR>>> all is fine (with a script added to make it invisible at the start).<BR>>><BR>>> When I run it as shown, I never see the panel.<BR>>><BR>>> If I take toggle script off he button, the panel appears as expected but<BR>>> of course does not go away on second click.<BR>>><BR>>><BR>>> Thanks for your help,<BR>>><BR>>> ma<BR>>><BR>>><BR>>> [[]]<BR>>><BR>>><BR>>><BR>>> At 07:53 PM 4/12/2010 +0100, you wrote:<BR>>><BR>>><BR>>> Content-class: urn:content-classes:message<BR>>><BR>>> Content-Type: text/html;<BR>>><BR>>><BR>>> charset="iso-8859-1"<BR>>><BR>>><BR>>> use some code in the response to toggle<BR>>><BR>>><BR>>><BR>>> if (myIconID._visible == false){<BR>>><BR>>> //make my items visible<BR>>><BR>>> myIconID._visible = true;<BR>>><BR>>> } else {<BR>>><BR>>> //make them invisible<BR>>><BR>>> myIconID._visible = true;<BR>>><BR>>> }<BR>>><BR>>><BR>>><BR>>> the icons could be children of the button - or could be elsewhere,<BR>>><BR>>><BR>>><BR>>> HTH,<BR>>><BR>>><BR>>><BR>>> J<BR>>><BR>>> ________________________________<BR>>><BR>>><BR>>> From: xerte-bounces@lists.nottingham.ac.uk on behalf of Mary Ann<BR>>> Ahearn<BR>>><BR>>> Sent: Mon 12/04/2010 18:38<BR>>><BR>>> To: xerte@lists.nottingham.ac.uk<BR>>><BR>>> Subject: [Xerte] toggle button<BR>>><BR>>><BR>>> Hi everyone.<BR>>><BR>>> I've been preparing desktop xerte models to use in projects where a<BR>>><BR>>> group of us will need to produce large amounts of content in short<BR>>><BR>>> amounts of time. I want to make & save a model of a button<BR>>><BR>>> interaction where the button is a toggle to display/hide a panel<BR>>><BR>>> containing text and sometimes a graphic. Very simple.<BR>>><BR>>><BR>>> Since a button's mission seems to be to display a response when<BR>>><BR>>> clicked, I've been struggling to get it to act as a toggle and hide<BR>>><BR>>> the response when clicked again. If I put a script on the button<BR>>> to<BR>>><BR>>> always reverse the visibility of its child icons, I can't seem to<BR>>> get<BR>>><BR>>> it to overcome its desire to make them visible.<BR>>><BR>>><BR>>> If the panel/text/graphic are siblings of the interaction icon which<BR>>><BR>>> contains the button rather than its children, the toggle works<BR>>><BR>>> perfectly, but then we lose the ability to save the interaction icon<BR>>><BR>>> as a tidy model with everything needed contained inside.<BR>>><BR>>><BR>>> Is there a way to disable or replace a button's default behavior<BR>>><BR>>> regarding it's children?<BR>>><BR>>><BR>>> Thanks so much!<BR>>><BR>>> ma<BR>>><BR>>><BR>>> _______________________________________________<BR>>><BR>>> Xerte mailing list<BR>>><BR>>> Xerte@lists.nottingham.ac.uk<BR>>><BR>>><BR>>> <A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR>>><BR>>> _______________________________________________<BR>>><BR>>> Xerte mailing list<BR>>><BR>>> Xerte@lists.nottingham.ac.uk<BR>>><BR>>><BR>>> <A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR>>><BR>>><BR>>><BR>>><BR>>><BR>>> _______________________________________________<BR>>><BR>>> Xerte mailing list<BR>>><BR>>> Xerte@lists.nottingham.ac.uk<BR>>><BR>>><BR>>> <A href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</A><BR>><BR>> _________________________________________________________________<BR>> Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.<BR>> <A href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2</A><BR> <BR>_________________________________________________________________<BR>The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail.<BR><A href="http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5_______________________________________________">http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5_______________________________________________</A><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>