I'm pretty sure the custom window shifts when transitions are
applied to the content. I'll try and explain some more how
everything is built:
the custom window is a canvas with a label, a close button and
another canvas (contentHolder) which will hold the window's content.
the module contains an instance of this custom window, and ads the
content to it via actionscript (I have a method in the custom window
class which sets the content and the dimmensions of the
contentHolder)
the transitions are implemented in the content class.
So: schematic this would look like this:
content -> {contentHolder} Custom Window -> Module -..-> Module
Loader.
calling this.parent.parent from content would highlight CustomWindow
(seeing that this.parent would highlight contentHolder which is a
child of the custom window).
this.parent changes only the inner canvas and even though I have set
autolayout=true, the custom window doesn't enlarge.
this.parent.parent.parent doesn't work.
Any ideas?
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> If you don't use a module, do you have the same problem? I'm more
> interested in who the parent of the custom window and content is,
and
> whether it is the content that shifts or the custom window.
>
>
>
> ________________________________
>
> From: [email protected]
[mailto:[EMAIL PROTECTED] On
> Behalf Of flashcrow2000
> Sent: Wednesday, May 23, 2007 8:35 AM
> To: [email protected]
> Subject: [flexcoders] changing states in module behaves strange
>
>
>
> Hello,
>
> Here's the story:
> I have a custom window and a class which defines a specific
content
> (pictures, text, other components and so on).
>
> My module loads a custom window and sets its content to that
> specific class (much like a popupmanager, if you like, but i can't
> use that for this project).
>
> My problem is that, whenever one of the windows changes state, it
> jumps back to the upper left corner, where all moduleLoaders
objects
> are.
>
> I have implemented transitions between the states, and if I remove
> them, the window doesn't jump anymore.
>
> One of the transitions looks like this:
> <mx:Transition id="resUp" fromState="*" toState="results">
> <mx:Sequence target="{this.parent.parent}">
> <mx:AddChildAction/>
> <mx:Resize target="{this.parent.parent}" heightTo="460"/>
> </mx:Sequence>
> </mx:Transition>
>
> where this.parent.parent leads to the custom window.
>
> Any ideas?
> Thanks!
>