<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD><TITLE>[Xerte] What is the correct way to set the properties of scriptduplicated text Icons?</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: SimSun;
}
@font-face {
        font-family: SimSun;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: @SimSun;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman","serif"; mso-style-priority: 99; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-GB vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>When I have finished it I will send you a
copy.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>I am trying to learn the button
accordion.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>The idea of the project is to enable me to select a Key
e.g. C major, D major etc. and have the keyboard display highlight only the keys
on the keyboard that belong to that key.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>The purpose is to aid in building up a spacial / pictorial
sense of where the keys are whilst picking out a tune by looking at the sheet
music and glancing across at the keyboard map.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>I think it will be helpful in the learning process, I will
know better when I try it out.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>If it seems a useful learning tool then extra bits would be
to allow the user to select the size of keyboard and to select which key system
they wish to use e.g. C system, B system.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>Kind regards</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916501111-06102009><FONT face=Arial
color=#0000ff size=2>Johnathan</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<P><FONT face=Arial size=2>Johnathan Kemp<BR>ICT Development
Coordinator<BR>Connexions Staffordshire<BR></FONT><A
href="http://www.cxstaffs.co.uk/"><FONT face=Arial
size=2>www.cxstaffs.co.uk</FONT></A><BR><FONT face=Arial size=2>01785
355714<BR></FONT></P>
<P> </P>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Julian Tenney
[mailto:Julian.Tenney@nottingham.ac.uk] <BR><B>Sent:</B> 06 October 2009
10:31<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] What is
the correct way to set thepropertiesofscriptduplicated text
Icons?<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">Any
chance you want to show what you’re doing? It sounds
interesting…<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
<DIV>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><B><SPAN lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Johnathan
Kemp<BR><B>Sent:</B> Tuesday, October 06, 2009 10:15 AM<BR><B>To:</B> Xerte
discussion list<BR><B>Subject:</B> RE: [Xerte] What is the correct way to set
the propertiesofscriptduplicated text Icons?<o:p></o:p></SPAN></P></DIV></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><o:p> </o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'">Hello
Julian,</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'">Thanks
for your help I have been able to solve my problems with this
now.</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'">Kind
regards</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Arial','sans-serif'">Johnathan</SPAN><o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Johnathan Kemp<BR>ICT
Development Coordinator<BR>Connexions Staffordshire<BR></SPAN><A
href="http://www.cxstaffs.co.uk/"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">www.cxstaffs.co.uk</SPAN></A><BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">01785
355714<o:p></o:p></SPAN></P>
<P style="MARGIN-LEFT: 36pt"> <o:p></o:p></P>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><o:p> </o:p></P>
<DIV class=MsoNormal style="MARGIN-LEFT: 36pt; TEXT-ALIGN: center"
align=center><SPAN lang=EN-US>
<HR align=center width="100%" SIZE=2>
</SPAN></DIV>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 36pt; MARGIN-RIGHT: 0cm; mso-margin-top-alt: 0cm"><B><SPAN
lang=EN-US
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN
lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> Julian
Tenney [mailto:Julian.Tenney@nottingham.ac.uk] <BR><B>Sent:</B> 05 October 2009
09:36<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] What is
the correct way to set the properties ofscriptduplicated text Icons?</SPAN><SPAN
lang=EN-US><o:p></o:p></SPAN></P>
<DIV id=idOWAReplyText93806>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Maybe:</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">- create an array,
with objects in it, one for each key:</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">myArray = [{note:'C',
x:25, y100}, ...etc]</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Then duplicate the
icons. Use the array to position them: so refernce the array from the icon
properties:</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">so for
x:</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">myArray[icon.index()].x</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">etc.</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Use a similar
expression in the text icon to show the text:</SPAN><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"> <o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">{myArray[icon.index()].note}</SPAN><o:p></o:p></P></DIV></DIV>
<DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><o:p> </o:p></P>
<DIV class=MsoNormal style="MARGIN-LEFT: 36pt; TEXT-ALIGN: center" align=center>
<HR align=center width="100%" SIZE=2>
</DIV>
<P class=MsoNormal
style="MARGIN-BOTTOM: 12pt; MARGIN-LEFT: 36pt; MARGIN-RIGHT: 0cm; mso-margin-top-alt: 0cm"><B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">
xerte-bounces@lists.nottingham.ac.uk on behalf of Johnathan Kemp<BR><B>Sent:</B>
Mon 05/10/2009 09:23<BR><B>To:</B> Xerte discussion list<BR><B>Subject:</B>
[Xerte] What is the correct way to set the properties of scriptduplicated text
Icons?</SPAN><o:p></o:p></P></DIV>
<DIV>
<P style="MARGIN-LEFT: 36pt"><SPAN style="FONT-SIZE: 10pt">Hello Xerte
Team,<BR><BR>I am trying to develop a Xerte project that will display the
keyboard of<BR>a button accordion, with the user able to select from a range
of<BR>keyboard sizes.<BR><BR>I have tried two different approaches to achieving
this, both on the<BR>same basic idea of having a page with a text Icon that is
then<BR>duplicated as many times as there are keys on the keyboard, by script
at<BR>run time.<BR><BR>Which ever method I use I have not been able to correctly
change the<BR>newly generated textIcon properties.<BR>I am sure it must be
something simple I am missing.<BR><BR>I need to be able to change the x and y
properties to position the key,<BR>To change its text to display the Note of the
key,<BR>to change its colour and its alpha property and to draw a
circular<BR>border around it.<BR><BR>I think once I can get the correct
expression to change one property I<BR>will be able to resolve everything else,
because then the correct syntax<BR>for accessing the icon, to get at its
properties and methods will have<BR>been identified.<BR><BR>Can you give me an
example of how I should be setting the properties, so<BR>that I can stop banging
my head against the wall ? :-)<BR><BR>Method 1. By using
duplicateIcon<BR>Page<BR> textIcon (id
= protoKey)<BR> script<BR><BR><BR>I
use the following in the
script<BR>=============================================================<BR>allKeys
= new Array();<BR>allKeys[0]= protoKey.duplicateIcon(0);<BR>allKeys[1]=
protoKey.duplicateIcon(0);<BR>// this is a test my intention will be to use a
loop to create the<BR>elements of the array<BR>// that will repeat once for each
key on the keyboard<BR>// new icons are created but I cannot set the
properties.<BR><BR>allKeys[0].clip()._y=100;<BR>// this is shifting the whole
project display, leaving a blank area 100<BR>deep at the top of the
project<BR>============================================================<BR><BR>Method
2. By using duplicate<BR>Page<BR>
script<BR> textIcon (no ID)<BR><BR>I
then use in the script<BR>===============================================<BR>//
create the number of text icons - each text icon will eventually be a<BR>key on
the keyboard display<BR>if (icon.attributes.built != "true"){<BR><BR>
icon.nextSibling.duplicate(5);<BR> icon.attributes.built = "true";<BR>//
the figure 5 is for testing to prove the concept, eventually it will<BR>be set
by the user in an earlier<BR>// interaction when they select the keyboard
size<BR><BR>// create an array of the text icons<BR>allKeys = new
Array();<BR>allKeys = icon.parentNode.findChildNodes("type","text");<BR><BR>// I
then want to be able to set properties for allKeys[0],
allKeys[1]<BR>etc.<BR>================================================<BR><BR><BR>Kind
regards<BR><BR>Johnathan<BR><BR><BR>Johnathan Kemp<BR>ICT Development
Coordinator<BR>Connexions Staffordshire<BR>www.cxstaffs.co.uk<BR>01785
355714<BR><BR>This email and any files transmitted with it are confidential and
are intended solely for the use of the individual(s) or entity(s) to whom they
are addressed. All messages are monitored for virus, high risk files and
inappropriate content. As a result users should be aware that this mail maybe
accessed, read and the right is reserved to reject, return, remove attachments
or delete if considered to be inappropriate or unsuitable. Liability cannot be
accepted for any loss or damage arising from this email (or any attachments) or
from scripts or any virus transmitted.<BR><BR><BR><BR>This communication
represents the originator's personal views and opinions, which do not
necessarily reflect those of Connexions Staffordshire. If you are not the
original recipient or the person responsible for delivering the email to the
intended recipient, be advised that you have received this email in error, and
that any use, dissemination, forwarding, printing, or copying of this email is
strictly prohibited. If you received this email in error, please immediately
reply to the sender or notify
postmaster@cxstaffs.co.uk<BR><BR><BR><BR><BR><BR>Connexions Staffordshire
Limited is registered in England No.4355170<BR><BR>Registered office: Foregate
House, 70 Foregate Street, Stafford, Staffordshire, ST16
2PX<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></SPAN><o:p></o:p></P></DIV>
<DIV>
<DIV class=MsoNormal style="MARGIN-LEFT: 36pt; TEXT-ALIGN: center" align=center>
<HR align=center width="100%" SIZE=2>
</DIV>
<P class=MsoNormal style="MARGIN-LEFT: 36pt">This email and any files
transmitted with it are confidential and are intended solely for the use of the
individual(s) or entity(s) to whom they are addressed. All messages are
monitored for virus, high risk files and inappropriate content. As a result
users should be aware that this mail maybe accessed, read and the right is
reserved to reject, return, remove attachments or delete if considered to be
inappropriate or unsuitable. Liability cannot be accepted for any loss or damage
arising from this email (or any attachments) or from scripts or any virus
transmitted. This communication represents the originator's personal views and
opinions, which do not necessarily reflect those of Connexions Staffordshire. If
you are not the original recipient or the person responsible for delivering the
email to the intended recipient, be advised that you have received this email in
error, and that any use, dissemination, forwarding, printing, or copying of this
email is strictly prohibited. If you received this email in error, please
immediately reply to the sender or notify postmaster@cxstaffs.co.uk Connexions
Staffordshire Limited is registered in England No.4355170 Registered office:
Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16
2PX<o:p></o:p></P></DIV></DIV><div align=\"center\" style=\"font-family:verdana; font-size:10px;\"><hr width=\"100%\">This email and any files transmitted with it are confidential and are intended solely for the use of the individual(s) or entity(s) to whom they are addressed. All messages are monitored for virus, high risk files and inappropriate content. As a result users should be aware that this mail maybe accessed, read and the right is reserved to reject, return, remove attachments or delete if considered to be inappropriate or unsuitable. Liability cannot be accepted for any loss or damage arising from this email (or any attachments) or from scripts or any virus transmitted.
This communication represents the originator's personal views and opinions, which do not necessarily reflect those of Connexions Staffordshire. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you received this email in error, please immediately reply to the sender or notify postmaster@cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16 2PX</div></body></HTML>