[Xerte] text entry interaction with different font colors

Julian Tenney Julian.Tenney at nottingham.ac.uk
Tue Sep 14 11:19:22 BST 2010


As it stands, the code split the paragraph on spaces, so when you write <font color="#999000"> it is breaking it into <font and _color="#999000">, i.e. two words.

 

BreakApart isn't the way to go.

 

If you don't use breakApart(), you can format the text as usual and then use hotspots to handle the interactivity.

 

 

 

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Bárbara Furtado
Sent: 14 September 2010 11:14
To: Xerte discussion list
Subject: Re: [Xerte] text entry interaction with different font colors

 

I'm new using Xerte, I don't know how to taking the highlighting code routines from xerte editor. Is there an example where I can see it?

This is an introductory programming course, and in that specific exercise, the user just need to complete the missing words in the java code. I want to color the for loop, etc, so the student can easily read the code, just like in a compiler. So, is not important that the user can interact with individual words in this exercise, but it would be interesting that student can click on some words just to get a little help (about for loop, for example) in a popup window. Its possible to do that on xerte? But this is another problem :)

2010/9/14 Julian Tenney <Julian.Tenney at nottingham.ac.uk>

I see you are trying to highlight code. Have you thought about taking the highlighting code routines from the xerte editor and using those? It's configurable, and it would be easy enough to make a swf component that does what you need better than formatting each block. I imagine there is a quite a bit of it?

 

Is it important that the user can interact with the individual words in the code by, say, clicking on them?

 

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Bárbara Furtado
Sent: 13 September 2010 18:42
To: Xerte discussion list
Subject: Re: [Xerte] text entry interaction with different font colors

 

No, I'm having the same problem with version 2.12, that is the last one available on website.

Maybe I'm doing something wrong. The example file is attached in this e-mail, so you can see what I'm doing wrong. Before the construction of all interaction code, the text displays fine. The problem is when I break text apart. Can you help me please? Or send me your example.

Thanks

No dia 13 de Setembro de 2010 17:59, Bárbara Furtado <bfurtado at student.dei.uc.pt> escreveu:

I'm using version 2.11. I didn't know about version 2.12... I'll try that one.

Thanks

2010/9/13 Julian Tenney <Julian.Tenney at nottingham.ac.uk>

I think you might need to update your Xerte because mine displays the markup properly.

 

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 12 September 2010 22:48
To: Xerte discussion list


Subject: RE: [Xerte] text entry interaction with different font colors

 

no, it splits it on spaces, so you end up with a bunch of words (the WORD class - you can then break apart WORDs into characters I grant you). MovieClips are then created, and textFields, and their text is set. I must be setting.text rather than .htmlText.There might be a good reason, or it might be an oversight - I'll play around and see whats going on,

 

J

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Sun 12/09/2010 17:39
To: Xerte list
Subject: RE: [Xerte] text entry interaction with different font colors

break apart will break it out as individual characters.
So my guess is that your html text is also being broken into individual characters, so is no longer recognized as tags, it's just characters again and defaults to black.

You can set the text properties dynamically with code.

Dave

________________________________

Date: Sun, 12 Sep 2010 17:30:53 +0100
Subject: [Xerte] text entry interaction with different font colors
From: bfurtado at student.dei.uc.pt
To: xerte at lists.nottingham.ac.uk

Hi,
I'm probably not explaining well (sorry about my english). I need to make a programming exercise with a piece of java code to complete, and I would like to put text with different colors. I'm using HTML tags, like this:

  <font color="#0000FF">public static void</font> <b><i>main</i></b>(String[] args) {
   <font color="#999999">//declara um array de inteiros</font>  
   <font color="#0000FF">int</font>[] A = <font color="#0000FF">new int</font>[ |3| ];

It works fine in preview, but when I use the code to break the words apart ( w = mainText.breakApart(3,7,false,false); ), in preview HTML tags display as text. Is there another way to do this? Anyone can help?

Thanks a lot. And I'm sorry for the repeated e-mail.

Bárbara Furtado
                

No dia 12 de Setembro de 2010 00:29, Bárbara Furtado <bfurtado at student.dei.uc.pt> escreveu:

Hi,
I have a text entry exercise (interaction), and I need to write text with different font colors. When I use <font color="#000000"> example </font> in a simple text icon, it works. But when I break text apart with function myIcon.breakApart(...) to make the exercise, in preview all text colors disappear and shows all the <font> codes, like it was text.
How can I solve this? I'm using Xerte desktop version.

Thanks,
Bárbara Furtado



This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. 
This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. 

_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. 

 

_______________________________________________


Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

 

 


_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.



 

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


More information about the Xerte mailing list