6 Replies Latest reply on Mar 1, 2010 5:31 AM by willise414

    Flex 2 Sample project in Flex Builder 3


      Hi there,


      I have downloaded the FlexStore sample from the Adobe site to try and learn some of the more advanced features of flex. Unfortunatel, when I try to import it into Flex 3, it tells me it is not a valid flex project. The FlexStore sample is a Flex 2 project.


      Is there any method to import a Flex 2 project into Flex 3?



        • 1. Re: Flex 2 Sample project in Flex Builder 3
          cheftimo Level 2

          I have been playing a lot with the very same project. I had no problem importing it into FB3 – but your system/setup may be different from mine.


          Instead of importing the project, you can always create a new one, then add the files from Flexstore to it.


          I may actually end up using what I'm doing to display products from one of the merchants I am affiliated with. If you want to see something based on the Flextore app, it's here: http://www.webgourmand.com/wg/CyberCucina/CyberCucina.html


          I have become rather familiar with this project, so, if you do study it and need help, I will be happy to try to assist.


          NOTE: I am not a programmer/developer or anything like that. This is still a work in progress and not all parts of it are yet fully implemented, although it's progressing almost daily. At least for now, I cannot make ViewSource available.


          Have fun and let us know how you are using this thing to learn more about Flex.


          Best regards,



          • 2. Re: Flex 2 Sample project in Flex Builder 3
            willise414 Level 1

            Hi Carlos,


            Thank you for your reply. After much searching, I finally found an article on the Adobe site that shows how to import teh FlexStore into Flex 3. Unfortunately, I have since upgraded to Flash Player 10  and it doesn't seem to work right anymore, so I will try again.


            You site looks very nice. I was hoping to use the basic FlexStore design and instead of using it like a store, use it to display employees of my company. The cell phones would be replaced by the employees pictures and the descriptions would be replaced with their names, addresses, emails, positions, etc.


            I was also hoping to store this data in a MySql database ( which I have already completed) and use the Zend Amf application to access the database.


            Is your application still running from the XML file or have you imported your data into a database?


            You site is actually a little closer to what I want for mine, so I am sure I will be back with questions, if you don't mind too much!!


            Thanks again!

            • 3. Re: Flex 2 Sample project in Flex Builder 3
              cheftimo Level 2

              willise, here are some of the differences between the Flexstore project and mine:


              My backend is ColdFusion/MSSQL db.

              No XML files anywhere.

              Big diff between total products 28 (in Flexstore) and 1100+. So my display shows one category at a time; when a category has more than about 60 products, it will be displayed in the datagrid with its subcategories.

              I started out with SDK 3.2; switched to SDK 3.5 a couple of weeks ago, no problems.

              I use FlashPlayer 10, no problems.


              I don't mind questions – if you have any, ask away; we will both learn.



              • 4. Re: Flex 2 Sample project in Flex Builder 3
                willise414 Level 1

                Hi Carlos,


                I have been working on this project quite a lot over teh last day and cannot seem to find the answer to my question in any of my books (maybe because they only give simplified examples)


                I am trying to get the Viewstack and ToggleButtonBar working correctly. From my reading, this is what I have done:


                1. I created a ManagementView.mxml file and placed it in my Components folder (there are also two other mxml files in there as well).

                2. Then I created this file:


                <?xml version="1.0" encoding="utf-8"?>
                <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                                backgroundGradientAlphas="[1.0, 1.0]"
                                backgroundGradientColors="[#EBD6D6, #EBD6D6]"


                    <mx:Canvas width="100%"


                        <mx:VBox width="100%"
                            <mx:ApplicationControlBar id="acb"
                                <mx:ToggleButtonBar height="100%"


                            <mx:ViewStack id="groupViews"
                                <comp:DayView id="day"
                                           label="Day Employees"
                                <comp:NightView id="night"
                                          label="Night Employees"
                                <comp:ManagementView id="Management"









                However I get an error indicating "Type was not found or was not a compile-time constant" for all three views. I am assuming I have to import a class or package, but I am not sure which one.


                Any ideas what I have done wrong?



                Thanks a million.

                • 5. Re: Flex 2 Sample project in Flex Builder 3
                  cheftimo Level 2



                  That error you are getting does indeed mean you are missing an import. But, since the code you show does not have a <mx;Script> section, I can't tell which one it might be.


                  When I started working on this, I just copied all the files from the Flexstore project, created a new project from those, and started modifying them. Depending of your level of proficiency in Flex, it's possible that it would be a good idea for you to do the same. I have learned a lot doing that.


                  I will be glad to help any way I can, but remember I am not an expert at this.






                  • 6. Re: Flex 2 Sample project in Flex Builder 3
                    willise414 Level 1

                    Hi Carlos,


                    I figured out why I was getting that error and I wanted to let you know what the issue was.


                    I wasn't missing any <mx:Script> information (so an "import" was not required as I thought). The error was in the methid I used to create the supporting mxml files. I was creating them (I'll use the original SupportView.mxml for example) by using the Create new MXML Application method. This is incorrect.


                    What you need to do is create the new MXML as a Component. Once this is done, you can call it it your main application page ViewStack.