2 Replies Latest reply on Sep 18, 2007 7:11 PM by *gsb*

    Popup Window root node reference

    *gsb* Level 1

      I have a "prompting" popup I am trying to make.
      It is based on a "TitleWindow" as the root node.

      Since I can not add an "id" tag to root node, how can I reference it in my states to change one or more of it's property values, like 'title' as exampled below?

      What do I replace '????' with to reference the TitleWindow element?

      quote:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:TitleWindow title="Title for state null" xmlns:mx=" http://www.adobe.com/2006/mxml" >

      <mx:states>
      <mx:State name="state1">
      <mx:SetProperty target="{ ???? }" name="title" value="Title for state 1" />
      </mx:State>
      </mx:states>

      </mx:TitleWindow>

      Thank you.
        • 1. Re: Popup Window root node reference
          TeotiGraphix Level 3
          Hi,

          <mx:states>
          <mx:State name="state1">
          <mx:SetProperty target="{this}" name="title" value="Title for state 1" />
          </mx:State>
          </mx:states>

          That should work fine, remember 'this' always points to your root node.

          Peace, Mike
          • 2. Re: Popup Window root node reference
            *gsb* Level 1
            Thank you for your reply.

            I tried that first... perhaps I had a typo or such and will try again.
            I moved it to ActionScript and this worked fine.

            I am missing the "big picture" still. I come from a reasonable understanding of Flash MX and AS2, but can not yet relate "scope" and "objects" within Flex. Is there a good reference / quick start tutorial or book for such? ...anyone. :)


            Thanks again and I will try this again.