6 Replies Latest reply: Sep 2, 2009 10:05 AM by rdermer RSS

    Error while attempting to use the CSSFormatResolver Class in Flash CS4

    H_mike

      Hello,

       

      While trying to work with a revised version of the CSSFormatResolver class (created by timoisalive and posted on this thread) the compiler threw the following error:

       

      1061: Call to a possibly undefined method getChildAtIndex through a reference with static type flashx.textLayout.elements:FlowGroupElement.

       

      The method originates from within the invalidate() method of the CSSFormatResolver class.

       

      public function invalidate(target:Object):void {       

           delete _textLayoutFormatCache[target];      

           var blockElem:FlowGroupElement = target as FlowGroupElement;      

           if(blockElem) {          

                for(var idx:int = 0; idx < blockElem.numChildren; idx++)                          invalidate(blockElem.getChildAtIndex(idx));          

                }      

      }

       

      If I comment the for loop I can get the example to run, but that seems to seriously affect the way the styles are interpreted...

       

      The example files are attached below.

       

      Any suggestions?

      Thank you in advance.