Squiggly TLF and RichEditableText

I am trying to apply SpellUIForTLF to the TLF object contained within a RichEditableText spark object.
My mark up looks like this:
<s:RichEditableText id="myTextArea" bottom="50" top="0" left="0" right="200" />
Then in my creationcomplete handler:
protected function init(event:FlexEvent):void
    SpellUIForTLF.enableSpelling(myTextArea.textFlow,"en_US");
The problem is that when I start up the application, I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at flashx.textLayout.container::TextContainerManager/getContentBounds()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:680]
at spark.components::RichEditableText/textContainerManager_compositionCompleteHandler()[E:\d ev\4.5.1\frameworks\projects\spark\src\spark\components\RichEditableText.as:4448]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flashx.textLayout.container::TextContainerManager/dispatchEvent()[C:\Vellum\branches\v2\2 .0\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.a s:1553]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flashx.textLayout.elements::TextFlow/dispatchEvent()[C:\Vellum\branches\v2\2.0\dev\output \openSource\textLayout\src\flashx\textLayout\elements\TextFlow.as:859]
at flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()[C:\Vellum\branches\v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compos e\StandardFlowComposer.as:688]
at flashx.textLayout.compose::StandardFlowComposer/internalCompose()[C:\Vellum\branches\v2\2 .0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as: 760]
at flashx.textLayout.compose::StandardFlowComposer/updateToController()[C:\Vellum\branches\v 2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer. as:556]
at flashx.textLayout.compose::StandardFlowComposer/updateAllControllers()[C:\Vellum\branches \v2\2.0\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowCompose r.as:517]
at com.adobe.linguistics.spelling::SpellingContextMenuForTLF()[C:\p4_garuda1890_ugoyal-xp\es g\squiggly\main\AdobeSpellingUITLF\src\com\adobe\linguistics\spelling\SpellingContextMenuF orTLF.as:95]
at com.adobe.linguistics.spelling::SpellUIForTLF/addContextMenu()[C:\p4_garuda1890_ugoyal-xp \esg\squiggly\main\AdobeSpellingUITLF\src\com\adobe\linguistics\spelling\SpellUIForTLF.as: 481]
at com.adobe.linguistics.spelling::SpellUIForTLF/loadDictComplete()[C:\p4_garuda1890_ugoyal- xp\esg\squiggly\main\AdobeSpellingUITLF\src\com\adobe\linguistics\spelling\SpellUIForTLF.a s:464]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling.framework::SpellingService/loadDictComplete()[C:\p4_garuda 1890_ugoyal-xp\esg\squiggly\main\AdobeSpellingFramework\src\com\adobe\linguistics\spelling \framework\SpellingService.as:117]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling::HunspellDictionary/loadDictionaryComplete()[C:\p4_garuda1 890_ugoyal-xp\esg\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\Hun spellDictionary.as:157]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling.core.utils::SquigglyDictionaryLoader/loadWithoutTimeouts() [C:\p4_garuda1890_ugoyal-xp\esg\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguistic s\spelling\core\utils\SquigglyDictionaryLoader.as:327]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Can someone point out why this is happening?

Hi Godly,
Please use SpellUI.enableSpelling from AdobeSpellingUIEx.swc.
You will need to use AdobeSpellingUIEx.swc from the Squiggly package instead of AdobeSpellingUITLF.swc which must be using right now.
Your code will look something like this:
import com.adobe.linguistics.spelling.SpellUI;
protected function init(event:FlexEvent):void
   SpellUI.enableSpelling(myTextArea,"en_US");
<s:RichEditableText id="myTextArea" bottom="50" top="0" left="0" right="200" />
Please let me know if this solves the issue.
Thanks,
Utsav

