Click the attribute in the textFlow anchor tag in Flash Builder 4

Hi people,

First congratulation to you, Adobe and Flex team for Adobe Flash Builder 4 & 4 final version of flex SDK...

Then I have an attribute, click in my textFlow, just like that anchor tag:

<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 clicking on my picture, I have adobe site in a new window and also have my alert window with the text "Hello!" ...

But the problem is something else. I want to give this textFlow since a Web service content and put it in a string var and then link it to my RichEditableText. I have receive it of webservice, put it in the chain and how to bind this string to textFlow attribute my RichEditableText obj with simple function... after my project, I can see the content, and when I click on my picture, I have adobe site in a new window, once again. but my function does not call!

What is the problem? the code is something like this (of course without codes webservice!):

<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" />

Listen to a FlowElementMouseEvent.CLICK event will be beneficial.

In your webservice (Textflow) of power, have a tag such as:

Click here to view Adobe's logo!

Then in your ActionScript code, listen to the FlowElementMouseEvent.CLICK of your textFlow instance events.

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
          }

Tags: Flex

Similar Questions

  • I have the problem of installation of Flash Builder 4

    When I tried to download on the official website and install Flash Builder 4,

    the information alert popout and said: I need to remove a beta or test in advance.

    But I remove the beta version of Flash Builder 4,

    and fair warning keep visible so that I can't just Setup.

    I the environment is

    MacBook pro, version 10.6.4

    Chinese language.

    Please help me.

    Thanks in advance.

    Hello

    Try to run the CS5 own tool before installing:

    http://www.Adobe.com/support/contact/cs5clean.html

    For good measure, restart after running the clean tool and then see if you can install it successfully.

    Let us know if it works,

    -Chris

  • I have the key to 4.7 flash builder, what version I have to download and whence?

    My Client purchased the std 4.7 key, but I was unable to find the instaler for this. kindly guide me from where I download

    Manish, try please: https://creative.adobe.com/products/download/flash-builder

    You can also try:

    I hope this helps.

    Atul_Saini

  • After you have installed the CS6 Master Collection, only Flash Builder 4.6 has not been installed successfully.

    How can I fix it?

    The specification of the computer is windows 7 x 64, 32 GB of ram, i7 3770, ssd 256 GB, hard drive 2T.

    I bought the edition student, tried to reinstall using the disks several times without success.

    Thanks for your advice. I had opened a support ticket and solved the problem last night.

    The problem has been resolved primarily by the installation of Flash Builder first, then the rest.

  • Is anyway to change the file Info.plist and Flash Builder 4.6 settings allows to compress the iOS app?

    Hello

    I tried to wrap my application with the last 4.5 Xcode (19 Oct 2012 version) iOS 6 SDK, Flash Builder Flex SDK with Air Beta overlay 3.5 4.6 4.6.

    unzip the .ipa file and I found the following automated settings on the file Info.plist did not:

    < key > DTPlatformVersion < / key >

    < string > 5.1 < / string >

    < key > DTSDKBuild < / key >

    < string > 9B 176 < / string >

    < key > DTSDKName < / key >

    < string > iphoneos5.1 < / string >

    According to the specifications of Adobe, these settinsg are unchangeble, is there anyway to change these values to produce .ipa file with parameters iOS 6.0 with Flash Builder 4.6?

    I think that this cause the problem of presentation appstore below with the image of the iPhone screen 5 4-inch screen splash [email protected]:

    Invalid launch image - you app contains a launch image with a size modifier which is only supported for applications built with the iOS SDK 6.0 or later version.

    Thank you very much

    A

    Please find attached the adt.jar which solves the problem of download. Try to download your application using this adt.jar and let us know the results.

  • Right-click the event listener? in Flash CS4 (AS3)

    Hello

    I was wondering if there is such a thing as a mouse over the earpiece.

    So that she could run code when the mouse is over (and possibly execute code when the mouse moves away again)

    Thanks for any help.

    Yes, there are events of rollover and mouseover so their events 'out ':

    MouseEvent.MOUSE_OVER

    MouseEvent.ROLL_OVER

  • With the help of Scout with Flash Builder

    I use FB 4.7 but I don't see the ActionScript compiler under the project properties. What Miss me?

    Thank you

    You have probably created a Flex - the section ActionScript compiler project will be there only for ActionScript projects. If you want to activate the telemetry to a Flex project or an existing swf (without recompiling), see here:

    http://Renaun.com/blog/2012/12/enable-advanced-telemetry-on-Flex-or-old-SWFs-with-SWF-scou nt enabler.

  • Muse anchor tags

    Need to link to an anchor of Muse from an external url tag, is it the same as the regular anchor tag or Muse code differently?

    Hi RightBraneDesign,

    Anchor in Muse tag works even as a regular anchor tag. Just add the name of the anchor in the muse has added to the anchor tag after "#". EX - http://musesite.com/page.html#muse name of the anchor "> anchor of Muse"

    See you soon!

    Aish

  • How to adjust the position of the image in Flash Builder?

    Hi guys,.

    Where can I find tags in Flash Builder?

    as

    fontSize

    fontFamily

    x = "138".

    How to set the scale of Y and X scale?

    Thank you

    JaxNa

    Component image (in Flex 3) has a scaleX and scaleY property that you can set. The values between 0-1.0, so if you want an image to display at 75% of its real dimensions, you can set these properties ".» 75.

  • KeyboardDrake: changing the default blackberry type in Adobe Flash Builder

    Hey guys,.

    How can I change the default layout in Adobe Flash Builder Burrito using the SDK software BB Playbook

    Essentially, I want the navigation bar at the top down on the left side

    How can I do this

    Thank you

    Chris

    Hey chris,

    Sorry for the delay, the image takes some time before it appears (pending approval of the host). in any case the bar that is displayed is known as an "action bar" in MXML. IM unfamiliar with too much Flex, so I can't tell you how to position it yourself. just google or search for "Flex Action Bar" and which should help you in the right direction. hope that helps. Good luck!

  • What is the cost of Flash builder 4.0 and the purchase of the license?

    1. What is the cost of Flash builder 4.0 and the purchase of the license?

    2. How to make the current test version of Flash builder 4.0 for run with the re - install?

    Hello

    you could have a look at the family Adobe Flash Builder or website to use amazon for example as Amazon.com: Adobe Flash Builder 4 Standard.

    Hans-Günter

  • Flash Builder does not recognize the project files

    Hello

    I have a subscription to creative cloud.  I got it a few months ago.  At that time, I moved all my old work space files in my directory of creative cloud on my computer and then update flash builder 4.6 (later at the time).  I did flash builder for my new workspace in the "cloud" and it automatically has all my old projects and some settings as well.

    Fast forward to today.  I just reinstalled OS x on my computer.  Reinstalled flash builder 4.7 (flash builder 4.7 installed before, I had as well).  Point to my work space in the cloud to front and I have nothing.  I tried to import my old project files and IE is not a valid folder.  Am I missing something here?

    Guess I went ahead a little on this issue.

    For the control of the double, I realized that a few other files was missing in my repertoire of creative cloud.  So he clearly was not syncing properly.  I pulled down the old directory of creative cloud that was stored locally in my front bracket of the reinstall and that copied on and it worked perfectly.

  • Flex components do not work after the upgrade to Flash Builder 4

    I just bought Flash Builder 4 and imported my Flex Builder 3 project. Everything worked except my Flex components that have been created in Flash Professional using the Kit of Compoent Flex may not appear at all in my Flex application. The components have been created in Flash CS3 and published to a CFC. I even tried the upgrade to Flash Professional CS5 and publish again, but that did not help. These components work in Flex Builder 3 with Flex SDK 3.2. Anyone know why they do not appear in Flash Builder 4 with Flex SDK 4.1 and AIR 2.5 SDK? I need to work with AIR SDK 2.5 so I can compile for Android. Thank you, Ryan.

    P.S. when I say that they are not I mean that they are not visible in the currently running application. Flash Builder is find in the good SWC because I instantiate components in my mxml file and it compiles without error. -Ryan

    I downloaded the SWC and looked inside.  It is not related with Flex 4

    version of the FCC.  I think you need to check your configuration.  The CFC

    would have a substantially larger size once you get it right.

  • HTML &lt; Table &gt; tag in Flash

    I have a flash flipbook, I need to implement the HTML < Table > tag inside flash,
    How to integrate into flash because flash accepts only basic HTML tag...
    I HAV FLA, SWF, JS and the HTML, what file I need to change...
    Please guide me...

    There is nothing that you can change in all files that will result in Flash support html table tags

  • anchor tag unique to the multiple links on a page

    to makes things easy, I wanted to know how the arrow down on this site. Cyclemon / experience of the... It is a single anchor tag pinned down. It is just move to the bottom of 1 article to another. I have no idea how to do that and I'd like someone to teach me. Thank you.

    I was going by the code that has been on this page. The problem you would have with the implementation with Muse in this way is that the code directly references the name of the div on the page. Muse names arbitrarily its containers, so you should publish the page and note the names he gives them before that you could write code to do it.

    Is there a reason that you should do this instead of the standard anchor method?

