[Xerte] How do you detect someone clicking ontextthathasbeenmarked with the hot text tags?

Johnathan Kemp johnathan.kemp at cxstaffs.co.uk
Wed Sep 9 08:48:17 BST 2009


Hello Julian,
 
Many thanks - it's easy when you know how :-)
 
Kind regards
 
Johnathan
 

Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk <http://www.cxstaffs.co.uk/> 
01785 355714


 

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 08 September 2009 17:50
To: Xerte discussion list
Subject: RE: [Xerte] How do you detect someone clicking
ontextthathasbeenmarked with the hot text tags?


I thought you were looking in the source code for the engine: here is
the function:
 
function hotText(text){
 rootIcon.hotTextClicked = text;
 rootIcon.broadcast('onHotText');
}
 
so you need to listen to rootIcon and then use rootIcon.hotTextClicked
to decide what to do,
 
J

________________________________

From: xerte-bounces at lists.nottingham.ac.uk on behalf of Johnathan Kemp
Sent: Tue 08/09/2009 16:39
To: Xerte discussion list
Subject: RE: [Xerte] How do you detect someone clicking on
textthathasbeenmarked with the hot text tags?


Hello Julian,
 
That is exactly what I am trying to find out but I have exhausted where
to look.
 
I can't find anything in the Xerte help file, or in the mail list
archives.
 
I am assuming that hotText is a Xerte method rather than a native action
script method as I can find no reference to it in the Action script 2
reference.
 
I found out that hotTextClicked existed because it showed up in the list
when you press ctrl + shift in a script window.
 
I found hotText as a method by seeing it in the text entered when I
marked text as hot text.
 
I have inspected _level0.engine but all it tells me is that hotText is a
function, so I have no idea how to find out about what if any parameters
it takes.
 
I am guessing that the function will return the string of the marked
text e.g. in your example below it would return "index"
 
I am guessing that when you click on the text the hotText function will
fire an event but thus far I have been unable to trap it
 
I tried setting up
 
page id = hots
    text icon id = myText, text = Text click <a
href="asfunction:_level0.engine.hotText,here">here</a> to trigger hot
text action.
    interaction perpetual = 1
        event eventName = hotTextClicked, icon = myText
            script 
 
                debug("hot text clicked");
                debug(myText.hotTextClicked);
 
but the script never gets to fire.
 
Any tips that might point me in the right direction would be most
appreciated.
 
Kind regards
 
Johnathan

Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk <http://www.cxstaffs.co.uk/> 
01785 355714


 

 

________________________________

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 08 September 2009 16:06
To: Xerte discussion list
Subject: RE: [Xerte] How do you detect someone clicking on text
thathasbeenmarked with the hot text tags?


the method is there so it can be called from <a
href="asfunction:_level0.engine.hotText, index"> link in html and have
the piece navigate to a page. I think. Check out what the actual
function does and what parameters it expects.
 
J

________________________________

From: xerte-bounces at lists.nottingham.ac.uk on behalf of Johnathan Kemp
Sent: Tue 08/09/2009 08:59
To: Xerte discussion list
Subject: RE: [Xerte] How do you detect someone clicking on text that
hasbeenmarked with the hot text tags?



Dear Xerte Team,

I have now discovered that there is a method  _level0.engine.hotText.

There also appears to be a property hotTextClicked, though I am unsure
what object it belongs to.

However since the hottext is not a child of an interaction I am unsure
how to test for when the text has been clicked on, so as to trigger
events from a script.

I have searched the help and the archives but cannot find anything that
will give me the final part to solve the puzzle.

Kind regards

Johnathan


Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk
01785 355714





-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Johnathan
Kemp
Sent: 03 September 2009 12:02
To: Xerte discussion list
Subject: [Xerte] How do you detect someone clicking on text that has
beenmarked with the hot text tags?

Dear Xerte Team,

I have a text icon which contains text that is to long to fit in the
text box, so I am using a scroll bar. However I want to trap the user
clicking on sections of the text.

If I use a hot spot this becomes out of position when the user scrolls
the text icon, as the text moves but the hot spot does not.

Could I use the hot text tags to mark the text I want the user to click
on?

If so how would I then trap the event, distinguishing between one
section of text within the icon and another?

I am trying to avoid breakApart() as the text icon in question is being
used as a display area, being populated by script that reads the text
property of the appropriate text icon to be displayed and then using
setText() to set the text of the display text icon. If I can just put
tags in the text that would be ideal.

Kind regards

Johnathan


Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk
01785 355714


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 at cxstaffs.co.uk





Connexions Staffordshire Limited is registered in England No.4355170

Registered office: Foregate House, 70 Foregate Street, Stafford,
Staffordshire, ST16 2PX

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

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 at cxstaffs.co.uk





Connexions Staffordshire Limited is registered in England No.4355170

Registered office: Foregate House, 70 Foregate Street, Stafford,
Staffordshire, ST16 2PX

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


________________________________

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 at cxstaffs.co.uk
Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford,
Staffordshire, ST16 2PX
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 at cxstaffs.co.uk


Connexions Staffordshire Limited is registered in England No.4355170
Registered office: Foregate House, 70 Foregate Street, Stafford, Staffordshire, ST16 2PX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090909/f07df4b0/attachment.html


More information about the Xerte mailing list