9 Replies Latest reply on Jun 20, 2012 6:09 AM by Winx Alex

    Error when overriding mx_internal function in mxml file

    1ndivisible Level 1

      Hi,

       

      I'm having difficulty overriding an mx_internal function inside an mxml file. I get an error:

       

      1004: Namespace was not found or is not a compile-time constant. StackRenderer.mxml /Layouts/src/example line 12 Flex Problem

       

      <?xml version="1.0" encoding="utf-8"?>

           <s:ItemRenderer

                  xmlns:fx="http://ns.adobe.com/mxml/2009"

                  xmlns:s="library://ns.adobe.com/flex/spark"

                  xmlns:mx="library://ns.adobe.com/flex/mx">

       

                  <fx:Script>

                        <![CDATA[

                              import mx.core.mx_internal;

       

       

                              use namespace mx_internal;

       

       

                              override mx_internal function drawBackground():void{

                              }

       

       

       

                         ]]>

                  </fx:Script>

       

      </s:ItemRenderer>

       

      What am I doing wrong?