[Xerte] icon property

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Oct 2 11:50:21 BST 2008


When you set the property of an icon using the editor, what you are
doing is setting the value of an attribute in the underlying XML file,
like this:

 

<DIS name="The Name For My Icon" id="myGraphic" x="etc"..../>

 

That xml node is used to initiate a MovieClip at runtime. That movieclip
can be addressed using the id defined in the xml (if it was defined -
otherwise it gets a computer generated name);

 

The values of the attributes in the XML are not necessarily translated
into properties of the resulting movieclip. As you have found, name will
return undefined.

 

Each icon is a movieclip. Each Icon movieclip has a property called
XMLELement. This is the XML node that was used to initiate the icon.

 

So myIcon.XMLElement.attributes.name will contain the value you entered
in the editor.

 

Hope that helps understand what's going on.

 

J

 

From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Elly Langewis
Sent: 02 October 2008 11:09
To: Xerte at lists.nottingham.ac.uk
Subject: [Xerte] icon property

 

Hi Julian,

 

In the Help file it says:

 

For an icon with an id of 'myIcon', you can address properties and
methods using the following code: 

 

myIcon.property = value;

myIcon.methodName();

 

But myIcon.name does return 'undefined' (for a page).

I get the value of the property 'name' back with myIcon.title...so my
problem is solved, but I do not see why.

Even if I add the property 'title' to the page myIcon.name stays
'undefined', so it is not a mix-up.

Elly

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


More information about the Xerte mailing list