[Xerte] Use textIcon field of a text icon todisplayagraphictotheleft of a text icon

Paul Swanson Paul.Swanson at harlandfs.com
Mon Aug 24 16:56:15 BST 2009


Perhaps you need to include the full URL of the image. You could
probably dispense with the protocol and hostname part (unless the image
is on another domain), so you might try <img
src="/fullPathToXerteFile/media/Cross.png"> in the text icon ...

 

Paul

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Johnathan
Kemp
Sent: Monday, August 24, 2009 8:42 AM
To: Xerte discussion list
Subject: RE: [Xerte] Use textIcon field of a text icon
todisplayagraphictotheleft of a text icon

 

Hello Julian,

 

I assume from your response below that the textIcon property of the text
field is obsolete, redundant or defunct.

 

I have been trying to implement your suggestion below. I finally figured
out that I need to use double quotes in the first line, otherwise
strange things happen as the whole script is affected e.g.

 

txt_04_ps1.createEmptyMovieClip("myImage", 9);

 

I think based on other postings you have made I need to use

 

txt_04_ps1.myImage.loadMovie(_level10.engine.FileLocation +
"media/Cross.png"); // rather than (FileLocation + "media/Cross.png") 

 

I have tried both versions but I still can't get an image to appear.

 

Is it correct to use loadMovie() or loadImage() , I can't get either of
them to work.

 

Also where you then refer to 

 

then set myIconID.txt x,y,width properties

 

would that in my example be 

 

txt_04_ps1.x = 200;

txt_04_ps1._x = 200;

txt_04_ps1.myImage.x = 200;

txt_04_ps1.myImage._x = 200;

 

What is the .txt property for ?

 

I have been struggling with this most of the afternoon, so I have come
to the conclusion I need input from the Guru :-)

 

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: 19 August 2009 10:23
To: Xerte discussion list
Subject: RE: [Xerte] Use textIcon field of a text icon to
displayagraphictotheleft of a text icon

I'd do this by adding a new movie clip to the text icon, and then
positioning it, and the text field appropriately inside the icon.

 

myIconID.createEmptyMovieClip('image', 9);

myIconID.image.loadMovie(yourimagefile);

 

then set myIconID.txt x,y,width properties

 

Then you just have one icon to deal with in Xerte.

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Patrick
Lockley
Sent: Wednesday, August 05, 2009 11:59 AM
To: Xerte discussion list
Subject: RE: [Xerte] Use textIcon field of a text icon to
displayagraphictothe left of a text icon

 

Can you append the "<img src=\"\" />" string to the end of the
textfield.

 

I'm not crash hot at raw xerte, these are hacks

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Johnathan
Kemp
Sent: 05 August 2009 11:37
To: Xerte discussion list
Subject: RE: [Xerte] Use textIcon field of a text icon to display
agraphictothe left of a text icon

 

I have six text fields and two target areas in an interaction

 

Text fields 1 through 3 are correct for target area ta1, text fields 4
through 6 are correct for target area ta2

 

I would like to display a ? graphic against each text field, that will
move with them when they are dragged. Hence the attempt to use the
iconText field of the text icon.

 

When text field 1 is dropped onto ta2 (an incorrect user response) I am
changing the text colour to red but I also want to change the ? graphic
to a X graphic.

 

When text field 1 is dropped onto ta1 ( a correct user response) I am
changing the text colour to green but I also want to change the ?
graphic to a tick graphic.

 

At the moment the dragging works, the colour change works, the scores
increase or decrease depending on whether the response is correct or
incorrect.

 

However I cannot get the textIcon to appear beside the text at all. Only
once I can get it to display will I then be able to explore how I can
change the graphic from within a script.

 

Once I have cracked this I want to add a sound to play when a drop is
completed, either a right answer sound for a correct response or a wrong
answer sound for an incorrect response.

 

This is all using raw xerte.

 

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 Patrick
Lockley
Sent: 05 August 2009 11:15
To: Xerte discussion list
Subject: RE: [Xerte] Use textIcon field of a text icon to display a
graphictothe left of a text icon

Hello,

 

So you want a tick image to appear depending on where an item is
dropped?

 

Set the graphic to be invisible till the result even, then set it
visible?

 

Pat

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Johnathan
Kemp
Sent: 05 August 2009 11:15
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Use textIcon field of a text icon to display a graphic
tothe left of a text icon

 

Hello wonderful Xerte people,

 

Sorry if this has been covered in the list, but if it has I can't find
it. 

 

Searching on textIcon returns lots of hits for text icon :-( but nothing
for textIcon.

 

I have a page with a graphic and a text icon. 

 

I have set the textIcon property to 

 

FileLocation + 'media/Tick.png' 

 

which is the same value as the url field of the graphic icon.

 

The graphic icon shows in the page but fails to show as an icon to the
left of the text icon.

 

I am eventually aiming to have the text icon appear as a result of
dragging and dropping the text icon.

 

If the text icon is dragged onto the correct target area I want to
display a tick and if it is dropped onto the wrong target area a cross,
to the left of the text.

 

First - how do I even get the textIcon to display?

 

Second - can I change it by a script by using 

 

interactionId.objectDropped.XMLElement.attributes.textIcon =
"FileLocation + 'media/Tick.png'"

 

Kind regards

 

Johnathan

Johnathan Kemp
ICT Development Coordinator
Connexions Staffordshire
www.cxstaffs.co.uk <http://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

________________________________

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/20090824/2baec4b4/attachment.html


More information about the Xerte mailing list