1 Reply Latest reply on Mar 24, 2008 1:01 PM by Gaurav J

    Build problems with mxmlc on Linux

    relavak
      I am using mxmlc on linux and cannot get some things to compile. I took the following code directly from the adobe documentation and tried to compile it using "mxmlc Application.xml" (the file is called Application.xml):

      <?xml version="1.0"?>
      <!-- charts/WatchingCollections.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      initialize="initData();">
      <mx:Script><![CDATA[
      import mx.collections.ArrayCollection;

      [Bindable]
      public var dataSet:ArrayCollection;

      [Bindable]
      public var revenue:Number = 100;

      private var t:Timer;

      private function initData():void {
      dataSet = new ArrayCollection();
      t = new Timer(500);
      }

      private function startApp():void {
      t.addEventListener(TimerEvent.TIMER, addData);
      t.start();
      }

      private function addData(e:Event):void {
      /* Add a maximum of 100 data points before user has to click
      the Start button again. */
      if (dataSet.length > 100) {
      stopApp();
      }

      dataSet.addItem( { revenue: revenue } );
      revenue += Math.random() * 10 - 5;
      }

      private function stopApp():void {
      t.stop();
      t.removeEventListener(TimerEvent.TIMER, addData);
      }
      ]]></mx:Script>

      <mx:SeriesInterpolate id="interp"
      elementOffset="0"
      duration="300"
      minimumElementDuration="0"
      />

      <mx:Panel title="Line Chart">
      <mx:LineChart id="myChart" dataProvider="{dataSet}">
      <mx:series>
      <mx:LineSeries
      yField="revenue"
      showDataEffect="{interp}"
      displayName="Revenue"
      />
      </mx:series>
      <mx:horizontalAxis>
      <mx:LinearAxis autoAdjust="false"/>
      </mx:horizontalAxis>
      </mx:LineChart>
      <mx:Legend dataProvider="{myChart}"/>
      </mx:Panel>

      <mx:HBox>
      <mx:Button id="b1" label="Start" click="startApp()"/>
      <mx:Button id="b2" label="Stop" click="stopApp()"/>
      </mx:HBox>

      </mx:Application>


      The compiler gave the following output:

      /home/me/flex/examples/Application.mxml(43): Error: Type was not found or was not a compile-time constant: SeriesInterpolate.

      <mx:SeriesInterpolate id="interp"

      /home/me/flex/examples/Application.mxml(50): Error: Type was not found or was not a compile-time constant: LineChart.

      <mx:LineChart id="myChart" dataProvider="{dataSet}">

      I can see that the LineChart and SeriesInterpolate are defined in the mxml-manifest.xml file in my sdk3/frameworks directory.