Click attribute in textFlow anchor tag in Flash Builder 4

Hi folks,
At first congratulation to you, Adobe and Flex team for Adobe Flash Builder 4 & flex 4 SDK final release...
then, I have a click attribute in my textFlow anchor tag, just like this:
<fx:Script>
     <![CDATA[
     import mx.controls.Alert;
     public function func():void{
          Alert.show("hello!");
     ]]>
</fx:Script>
<s:RichEditableText x="50" y="50" editable="false" id="RET" >
     <s:TextFlow>
          <s:a href='http://www.adobe.com' click='func()'>
               <s:img source='adobe.jpg' width='50' height='50' />
          </s:a>
     </s:TextFlow>
</s:RichEditableText>
When I run the project, everything's allright; and after click on my image, I have adobe site in new window, and also have my popup alert window with "Hello!" text...
But the Problem is another thing. I want to give this textFlow content from one webservice and put it in a string var then bind it to my RichEditableText. I receive it from webservice, put it in the string, and then bind this string to textFlow attribute of my RichEditableText obj with simple function... after running my project, I can see the content, and when I click on my image, I have adobe site in new window, again. but my function does not call!
What is the problem?! the code is something like this (of course without webservice codes!):
<fx:Script>
     <![CDATA[
     import flashx.textLayout.conversion.TextConverter;
     import mx.controls.Alert;
     public function func():void{
          Alert.show("hello!");
     internal var str:String;
     public function func2():void{
          str = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' paddingRight='5'>"+
          "<a href='http://www.adobe.com' click='func();'><img source='adobe.jpg' width='50' height='50' /></a>"+
          "</TextFlow>";
          RET.textFlow= TextConverter.importToFlow(str, TextConverter.TEXT_LAYOUT_FORMAT);
     ]]>
</fx:Script>
<s:RichEditableText x="50" y="50" editable="false" id="RET" />

Listening for a FlowElementMouseEvent.CLICK event will be beneficial.
In your webservice feed (Textflow), have a tag such as:
<a href="event:adobe.jpg">Click here to view Adobe's logo!</a>
Then in your ActionScript code, listen for any FlowElementMouseEvent.CLICK events from your textFlow instance.
textFlow.addEventListener(FlowElementMouseEvent.CLICK,
onLinkHandler);
Next, declare onLinkHandler:
           * In the XML there are href tag which has 'event:' prefix to the value.  This prefix
           * allows method calls.
          private function onLinkHandler(event:FlowElementMouseEvent):void
               //extract the number value from the string.
               var uri:String = LinkElement(event.flowElement).href.split(":")[1];
               trace(uri);//outputs: adobe.jpg

Similar Messages

  • Netui Anchor Tag

    Can we use href and action attribute in netui:anchor tag both at a time...*href* is for opening a modal dialog and action is page flow action

    does the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
    If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
    regards
    deepak

  • Flash Builder 4.6 not launching

    Just discovered that Flash Builder 4.6 and 4.5 do not run. Flash Builder 4 does. Get the logo popping up but nothing loading. I'd uninstall the other two versions but I get an error when I go into my program settings and click on my CS package.
    Any suggestions?

    UPDATE: I contacted Adobe yesterday and they had me do something I would of not thought of.
    Run MSCONFIG
    On the Services tab click Hide all Microsoft services.
    Click Disable all button
    Restart your system
    Run Flash Builder (It now started)
    I closed Flash Builder and went back into MSCONFIG
    Uncheck Hide all Microsoft services (if checked)
    Click Enable all button
    Restart your computer
    Flash Builder still worked after this. All is now good.

  • Upgrade Flash builder 4 from Master Collection CS5 to Flash builder 4.7

    HI ! A few years ago, I bought Master Collection CS5 (Flash builder 4).
    Yesterday, I bought an upgrade for Flash builder 4.7 but when I try to activate it, the serial I give (Master Collection CS5) is not valid.
    What can I do ?
    Regards,
    marsupulamis

    Hi,
    Standard appears to be available here:
    https://store5.adobe.com/cfusion/store/html/index.cfm?store=OLS-IE&event=displayProduct&ca tegoryPath=/Applications/FlashBuilderStandard&distributionMethod=FULL
    Also matrix is here:
    http://www.adobe.com/uk/products/flex/buy/
    It will be different for your location, but if you click on the "purchasing options" from the Flash Builder 4 home page you should be able to get Standard.
    Niall

  • Netui: anchor tag with target attribute.

    I am using the netui:anchor tag inside an iframe to post to an action. But the
    resulting page is displayed within the iframe. Will the target attribute of the
    netui:anchor tag help solve the problem. What is a valid value of the target
    attribute.
    thanks,
    Shankar

    does the action have a formSubmit = true? If not then your modal dialog should be shown via the onclick and you have to javascript the link click (based on your modal dialog options)
    If you do have a formSubmit=true, then you'd have the onclick show the modal dialog and you would have to write additional javascript to submit the form (Along with setting its action)
    regards
    deepak

  • Firefox removes href attribute from anchor tag on copy paste

    Hi Support,
    I have a text along with the image used as a hyperlink as follows.
    "Sample Text.<a href="javascript:myfunction()"><img title="sample image" src="sample.gif" /></a>"
    When i copy the above text and paste it inside a HTML Control (for e.g. iframe), the control removes the href attribute of 'anchor' tag. It happens only with firefox and safari. It is working correctly in internet explorer.
    "Sample Text.<a ><img title="sample image" src="sample.gif" /></a>"
    Is there any solution for this.? Awaiting for sooner response
    Try clicking on the below link
    http://screencast.com/t/sXq6BcZvJB

    I tested this in Gmail compose, and what I see is: regular links (href="url") are preserved during copy/paste, but javascript links (href="javascript:") are dropped/cleared.
    I don't know whether this is by design. One place to research that would be [https://bugzilla.mozilla.org/].

  • Problem in onClick attribute of the netui:anchor tag

    Hi,
    I have a String object to be passed to the javascript function with onClick attribute.
    eg: <%String st = new String("helo");%>
    <netui:anchor action="display" onClick="display()">
    I want to pass the object st to the java script so that I can do some validations. how can I do that. If I say,
    onClick="display('<%=st%>')" it is not working. can you please suggest me a solution.
    Regards,
    Satish.

    I haven't tried this with the netui:anchor tag, but it works with the netui:button tag.
    <%
    String onCl = "display('" + st + "')";
    %>
    <netui:anchor action="display" onClick="<%=onCl%>">
    Apparently, you can place a scriptlet inside the onClick attribute, but you cannot intermingle the scriptlet with plain text.
    Also, the onclick attribute appears not to support XScript ({request.whatever}). I find that weird.

  • Download attribute for anchor tag in HTML 5 mozilla browser

    There seem to no download attribute for anchor tag been implemented in Mozilla Firefox ... neither desktop nor mobile version for android.
    can seem to download a file generated via javascript with correct name .....it saves with garbage name and with .part extension.
    Will it be implemeted in the future ....

    ''thak123 wrote:''
    Will it be implemeted in the future ....
    See the following link for details.
    * [https://bugzilla.mozilla.org/show_bug.cgi?id=676619 Bug 676619] - Implement proposed download attribute
    If you want a particular feature or fix to be implemented, vote for it instead of commenting on the bug report. See [https://bugzilla.mozilla.org/page.cgi?id=etiquette.html Bugzilla etiquette].

  • Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through j

    Certainly I realized that Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through jquery or javascript.
    e.g.
    In Felix Console , in Apache Sling JCR Resource Resolver configuration I have added following mapping.
    /content/myproject/-/
    So If any anchor tag is there like <a href="/content/myproject/en.html"> click me </a> then it will be mapped to "/en.html" automatically.
    But the problem is there in following scenario.
    I have an anchor tag as follows.
    <a href="#" id="test"> click here </a>
    And I am assigning the href to anchor through JQUERY.
    <script>
    $("#test").attr("href","/content/myproject/en.html");
    </script>
    Ideally this should have been mapped to "/en.html".
    But it is not mapping to "/en.html". It still shows "/content/myproject/en.html".
    How to resolve this.
    Thanks,
    Sai

    In a servlet you have access to the resourceResolver so if you know which attributes contain links then it's relatively easy to apply resourceResolver.map to those links.
    Your challenge is clearly how do you know which attributes are links and which aren't. Its is the same challenge that makes parsing the response and rewriting it on the way out difficult - the JSON doesn't have any semantic meaning so how do identify which attributes require rewriting. There really is no good answer ot that question in my experience - all the options have down sides.
    Create some convention - all attributes matching this pattern X get mapped before being converted to JSON (could be attributes whose name ends in link, or it could a convention applied to the value of the attribute - if the attribute is a string that starts with /content apply the resource resolver mapping. In this case you have train your developers to follow this convention which is the down side.
    Create some configurable list of attribute names that require mapping. This is brittle, requires training and is easy to break.
    Implement a client side version of the resource resolver mapping. It wouldn't be as full proof as server side mapping (because that takes into account but you could make it work for simple logic like stripping of /content/site/en. If ou are just trying to solve the simple version of this issue - stripping off the top of the repository path this might be your best option.
    Not worry about it and set up Apache 301 redirects that catch any long URLs and redirect them to short URLs (so configure apache to look for any URL matching /content/site/en and strip off /content/site/en and do a 301 redirect to the shortened URL. You end up with a lot of extra HTTP request because of all the 301s but it would work (I wouldn't recommend this option - but it is possible).

  • Hyperlink set to open new window & jump to anchor tag, doesn't jump

    I am generating Flash Help output in RH7.
    We have content hyperlinks that are set to open in a new window (target="_blank") and jump to an anchor tag in the destination topic (a href="newwindowtopic.htm#anchor")
    This works fine if I compile the file as is.
    However, we edit the whtopic.js topic in order to remove the "Show" link that appears when you open context sensitive topics. We do this by adding the following code at the end or the addShowButton function:
    setRelStartPage("ourstartpage.htm");
    show();
    Replacing the Show link worked fine in RH5 and it works fine in RH7. However, in RH7 when we replace the "show" link to have the TOC load when all topics are called (not just the start page), the ability to open a new window AND jump to the anchor tag is no longer working. When you click the hyperlink the new page opens, but only to the top of the page, not to the bookmark (anchor). The anchor jump does work if the hyperlink is set to open in the current window in RH7.
    The issue exists in IE7 and Firefox.
    Any ideas?

    Hi there
    Why are you editing the JavaScript file? Did you know that when generating FlashHelp you have an option to turn off the Show link?
    Additionally there are ways to link to topics so the TOC is visible and synchronized. These are described at this link right here.
    Cheers... Rick
    Begin learning RoboHelp HTML 7 within the day - $24.95!
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Anchor tag in txt file

    is there any way that i could include a link that has
    punctuation characters inside of an anchor tag of an externally
    loaded txt file. something like this <a href='
    http://www.dailymotion.com/relevance/search/leah%2Bdizon/video/x18dj1_leah-dizon'>click</a >.
    i noticed that txt files loaded into flash seem to break at any
    point where more unusual punctuation characters are
    included.

    This is such a great solution--thanks so much for sharing.  I'm having a problem with the name of my collapsible panels (which operate similarly to Tabbed Panels, as far as I understand).  Basically I am trying to use anchor tags and my goal is to create a hyperlink on page 1 that points to content within a spry widget on page 2 of my webpage.  I obviously want the spry widget on page 2 to open up on click and the user to be taken to where my anchor tag is located.  In this thread (http://forums.adobe.com/message/209107#209107), Mr. Celic seems to indicate using something like this:
    <a href="#anchorname" onclick="TabbedPanels1.showPanel(2);">
    My exact code is like this:     <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel1.open();">content here</a>
    The good news is that this works, but my problem is that page 1 of my website also has a CollapsiblePanel1 so when I click on the link above, CollapsiblePanel1 on page 1 opens, not the CollapsiblePanel1 on page 2 of my site.  I went into page 2 and clicked on "CollapsiblePanel1" and in the "Properties" panel renamed it to "CollapsiblePanel11" then changed my code to
    <a href="pagetwo.html#myanchortag" onclick="CollapsiblePanel11.open();">content here</a>
    but that didn't do a thing!  I'm super stuck and don't know how else to rename the collapsible panels or how to get it to work.
    One thing I can't figure out from the original solution (<a href="#" onclick="TabbedPanels1.showPanel(2);">) is what is "showPanel(2)"? Where did she get this from/where can I find the equivalent for my collapsible panel spry? This could be where I'm going wrong.
    Any thoughts would be greatly appreciated.
    Thanks so much! Catherine

  • Netui anchor tag in netui:form

    I have some code like following:
    <netui:form action="action1" >
    <netui:anchor action="action2">Check</netui:anchor>
    </netui:form>
    Action1 and action2 willl be finally redirected to the same JSP(for example one.jsp).
    The weird thing is that: according to log output, it seems that one.jsp has been hit twice when user click "check" link.
    Is it possible that when user click "check" link, weblogic not only trigger action2 but also trigger action1? forsubmit attribute is not set to true explicitly for netui:anchor tag.
    Thanks in advance

    hi
    verify from a browser trace tool (e.g. livehttpheaders, fiddler or firebug) how many requests your browser is making. (or you can inspect the code that portal generates in the HTML). Once we have determined whether its the browser making the two requests or something on the server, we can see if there are workarounds.
    regards
    deepak

  • Not able to open document using anchor tag in firefox

    Hello Friends,
    I would really need your help in solving this issue.My application is deployed in server machine.
    I'm accessing the application through fire fox. In my application, i have a link where i need to open a document on click of it.
    For this, i am using html anchor tag.
    Eg:
    Test
    where IP is the server machine address and dir is the shared directory.
    It works in IE but didn't work in fire fox. Please help me out on to fix it.
    Cheers,
    Cap

    Try out to open doc using following link, {color:#ff0000}*use 5 back slashes instead of 2*
    {color}Test Link
    once you done the code change, close the browser and open a new browser and try it.
    Edited by: Thagelapally on Jul 17, 2009 6:05 AM

  • How to add anchor tag dynamically on infopath (OOTB task form of workflow .xsn) by jquery -dynamically as i did by below script on newform.aspx where I will read Help title and URL value from list

    on newform.aspx just above the top of cancel button I want to put 1 hyperlink "Help"
    but I want to do this by script/jquery by reading my configuration list where 1 column is TITLE and other is- URL
    Configuration List has 2 columns Title and URLValue
    Title                                    UrlValue
    HelpNewPage                    
    http://url1
    HelpEditPage                      http://url2
    so script should read Title and display "Help"--->1st part on NewForm.aspx/EditForm
    Script should read UrlValue column and on click of help-(display link) the respective url should be open in new window.-->second part
    Please let me know reference code for adding anchor tag dynamically by reading from list
    Help/Reference 
    http://www.sharepointhillbilly.com/Lists/Posts/Post.aspx?ID=5
    I can see hyperlink near cancel button-
    //This block is just placing help link near cancel button- 
    $(document).ready(function() {
        GetHelpLinkFromConfigList();
    var HelpLinkhtml ='<a href="#" text="Help">Help</a>';
    var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    var HelpLinkhtml ='<a href="#" text="Help" onclick="GetHelpLinkFromConfigList();">Help</a>'; 
    var position =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    var HelpLinkimageButton ='<IMG SRC="../../Style Library/Help.bmp" style="width:35px;"/>'; 
    var position1 =$("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkimageButton );
    //Rest script
    function GetHelpLinkFromConfigList()
     //The Web Service method we are calling, to read list items we use 'GetListItems'
     var method = "GetListItems";
     //The display name of the list we are reading data from
     var list = "configurationList";
     //We need to identify the fields we want to return. In this instance, we want the Title,Value fields
     //from the Configuration List. You can see here that we are using the internal field names.
     var fieldsToRead = "<ViewFields>"+"<FieldRef Name='Title' />"+"<FieldRef Name='Value' />"+"</ViewFields>";
     //comment
     var query = "<Query>" +
                            "<Where>" +
                                "<Neq>" +
                                    "<FieldRef Name='Title'/><Value Type='Text'>Help</Value>"
    +
                                "</Neq>" +
                            "</Where>" +
                            "<OrderBy>" +
                                "<FieldRef Name='Title'/>" +
                            "</OrderBy>" +
                        "</Query>";
     $().SPServices(
     operation: method,
        async: false,
        listName: list,
        CAMLViewFields: fieldsToRead,
        CAMLQuery: query,
        completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var displayname = ($(this).attr("ows_Title"));
        var UrlValue = ($(this).attr("ows_Value")).split(",")[0];
        AddRowToSharepointTable(displayname,UrlValue)
    function AddRowToSharepointTable(displayname,UrlValue)
        $("#NDRTable").append("<tr align='Middle'>" +
                                    "<td><a href='" +UrlValue+ "'>+displayname+</a></td>"
    +
                                   "</tr>");
    <table id="NDRTable"></table>
    sudhanshu sharma Do good and cast it into river :)

    Hi,
    From your description, you want to add a help link(read data from other list) into new form page.
    The following code for your reference:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(AddHelpLink, "sp.js");
    function AddHelpLink() {
    var context = new SP.ClientContext.get_current();
    var list= context.get_web().get_lists().getByTitle("configurationList");
    var camlQuery= new SP.CamlQuery();
    camlQuery.set_viewXml("<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>Help</Value></Eq></Where></Query></View>");
    this.listItems = list.getItems(camlQuery);
    context.load(this.listItems,'Include(Title,URL)');
    context.executeQueryAsync(function(){
    var ListEnumerator = listItems.getEnumerator();
    while(ListEnumerator.moveNext())
    var currentItem = ListEnumerator.get_current();
    var title=currentItem.get_item("Title");
    var url=currentItem.get_item("URL").get_url();
    var HelpLinkhtml ='<a href="'+url+'">'+title+'</a>';
    $("input[value='Cancel']").parent("td").addClass('ms-separator').append(HelpLinkhtml);
    },function(sender,args){
    alert(args.get_message());
    </script>
    Result:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • File Download not working for anchor tags

    Hello,
    I've encountered a bug with the 4.1.31 version of Tomcat. Apparently, when
    I use an anchor tag for a file, and I click on the link, it does not show the
    file download message "Do you want to open or save this file?" with the open
    and save options. Instead, it displays the file in the browser. I know you
    could normally save this information from the browser to a file, but I need it
    to show the download message because it's easier for users to save their
    file. I'm using Internet Explorer version 6, SP2. I've also tried setting
    the "Confirm open after download" check box for file types to no avail. It
    use to work in Tomcat 4.1.18.
    Any help would be appreciated.

    Can anyone pls. help me ? I tried all options from disbling firewall to uninstalling Bonjour.. But nothing works. Had I known that Apple makes such worst software I would never have bought iPhone !!!! Apple really *****!!!!!!!

Maybe you are looking for

  • JSF 1.0 final release problem.

    My application was working when I was using the beta release. (with the old tag like input_text) I downloaded the JSF 1.0 final release from Sun and everything stopped working. The funny part is the the samples in the fina release are working. Howeve

  • Ghost network interfaces installed

    Some failed installation process have managed to setup > 1000 "Local Area Connections" on  my Windows 7 64-bit installation. These do not show using device manager, devcon or other Windows tools. Even if I display hidden ones. The only way I can list

  • Links to assets are missing!

    I have linked my files to the selected words in other occations throughout my website. 2 of these links are not working. Please help! The error says "This document contains 2 links to assets that are missing. You can find or relink the missing assets

  • Type of Scan File

    I have deskjet 1510 all in one printer. In scan setting, i have selected the destination folder as local or on network. I have entered location as desktop but after scaning even though as pdf file,copy is saving as HTML doc, enable me to see or save.

  • Admin Studio 90a unable to connect to ZCM server

    What I have: ZCM 10.1 setup on Windows 2003 server - running smoothly. Able to login and function as Administrator using password x URL used to connect to this is https://10.10.1.68/zenworks/jsp/Login.jsp Admin Studio SE 90 Zenworks Edition. Issue: I