6 Replies Latest reply on Sep 23, 2009 12:52 PM by Harry Wycoff

    Basic question about Flex SDK:

    Harry Wycoff

      I'm a noob and also can't afford Flex Builder, so I downloaded Flex SDK.  I have the Java runtime, and set my JAVAHOME sys variable.  I ran the

       

      C:\Program Files\FlexSDK\samples\explorer\build.bat

       

      ...and it ran for a couple of minutes (I presume successfully since I didn't see the word "error" appear anywhere in the command line window).

       

      Now--I don't know if Component Explorer had been there before in the original download of Flex SDK (which all of which I copied into a directory I made called "C:\Program Files\FlexSDK\", but it's there now inside "C:\Program Files\FlexSDK\samples\explorer\" directory.  I don't know if my running batch.bat created this "Explorer.html" or not.  Does it?

       

      My next question.  When I open that Explorer.html--as I've been instructed to do in order to view sample running Flex files--I see nothing but grey.

       

      I don't know what to do, but this is compounded by the fact that I'm new to all of this--I don't know what to expect either.

       

      Can anyone help point me in the right direction?  Thanks.

        • 1. Re: Basic question about Flex SDK:
          RWinscot Level 1

          Sounds to me like an IDE might help you... check out Flash Develop (http://www.flashdevelop.org). It's a free and has a solid community backing it.

           

          Cheers,

           

          Rick Winscot

          • 2. Re: Basic question about Flex SDK:
            Harry Wycoff Level 1

            Thanks for the link to the flashdevelop site.  I never new it existed.

             

            First what I think I what I really need to do is be able to open an .mxml sample from off the street and be able to run it.  Currently I'm limited to viewing how third party .MXMLs run on the parties' own websites.  They supply me with the mxml source to compile and run on my own, but I don't know whether a runtime environment is available to me on my own system.

             

            For instance, I can write an ActionScript app in Flash CS$ and then compile the Movie or Scene and run it.  Flash CS4 IDE is apparently unable to open an .mxml file let alone run one.  So I downloaded Flex SDK with the expectation that once I ran a command line compile, there would be some way for me to view the resulting application--and not just the resulting source.

             

            I really don't need a gussied up version of a text editor at the moment unless it also contains a full-out player window.  I really just want to better understand why the instructions that came with Flex SDK are so ambiguous about what Explorer Component is.  Can someone explain please?

             

            I thought maybe going to the horse's mouth, Adobe, was best.  Thanks.

            • 3. Re: Basic question about Flex SDK:
              paul.williams Level 4

              It takes a lot longer than 2 minutes to run through the full build of the explorer. When it is finished you should see new files with the '.swf' extension in the same directory as build.bat. You can tell the files are new by checking their creation date. It will also add swfs to each of the sub-directories under that directory. I ran the build by double-clicking on build.bat in Windows Explorer and also using Start->Run->'C:\Program Files\FlexSDK\samples\explorer\build.bat'. When it runs it generates output of the form:

               

              Loading configuration file C:\Program Files\FlexSDK\frameworks\flex-config.xml
              C:\Program Files\FlexSDK\samples\explorer\explorer.swf (382412 bytes)
              Loading configuration file C:\Program Files\FlexSDK\frameworks\flex-config.xml
              C:\Program Files\FlexSDK\samples\explorer\loaderPanel.swf (162908 bytes)
              Loading configuration file C:\Program Files\FlexSDK\frameworks\flex-config.xml
              C:\Program Files\FlexSDK\samples\explorer\SourceTab.swf (255383 bytes)
              Loading configuration file C:\Program Files\FlexSDK\frameworks\flex-config.xml
              C:\Program Files\FlexSDK\samples\explorer\viewsource.swf (270323 bytes)
              Loading configuration file C:\Program Files\FlexSDK\frameworks\flex-config.xml

              etc. etc. etc.

               

              If you are able to run Flex applications from the internet, then you must have a runtime environment installed. As you've summised, MXML files are source code, so you must compile them before they can be run. The mxmlc compiler will convert them to ActionScript prior to compiling them into a Swf. The Swf can be run in a web-browser with the Flash Player plugin installed. For development purposes you may want to install the debug version of Flash Player available here:

               

              http://www.adobe.com/support/flashplayer/downloads.html

               

              If you are having problems with build.bat try running mxmlc directly from a command-line prompt:

               

                   cd C:\Program Files\FlexSDK\bin

                   mxmlc

               

              The output should be something like:

               

              Adobe Flex Compiler (mxmlc)
              Version 3.4.0 build 9271
              Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.

               

              mxmlc [options] [defaultVar]
              Use 'mxmlc -help' for more information.

               

              If this doesn't work and you can't find a solution then post the error you get. Also bear in mind that a free 60-day trial version of FlexBuilder is available and this may help you get to grips with the concepts more quickly:

               

              http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3

              • 4. Re: Basic question about Flex SDK:
                Harry Wycoff Level 1

                p_m_williams,

                 

                Thank you so much for your answer.  It has helped tremendously; exactly the kind of answer and detail I needed.

                 

                I evidently have a big problem:  My command line output looks exactly like yours, but .SWFs are nowhere to be found in any of my directories after the batch's run.  I don't know why.

                • 5. Re: Basic question about Flex SDK:
                  paul.williams Level 4

                  It looks like a write-permissions issue. The Program Files directory has tighter restrictions than other directories and mxmlc is silently failing to write the swf file.

                   

                  Please create a 'FlexSDK' directory directly under C:\  or in your own user directory, expand your SDK there and try again.

                  • 6. Re: Basic question about Flex SDK:
                    Harry Wycoff Level 1

                    This works!  Thank you very much for this!  I really appreciate all of your help.