Similar Messages

  • Kerning/Letterspacing Problems with TLF - and more

    Hello,
    I have some troubles with TLF (RichEditableText - editable) and Letterspacing/Kerning.
    Problem is, that I my application uses a different rendering-engine on the server-side. Textediting happens with a Flash/Flex Client displaying serverside stored layouts, mass-printing/spoolfile generating again is being done on the server side.
    Now Text looks terrible  (currently most annoying when using Verdana , size 10pt). Even when typing the same word twice letterspacing of the two words looks (and is by one Pixel) diffferent.
    I could life with some differences happening here and there but the Layout and resulting Paragraph height it is a complete mess. Word wrapping accours on different words in almost every line compared to the serverside template-document.
    Last hope is that I am doing things wrong.
    Is this correct: 10 point fontsize equals 10 pixel fontsize in Flash (as flash.system.Capabilities always says DPI is 72)?
    Fonts being used are embedded in MXML style declaration.
    Thanks for any help
    Regards
      Andreas

    The server side rendering engine is a complex system wich produces multiple output formats like PDF, AFP, PCL and so on using own and 3rd Pary Modules. Resulting (printed) Documents do always match each other. I know, that there can be slight differences resulting in an unwanted Linebreak.
    But in the TLF output almost nothing looks like it should - it just does not match the template (screenrendering own C# Windows Textengine) or the print output. It is not about pixel, it's such a huge difference, sadly resulting in additional lines:
    Picture shows Text in our Design Tool (Windows .NET Application)  - Text is Verdana (regular/bold) 10pt
    TLF Version - FontFamily "Verdana", Font-Size: 10
    Same Text layouted in Word 2007 matching exaktly our Layout-Tool.
    Typing twice I ment typing the same word in tlf editor.
    Charspace between "M" and "ü" differs between 3 and 4 pixel, the same happens with "ü" and "l" - which is not a pretty look as you can see in the image.
    Regards
      Andreas

  • TLF and CMS question.

    Greetings,
    I have a Flex app (browser based) that will be displaying formatted text in certain sections. Formatting will include (font color, font weight, lists, paragraph padding, italics). I would like the client to be able to update the content in these sections themselves as it will frequently change and may be in several languages.
    Am I right in understanding that TLF is the best way to go about this?
    If I use TLF to handle the formatting, what are the options for allowing the client to edit or generate the content? Do I need to build and provide them a subset of the functionality at http://labs.adobe.com/technologies/textlayout/demos/ ? Or is there something easier available?
    Thank you for any help you can provide.

    Am I right in understanding that TLF is the best way to go about this?
    lists and paragraph padding you mentioned are the features only TLF can provide, rather than the classic text (textfield text). TLF is an AS3 text layout framework with support for high-quality, typographically  rich, flowable text in Flash.
    PS:
    Direction and BlockProgression are the formats you should set manully when you layout the languages that should be vertical or right-to-left, such as Japanese, Hebrew, Arabic.
    If I use TLF to handle the formatting, what are the options for allowing the client to edit or generate the content? Do I need to build and provide them a subset of the functionality at http://labs.adobe.com/technologies/textlayout/demos/ ? Or is there something easier available?
    Can you access the source code of the demo you mentioned?  The complexity of the demo is mainly about UI things, while the codes for TLF in the demo are pretty simple.
    What you need is a s:RichEditableText and some buttons. Then when you press a button, you get the textflow in the RichEditableText and set its formats and re-compose.

  • Scroller and RichEditableText - max position of scroller

    Hi
    I have maybe quick and easy question, but it's hard to find solution. Does anybody know, how to set max postion of the (vertical) scroller which wrapped RichEditableText ??
    I'm writing chat, and vertical scroller must be at the bottom, to see recent message
    Here is a code  :
                        <s:Scroller width="100%" id="outputScroller"  height="90%"  >
                            <s:RichEditableText  editable="true" clipAndEnableScrolling="true"
                                                 textFlow="{TextConverter.importToFlow(mesgHtml, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
                                                 width="100%" id="outputTf" height="100%" />
                        </s:Scroller>
    I'll be grateful for the answers,
    Best wishes

    From this blog entry:
    http://blog.flexexamples.com/2009/08/19/setting-the-vertical-scroll-position-on-a-spark-ri cheditabletext-control-in-flex-4/
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      xmlns:s="library://ns.adobe.com/flex/spark">
      <mx:ApplicationControlBar width="100%" cornerRadius="0">
        <mx:Form styleName="plain">
          <mx:FormItem label="verticalScrollPosition:">
            <s:HSlider id="slider" minimum="0"
              maximum="{richEditableTxt.contentHeight - richEditableTxt.height}"
              change="richEditableTxt.verticalScrollPosition = slider.value;" />
          </mx:FormItem>
        </mx:Form>
      </mx:ApplicationControlBar>
      <s:RichEditableText id="richEditableTxt" widthInChars="20"
        heightInLines="10" textAlign="justify"
        horizontalCenter="0" verticalCenter="0">
        <s:content>
          <s:p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque tempus, eros ac dignissim interdum, elit sem euismod velit, eget laoreet urna metus nec enim. Cras ornare nulla imperdiet nulla blandit vehicula. Donec risus dolor, sollicitudin nec fringilla nec, aliquet vitae nisl. Duis tincidunt fermentum posuere. Nullam augue sem, rutrum a viverra aliquet, elementum interdum lacus. Aliquam dictum, nulla sit amet tempor commodo, tortor purus ullamcorper turpis, id aliquet dolor mauris vel turpis. Mauris placerat justo non orci porttitor hendrerit. Aenean mattis augue quis turpis dapibus sed eleifend mi sodales. Morbi sem tortor, ultricies vitae laoreet in, viverra id erat. Cras sed varius dolor. Sed vestibulum, sem at vehicula volutpat, enim augue facilisis nunc, ut dapibus nisi mi vel dui. Phasellus elementum leo quis velit mollis aliquam. Fusce a hendrerit lectus. Suspendisse potenti. Nulla urna diam, vulputate sed fringilla eget, consectetur ac risus. Duis sem nisl, hendrerit sit amet volutpat ut, posuere nec diam. Donec dignissim tortor in velit bibendum imperdiet. Sed nibh nulla, fringilla et auctor eu, tincidunt vel arcu.</s:p>
          <s:p>Phasellus egestas nunc et eros accumsan congue ornare nunc vestibulum. In quis erat magna, in mattis purus. Aliquam tempor, velit ac interdum sagittis, nisi neque sodales neque, ac tempus metus leo eget tellus. Cras non gravida tortor. Cras dictum rutrum vehicula. Morbi arcu odio, ultricies quis rhoncus aliquam, consectetur sit amet ligula. In aliquam fermentum mollis. Suspendisse ut massa nibh. Praesent tincidunt, tortor a semper egestas, purus mauris blandit magna, non bibendum leo leo varius odio. Suspendisse aliquet tempor arcu porta posuere.</s:p>
        </s:content>
      </s:RichEditableText>
    </s:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • TLF and Flex Mobile

    Has anyone tried using TLF code in a Flex 4.5 Mobile application? Everything compiles and runs fine but the text is invisible. Any known workarounds for this?

    I was trying to run a simple pagination example that works fine as a web app.
    It uses the paginationWidget.as and Alice.as files which can be found here: http://blogs.adobe.com/tlf/files/2010/09/Pagination20Build169.zip
    Any help would be appreciated.
    Thanks
    The code for the Home view is:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" title="Home">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import tools.PaginationWidget;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.TextLayoutFormat;
    public var pageView:PaginationWidget = new PaginationWidget();
    public var curChapter:int = -1;
    private function init():void {
    storyBox.width=this.width;
    storyBox.addChild(pageView);
    pageView.setSize(storyBox.width, storyBox.height);
    setChapter(0);
    private function setChapter(chapterNumber:int):void
    curChapter = chapterNumber;
    var textFlow:TextFlow = TextConverter.importToFlow(Alice.contents[chapterNumber], TextConverter.TEXT_LAYOUT_FORMAT);
    pageView.textFlow = textFlow;
    private function prevChapter():void
    if (curChapter > 0)
    setChapter(curChapter-1);
    private function nextChapter():void
    if (curChapter >= 0 && curChapter < Alice.contents.length-1)
    setChapter(curChapter+1);
    ]]>
    </fx:Script>
    <s:Group top="0" left="0" right="0">
    <s:Button left="100" top="0" width="70" height="25" label="np"
      click="pageView.nextPage()" fontSize="18"/>
    <s:Button left="0" top="0" width="70" height="25" label="pp"
      click="pageView.prevPage()" fontSize="18"/>
    <s:Button right="0" top="0" width="70" height="25" label="nc" click="nextChapter()" fontSize="18"/>
    <s:Button right="100" top="0" width="70" height="25" label="pc" click="prevChapter()" fontSize="18"/>
    <s:SpriteVisualElement id="storyBox" top="25" bottom="0" left="0" right="0" />
    </s:Group>
    </s:View>

  • TLF and arabic text

    Hello,
    I'm using AS3 with CS3 to do some design involving working with dynamic text field for arabic text.
    This staetemnt works just fine:
    var strValidate_txt.text = "خُرُوجْ"; // a dynamic text field - result  OK
    however when I try to build the string characyter by character:
    var strValidate_txt.text = "";
    strValidate_txt.appendText("خ");
    strValidate_txt.appendText("ر");
    strValidate_txt.appendText("و");
    strValidate_txt.appendText("ج");
    the resuslt is a string with dissjointed characters وجرخ
    I couldn't find a way to fix this in Flash CS3.  I'm wondering if upgrading the Flash CS4 with the new TFL will solve me this issue?
    still need to convince my boss to pay for the upgrade!
    Thanks for help

    Hi,
    I'm working on Flash with Arabic language since 2 years in FAO (http://www.imarkgroup.com) to develop eLearning apps in Flash/Actionscript...before the TLF also.
    The new TLF is the best choice, you can test your arabic text using the demo app http://labs.adobe.com/technologies/textlayout/demos/
    I suggest you to wait for the release of new Flash Builder 4 with the official version of TLF. Now the TLF is a BetaVersion.

  • RichEditableText: export().equals() and HTML export

    1. How can I find out that two richEditableText.export() are equal?
    At least the order of the attributes in the TextFlow element is random which means that exported strings cannot be compared directly. Take for example the trunk.mxml from http://bugs.adobe.com/jira/browse/SDK-21836 and compile+run it several times and you see the different order of attributes. Is there a utility method somewhere to compare two exports? (BTW releasing the source of TLF would ease these kind of bug hunting...)
    I know how to use richEditableText.textFlow.generation but this only indicates changes in the current component.
    2. Is supporting html import/export on the roadmap?
    (This question got burried in the information stream... http://forums.adobe.com/message/2042067#2042067)
    Gordon Smith: TLF's TextFilter class supports importers and exporters for HTML_FORMAT, but I haven't tried them and don't know how robust they are.
    I think the HTML export in TLF is not yet stable. The thing is that once
    it is stable there is pretty much no way to insert the import
    functionality into RichEditableText without rewriting most of the
    component. In my opinion, it should be either integrated into
    RichEditableText even at this early stage or RichEditableText should be
    refactored to allow extending it in an easier way.
    Thanks for any hints,
    Marc

    Hi Abhishek,
    Nice conversation I do not expect that TLF covers the full HTML standard. After all, browsers are too good when it comes to HTML rendering...
    with varying degrees of fidelity.
    I remember reading in the TLF forum, that HTML import/export was experimental. That's why I wrote that HTML is not ready for prime time. Also your comment shows that HTML is a poor choice from a Flex perspective. Unfortunately, it's unclear what varying degrees of fidelity really means as I'm not aware of any precise documentation or code.
    Concerning your idea about passing around a (mutable) instance of TextFlow, I'm not a great fan. The power of markup is besides others, that it is a comparable description of content and format. So I definitely prefer an equal function. If this function doesn't make it into the Flex 4 release, I  reluctantly add to each TLF markup a dirty flag which is based on TextFlow.generation.
    As mentioned before, I prefer TLF could export all content and formatting into HTML compliant format. There are many reasons why HTML is a huge benefit over any new, widely undocumented format (this is not specific to TLF or FXG). A few reasons that come to my mind:
    - Server side: Apache Lucene has a battle-proof extractor. With TLF or FXG, I had to write and configure my own.
    - Server side: Extract and modify links in content. This is obviously very easy with HTML as there are age-old libs available.
    - Flash Player: Compare two TLF markups. There might be also no actionscript lib for HTML available. But I'd happily start a project for HTML but not for a new format without underlining code and thorough doc.
    - HTTP communication: what's the mime type of TLF or FXG?
    - Every developer knows HTML, TLF/FXG must be learned. I regard this learning as a high barrier as TLF does not seem to be a big step forward compared to HTML.
    Note that I don't prefer HTML because it is an "open standard". It's because the whole world knows HTML and that brings a much higher engineering efficiency (and that's maybe due to the open standard). If not all information of TLF can be export HTML, it's a pity but just document it.
    Looking forward to your thoughts/comments,
    Marc
    abhishek.g wrote: Hi Marc,
    Thanks for your reply.
    TLF supports many different markup formats (TLF, FXG, Plain text, HTML) with varying degrees of fidelity. It would simply not do to compare HTML because there isn't a 1:1 correspondence between TLF and HTML capabilities. From that perspective, TLF format would be your best bet though I realize there is the problem of inconsistent attribute order.
    Perhaps your scenario is better addressed by having utilities to compare TextFlow instances rather than comparing corresponding markup (this needs additional thought).
    As for HTML import/export, it is obviously be beyond TLF's scope to implement the full HTML standard. The current implementation is loosely based on the HTML capabilities of flash.text.TextField (see htmlText property), which itself is a small subset of the standard, and deviates from it in some ways. When you say HTML support is not ready for prime time, are you referring to this limited scope, or have you encountered specific bugs in the implementation? If the former, I'd like to know what your expectations are. If the latter, please report them.
    Thanks
    Abhishek
    (Adobe Systems Inc.)
    This message was sent to: faindu
    To post a reply to the thread message, either reply to this email or visit the message page:
    http://forums.adobe.com/message/2059470#2059470
    --end--
    mail transfer stalled...

  • ProLoader and TLF TextFields do not work together!

    I'm using ProLoader to load a .swf that uses TLF.  The master .swf loads the target .swf and all code executes as expected with one minor glitch: the content of the loader is white/blank.  Has anyone else seen this!?
    ~~~~~~~~~~~~~~~~~~~~~~~~
    Here is the full bug report that I tried to send Adobe, but they cap reports at 2000 characters and provide no option for uploading a source .zip. (Seriously, Adobe?)  If you have time, and follow my instructions you will see how ProLoader won't even load a .swf with TLF on its stage.  (Yes, I realize this different from my problem, but I'd like to demonostrate how buggy and inconsistent ProLoader is.  The simple solution would be not to use TLF, and mostly likely, I will end up doing that.)
    ******BUG******
    ProLoader loads .swf with TLF, but ProLoader is blank.
    Steps to reproduce bug:
    1.  Download sample files (http://helpx.adobe.com/content/dam/kb/en/141/tn_14190/attachments/Load_External_SWF.zip) from the Tech Note, Load external SWF into another SWF (http://helpx.adobe.com/flash/kb/load-external-swf-swf.html).
    2.  Open ExternalSWF.fla and assign it a document class.
    Here is mine:
    package  {
              import flash.display.MovieClip;
               import flash.events.Event;
              public class ExternalSWF extends MovieClip {
                        public static var DATA_LOAD_COMPLETE:String = "ExternalSWF_DataLoadComplete";
                        private var data_:String;
                        public function ExternalSWF() {}
                        //This function will be called from the .swf that loaded me.
                        public function loadData(data:String):void
                                  data_ = data;
                                  dispatchEvent(new Event(DATA_LOAD_COMPLETE));
                        public function get data():String { return data_; }
    3.  On ExternalSWF.fla's stage, change a classic TextFields into a TLF TextField.
    4.  In Loader_Movie.fla, change all flash.display.Loader instances to fl.display.ProLoader in order to load TLF TextFields.  Also, add an event listener to myLoader for Event.COMPLETE.  Here are my Loader_Movie.fla's Actions:
    import flash.events.Event;
    import fl.display.ProLoader;
    var myLoader:ProLoader = new ProLoader();                     // create a new instance of the ProLoader class
    var url:URLRequest = new URLRequest("ExternalSWF.swf"); // in this case both SWFs are in the same folder
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, myLoaderIsLoaded);
    myLoader.load(url);                                     // load the SWF file
    addChild(myLoader);                                     // add that instance to the display list, adding it to the Stage at 0,0
    myLoader.x = 10;                                        // move the loaded SWF 10 pixels to the right (from the left edge)  
    myLoader.y = 175;                                       // move the loaded SWF 175 pixels down from the top
    // (optional) load a second external SWF file
    var my2ndLoader:ProLoader = new ProLoader();
    var url2:URLRequest = new URLRequest("ExternalSWF2.swf");
    my2ndLoader.load(url2);
    addChild(my2ndLoader);                                  // optionally, you could put the 2nd SWF beneath
                                                            // the 1st by using addChildAt(my2ndLoader, 1);
    // (optional) scaling of the 2nd SWF file
    my2ndLoader.scaleX = 2;                                 // scale the SWF horizontally by 200%
    my2ndLoader.scaleY = 2;                                 // scale the SWF vertically by 200%
    function myLoaderIsLoaded(event:Event):void
              trace("The first .swf has loaded so add event listeners");
              var swf:ExternalSWF = ExternalSWF(myLoader.content);
              swf.addEventListener(ExternalSWF.DATA_LOAD_COMPLETE, allFinished);
              swf.loadData("foobar");
    function allFinished(event:Event):void
              trace("Here is the data we loaded: " + ExternalSWF(myLoader.content).data);
    Results:
    [Trace] Output
    ReferenceError: Error #1056: Cannot create property __id0_ on ExternalSWF.
              at flash.display::Sprite/constructChildren()
              at flash.display::Sprite()
              at flash.display::MovieClip()
              at ExternalSWF()
    ExternalSWF is invisible; 4 loading dots appear instead.
    Expected results:
    Both .swfs load without incident.
    Trace output:
    The first .swf has loaded so add event listeners
    Here is the data we loaded: foobar
    Additional notes:
    I discovered this bug when my main/master .swf used ProLoader to load another .swf (with TLF on a symbol in the libary).  In this case, the ProLoader appeared blank/white, not even the 4 loading dots.  However, all the code in both .swfs still ran as expected (shown via the Output panel dumping all expected trace statements until execution finished).
    Environment:
    Adobe FLash Professional CS5.5, Version 11.5.1.349
    (bug discovered while running "Test Movie" in IDE)
    Windows 7 Professional Service Pack 1
    Intel(R) Core(TM)2 Duo CPU  E4600 @ 2.40GHz  2.39 GHz
    RAM: 6.00 GB
    64-bit Operating System

    Do you have anything that uses TLF in your preloader? It's possible that the TLF framework has made your preloader so heavy that it merely appears to not be doing anything, but the actual case is that all that stuff has to load before it can show you anything.
    You may find this helpful http://jeffkamerer.com/blog/2010/08/12/using-a-custom-preloader-loop-with-tlf-text/
    However, I don't really understand why you feel you have to use TLF to bring in the text from Photoshop. I think you must mean PhotoShop PSD's, because PhotoShop PNG's will not contain editable text (though Fireworks ones can). I get Photoshop comps all the time and bring the text in as Classic Text. While it's not an exact match 100% of the time, it's as close a match as you're going to get based on the limitations of Classic text. I think there's no reason for your designers to be redoing the designs--you just need to play around with the import settings and figure out what gets you close and then what tweaks you need to do to get closer.
    And, to answer your question, nearly everyone creates graphics for Flash files in Photoshop, despite Fireworks being the better tool. For whatever reason, designers often aren't very adventurous when it comes to learning new tools, and nearly all art schools teach PhotoShop.
    I also don't have any trouble loading CS5.5 AS3 swfs (no TLF--I just don't need the hassle) with Document Classes using an ordinary Loader. So I think there's something not right about what you're doing if you've come to the conclusion that you can't load a swf with a Document Class. Try scaling back to the bare minimum, then working up.
    Finally, I just don't "get" why people do two things that you're doing (or, I do, but I think it's unnecessary and a colossal failure on Adobe's part)
    Instantiating everything through code. Not only are you wasting an inordinate amount of time/code in specifying layout, you also completely lose the natural capability of Flash to compile assets throughout the whole of the swf. This means you have to have a preloader, because literally everything you ever use is embedded before the first visual frame. Contrast to using the timeline, where all you need to load the visuals for the first frame is the Document Class (which you can keep light by coding to Interfaces) and the visuals for the first frame. Anything else you need to load, you can defer to the frame that you've selected for embedding your AS Classes on.
    Using a preloader at all.
    My preloading strategy is very simple. I put a spinner graphic in the first frame, with the word "Loading." The playhead will stop at the frame that I've specified to use for exporting my ActionScript Classes (10--this provides enough space for the label "Loading" to be readable). When the embedded Classes and whatever is needed to display frame 11 is loaded, the playhead will continue to frame 11 by itself, with no code. On Frame 11, I have a MC that is a named instance, and I have a getter/setter pair to catch it. When the setter triggers, I know I'm ready to start the logic.
    However, you could do all sorts of things, like just putting a MC there that "is" the entirety of your other logic (has what is now the Document Class of the swf you're preloading as its BaseClass).
    Anyway, maybe something in my ramble will help you.

  • Text display and scaling issue

    Hello,
    I don't know if this is done by design, but after I released our internal newspaper build on Flex, the number one complaint I received was that when zooming in, the space between the letter was not consistent and in some of the words, the letter are either too far spaced or glued to each other.
    I build a little test app to demonstrate what I mean.
    I will first post the results and then the code.
    First here is a snapshot of text at scale 1: Everything looks great
    Now, here is the same text at scale 1.5: (I only scale x and y, it never occur to me at first that I should use z as well)
    Notice how crisp the text is but the downside are the distorded words: I highlighted a few in yellow.
    So then I figured I give a shot to the z axis and scale that one as well: to my satisfaction the words keep their spacing but the crispiness of the text, not so good!
    Here is the little app:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 
    xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
    library://ns.adobe.com/flex/spark" xmlns:mx="
    library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    private function Size(value:Number, useZ:Boolean=false):void
    this.TextToSize.scaleX = value; 
    this.TextToSize.scaleY = value; 
    if(useZ){
    this.TextToSize.scaleZ = value;}
    else
    this.TextToSize.scaleZ = 1;}
    ]]>
    </fx:Script>
    <s:VGroup>
    <s:HGroup>
    <s:Button label="Scale 1" click="Size(1)">
    </s:Button>
    <s:Button label="Scale 1.5" click="Size(1.5)">
    </s:Button>
    <s:Button label="Scale 1.5 All Dimensions" click="Size(1.5, true)">
    </s:Button>
    </s:HGroup>
    <s:RichEditableText id="TextToSize" editable="false" fontFamily="Verdana" fontSize="10" width="300">
    <s:content>
    <s:p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
    </s:p>
    </s:content>
    </s:RichEditableText>
    </s:VGroup>
    </s:Application>
    So now the big question:
    Is there a way to get the best of both world? Even word sizing, with crisp text?
    Did I miss something, a property that would adjust the fuzziness?
    Thanks for any input
    CNB

    I can use mobile skins for RichText and RichEditableText components for desktop and web projects, but there is a little problem. They have no mobile skins and they are paradoxically not recomended by adobe to use within mobile projects, because they are heavy. But they work great even if they are scaled. Do you still think that this is not a bug?
    http://help.adobe.com/en_US/flex/mobileapps/WS19f279b149e7481c6a9f451212b87fe7e87-7fff.htm l#WS19f279b149e7481c6a9f451212b87fe7e87-7ffb
    "Try to avoid using the RichText and RichEditableText controls in mobile applications. These controls do not have mobile skins, and they are not optimized for mobile applications. If you do use these controls, you are using TLF, which is computationally expensive."
    Is there any chance that this bug will be resolved soon, or do I have to go back to 2004 and make my own class extended from TextField? :-))

  • TLF code freezing up application

    [cross-posted here from TLF forum]
    Since upgrading to the final release SDK for Hero, we have seen our application freezing up intermittently. As the stack trace suggests, it is related to clicking on points on a line chart.
    Has anybody seen something like this before? It is suggested that this is probably any issue within FTETextField.
    Flex SDK 4.5.20967
    Flash Player 10.3.181.14/26
    Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
    at flashx.textLayout.container::TextContainerManager/http://ns.adobe.com/textLayout/internal/2008::factoryUpdateContainerCh ildren()
    at flashx.textLayout.container::TextContainerManager/updateContainer()
    at HTMLHelper/composeHTMLText()[E:\dev\hero_private\frameworks\projects\ spark\src\mx\core\FTETextField.as:3683]
    at mx.core::FTETextField/validateNow()[E:\dev\hero_private\frameworks\pr ojects\spark\src\mx\core\FTETextField.as:2524]
    at mx.core::FTETextField/get textWidth()[E:\dev\hero_private\frameworks\projects\spark\src\mx\core \FTETextField.as:1651]
    at mx.charts.chartClasses::DataTip/measure()
    at mx.core::UIComponent/measureSizes()
    at mx.core::UIComponent/validateSize()
    at mx.charts.chartClasses::ChartBase/positionDataTips()
    at mx.charts.chartClasses::ChartBase/updateDataTipToMatchHitSet()
    at mx.charts.chartClasses::ChartBase/processRollEvents()
    at mx.charts.chartClasses::ChartBase/mouseDownHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\hero_private\fr ameworks\projects\framework\src\mx\managers\SystemManager.as:2924]

    I suggest you also post the question to Flex Forum.
    mx.core.FTETextField is not a class in TLF and It's not recommended that you take it as the container for TLF. s:TextArea, s:RichText, and s:RichEditableText are all good containers for TLF in Flex.

  • Interesting Multiple Container Bug in TLF

    Hi All,
    I've hit a bit of a roadbump in developing an AIR app (2.5.1.17730 runtime) using the TLF and wonder if anyone else has seen it and come up with a workaround. Consider the mxmxl below. When you run the app, you two columns of text as you would expect. Editing (cut, paste, type, undo, redo) all work fine anywhere except when you edit the second line of the second column. Then the whole second column is pushed down to the y-value of the first column until you do an edit somehwere else in the window (say, put a space in the first column somewhere). I have pored over this for quite a while and have come to the considered opinion that (a) it's a bug, and (b) I haven't a clue what is causing it or how to work around it.
    Any suggestions?
    Thanks!
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            creationComplete="init(event)" viewSourceURL="srcview/index.html">
    <fx:Script>
      <![CDATA[
       import flashx.textLayout.container.ContainerController;
       import flashx.textLayout.conversion.ITextImporter;
       import flashx.textLayout.conversion.TextConverter;
       import flashx.textLayout.edit.EditManager;
       import flashx.textLayout.elements.TextFlow;
       import flashx.undo.UndoManager;
       import mx.events.FlexEvent;
       private var _textContainer:SpriteVisualElement = null;
       private static const textInput:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008">
        <div>
         <p><span>Qui magna velit consequat, lobortis iriure autem augue duis exerci blandit esse laoreet ex eros, adipiscing aliquip, ut, vel eum. Vero consectetuer dolor feugait dolore lobortis delenit nibh eu, te et in, dolore. Nulla ut enim consequat diam adipiscing nulla facilisis zzril te laoreet at. Iusto quis esse nulla et, aliquam quis, facilisi euismod, diam eros ut dolore commodo erat et ad tation, illum. Autem, qui wisi odio ad vel esse ad ad. Velit vel facilisis iriure, et nisl aliquip iriure zzril.
           Praesent tincidunt blandit nulla, odio, sed vulputate ipsum dolore duis in veniam iriure zzril minim odio suscipit dignissim wisi. Feugiat, volutpat duis vero ut elit zzril, te commodo duis. Molestie ea erat et volutpat dolore vel molestie consequat tincidunt hendrerit consequat. Euismod, consequat blandit nostrud facilisi qui delenit duis, molestie tation illum accumsan amet dolor feugait molestie ea consectetuer wisi. Adipiscing lobortis, ut veniam nostrud accumsan vero elit dolore ex nulla ullamcorper sit qui. Qui magna velit consequat, lobortis iriure autem augue duis exerci blandit esse laoreet ex eros, adipiscing aliquip, ut, vel eum.
           Vero consectetuer dolor feugait dolore lobortis delenit nibh eu, te et in, dolore. Nulla ut enim consequat diam adipiscing nulla facilisis zzril te laoreet at.</span></p>
        </div>
        </TextFlow>;
       private var _textFlow:TextFlow;
       private function init(evt:Event):void {
        var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT);
        importer.throwOnError = true; // will throw exception if parsing error occurs on import
        _textFlow = importer.importToFlow(textInput);
        _textFlow.flowComposer.addController(new ContainerController(col1, col1.width, col1.height));
        _textFlow.flowComposer.addController(new ContainerController(col2,col2.width,col2.height));
        col2.x = g1.width*0.55;
        //adding Select/Edit/Copy/Paste/Undo features
        _textFlow.interactionManager = new EditManager(new UndoManager());
        // initialize with a selection before the first character
        _textFlow.interactionManager.selectRange(0,0);
        _textFlow.flowComposer.updateAllControllers();
      ]]>
    </fx:Script>
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Group x="0" y="0" width="100%" height="100%" id="g1">
      <s:SpriteVisualElement x="0" y="0" height="100%" width="45%" id="col1"/>
      <s:SpriteVisualElement y="0" height="100%" width="45%" id="col2"/>
    </s:Group>
    </s:WindowedApplication>

    This is a bug in the TLF 1.1. It was not there in TLF 1.0, and has been fixed in TLF 2.0 (currently pre-release). You have three options:
    - You can go back to TLF 1.0. If you are using Flex 4.1, I think you could do this by putting TLF 1.0 in place of TLF 1.1 in the Flex installation. Alternatively, you could roll back to using Flex 4.0.
    - You can go forward to use TLF 2.0. If you are using Flex, this would mean adopting the pre-release Hero version of Flex.
    - You can create your own TLF 1.1 with a fix. I can provide you with the fix, but you will need to recompile TLF 1.1, which means you cannot use the RSL version of the library.
    I apologize for the inconvenience.
    - robin

  • Does TLF support tabbing to LinkElements?

    We currently use Flex 3.2 but are in the process of moving up to Flex 4.1.  In the Flex 3.2 SDK we took advantage of the 'htmlText' property and its ability to do links.  But, users could not tab to the links and screenreaders could not read the links.  Therefore we were questioned about 508 compliance.  We raised the issue to Adobe but haven't heard anything back.  Has anything changed in Flex 4.1 (or 4.5) with regards to this issue? Has the Flash Text Engine or TLF somehow fixed this issue?  I'm also wondering if anyone has any ideas about how to make the links in the 'htmlText' property 508 complaint.
    Thanks for your time!

    There is no change to Flex 4.1 or 4.5. We are working on a way to address this. It may be possible to use the FocusManager interface to override tabIndex values when the keyboard focus is inside a TLF object. That way, the cursor would move in the same way you would expect of a browser.
    It is important to note, however, that TLF and htmlText is not intended to be equivalent to a browser pane. It's a feature that simplifies designing rich text layouts. If you want a fully functional HTML pane, then what you need is a browser iframe. Building a browser out of TLF may technically be possible, but it's a lot more work than you're likely to want to undertake.

  • Apply embedded fonts to special characters in spark textArea using tlf

    By setting fontfamily directly to textarea in mxml fonts get applied to special characters. But using tlf and setting fontfamily it does not apply.
    style.css ::
    @font-face
        src: URL("/Assets/Fonts/GandhariUnicode-Bold.otf");
        fontFamily: "GandhariUnicode-Bold";
        embedAsCFF: true;
    snippet of source code ::
    textArea.textFlow.interactionManager.selectRange(beginIndex, endIndex);
    var textLayoutFormat:TextLayoutFormat = getTextLayoutFormat();
    textLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;
    textLayoutFormat.fontFamily ="GandhariUnicode-Bold";   
    textLayoutFormat.renderingMode = RenderingMode.CFF;

    Please try the code as follows.
    (1)
    [Embed(mimeType="application/x-font", exportSymbol="GandhariUnicode-Bold", embedAsCFF="true", fontWeight="bold", source="Assets/Fonts/GandhariUnicode-Bold.otf", fontName="gandhariUnicode-Bold")]
    var GandhariUnicode-Bold:Class;
    var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
    textLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;
    textLayoutFormat.fontFamily ="gandhariUnicode-Bold";   
    textLayoutFormat.renderingMode = RenderingMode.CFF;
    textArea.textFlow.hostFormat = textLayoutFormat;
    textArea.textFlow.flowComposer.updateAllControllers();
    Or (2)
    [Embed(mimeType="application/x-font", exportSymbol="GandhariUnicode-Bold", embedAsCFF="true", fontWeight="bold", source="Assets/Fonts/GandhariUnicode-Bold.otf", fontName="gandhariUnicode-Bold")]
    var GandhariUnicode-Bold:Class;
    textArea.textFlow.fontLookup = FontLookup.EMBEDDED_CFF;
    textArea.textFlow.fontFamily ="gandhariUnicode-Bold";   
    textArea.textFlow.renderingMode = RenderingMode.CFF;
    textArea.textFlow.flowComposer.updateAllControllers();

  • HTML tags in TLF (slice to 2 text fields)

    i create on stage TLF and i slice to 2 text fields
    i put text to TLF in actions tText.htmlText = "Some text...."
    if text is too much, text from 1 text field is not displayed
    in 2 text field. All is displayed only in 1 text field
    if i add text from tText.text is displayed in 1 and 2 text field.
    how to make to text with html tags displayed in 1 and 2 text field?

    This looks to me like a bug in TLFTextField. I'll report this bug to the Flash Authoring team.
    You could use this as a workaround - find all of the containers that should be attached to the flow, set htmlText then reattach the containers (past the first):
    var controllerArray:Array = new Array()
    for (var i:int = 0; i < myText.textFlow.flowComposer.numControllers; i++)
         controllerArray[i] = myText.textFlow.flowComposer.getControllerAt(i);
    myText.htmlText = "some text that should be flowing into the other containers";
    for (i = 1; i < controllerArray.length; i++)
         myText.textFlow.flowComposer.addController (controllerArray[i]);
    myText.textFlow.flowComposer.updateAllControllers();

  • Using TLF in Indesign

    Hi - I've been reading that there is now more fidelity in text between Indesign and Flash, starting from FP10, when we use the TLF. Can you send me some sample code(Javascript way or Java way) of how to use the TLF in indesign server? I know that we can extract the text manually from TLF and apply the text to the textframe in an indd file but I want to use a TLF directly in a textframe in indesign.
    If possible, Is this vailable with Indesign server CS4?

    On Step 6 choose PSD for the file format
    http://www.axialis.com/tutorials/tutorial-misc001.html

Maybe you are looking for

  • Call transaction in ABAP Inbound proxy

    Hi All, I am processing transaction KKPAN in inbound proxy. As per my knowledge, there is no BAPI or other way of processing this transaction. I have recorded a BDC, and I am calling this BDC using Call Transaction in my Inbound proxy. The problem is

  • Error Building LW 2010 Distribution Kit

    I get the following error when trying to build my distribution kit on a factory test set PC.  The same kit will build on my work laptop. I have found various posts of similar problems building distributions with LW, LV, Test Stand, etc. but none are

  • The dashboard propmt not showing desired results

    Hi, I have propmt created using this condition.But it is not showing me the desired results.The code seems to be correct.any help plz... case when TimeStampDiff(SQL_TSI_DAY,"TB1".CL1,CURRENT_DATE) between 0 and 30 or TimeStampDiff(SQL_TSI_DAY,"TB1".C

  • Query read / cache modes are set in BW

    Hi Experts, What is query read / cache modes are set in BW in order to improve the query performance? Thanks Rohan

  • Using MSDN licenses in Azure

    Hi This may or may not be the right forum to ask this question but I cannot find a relevant forum to post to. Does anybody know if MSDN licenses can be used in Azure outside of an MSDN-activated subscription? In all the documentation I have read, it