[Xerte] toggle button

Dave Burnett d_b_burnett at hotmail.com
Tue Apr 13 20:28:51 BST 2010



You're gestalting again.

I call that a framerate.

In my case I'm thinking:

A key frame with a graphic and some code.
Now, I think the Flash IDE layout, stage above, code window below, makes folks tend to think OK, my graphic appears then the code is executed.

Anyway Which still leaves me confused as to what in Xerte translates into a "frame" (my version).


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


More information about the Xerte mailing list