How to trigger a MouseEvent from TLF, my test doesn't work

  Hi,
      I run into a problem while using the Listener of TLF,
      Inside  the  TextFlow,  I have several Paragraphs.
      What I wish to accomplish is to trigger a mouse Event, like ROLL_OVER, ROLL_OUT event , when  my mouse is over a on one of the Paragraphs.
      I used to experiment a while , but never seem to work, just the examples below
      _textFlow.addEventListener(FlowElementMouseEvent.ROLL_OUT,onMouseHandler);
      _textFlow.addEventListener(FlowElementMouseEvent.ROLL_OVER,onMouseHandler);
       ///   which doesn't work.         i need the event response ,so i can manipulate the paragraph
private function onMouseHandler(e:FlowElementMouseEvent):void
     trace("onMouseHandler" +  e.type  );
     var para:ParagraphElement = e.flowElement.getParagraph();
     trace(para.textLength);
Thanks  in   advance!!!

   this is the code
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="http://www.adobe.com/2006/mxml"
   creationComplete="init()">
<mx:Script>
<![CDATA[
import flash.display.Sprite;
import flash.events.MouseEvent;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.conversion.TextConverter;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.events.*;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.InlineGraphicElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.elements.FlowElement;
import flashx.textLayout.tlf_internal;
private var _textFlow:TextFlow;
private var textSprite:Sprite;
private var backgroundSprite:Sprite;
var source:XML = <TextFlow xmlns="http://ns.adobe.com/textLayout/2008">
<div></div>
<p>
<img source="air.png"/>
<span>Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems. While Flex applications can be built using only the free Flex SDK, developers can use Adobe® Flex® Builder™ 3 software to dramatically accelerate development. Try Flex Builder 3 free for 60 days. Try ILOG Elixir to enhance data display in your Flex applications.</span>
<br/>
</p>
<div></div>
<p>
<span>Adobe® Flex® 3 是用于构建和维护在所有主要浏览器、桌面和操作系统一致地部署的极具表现力的 Web 应用程序的高效率的开放源码框架。 可以使用免费的 Flex SDK 构建 Flex 应用程序, 开发人员可以使用 Adobe Flex Builder™ 3 软件来显著促进开发。 60 天内免费试用 Flex Builder 3</span>
<br/>
</p>
<div></div>
</TextFlow>;
private function init():void
backgroundSprite = new Sprite();
canvas.rawChildren.addChild(backgroundSprite);
textSprite = new Sprite();
canvas.rawChildren.addChild(textSprite);
    _textFlow = TextConverter.importToFlow(source, TextConverter.TEXT_LAYOUT_FORMAT);
_textFlow.fontFamily = "Georgia, Times";
_textFlow.fontSize = 16;
_textFlow.columnCount = 2;
_textFlow.columnGap = 30;
_textFlow.columnWidth = 320;
setListenerOnParagraph(_textFlow);
_textFlow.flowComposer.addController(new ContainerController(textSprite,canvas.width,canvas.height));
_textFlow.flowComposer.updateAllControllers();
import flashx.textLayout.tlf_internal;
private function setListenerOnParagraph(textFlow:TextFlow):void
use namespace  tlf_internal;
for(var i:int =0;i < textFlow.numChildren;i++)
    var para2:FlowElement = textFlow.getChildAt(i);
   if(para2 is  ParagraphElement)
     para2 = para2 as ParagraphElement
     trace("paragraph:"+para2.textLength);
     para2.tlf_internal::getEventMirror().addEventListener(MouseEvent.CLICK, regionClickHandler);      //  wrong here
public function regionClickHandler(evt:MouseEvent):void {
trace("click");
]]>
</mx:Script>
<mx:Canvas width="614" height="321" x="30" backgroundColor="#FDFBFB" id="canvas">
</mx:Canvas>
</mx:WindowedApplication> 

Similar Messages

  • How to recover a library from a laptop that doesn't work

    My laptop died(my brother in law spilled cola on it). I have a new one but I don't know how to recover my library from the old one:( it doesn't start,the GeekSquad told me the motherboard is the problem(too expensive) but I can recover the library if I contact iTunes. So I was thinking to check the forum first,maybe somebody had the same problem.
    Thank you

    If you have everything on an iPod, you can get it back from that, too.
    I don't know if I would trust the Geek Squad person who said contact itunes.
    iTunes store support will not help you with hardware!
    Maybe someone else on the squad could get your entire itunes folder off the hard drive.

  • How do get my pictures from my iPhone that doesn't work

    How can I get my pictures from my iPhone that doesn't work

    When you plug it into a computer, is there any reaction? Is it just the screen that's dead or the whole phone?
    If the whole thing is dead then there may not be anything you can do

  • How to recover my photos from my ipod that doesn't work

    So My Ipod touch 4gr stopped working on friday. And I would really like to know if it's possible to get my photos off it to my computer!

    If iTunes sees the iPod then just import them.
    Otherwise you need to contact an data recovery company.
    However,
    - Restore another iPod, iPhne or iPad from that packup if they are in an iPod backup:
    - If you used PhotoStream then try getting them from your PhotoStream. See that topic of:
    iOS: Importing personal photos and videos from iOS devices to your computer
    - Maybe from an iPOd backup that iTunes made by:
    How to perform iPad recovery for photos, videos
    Wondershare Dr.Fone for iOS: iPhone Data Recovery - Wondershare Official     
    http://www.amacsoft.com/ipod-data-recovery.html
    iPod recovery software to restore lost music files      

  • How to Trigger an IDOC from SAP R/3 to two systems at a time

    Hi experts,
    Can any one please tell me How to Trigger an IDOC from SAP R/3 to two XI systems at a time.
    My current production R/3 system sends a DELVRY03 IDOC to Production XI system ( Name : XIP) .
    I would like to route the same IDOC from production R/3 system to my Quality XI System ( Name XIQ) .
    Problem is production R/3 system triggers an IDOC once. We need to write a logic to route the same to two different systems
    Can any one tell me how can we do that ?
    Regards
    Ram.

    Hello Ram,
    Do you have connectivity between your production & XIQ?
    What does "connectivity" mean?
    1. RFC destination is maintained.
    2. Port defined for the RFC destination.
    If no, create these. (Search in SDN for details).
    If yes, proceed:
    1. Define the logical system for XIQ.(BD54)
    2. Define the same as your partner profile. (WE20). Add the message type SYNCH with the port for XIQ.(This is imp)
    3. Create a distribution model view with sender as "your production" & receiver as XIQ.
    3.1. Add the messages which you want to distribute.
    3.2 Generate Partner profiles.
    No coding is reqd. for this.
    BR,
    Suhas

  • How to Trigger an IDOC from SAP R/3 to two XI systems

    Hi experts,
       Can any one please tell me How to Trigger an IDOC from SAP R/3 to two XI systems at a time.
    My current production R/3 system sends a DELCERY01 IDOC to Production XI system ( Name : XIP) .
    I would like to route the same IDOC from production R/3 system to my Quality XI System ( Name XIQ) .
    Problem is production R/3 system triggers an IDOC once.
    Regards
    Ram.

    Hi Ravi,
      Thank you very much for your answer.
    As I am not completely aware of R/3 side,I am getting little problem in understanding your answer.
    Could you please explain the same in some what beter way.. Thank you ..

  • HOW TO TRIGGER AN WORKFLOW FROM A PROGRAM ?

    HELLO THERE ,
    CAN ANYBODY PLZ TELL ME HOW TO TRIGGER AN WORKFLOW FROM AN PROGRAM AND TO PAS THE VALUE TO THE CONTAINER ?

    Hello Neon,
    If you want to trigger the workflow directly, use the FM, SWU_START_WORKFLOW
    CALL FUNCTION 'SWU_START_WORKFLOW'
      EXPORTING
        task                  =
    *   LANGUAGE              = SY-LANGU
        user                  =
    *   SENDER_ID             =
    * IMPORTING
    *   RETURN_CODE           =
    *   WORKITEM_ID           =
      tables
    *   CONTAINER             =
    *   MESSAGE_LINES         =
        attachment_list       =
    A workflow can also be triggered by and event which is in turn triggered by a program.
    By the FM, SWE_CREATE_EVENT
    Example:
    w_key = 'Connie'.
      w_creator-otype = 'US'.
      w_creator-objid = 'SAPDEV02'.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                       = 'YH_BUDDIES'
          objkey                        = w_key
          event                         = 'event'
         creator                        = w_creator
    *     TAKE_WORKITEM_REQUESTER       = ' '
    *     START_WITH_DELAY              = ' '
    *     START_RECFB_SYNCHRON          = ' '
    *     NO_COMMIT_FOR_QUEUE           = ' '
    *     DEBUG_FLAG                    = ' '
    *     NO_LOGGING                    = ' '
    *     IDENT                         =
    *   IMPORTING
    *     EVENT_ID                      =
    *   TABLES
    *     EVENT_CONTAINER               =
       EXCEPTIONS
         objtype_not_found              = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        WRITE: / 'EVENT TRIGGERED'.
      ENDIF.
      COMMIT WORK.
    Hope it helps you.
    Regards
    Indu.

  • How to trigger an interface from a database(COBOL) in online mode?

    Hi everybody,
    Can you please tell me how to trigger an interface from a database(COBOL) in online mode?
    thanks a lot,
    Ramya Shenoy

    If you can make a HTTP call from you DB platform -
    HTTP -> BPM (Receive -> Send Step (execute an SP or your select statement here in the JDBC receiver channel) -> send (to target) )-> end.
    VJ

  • How to trigger IDOC'S from SAP

    Hi All,
    How to trigger IDOC's from SAP(ECC 6)..where can we check this in mii 11.5 weather it is fail/success
    Thanks,
    Abhi

    You can trigger LOIPRO, LOIPLO and a few others manually from POIT (SAP Txn).  Master Data related to orders can be triggered from POIM.  Depending on which IDocs you which to generate, there are other transactions to trigger different IDocs.
    You can also use Triggers from MII to generate IDocs in SAP using CLOI_DOWNLOAD_TRIGGER_MDAT (POIM equivalent) and CLOI_DOWNLOAD_TRIGGER_TRANS (POIT equivalent).
    There is also a rather nice post which detailed the process of using change pointers to automate the IDoc generation and download, but I am having trouble finding it.  Will continue to look and will post link when I find it.
    Regards,
    Mike
    I couldn't find the post I was looking for, but there is an informative note 390635 which may help.
    Edited by: Michael Appleby on May 5, 2009 1:29 PM

  • How to trigger sender rfc from r3 system

    Hi experts,
    can any body send  documents about " how to trigger sender rfc from r3 system"
    regards
    sandeep.

    HI Sandeep,
    To send RFC data on timely basis you can schedule the programs.
    In Partner Profile use setting collect program. Use program RSEOUT00 to send data at particular time.
    You can schedule the report RSEOUT00 according to your requirements. So it flushes all the idocs in the background as per your schedule this program.
    Plese refer the below thread, it will help you.
    Re: Triggering Idocs from sender  side
    Idoc triggering from a transaction
    Cheers..
    Vasu
    <i>** Reward Points if found useful **</i>

  • APD process is active, How to trigger the data from BI to CRM table

    Hi All,
    I want to send data from BI system(using APD method) to CRM table (ADS method).
    I am able to see the table for e.g ABCD in CRM system , i can open using SE11 , but data is 0.
    In BI , i have data in DSO and i have mapped it in APD process to data Target to CRM system and APD is active.
    Now i want to know how to trigger the data from BI to CRM table? (e.g ABCD).
    Please let me know the steps.
    Regards.
    Nithi.

    Hi
    Just create a Process Chain to execute this APD method, if the process Chain is already available, then just insert this Process in to the process Chain and execute the Process Chain by normal process, by hoe we do in general.
    Hope it solves...

  • How can I upload a video from my PC through I tunes to camera roll on my iPhone? Is there an app or format of specific video supported? Sync from photos include video doesn't work for me.

    How can I upload a video from my PC through I tunes to camera roll on my iPhone? Is there an app or format of specific video supported? Sync from photos include video doesn't work for me.

    download the new you tube apps in i tunes, in os6 just pick a video in the photos apps and select share, the old you tube app icon will appear

  • Although I'm connected to my WIFI network my computer keeps "looking for new networks" How can I stop it from doing so when I'm working at home and don't want another network?

    Although I'm connected to my Wi-Fi network my computer keeps "looking for new networks." How can I stop it from doing so when I'm working at home and don't want another network?

    You might want to update Safari to 3.12. I would empty the safari cache. (Safari>Empty Cache). Then quit Safari. System Preferences>Network>Show:Airport>TCP/IP. Insert the following into the DNS Servers box;
    208.67.222.222
    208.67.220.220
    then hit apply. Now launch Safari. You should also try powering down modem, router and Mac and power up in 2 minute sequence; modem, router, Mac.

  • How can I import comments from shared reviewer who doesn't have acrobat pro?

    How can I import comments from shared reviewer who doesn't have acrobat pro? I sent out a shared review, but not all of the reviewers have acrobat pro, they do have acrobat reader 9 and have made comments on the document, but they do not appear when I open the shared review from the workspace. Can I import his comments so that they are apart of the shared review?

    I figured it out, so I will share just in case anyone else has this issue...
    The reviewer emailed me his comments on the document. I opened it and made a comment. When I went to publish my comment a dialogue box opended asking if I wanted to publish his comments to the shared review for him. Says yes and the reviewers comments are now published and a part of the shared review.

  • Photostream from PC to Ipad doesn't work

    Hello, I have installed ICloud on my Ipad en on my Windows 8 laptop. Photostream from Ipad to laptop is ok but from laptop to Ipad doesn't work.
    I have contacted Apple support but the couldn't figure it out, I tried everything: disable firewall in router and laptop, also disabeld Defender, installed a new
    ICloud, installed new OS on the Ipad, all the photo's are in the upload folder, the battery of the Ipad is 100% filled, the Wifi works ok. etc.etc. I suppose that
    there must be a wrong configuration somewhere, perhaps the Wifi must be in BootP on the Ipad or I have to enable a kind of service in the laptop or perhaps
    it is just a stupidity from me? Who has an idea?
    Thnx RJZ

    Looks like they changed how this works in iCloud Control Panel 2.0
    "On a PC with iCloud Control Panel 2.0 or later, open a Windows Explorer window. Select Photo Stream under Favorites. Open My Photo Stream. Click the "Add photos" button. Select photos to import to My Photo Stream, and then click Open."
    And here is the source:
    iCloud: Photo Stream FAQ - Support - Apple

Maybe you are looking for

  • Podcasts There But Not Really(?)

    Hi there. I know the boards are lighting up with complaint about v7, but if someon could find the time to help me, they would be my hero. Problem: Podcast episodes ARE showing up in one smart playlist, NOT the podcast section, and NOT in the Libray.

  • 10.6.8 does not recognize canon powershot SD1100 IS

    I have just tried to upload photos from my canon for the first time since I got my macbook pro 10.6.8, also reinstalled canon software, and when I plug in my camera, the machine does not recognize it. It simply says, 'No camera found' Anyone else hav

  • Replaced Cert now Outlook giving error.

    Our existing SAN Cert expired so I bought and installed a new one from godaddy. The old Cert had SAN Names for the internal name of the server I'll say server.internal.local. The new ICANN rules persuaded me to not include the internal name of the se

  • What's the best way to check my macbook pro for malware?

    I've noticed of late a couple of random popups and suspicious-looking installers on my macbook pro. How can I check for malware? And if my lap top's infected, how can I disinfect it?

  • How to back up my laptop?

    I have an HP pavilion m6 laptop with Windows 7. How do I back up my data if my hard drive ever fails? Should I order hp recovery disks or should I just make a recovery image? Suggestions?