[Xerte] Reading X,Y

Tenney Julian Julian.Tenney at nottingham.ac.uk
Mon Jun 2 09:23:13 BST 2008


My own preferred way of doing this is to set a property on the icons
themselves, rather than access the XML directly. If you set up a load of
graphics, you can loop over them and set additional properties such as
'initX' or 'initY':
 
myIcon.initX = myIcon._x;
 
then it becomes much simpler to replace it:
 
myIcon.animate(myIcon.initX, myIcon.initY,10,'linearTween');

________________________________

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul
Beckwith, AC&S Ltd
Sent: 29 May 2008 16:20
To: 'Xerte discussion list'
Subject: [Xerte] Reading X,Y



Hi

 

Am trying to send an item back to it's original x &y. Does anybody know
of a way of reading the x&y from the XML file through script? 

The first line works but is hard coded, we want to extract the initial
post position of the object just dropped so we can return it to its
start position. Second line doesn't work...

 

 

if(blnTargetFree==false){

//all targets are full, take action

 

//mf1.objectDropped.animate(100,100,20,'linearTween');

mf1.objectDropped.animate(mf1.objectDropped.XMLNode.attributes.x,mf1.obj
ectDropped.XMLNode.attributes.y,20,'linearTween');

 

}

 

 

Aerospace Consulting & Services Ltd

Engineering, Training, Consultancy <http://www.acns-gmbh.com/> 

 

Paul Beckwith
Multimedia Developer 

AC&S LTD
35A Victoria Road East
Thornton-Cleveleys
Lancashire
FY5 5BU
UK 

paul.beckwith at acns-group.com <mailto:mark.tomlinson at acns-group.com> 
www.acns-group.com <http://www.acns-group.com/>  

tel: 
fax: : 

+44 1253 855 997
<http://www.plaxo.com/click_to_call?lang=en&src=jj_signature&To=%2B44+12
53+855+997&Email=mark.tomlinson at acns-group.com> 
+44 870 762 6818

 

 

 

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


More information about the Xerte mailing list