[Xerte] Xerte3: Is it possible to get the parent DisplayObjectinproperties of a child?

Julian Tenney Julian.Tenney at nottingham.ac.uk
Thu Jul 1 13:07:58 BST 2010


It would be possible to create some tokens in the parser, so that you
had references to the parent of the current Icon. We'd have to be
careful with the language though, as parent will mean something
different than what you describe in the engine's context.

currentParent or something like that might work quite well.

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
Huppertz
Sent: 01 July 2010 12:47
To: Xerte discussion list
Subject: Re: [Xerte] Xerte3: Is it possible to get the parent
DisplayObjectinproperties of a child?

SWFLoader also has the addChild() method, so I think it should be
possible to add other icons. And it works great! 

Just in principle if you have a structure like

icon1
-- icon2

Is there a way other than using an event (e.g. creationComplete) to
access the properties of icon1 from icon2 without using the iconID. E.g.
set width property of icon2 = {parent.width} which should be the width
of icon1?


On 01.07.2010, at 12:49, Julian Tenney wrote:

> I don't think you can have text children of swf icons...
> 
> Remember there are no rules on the tree (yet) so just because you can
> add something, doesn't mean it can go there,
> 
> J
> 
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
> Huppertz
> Sent: 01 July 2010 10:43
> To: Xerte discussion list
> Subject: [Xerte] Xerte3: Is it possible to get the parent
DisplayObject
> inproperties of a child?
> 
> What I want to do is something like this:
> I have a SWFIcon which has a TextIcon as child. I scale the SWFIcon,
and
> want to scale the TextIcon by {1 / parent.scaleX} and {1 /
> parent.scaleY} to have it "unscaled".
> 
> ==================================
> Peter Huppertz
> E-learning and IT Specialist
> International Centre for Asset Recovery
> Basel Institute on Governance
> Phone: +41 61 205 55 18
> Fax: +41 61 267 55 19
> 
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte

==================================
Peter Huppertz
E-learning and IT Specialist
International Centre for Asset Recovery
Basel Institute on Governance
Phone: +41 61 205 55 18
Fax: +41 61 267 55 19

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


More information about the Xerte mailing list