Skip to main content
Participating Frequently
June 24, 2009
Question

Scrolling changes with build 455 (706481)

  • June 24, 2009
  • 1 reply
  • 1090 views

It seems something changed with scrolling from build 452 (705274) to build 455 (706481).  The below works fine in 452 (705274) but in 455 (706481) if i scroll down to the bottom i cant scroll back to the top.  I origanlly thought it was an issue with images b/c we have a lot of InlineGraphicElements and saw some comments about scrolling issues with images in the last change log but made this test and its happening without them.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
     xmlns:mx="http://www.adobe.com/2006/mxml"
     layout="absolute"
     horizontalAlign="center"
     applicationComplete="init()">

    <mx:Script>
         <![CDATA[
             import flashx.textLayout.BuildInfo;
             import flash.utils.*;
             import flash.text.engine.*;
             import flash.display.*;
             import flash.events.*;
            
             import flashx.textLayout.elements.*;
             import flashx.textLayout.formats.*;
             import flashx.textLayout.container.*;
             import flashx.textLayout.events.*;
             import flashx.textLayout.edit.*;
    
             private var container:Sprite = null;

            public function init() : void
             {
                 container = new Sprite;
                    textArea.rawChildren.addChild(container);
                    
                  var textFlow:TextFlow = new TextFlow;
                  textFlow.interactionManager = new EditManager;
                  textFlow.flowComposer.addController(new ContainerController(container, textArea.width, textArea.height));
    
                 var i : uint = 10;
                 var total : uint = i;
                 while( i )
                 {
                     var dv : DivElement = new DivElement;
                     var sp : SpanElement = new SpanElement;
                     sp.text = i + "/" + total + " " + BuildInfo.kBuildNumber;
                     var p : ParagraphElement = new ParagraphElement;
                    
                     p.addChild(sp);
                     dv.addChild(p)
                     textFlow.addChild( dv );
                    
                     i--;
                 }
                
                   textFlow.interactionManager.setSelection(0,0);
                 textFlow.interactionManager.setFocus();
                 textFlow.flowComposer.updateAllControllers();
             }
    
         ]]>
     </mx:Script>

    <mx:Canvas
         height="50"
         width="100"
         backgroundColor="#FFFFFF"
         id="textArea">   
     </mx:Canvas>

</mx:Application>

This topic has been closed for replies.

1 reply

Adobe Employee
June 24, 2009

Yes,  Build 455 had scrolling issues.  Recommend getting this weeks build.

Richard

horixonAuthor
Participating Frequently
June 25, 2009

Updated to build 459 (707306) and the scrolling issues I was having seems to be resolved.  Thanks.  However this bought up another issue with build 459 i am not able to call TextLayoutFormat.defualts();  compiler error 1061: Call to a possibly undefined method defaults through a reference with static type Class, just using new TextLayoutFormat instead.

Adobe Employee
June 25, 2009

That was renamed to defaultFormat.  It's now a getter.  Check the releasenotes.

Another (final for 1.0) batch of API changes are coming by the end of this week.

Apologies for all the changes - the changes are from a review process to make the TLF API consistent, usable and readable.

RIchard