I'm trying to create a collapsable TitleWindow to use as a popup.

I'm loosely basing it on Christophe Coenraets' Pod.as code, which extends 
the Panel component.

The problem I'm having is with the code that actually makes the window open 
and close, based on a "state" variable. Here's the relevant excerpt:

----------------------------
    private var __state: Number=1; // 0=Minimized 1=Maximized

     function set state(_state)
     {
         __state=_state;
         if (_state==0) // Minimized
         {
             this.height=getStyle("headerHeight")+5;
             sbStateDown.visible=false;
             sbStateUp.visible=true;
             dispatchEvent({type: "minimize", target: this});
         }
         else
         {
             this.height="100%";
             sbStateUp.visible=false;
             sbStateDown.visible=true;
             dispatchEvent({type: "maximize", target: this});
         }
     }

     function get state(): Number
     {
         return __state;
     }
--------------------------------------

Everything works fine when the component is merely instantiated, but not 
when it's called as a popup. In that case, the button switches correctly 
but the window doesn't change open and close. Must be something with the 
way "this" is defined in the targeting in the above code. Can anyone 
suggest a solution?

- Tom






------------------------ Yahoo! Groups Sponsor --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to