Hyperlinks in spark RichEditableText issue!?!

Hi,
I found a really annoying bug in RichEditableText control. Has anyone tried to set a fixed width and textAlign to "center" or "right" (actually anything other then "left") while the text control contains a hyperlink? If you try this you will notice that you cant click on the hyperlink as expected...very strange behavior and its causing headache. Has anyone a solution?
Here is a simple example, if you wish:
<s:RichEditableText x="10" y="10" width="500" backgroundColor="0xCDCDCD" editable="false" selectable="true" textAlign="center">
        <s:textFlow>
            <s:TextFlow>
                <s:linkHoverFormat>
                    <s:TextLayoutFormat color="#33cc00" textDecoration="underline"/>
                </s:linkHoverFormat>
                <s:p>Here is <s:a href="http://adobe.com">Adobe home page</s:a> for everyone.</s:p>
            </s:TextFlow>
        </s:textFlow>
    </s:RichEditableText>
Thanks,
Nedim

There is a tlf_internal function you can use to do this. If you can get the textFlow (I think this is the RichEditableText.content), you can call:
import flashx.textLayout.edit.SelectionManager;
import flashx.textLayout.tlf_internal;
use namespace tlf_internal;
SelectionManager.computeSelectionIndex(textFlow:TextFlow, target:Object, currentTarget:Object, localX:Number,localY:Number)
- robin

