9 Replies Latest reply on Apr 18, 2007 12:57 PM by Neeeol

    getProperty allowables

      To try solving another problem I've been playing with the getProperty function. I ran into an interesting issue. This line compiles:

      var PVSForm = getProperty(_root.session.windowMgr[0], _x);

      but this one doesn't:

      var PVSForm = getProperty(_root.session.windowMgr[0], contentPath);

      I attached my call to attachMovie. The question is, what properties are accessable through getProperty? Since _x and contentPath are both declared the same way, I assumed I could get to both, but apparently not.

      Is there a list of runtime accessible properties available?
        • 1. Re: getProperty allowables
          kglad Adobe Community Professional & MVP
          getProperty must expect a class property.
          • 2. Re: getProperty allowables
            Neeeol Level 1
            Okay, then what's the class that has the property?
            • 3. Re: getProperty allowables
              kglad Adobe Community Professional & MVP
              it better be the movieclip class or your attachMovie() will fail.
              • 4. Re: getProperty allowables
                Rothrock Level 5
                Why are you using getProperty anyways? getProperty is very old style flash and I think most folks here don't ever use it. Does this work:

                var PVSForm = _root.session.windowMgr[0].contentPath;

                I think the problem is that _x is a defined property of the MovieClip class while contentPath is a dynamic property. Or maybe not?
                • 5. Re: getProperty allowables
                  why are you using getProperty? i read somewhere that it's not recommended to use, unless you are using or publishing in older flash versions. do you have any special reason to use this function? this does the same:

                  var PVSForm = _root.session.windowMgr[0].contentPath

                  i never use getProperty.

                  • 6. Re: getProperty allowables
                    BorosAdam Level 1
                    ahhh... almost the same time almost totally the same answer. funny. ;)

                    • 7. Re: getProperty allowables
                      Neeeol Level 1
                      The reason I was using it is because I am not familiar with this stuff and that's what I found. I had already discovered that I could access my "streamin" object directly. So I guess the answer to this thread is "getProperty is obsolete. Just access the properties directly."

                      Thank you.

                      I invite you all to take a stab at my related question:
                      http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=288&threadid=1260545&fo rumid=15
                      • 8. Re: getProperty allowables
                        Rothrock Level 5
                        Glad this worked out for you. I have a question – not meant to be mean or anything – that might help me help more people in the future.

                        When you say "…that's what I found." How do you mean that? What I'm getting at is, how are you learning AS and what would have lead you to something that is really so old and hasn't been the dominant way of getting property values for something like 3 versions and 7 years?

                        Actually after looking at your other thread I'm guessing this is a legacy file? If that is the case, 'nuff said. Otherwise understanding how you are coming onto old techniques could really help me understand how people come to AS. Thanks.
                        • 9. Re: getProperty allowables
                          Neeeol Level 1
                          Yes, this is a legacy file. The only former developer that's still with us suggested getProperty, and I googled it. I don't read fast enough or retain well enough to read the thousands of available pages on ActionScript. Between PDFs and LioveDocs, the ActionScript 2.0 Dictionary I bought, plus the FlashMX Pro for Server Geeks, I have too much information and not nearly enough knowledge.

                          I've been two days now trying to access code that's attached to a movie clip and which I have no reference to at runtime. That's where this came from, I was hoping I'd be able to get a reference to the code instance for the window I need to modify. So far, no joy --- but I have a cunning plan!

                          Thanks for your help.