[Xerte] Pre-selected radiobutton

Julian Tenney Julian.Tenney at nottingham.ac.uk
Mon Jan 18 13:01:18 GMT 2010


icon is an XML node: icon.nextSibling.attributes.blah are the xml node's
attributes. The icon's movieclip is instantiated from this xml node.

 

There is no property in the xml for selected - so you need to set it on
the movieclip once it has been created.

 

The rs property refers to the movieclip that was created for this
interaction response - then you can call all it's usual methods / set
properties. It works like id for ay other icon, but because responses
are two things: an interactive movie clip AND a page of content that is
displayed whrn the response matches, you need an additional 'rs'
property so you can addresss the actual movieclip.

 

J

 

 

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Marc
Torruella Altadill
Sent: Monday, January 18, 2010 12:31 PM
To: 'Xerte discussion list'
Subject: RE: [Xerte] Pre-selected radiobutton

 

Thank you very much Julian, but we are not sure to understand how the rs
property works.

 

We currently use this to set the y property of the component:

 

icon.nextSibling.childNodes[i].attributes.y = arrayY[i] + 15;

 

We tried:  

icon.nextSibling.childNodes[i].setValue(true);

 

But no luck.

 

We have a button object which rs property we can set, but we will
duplicate(1) this object several times and we don't want the rs thing to
refer to all of them. I'm sure we are misunderstanding how it work... 

 

(1)    icon.nextSibling.childNodes[1].duplicate(ln - 1); 

 

 

 

De: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] En nombre de Julian Tenney
Enviado el: lunes, 18 de enero de 2010 12:00
Para: Xerte discussion list
Asunto: RE: [Xerte] Pre-selected radiobutton

 

btn1.setValue(true); //where btn1 is the rs property of the radio
button,

 

J

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Marc
Torruella Altadill
Sent: Monday, January 18, 2010 10:53 AM
To: 'Xerte discussion list'
Subject: [Xerte] Pre-selected radiobutton

 

Hello everyone,

We have a quiz template where you can have from 1 to N radiobuttons. 

We want that once a student has correctly answered this page, next time
the correct answer gets automatically checked.

 

We tried with properties "checked" and "selected" with actionscript, but
it doesn't seem to work. How should we do it?

 

Examples:

1-      Button1.attributes.checked = 1;

2-      Button1.attributes.checked = true;

3-      Button1.attributes.selected = 1;

4-      Button1.attributes.selected = true;

 

Thank you very much!

Marc 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100118/4b56d113/attachment.html


More information about the Xerte mailing list