How to get events with a line drawn by shape is selected ?

HI,
In my application I am drawing different lines by following
way. I have added a sprite within UIComponent and
then using shape in sprite to draw lines.
sh = new Shape();
sh.graphics.clear();
sh.graphics.lineStyle(0.5,0x000000);
sh.graphics.moveTo(startX,startY);
sh.graphics.lineTo(endX,endY);
this.addChild(sh);
I want that whenever i click on any line, there should be an
event related to that line which should enable me to select that
line. I have tried a lot but i could not found any way. Whether it
is possible, please suggest any solution if it is.
Thank you.

Hi
When you erase using the eraser tool the outline or stroke gets distorted creating a black outline. Try using the delete anchor tool or the Direct selection tool.
You can even merge the triangle with the rectangle using the unite in path finder. (window -> path finder) shift ctrl+f9 
Thanks
Digiscape Gallery
www.digiscapegallery.com

Similar Messages

  • Vox: how to get sound with no line-in?

    Pardon my french, but I'm up  creek without a paddle...
    I can't seem to get the sound working because I don't have a "line in" input on my laptop. I read that I can use the mic input, but it doesn't work!
    I have WinXP pro and an HP Compaq nc8000 laptop. What do I need to do - step by step...
    *Tronaldo*

    i split this from the sticky as that is only for tips and tricks. it does state that you should start a new topic if you need help. so i have done that for you.
    it does say that you should reduce the microphone recording volume.

  • How to get rid of a line from rectangle shape?

    usually my eraser tool works fine, but when i try to erase a line from a rectangle i made, it creates a black outline instead of erasing it. i took a video of what happens:
    the rectangle is over the image, which is made of regular lines. though i don't think that's causing the problem.

    Hi
    When you erase using the eraser tool the outline or stroke gets distorted creating a black outline. Try using the delete anchor tool or the Direct selection tool.
    You can even merge the triangle with the rectangle using the unite in path finder. (window -> path finder) shift ctrl+f9 
    Thanks
    Digiscape Gallery
    www.digiscapegallery.com

  • How to get string (specified by line and column) from txt file with labview

    Hi everyone
    How to get string (specified by line and column) from txt file with labview
    thx 
    Solved!
    Go to Solution.

    As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character?  You could the Read from Spreadsheet String function and set the delimiter to a space.  This will produce a 2D array of strings.  Then use index array and give the line number and column number.
    - tbob
    Inventor of the WORM Global

  • How to get event when any library object added to indesign doc?

    I want to do some operation when any library object is added to doc. So please tell me how to get event when any library object is added to the doc. better provide some code snippet.

    Daves61,
    I need to clarify what kind of event you're interested in.
    1. When you click once on page/spead widget in the Pages panel and only widget becomes selected. The layout window remains unchanged. OR
    2. When you doubleclick on page/spread widget the selected master spread appears in the layout window.
    In the first case you work with Pages panel.
    Have a look to file PageTransitionsPanelObserver.cpp from SDK. 
    PageTransitionsPanelObserver::LazyUpdate()
    In the second case you work with Layout window.

  • How to get event.columIndex on dragstart (before the actual drag)

    Hi there,
    I would like to know how to get event.columnIndex (ListEvent) when a drag starts within a datagrid.
    I need the index to get the value from a selected cell in a datagrid.
    It works with the itemClick handler (but then I have to click before dragging) on the datagrid but the DragEvent does not have a columIndex for de underlaying datagrid.
    Please advice and thanks.
    Grtz

    The dragStart event is a subclass of a MouseEvent that can be used in
    mouseEventToItemRenderer

  • How to get rozetta with lion?

    how to get rozetta with lion?
    I have put all of Snow Leopard on an external drive (checked to include Rozetta)
    but when I try to use it to start up my computer with Lion installed - it calls this external drive "Recover Drive" and
    it asks me to select from 5 options - all of which sound ominous

    gk5198 wrote:
    I have never used rpm files but Zipeg says it will open them - Zipeg.com
    I'm not really looking for decompressing the rpm, I'm looking for the other features like actually installing the rpm in place. There are a lot of utilities that would just "unzip" the rpm like Unarchiver, etc, but I'm looking for something that will do the rpm install...
    -Thanks

  • How to get event when app is minimized.

    How to get event when app is minimized in only windows app, not phone version.

    Hi,
    Suspending Event will be called when a windows store app is minimized. It will not hit the Suspending Event when minimised while debugging, So you need to trigger it manually from the VisualStudio Toolbar.
    Also Read
    Application Lifecycle for windows apps
    Pradeep AJ

  • How to get  data with the raw pattern from resultset ?

    would you tell me how to get data with the raw pattern from resultset ?
    thank you in advance!
    longgger2000

    I tried getBytes() and getObject()
    , but I can not get the right result , for example the
    data in oracle database is 01000000DFFF, when In used
    the method of getBytes() and getObject(), I get the
    result of [B@1c2e8a4, very different , please tell me
    why !
    thank you
    longgger2000
    [B is byte arrayseem that it return an bytes array for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to get event.target/event.currentTarget for HTML-5 canvas for click handler

    Hi,
    I hope everyone is doing great.
    I belong to Actionscript background and just started on Flash CC HTML-5 canvas.
    How to get event.target or event.currentTarget in Flash CC for HTML-5 canvas for click event.
    Like we used to do it in AS 3.0
    btn.addEventListener(MouseEvent.CLICK , go);
    function go(evt:MouseEvent){
       trace(" evt - "+evt.currentTarget); // It will let us know the clicked target
    For  HTML-5
    btn.addEventListener('click' , go.bind(this));
    function go(evt){
       console.log(" evt - "+evt.????t); // what is the correct syntax here?
    Thanks,

    Hey guys found the answer from stackoverflow
    it is - evt.target

  • How to get event press ESC when plugin's GUI is flashUI

    Hi all
    I implement my plugin use GUI is FlashUI (CSExentersion suite).
    when I pressed ESC. My GUI close imidately.
    I want to check whe n ESC press. But I can't get event pressed key for ESC
    I think that my GUI close from Illustrator. But I don't know how to get event press ESC.
    Thank for your help.

    Put a trace() to print the keyCode into the stage's keydown handler and run your extension in debug mode of flash builder, you can check whether ESC is pressed or not.
    However, I don't know how to prevent extension from closing neither.

  • HT1212 where do i go to get started with the disabled phone process.  I selected the information regarding not syncing into itunes ever.  but where do I go on the site to get started

    where do i go to get started with the disabled phone process.  I selected the information regarding not syncing into itunes ever.  but where do I go on the site to get started

    You use iTunes and restore the phone from Recovery Mode. You will lose all content. http://support.apple.com/kb/HT1808

  • How to get events from Jtextpane editable with graphic drawn on it ??

    HI,
    I have a Texpane with some string drawn on it at some interval according to scale.
    How do I get the event of click on it and make that particular character editable.

    Try adding a mouselistener to the pane
    appu

  • How do you get a "mouse over" event of a line drawn on a picture?

    I am using the "draw multiple lines" vi and want to be able to select a line using the mouse.  From the picture properties I can tell when the mouse is over the picture, but not when the mouse is over a line drawn on the picture.
    Thanks for any help with this.
    Jon

    I think you would have to keep a side database of each object that is selectable and select them from a list. If you look inside some of the picture control functions you will see that it is an array of drawing commands. You don't have access to the z-buffer, so you don't know what pixels were set by their Brenshaw but the z-buffer is the array of drawing commands. If you want to change things that are already laid down then it would have to be more like how visio cycles through the components of groups when you click where each click brings up the control points of the component parts.

  • How to get event target?

    I've registered the following Hide event: 
    app.notifiers.add("Hd  ", ...file path);
    Now, how can get object that triggered the event?  [app.active document.activeLayer]  only give me the 'selected' layer.  This obviously does not work in a scenario where the user hides a layer that is not selected.
    I would appreciate any help!

    Action Manager does not have direct access to objects in the Object Model. It has it's own classes and object. Sometimes there can be a more direct access than by name. If the event descriptor had the layer index or ID you could use that instead of the name.
    Sorry, when I threw this together for you I only tested hidding layers that were not the activeLayer. I don't think the reason the alert is empty is because the top layer was hidden. I think it's because the activeLayer was hidden so the actionReference is different.
    Try this( seems to work for me with both )
    try {
        if (arguments.length >= 2) {
        var desc = arguments[0];
        var event = arguments[1];
        // make sure it's the hide event
        if (event == charIDToTypeID('Hd  ')) {
            // get the list of what was hidden
            var list = desc.getList(charIDToTypeID('null'));
            // get the actionReferences from the list
            var ref = list.getReference(0);
            var psClass = ref.getDesiredClass();
            // make sure it was a layer that was hidded
            if(psClass == charIDToTypeID('Lyr ')){
                // check to see what is in the reference
                var dataEnum = ref.getForm();
                // should either be an enum if activeLayer
                if(dataEnum == ReferenceFormType.ENUMERATED) {
                        alert(app.activeDocument.activeLayer.name);
                }else{// or the layer name
                    alert(ref.getName());
    } catch (e) {
      alert( "Error: " + e + ":" + e.line );

Maybe you are looking for