5 Replies Latest reply on Oct 4, 2009 6:47 PM by pakkiderm

    states

    rdoyle720 Level 1
      I'm very new to Flex. Though I am using Flex 3, I was following a Flex 2 tutorial here:

      http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00000103.html

      I got as far as creating the states for the application, unfortunately when I try to preview I get an error:

      "Type was not found or was not a compile-time constant: states. [Generated code (use -keep to save): Path: states-generated.as, Line: 209, Column: 14] "

      My code is attached. What am I doing wrong?

        • 1. Re: states
          Kurt Mossman Adobe Employee
          When I compile this I don't see the error what version of the Flash Player are you using?

          http://www.macromedia.com/software/flash/about/

          I noticed another report that I couldn't reproduce here: http://bugs.adobe.com/jira/browse/FB-13139

          Are you using Flex Builder? If so what happens if you select "Project" and "Clean" ?

          -Kurt.
          • 2. Re: states
            rdoyle720 Level 1
            I'm using the debug version of 9.0.115, which is the version that installed with Flex Builder 3.

            I tried Project>Clean, but it didn't seem to help. Still get the same error. What does clean do?

            When I initially tried this earlier today, I thought it might have been an issue with Flex Builder and try uninstalling and reinstalling. Still get the error.
            • 3. Re: states
              rdoyle720 Level 1
              Hmm, just started a new project and pasted the code in and it works just fine, even though the old one would still cause the error. Must have been some odd hiccup with Flex Builder.
              • 4. Re: states
                Kurt Mossman Adobe Employee
                Clean will remove the generated actionscript classes. What happens is this... first Flex Will take the mxml code and turn it into ActionScript. When it does this... it creates some files named foo-generated.as and then once it's all ActionScript classes it compiles the code into a swf file. The clean says... to get rid of any previously created generated.as files.

                I'm happy it's working for you now regardless of how!
                • 5. Re: states
                  pakkiderm

                  The issue maybe that you can't name your file states or anyother key words. so simply change it to something like myStates.mxml