Similar Messages

  • GetCharIndexAtPoint() equivalent in Spark RichEditableText

    I want to find a way to get the character index in a Spark  based RichEditableText based on mouse x, y position.
    The  mx.controls.TextArea has a protected getCharIndexAtPoint() method but I  can't find an equivalent of this in the Spark RichEditableText which is  disappointing.
    Any  ideas or recommendations?

    There is a tlf_internal function you can use to do this. If you can get the textFlow (I think this is the RichEditableText.content), you can call:
    import flashx.textLayout.edit.SelectionManager;
    import flashx.textLayout.tlf_internal;
    use namespace tlf_internal;
    SelectionManager.computeSelectionIndex(textFlow:TextFlow, target:Object, currentTarget:Object, localX:Number,localY:Number)
    - robin

  • Spark DataGrid Issue

    I'm working with the new Spark DataGrid, and I understand it's still a work in progress. I've also created a bug in the Adobe bug system. However, I want to be sure that I'm not overlooking something.
    Here is an example that illustrates the issue. If I create an itemRenderer for a column in a dDtaGrid, it takes 2 clicks to trigger the click event and 3 clicks to trigger the doubleClick event, if you click on the column with the itemRenderer. This happens about 95% of the time. Occasionally, it works as expected, but that's a rarity. So the question is, am I doing something wrong in the use of itemRenderers.
    <?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[
    import mx.controls.Alert; 
    ]]>
    </fx:Script>
    <s:DataGrid x="33" y="57" requestedRowCount="4" textAlign="center" click="Alert.show('Clicked')">
    <s:columns>
    <s:ArrayList>
    <s:GridColumn dataField="dataField1" headerText="Name" width="75">
     <s:itemRenderer>
     <fx:Component>
     <s:GridItemRenderer>
     <s:Label text="{data.dataField1}" left="5" paddingTop="10" paddingBottom="5"/>  
    </s:GridItemRenderer>
     </fx:Component>
     </s:itemRenderer>
     </s:GridColumn>
     <s:GridColumn dataField="dataField2" headerText="Column2" width="75"/>
     <s:GridColumn dataField="dataField3" headerText="Column3" width="75"/>
     </s:ArrayList>
     </s:columns>
     <s:ArrayList>
     <fx:Object dataField1="John" dataField2="data1" dataField3="data1"></fx:Object>
     <fx:Object dataField1="Ryan" dataField2="data2" dataField3="data2"></fx:Object>
     <fx:Object dataField1="Kyle" dataField2="data3" dataField3="data3"></fx:Object>
     <fx:Object dataField1="Edward" dataField2="data4" dataField3="data4"></fx:Object>
     </s:ArrayList>
     </s:DataGrid></s:Application>

    I have approximately the same problem : I want to listen double click (doubleClick or gridDoubleClick) on a spark datagrid.
    The double click event is always dispatched when I double-click on a column whose item renderer is a textArea (even with doubleClickEnabled=false).
    The double click event is SOMETIMES dispatched when I double-click on a column whose item renderer is an image or a label :
    1. When I double-click for the first time on the label renderer : it gives focus to datagrid and select item but does not dispatch doubleClick
    2. When I double-click on the textArea colum, then on the Label column of the same row, doubleClick is well dispatched
    3. When I double-click on the textArea colum, then on the Label column of a different row, doubleClick is not dispatched
    4. when I double-click on the label column after double-clicking on another row in the Label column, doubleClick is well dispatched
    I think it's the same behaviour with simple click event.
    Do you think spark datagrid is not stable enough and we should use mx datagrid instead ?
    Here is the code :
    <s:DataGrid dataProvider="{arrayCollection}" doubleClickEnabled="true" doubleClick="trace(event)" gridDoubleClick="trace(event)">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn>
                        <s:itemRenderer>
                            <fx:Component>
                                <s:GridItemRenderer>
                                    <s:Label text="{data.label}"/>
                                </s:GridItemRenderer>
                            </fx:Component>
                        </s:itemRenderer>
                    </s:GridColumn>
                    <s:GridColumn>
                        <s:itemRenderer>
                            <fx:Component>
                                <s:GridItemRenderer>
                                    <s:TextArea text="{data.label}"/>
                                </s:GridItemRenderer>
                            </fx:Component>
                        </s:itemRenderer>
                    </s:GridColumn>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>

  • Problem enabling spelling check on spark RichEditableText

    I found an example on how to use this spellingchecker, very awesome by the way, for flex components.
    It load the dictionaries just fine, it does it work voor mx:textarea, s:textinput, but not for s:richeditabletext.
    Is this supported already, is this a bug, or is it on its way?
    A side I would like to that it indeed would be very nice to able to see the source code we are working with, just to get to grips with what is happening...
    Help very much appreciated, since I already put in a lot of time around my richeditable text component. (no way back :-)
    <?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[
                import com.adobe.linguistics.spelling.SpellChecker;
                import com.adobe.linguistics.spelling.SpellUI;
                import com.adobe.linguistics.spelling.core.DictionaryManager;
                import com.adobe.linguistics.spelling.core.SpellingInfo;
                import com.adobe.linguistics.spelling.core.utils.DictionaryLoader;
                import com.adobe.linguistics.spelling.ui.IWordProcessor;
                import com.adobe.linguistics.spelling.ui.SparkWordProcessor;
                import com.adobe.linguistics.spelling.ui.SpellingHighlighter;
                import flashx.textLayout.elements.TextFlow;
                import spark.utils.TextFlowUtil;
                            private function enableFeature():void {
                        SpellUI.enableSpelling(textArea, "en_US");
                        SpellUI.enableSpelling(textInput, "en_US");
                        SpellUI.enableSpelling(richTextArea, "en_US");
                   private function disableFeature() :void {
                        SpellUI.disableSpelling(textArea);
                        SpellUI.disableSpelling(textInput);
                        SpellUI.disableSpelling(richTextArea);
                   [Bindable]
                   public var flow:TextFlow = TextFlowUtil.importFromString("<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'>" +
                        "<p><span>Spell cheecking in s:RichEditableText does not woork</span></p></TextFlow>");
              ]]>
         </fx:Script>
         <s:Panel  width="100%" height="100%" >
              <s:layout>
                   <s:HorizontalLayout/>
              </s:layout>
              <mx:TextArea id="textArea" width="100%" height="100%" fontSize="30" text="Spell cheecking in mx:TextArea " />
              <s:TextInput id="textInput" text="Spell cheecking in s:TextInput"/>
              <s:RichEditableText id="richTextArea" width="100%" height="100%" fontSize="30"
                             textFlow="{flow}"/>
         </s:Panel>
        <s:HGroup>
            <s:Button id="tt2" label="enable Feature" click="enableFeature()" />
            <s:Button id="tt1" label="disable Feature" click="disableFeature()" />
        </s:HGroup>
    </s:Application>

    Thanks for using Squiggly.  RichEditableText is not supported in 0.3, we will try to make it available in 0.4.
    We also have the plan to open up some of the source code (for example, the SpellUI), so that you can do your customization.  But we can not guarantee this will be exposed in 0.4.

  • Spark Blinking issue

    Hi,
        I am creating a folding animation in flex. For the folding animation I am adding and removing sprites to a spark group. Using the tween class I tweened the sprites and on animation complete I am removing the current sprites from the group and adding the new set of sprites to tween.
    group.removeAllElements()
    This is used to remove the elements from the sprite
    group.addElement()
    This is used to add the element to the sprite
    But the issue I am facing is a blinking happenning while removing and adding sprites to the group. The thing is this is happening onlly at initial loading of tha application. Tried different ways with no success. Any help will be appreciated.
    Thanks
    Arun Viswanathan

    Understood the probelm. But still not find the solution
    Its not sure that removeAllElements and addElement happens in one update. It may be happen in atleast two updates one for removal and one for addition. The blinking is caused by the brief time frame b/w the two updates.
    Is there any way to make the update at once?

  • Draw Lines Under Text in Spark RichEditableText like notebook

    Hi All
    We basically want a simple notebook(RichEditableText) control with lines in flex so people can type and scroll in it.
    What's the best way to do it?
    I saw someone did a onChildLineAdded approach
    http://www.davidortinau.com/blog/draw_lines_under_text_in_spark_richeditabletext/
    but I notice it got an issue when it have no text, it show no lines.
    Notice as you erase text from that control all the line got remove too.
    Any other better ideas?
    Thanks for any info.

    Hi All
    We basically want a simple notebook(RichEditableText) control with lines in flex so people can type and scroll in it.
    What's the best way to do it?
    I saw someone did a onChildLineAdded approach
    http://www.davidortinau.com/blog/draw_lines_under_text_in_spark_richeditabletext/
    but I notice it got an issue when it have no text, it show no lines.
    Notice as you erase text from that control all the line got remove too.
    Any other better ideas?
    Thanks for any info.

  • Spark VideoPlayer issue with streaming in iOS Devices

    Hi,
    I’m working in a mobile application using Flex which needs playing remote videos.
    So, we are having some problems with the streaming of FLV videos in iOS devices. When we play a streaming video on iPhone or iPad, after some time (about 1 minute), the application just crashes and closes.
    We are using:
    - FLV video format;
    - Flex 4.5.1;
    - Flash Media Server 3;
    - Spark VideoPlayer component.
    It doesn’t occur when we are using Android devices neither when we are accessing medias located in our local network (including in iOS devices). The problem occurs only when we are accessing medias located in an external FMS server through iOS devices.
    I would really appreciate if someone could give any help about this problem.
    Thanks,
    Luis Vasquez

    FMLE Settings as follow:
    Video:
    Format H.264
    Frame Rate: 29.97
    Input Size: 320x240
    Bitrate: 200 kbps
    Profile: Main
    Level: 3.0
    Keyframe Frequency: 3 Sec
    Audio:
    Format: AAC
    Channels: Stereo
    Sample Rate: 44100
    Bitrate:56 kbps
    FMS URL: rtmp:server/livepkgr
    Stream: livestream?adbe-live-event=liveevent
    I try to access the web using http://server:8134/index.html and no luck and also try IP address and no luck eather.
    The modules are enable, the one you mention in the link provided (4a).

  • Is there a way to add a Hyperlink to ONE WORD in a large group of text?

    I am a beginner with adobe muse but I can't seem to find a way to make one word in a group of text a hyperlink. Do I have to make a separate text box then make that a hyperlink? I did try that but upon export the one word would be in a different spot on the site. Does this make sense? Thank you for any help!    

    Hello,
    If you're not able to make a single word a hyperlink, you must be selecting the text frame and applying the hyperlink to that. To make a single word hyperlink, click repeatedly on the text frame till you see "Text" in the selection indicator towards the top left of your screen in Muse and are able to select the particular text that you wish to hyperlink. When you have it selected apply the hyperlink to it. Check this out: http://jingsite.businesscatalyst.com/jing/2013-09-19_0023.swf
    Doing this shouldn't cause the link to change position when exported, you may still want to check if there is a "Link Style" applied to the hyperlink that is causing issues.
    Hope this helps.
    Cheers
    Parikshit

  • Which event dispatched after text selection done on spark text area in Apple iPad using Adobe Flex 4

    I need to know which event triggered after text selection done in Apple iPad. This way i have done in desktop air app code (mouse events)
    protected function txtEditor_mouseUpHandler(event:MouseEvent):void
                if(txtEditor.selectionAnchorPosition != txtEditor.selectionActivePosition){
                    showNoteToolBar(event);
                    txtEditor.focusEnabled = true;
                    txtEditor.setFocus();
    But in Apple iPad how to achieve through "Touch Event" ? And also i need how to hide all context menu on Spaek TextArea?. Why Touch.End event is not fired after place cursor on text area ?
    Please help me !

    Ok, so I finally got it working but this is not ideal at all. Adobe really needs to give us some direction on how to properly deal with font embedding and TLF now that the release build breaks all functionality with loading runtime fonts and TLF.
    Problem:
    I am embedding collections of fonts (faces) into single family classes. Each individual face is registered with Font.registerFont(). I need to do this because I have to have mixed fonts within text flows - at least according to Alex H's recent blog post.
    Fonts do not display in TLF without doing the following:
    1. GlobalSettings.resolveFontLookupFunction = null;
    2. editor.textFlow.flowComposer.swfContext = ISWFContext(this.getFontContext("AnyFamilyNameFromAnyFontEmbedded", false, false, FontLookup.EMBEDDED_CFF));
    3. Instead of #2, use editor.textFlow.invalidateAllFormats();
    Either #2 or #3 need to be performed. If I have a spark richEditableText control in MXML with defined familes from the loaded fonts. I even tried placing the control into a separate state so it wasn't created until after the fonts were loaded... I still needed to invalidate the formats or set the context.
    The "AnyFamilyNameFromAnyFontEmbedded" does not need to be all of the embedded family names. It only needs to be one of them. Once one is used, all embedded fonts work. Also, I have to use the internal namespace to even get access to getFontContext, another oddity that, in my humble opinion, should never be necessary to create mixed style TLF content.
    My questions are then:
    1. Why am I required to use ISWFContext if I am using Font.registerFont()?
    2. Why is GlobalSettings.resolveFontLookupFunction = null; also required for this to work?
    3. What is the recommended workflow to embed fonts from multiple SWF files into the release build and have it work without having to jump through all these hoops?

  • Tip Message with hyperlink to open in new tab/window

    Hi Guys,
    I have created a FND Message which has the following content:
    some text <a href="https://www.google.co.uk"target="_blank">Click Here</a> some more text
    This is referenced in a custom OAF page as a Tip Message (OATipBean), the text and hyperlink render with no issues, however the hyperlink does not open in a new tab/window (it opens in the current tab) - when you view the source of the page the '...target="blank"...' is not there:
    ... <a href="https://www.google.co.uk">Click Here</a> ...
    Is there a way of getting hyperlinks in Messages to open in new tabs/windows?
    Regards
    Carl
    Message was edited by: CarlHammond

    I think part of your problem might lie in the way you are trying to use your quotation marks.  It appears you are trying to have the single quotes do what double quotes should be doing.
    document.write("<a href='"+imagelinks[ry]+"' target='_blank'><img src='"+myimages[ry]+"' border='none'></a>
    If you want to have doublequotes appear in code as doublequote characters you can try slashing them to have them read literally... \"
    document.write("<a href=\""+imagelinks[ry]+"\" target=\"_blank\"><img src=\""+myimages[ry]+"\" border=\"none\"></a>

  • Callto:// hyperlink in Numbers (and Excel)

    I have a spreadsheet table that includes phone numbers.
    I would like to create an extra column with hyperlinks that when clicking on them will automatically use my prefered VOIP application.
    Issue 1:
    When I use the callto:// hyperlink in Numbers '09 (2009 when was that again) it doesnt do anything. After that I can't create any hyperlink at all anymore (even after closing and restarting numbers) what is the prober way to get to do this?
    1a. In Excel 2011 it automatically adds file:// in front of the callto:// which of course does not work
    Any suggestions on how to add other then http://, file:// or mailto:// hyperlinks in excel 2011
    Issue 2:
    when typing callto:// directly in the browser, to goes to Skype. How to change the default program used for the callto:// statement?
    Thanks in advance for you help.

    Hyperlinks are limited to http and mailto. Excel has the additional ability to link to files. You will not be able to create callto hyperlinks.
    Your question about how to select your default callto app might not get answered here in the Numbers forum. You might want to ask that in a different forum that has a wider audience. Or maybe an Internet search on callto to see what parameters can be specified.

  • How can I create a live hyperlink through PPT / PDF?

    1. I create a PPT with a "live" hyperlink - www.apple.com
    2. I test the hyperlink in PPT - no issues.
    3. I save the PPT as a PDF.
    4. I email the PDF to myself.
    5. The hyperlink is now dead.
    6. How do I create a "live hyperlink", through PDF, that I can access via my iPAD?
    THANK YOU!!!

    If you're talking about LIVE video (as in, people can see what you're doing RIGHT NOW), you can't host that on Youtube (yet), although there are applications (not part of iLife, though) to let you stream to a personal website. If you just want to record yourself, then upload it, sure, you can do so using iMovie 11.
    This page explains iMovie's iSight import feature - provided your webcam is supported, the same should work for you.
    Matt

  • ITunes and QuickTime will not work..Yeah, another one

    Despite my best efforts to try to solve my problem on my own and not both you kind people, I've been working on and off at trying to get my iTunes working, with no positive results at all. It's honestly been so long, I don't recall what might have sparked the issues, but every time I try to open iTunes or QuickTime they will begin to open but fail, bringing up the common windows error message:
    iTunes has encountered a problem and needs to close. We are sorry for the inconvenience.
    QuickTime Player has encountered a problem and needs to close. We are sorry for the inconvenience.
    So far, I have totally deleted both iTunes and QuickTime twice from my computer- first just through Add/Remove Programs pathways, then more in depth with Registry Crawler to try to remove any traces of the programs- all before re-installing the two programs. Both times have failed, still leaving me unable to open either program, so I've broken down and come here- hoping to find anyone willing to lend a hand to help fix this issue so that I can finally listen to my music the way I used to.

    Perfect information, thanks.
    That combination is almost always caused by some application stashing old QuickTime componentry down in your system files. (Codec packs and video converters are the usual suspects, although some Games might do it too.)
    Let's go looking for the old stuff.
    1. Open My Computer from the desktop or Start menu.
    2. In the Tools menu, click Folder Options.
    3. Click the View tab.
    4. In the "Advanced settings" pane under "Hidden files and folders" make sure that the "Show hidden files and folders" option is selected, and the "Hide extensions for known file types" option is unchecked.
    5. Click OK.
    Now in My Computer, open your C drive.
    Open the "Windows" folder.
    Open the "system32" folder.
    What files and/or folders can you see in there with QuickTime in the file/folder name? (In a standard installation of QuickTime, you should see precisely two files ... QuickTime.qts and QuickTimeVR.qtx ... and no QuickTime folders whatsoever.)

  • Flex 4 Release Build breaks text editor

    I was working on an editor using FB4 beta 2. Fonts were loaded at runtime ... CFF is being used.
    In Flex 4 SDK that comes with FB4 beta 2, my spark rich text field sitting in a group in my application looks fine - proper font families applied and renders correctly. My font + style drop down lists are all fine as well.
    As soon as I switch to the release SDK, or any SDK later than FB4 beta 2 (well, major releases) the font styles are not longer properly applied to the field. Changes to the family no longer apply to the rich text field.
    The rich editable text that I'm using is basically as follows:
                    <s:RichEditableText id="editor" fontLookup="embeddedCFF" renderingMode="cff"
                                        focusEnabled="false" x="100" y="50" focusIn="focusInEditor(event)" focusOut="focusOutEditor(event)"
                                        width="300" height="200">
                        <s:textFlow>
                            <s:TextFlow fontFamily="HelveticaNeueLTStd-MdCn">
                                <s:p fontFamily="HelveticaNeueLTStd-MdCn" fontSize="14" color="0x999999">Test first line of text</s:p>
                                <s:p fontFamily="HelveticaNeueLTStd-Blk" fontSize="18" color="0xFFFFFF">Test second line of text</s:p>
                            </s:TextFlow>
                        </s:textFlow>
                    </s:RichEditableText>
    That probably isn't too important but I figured I would paste it anyway. I'm using setFormatOfRange primarily and this block of textFlow was only to get some initial content into the text area.
    There is a ton of other related code for editing, selection, etc. It seems any font family related change does not get applied.
    I know there have been a ton of changes and this may be difficult to pin down. However, this is pretty awkward. The application I was building loaded up fine, fonts loaded up all fine and all editing worked perfectly until going to release SDK.
    Is there any change that would cause this to happen?

    Ok, so I finally got it working but this is not ideal at all. Adobe really needs to give us some direction on how to properly deal with font embedding and TLF now that the release build breaks all functionality with loading runtime fonts and TLF.
    Problem:
    I am embedding collections of fonts (faces) into single family classes. Each individual face is registered with Font.registerFont(). I need to do this because I have to have mixed fonts within text flows - at least according to Alex H's recent blog post.
    Fonts do not display in TLF without doing the following:
    1. GlobalSettings.resolveFontLookupFunction = null;
    2. editor.textFlow.flowComposer.swfContext = ISWFContext(this.getFontContext("AnyFamilyNameFromAnyFontEmbedded", false, false, FontLookup.EMBEDDED_CFF));
    3. Instead of #2, use editor.textFlow.invalidateAllFormats();
    Either #2 or #3 need to be performed. If I have a spark richEditableText control in MXML with defined familes from the loaded fonts. I even tried placing the control into a separate state so it wasn't created until after the fonts were loaded... I still needed to invalidate the formats or set the context.
    The "AnyFamilyNameFromAnyFontEmbedded" does not need to be all of the embedded family names. It only needs to be one of them. Once one is used, all embedded fonts work. Also, I have to use the internal namespace to even get access to getFontContext, another oddity that, in my humble opinion, should never be necessary to create mixed style TLF content.
    My questions are then:
    1. Why am I required to use ISWFContext if I am using Font.registerFont()?
    2. Why is GlobalSettings.resolveFontLookupFunction = null; also required for this to work?
    3. What is the recommended workflow to embed fonts from multiple SWF files into the release build and have it work without having to jump through all these hoops?

  • Air 1.5 Broke all Air applications on My Mac.

    I updated to 1.5 about two weeks back, and when I did every
    single Air application I have stopped working. Some of them
    (Remember the Task, Snoopr, Twhirl) say that I am running a version
    of Air that isn't supported...and they redirect me to the adobe
    site and tell me to update. When I attempt to install again, it
    just tells me that the version is already installed.
    When this problem first occurred I was running OS X 10.5.5. A
    few days ago I updated to OS X 10.5.6 but the problem still exists.
    I tried using the adobe uninstaller, and then reinstalled
    fresh...but that didn't fix anything either.
    Has anyone else had a similar problem? Or does anyone know
    where one can download the previous version of AIR?
    I'm not an expert at this stuff....so I appreciate any help,
    and apologize for any ignorance. Thanks.

    I'm adding in my own answer of "what" causes this; however, I still believe it's a bug...
    We were using URLMonitor to verify whether or not an asset existed -- Each urlMonitor instantiation and start() method calls generated an additional thread - for certain objects, we were checking for multiple assets (thus the 1000+ threads). This still may be related to garbage collection, but it was definitely the URLMonitor that sparked the issue.

Maybe you are looking for