10 Replies Latest reply on Mar 11, 2008 10:04 AM by AwesomeDigital

    Import Component


      I just started using flex today after seeing a video on some basic stuff and licking what I saw.

      I'm trying to use the Coverflow component by dougmccune and i'm trying to figure out how too import that component so I can use it. The guy in the video just selects add project in library path when and selects cover flow and it working for him.

      I've tried making a new project, but I can't figure out how to import the files in the zip that I downloaded.

      Can someone explain too me how to import the component, or a link to a guide that will show you how?

      Thank you
        • 1. Re: Import Component
          peterent Level 2
          Like diving into the deep end, huh? What they did in the video was to put the file containing the CoverFlow component into the Flex Builder build path. The component is in a file with a .SWC extension. You need to locate that file on your computer, then open your project's Properties, find Flex Build Path on that dialog, and pick the Library tab. Then pick the Add SWC button, browse to the location of the .SWC file and add it.

          That's half the battle. Once that's done you need to tell the compiler you are going to use it. Open an MXML file where you want to use the component, switch to Design View. In the component list, open "Custom Components" and you should see it there. Then just drag it into Design View and the code for it will be generated.

          I do suggest you start with something a bit simpler and other tutorials and then this will make more sense.
          • 2. Re: Import Component
            Hi peterent,

            I don't think this is gonna work. I also downloaded the coverflow component ( http://dougmccune.com/flex/coverflow/flexcontrols/srcview/index.html). There are 2 swc files: "papervision_phunky.swc" and "tweener.swc" in there. If you include them as you said you still get the error:

            The prefix "local" for element "local:VideoCoverFlow" is not bound. trz/src myTube.mxml

            So it would be nice to know how to import this as an Flex Library Project, as it is done in the Video.
            • 3. Re: Import Component
              peterent Level 2
              If there are two swcs, then go to Flex Builder's Project Properties->Flex Build Path->Library tab. Pick Add SWC and browse to one of the swcs. Select it and pick OK. It will be added to the list of libraries. Then do the same for the other. one. Doing this imports it as a library project.

              Once that's done, open your MXML file. In the file begin typing <Vid At that point Flex Builder should produce a list of all of the components that match Vid and you should see in that list VideoCoverFlow (assuming that's its name). Pick it and Flex Builder will finish adding the tag AND it will add a namespace to bind it.

              If Flex Builder doesn't produce a list with the component name in it, then perhaps those swcs do not contain the component and you'll have to fish around on his site to find out what's going on.
              • 4. Import Component

                I confirm that neihter "add Flex Library Project" nor "add SWC [folder]" work for this demo :(
                It seems that the source code given by Doug mcCune aren't the same as those used in the video tutrial.

                it seems that the MovieMaterial (from pv3D lib) is not found. So I added the org.papervision folder to the lib path.
                but it still not has any VideoCoverFlow component neither container.

                is that possible to have an explaination from the developper who made this well-made video please?

                PiR Durand
                • 5. Re: Import Component
                  mightyx Level 1
                  guess not :)
                  • 6. Re: Import Component
                    AwesomeDigital Level 1
                    I emailed Doug McCune and this was his response as to why you can not recreate what James Ward does in that video.

                    "He must have created an extension that adds a dataprovider. My examples don't use dataproviders, so he probably just wrapped my stuff in a small extension for his specific use case."

                    Perhaps someday James Ward will post his modified component?

                    • 7. Re: Import Component
                      Peter is right, or you can also just drop the .swf files in the LIBS forlder of your flex project.
                      • 8. Re: Import Component
                        AwesomeDigital Level 1
                        With the example that is posted?

                        I don't think there is a VideoCoverFlow component in those?

                        • 10. Re: Import Component
                          AwesomeDigital Level 1

                          Thank you VERY MUCH!