1 Reply Latest reply on Mar 5, 2009 6:07 AM by Newsgroup_User

    how to pass a reference to the main class of the swf to an actionscript class

    lreadl
      I have an all-actionscript project I was previously compiling from CS4, and now I'd like to compile it from flex. I need to call a static method of one of my AS classes and pass it a reference to the main class of the swf, also known as the main timeline (if not customized). In CS4, I did this by calling the static method on the first frame of the main timeline and passing it "this". How do I pass a reference to the main class of the swf in flex?
        • 1. Re: how to pass a reference to the main class of the swf to an actionscript class
          Level 7

          "lreadl" <webforumsuser@macromedia.com> wrote in message
          news:gomlig$1h3$1@forums.macromedia.com...
          >I have an all-actionscript project I was previously compiling from CS4, and
          >now
          > I'd like to compile it from flex. I need to call a static method of one
          > of my
          > AS classes and pass it a reference to the main class of the swf, also
          > known as
          > the main timeline (if not customized). In CS4, I did this by calling the
          > static method on the first frame of the main timeline and passing it
          > "this".
          > How do I pass a reference to the main class of the swf in flex?

          Pretend that you had created a base class instead of using timeline code,
          then use the methodology you'd have used in that case.