Removing libs components using the mxmlc Flex SDK

I am new to the Flex SDK and am trying to implement a simple project using the Doug Mccune CoverFlow widget . Most of the documentation on how to do this suggests that you are using the Adobe FlexBuilder product, which is an Eclipse plugin for $ 250, which I would rather avoid buying. The problem I ran into is simply getting the Swow swap file, which is a binary version of its lib component that will be recognized by mxmlc, the compiler of the Flex SDK project. I keep getting error messages like

Error: failed to install component

and

Error: The type was not found or was not a compile-time constant: CoverFlow.

I also tried the type "VideoCoverFlow", since I am sure that these types are defined in the Doug lib. Alas, I was stuck in figuring out where I was wrong.

The following is the full text of my mxml project project called coverflow.mxml.

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*" height="100%" width="100%" layout="absolute"> <local:CoverFlow id="CoverFlow" horizontalCenter="0" verticalCenter="0" borderThickness="10" borderColor="#FFFFFF" width="100%"/> </mx:Application> 

I am trying to compile it with the following command:

 c:\flex_sdk_3\bin\mxmlc.exe -compiler.source-path=lib coverflow.mxml 

I also tried moving the CoverFlow_lib.swc file to the same directory as the mxml file, instead of using the source-path argument, but that doesn't seem to matter.

I would love to go to RTFM if someone could be so kind as to point me in the direction of the relevant documents. There are the following questions here and here .

Thanks!


Refresh . I changed the build command to the following:

 mxmlc -library-path+=lib coverflow.mxml 

And I also tried the following:

 mxmlc -library-path+=CoverFlow_lib.swc coverflow.mxml 

With a swc file in the same directory as the mxml file. However, I still get the same errors.

There is also a video here showing the exact same library that I am trying to use, but in Flex Builder. Unfortunately, it does not show how to use mxmlc.

I also tried just disabling my mxml,

 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*" > <local:VideoCoverFlow /> </mx:Application> 
+6
flex mxml
source share
3 answers

Below is a link to the mxmlc command-line tool documents from Adobe and a direct link to the command-line options link. I also found mxmlc -help list good place to start.

We recommend using library-path as another poster to add the path to the directory containing the swc file. Use the + = operator to ensure that you are not overwriting previous values.

eg.)

 c:\flex_sdk_3\bin\mxmlc.exe -library-path+=lib coverflow.mxml 
+9
source share

If it is swc, you should not use the library path, not the source path, and refer to swc?

+1
source share

I finally got my project. Using the path library was part of the solution, but I also had to study the sources of the Doug Mccune library more carefully so that I could use the correct path information and type names in my mxml.

Winning command line

 mxmlc -library-path+=lib coverflow.mxml 

And working mxml

 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:coverflow="com.dougmccune.coverflow.*" xmlns:containers="com.dougmccune.containers.*" xmlns:local="*" > <containers:CoverFlowContainer id="flow" /> </mx:Application 

For some reason, my container complains if I use id="coverflow" . I get a message that the name and type name cannot be the same. If anyone can explain this to me, I would like to understand what is happening there.

Thanks again for your help, Simon and James.

0
source share

All Articles