Maybe you are looking for

  • can I use firefox?

    My android is part of 4g samsung Galaxy.

  • Satellite C855 - not working FN keys

    Hi all I bought Toshiba Satellite C855-1MZ, OS Win7 Home Premium 64. After that installation of added value package my function keys are ruined. for example cmbination FN + F5 shoul should toggle the touchpad, but without pressing the FN key is F5. I

  • Satellite 3000 - x 4: this model has how many memory slots?

    Hello I have a question on this model of Toshiba Satellite 3000 - x 4 PS301E - 000 K 8 - EN I took the chassis on this model today to do a repair for someone in my family work. When I took the VGA card, I discovered what looked like an another memory

  • USING XP - CANNOT PRINT A PDF DOCUMENT

    I'M USING WINDOWS XP AND I CAN'T PRINT PDF (SCANNED DOCUMENTS) DOCUMENTS EVERYWHERE WHERE THERE IS COLOR, IT WILL PRINT BLACK. BLACK AND WHITE, PRINTS PDF OK.

  • How to re install card microsoft 6to4 after trying to re install 3 times in a roll

    Hi, I use an Acer laptop running windows vista home basic 32-bit OS, I had trouble with my Atheros AR5007EG wireless network adapter card microsoft 6to4, so I uninstalled both the reinstalled, the problem is that the microsoft 6to4 never appeared in