Adding a listener click scene

Hi all

I added an earpiece on stage to close a loader object when it is clicked on the stage. The problem is the click seems to affect the loader object for (basically when you click on the charger it calls the click function attached to the stage). Is this normal? I guess it's logical, but is possible to add a listener to the scene which excludes some items?

Thank you

events bubble in flash if yes, who expects this behavior.

to prevent the propagation of the event, you can use:

e.stopImmediatePropagation)

in your handler for Chargers (where e is the event).

Tags: Adobe Animate

Similar Questions

  • added text on click of a button input field.

    Hello

    I use 11.1.1.4 jdev.

    Please let me know how to add the ADF of entering text on the button click.
    Text field must always appear above the button in the page.

    What clique button how to add the new component inputtext ADF.

    I need to map all of the values to the beans. Can we add/link it through bean?

    Thank you.

    Published by: 811407 on January 30, 2011 22:34

    Published by: 811407 on January 30, 2011 22:37

    I guess there is no code for this available use case example. But this isn't that hard to do.
    You must call a method of bean on your click on the button (an actionListener will do). in the listener, you can manipulate the tree of components to your needs.
    The tree of components is, as its name suggests a tree. so each component is the container for other components and is a child of a parent element. Your button is a child of an element parent (for example a group of panels).
    Start the easy way additional text below the button first. It's easy because you can get the parent of the button and simply add a new input text.
    Assuming that your button is a child of a panelGroupLayout, you get the following code:

        public void addInputTextListener(ActionEvent actionEvent)
        {
            UIComponent button = (UIComponent)actionEvent.getSource();
            RichPanelGroupLayout pgl = (RichPanelGroupLayout)button.getParent();
            List children = pgl.getChildren();
            RichInputText it = new RichInputText();
            it.setLabel("New IPT "+(children.size()+1));
            children.add(it);
            AdfFacesContext.getCurrentInstance().addPartialTarget(pgl);
        }
    

    Timo

  • Adding 3D to a scene object Axes

    I try to use the "Create 3D axis VI" (http://zone.ni.com/reference/en-XX/help/371361K-01/lvpict/create_3d_axis/) to add a set of axes to my scene of mesh object. The mesh changes with time (actually from measures) and must therefore be in a loop. Put the VI 3D axes in the loop works, but creates a horrible memory leak, as the VI creates new objects in each race. Do not put in the loop creates "1055 error to Invoke node; Possible reasons: LabVIEW: object reference is not valid. "error. Can someone please suggest a way around this?

    In addition, I have need the sphere to create in the VI. This is because I couldn't add axes without wiring something to the Drawable of the invoke node entry.

    Thank you!

    Add the objects outside of the loop.  Take the exit of the 'Drawable Set', cast to a reference of mesh and he in the loop wire.  Then, in the loop, simply modify the data required for the primitive in each loop and call the method 'Redraw' the control of 3D image.  The 3D image is reference based, which means that the reference points object drawable to the REAL object in memory that is under development.

    In addition, when you are not using the output of "Drawable Set" or "Add an item", you MUST tie a knot 'Close Reference' out there.

    Shane.

  • Adding new listener Console Console of the grid

    Hi I'm running 11 OEM, and I created a new listener Strawberry that was not discovered by the OEM. I tried target, refresh, but in vain. Is it possible to add a new Stanley OEM please.

    You can go two directions for this:

    Navigate to Configuration - Agents
    Select the Agent that is installed on the host computer, you created the listener

    1)
    Select Add Listener and press [Go]
    Enter all relevant data of Listener

    2)
    Select Add an Instance of database [GB]
    This will activate the detection of target on your host and can detect the presence of your listener.
    Complete the discovery with the listener select single and press [OK]

    Concerning
    Rob
    http://oemgc.WordPress.com

  • Total frustration with adding event listener

    It's driving me crazy. I tried to do it for a few days now and I can't function. Everything seems to work properly, my images are loaded and land on the stage where I would like to, but I can't drag. It seems that the event listener (which I have highlighted) is not applied. Can someone tell me the error in my ways?  PLEASE?


    As a note, I did this same thing with the loading of the items in the library, and it works. I copied a lot of my project to test this code and when I load the bitmaps instead of out them of the library, it breaks.

    package {}

    import flash.display.MovieClip;
    Import 12345678910111213import;
    import flash.display.Loader;
    import flash.events. *;
    import flash.net.URLRequest;

    SerializableAttribute public class Main extends MovieClip {}

    var testImageArray:Array = new Array();
    var testImages:Array = new Array("177966","178006","700091");
    var xPos:int = 580;
    var yPos:int = 2;
    var yOffset:int = 0;

    public void Main() {}

    for (var i: uint = 0; i < testImages.length; i ++) {}
    loadThisImage (testImages [i]);
    }

    }

    function loadThisImage (imageName) {}
    var loader: Loader = new Loader();
    var req:URLRequest = new URLRequest("images/"+imageName+".jpg");

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, loadComplete);
    Loader.Load (req);

    }

    function loadComplete(event:Event):void {}
    var i: int

    testImageArray.push (addChild (event.target.content));

    I have = testImageArray.length;
    testImageArray [i-1].addEventListener(MouseEvent.MOUSE_DOWN,dragItem);

    testImageArray [i-1] .x = xPos;
    testImageArray there [i-1] = yPos;
    yPos += testImageArray [i-1] .height + 5;

    }


    function dragItem(event:MouseEvent):void {}
    trace ("Drag from");
    event.target.startDrag ();
    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, dragItem);
    event.target.addEventListener (MouseEvent.MOUSE_UP, dropItem);
    }

    function dropItem(event:MouseEvent):void {}
    trace (Event.Target.Name);
    trace (Event.Target.x);
    trace (Event.Target.y);
    trace("");

    event.target.stopDrag ();
    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropItem);

    event.target.addEventListener (MouseEvent.MOUSE_DOWN, dragItem);
    }

    }
    }

    My guess is you are trying to assign an event listener to an object that does not have one, an object bitmap, even if no error reported by you, I would hedge my bets.  If you place the image into a movieclip and set the event listener for the movieclip it might work... maybe something like...

    function loadComplete(event:Event):void {}
    var i: int

    var newMC:MovieClip = new MovieClip();

    newMC.addChild (event.target.content);

    testImageArray.push (addChild (newMC));

    I have = testImageArray.length;
    testImageArray [i - 1] .addEventListener (MouseEvent.MOUSE_DOWN, dragItem);

    testImageArray [i-1] .x = xPos;
    testImageArray there [i-1] = yPos;
    yPos += testImageArray [i-1] .height + 5;

    }

  • [noob] Help understand why the event listener continues even after the withdrawal.

    Hey again,

    I'll try to do my best to explain. I can get this to work properly, but I'd like to understand why what I did before was not working.

    I have a little trouble understanding why an event listener continues listening to even after that I delete it. I have a facility where a Parent MovieClip ("CampScene") is established and an event listener is added to the look for a function ("walkUpToCampfire") to see if a condition is true ("comingFromAx is true", that won't be true until later).

    If it is true, an animation plays, an event listener is added to see if the animation is made and if it's an event listener is added to listen for a click ("campScene.goToAx") to a new animation to play and other events. (It won't be true until later.)

    If this isn't true (which is the situation that I work with at the start), the event listener said listening for a click on "campScene.goToAx" is implemented immediately. The function following removes the event listener, so it is supposed to stop listening to a click and let an animation play throughout.

    The problem is a continuous click to be listened to and if you keep clicking on the reboot of animation every time, which is what I don't want to happen.

    --------------------------------------

    I'm able to resolve the problem by adding the line "campScene.removeEventListener (Event.ENTER_FRAME, walkUpToCampfire)"; or in mouseEnabled affecting false for "campScene.goToAx", but I try to understand what is happening.

    It is, even if I'm deleting the listener ("campScene.goToAx") in a function ("goToAxScene"), "campScene.addEventListener (Event.ENTER_FRAME, walkUpToCampfire)"; continues to wait for a mouse click, unless it is removed also?

    Again, I am trying to understand how it works.

    --------------------------------------

    This should be all ACEs. Of course, I would like to know if you need more information. (I can post the FLA / AS files if need be.)

    public void practice_adventure8() {}

    ...

    initial event listeners

    addEventListener (Event.ENTER_FRAME, CampScene);

    }

    public void CampScene(event:Event) {}

    remove the event listener
    removeEventListener (Event.ENTER_FRAME, CampScene);

    Add the first camp scene
    campScene.x = - 120;
    campScene.y = - 10;
    addChild (campScene);
    setChildIndex (campScene, 0);

    Add the event listener to see if guys works with camp fire or not
    campScene.addEventListener (Event.ENTER_FRAME, walkUpToCampfire);

    }

    IF RETURNING TO CAMPSCENE
    public void walkUpToCampfire(event:Event) {}

    If the guy is walking back to axe
    If (comingFromAx == true) {}

    event listeners
    campScene.guyAtCampScene.gotoAndPlay ("guyComingFromAx");
    campScene.addEventListener (Event.ENTER_FRAME, ifGuyDoneWalking);

    otherwise if initial creation
    } else {}

    remove the old event listener
    campScene.removeEventListener (Event.ENTER_FRAME, walkUpToCampfire);

    trace ("comingFromAx = false");
    event listeners
    campScene.addEventListener (Event.ENTER_FRAME, sceneHoverInfo);
    campScene.goToAx.addEventListener (MouseEvent.MOUSE_UP, goToAxScene);
    campScene.goToBridge.addEventListener (MouseEvent.MOUSE_UP, goToBridgeScene);
    }
    }

    IF RETURNING TO CAMPSCENE FACT
    public void ifGuyDoneWalking(event:Event) {}

    If the guy ended up in foot
    If (campScene.guyAtCampScene.currentLabel == "guyAtCampSceneNormal") {}

    reset the Boolean values of scene
    comingFromAx = false;

    Add event listeners
    campScene.addEventListener (Event.ENTER_FRAME, sceneHoverInfo);
    campScene.goToAx.addEventListener (MouseEvent.MOUSE_UP, goToAxScene);

    }
    }

    GET READY FOR THE NEW SCENE

    public void goToAxScene(event:MouseEvent) {}

    delete movement event listeners
    campScene.goToAx.removeEventListener (MouseEvent.MOUSE_UP, goToAxScene);


    stop all sounds

    SoundMixer.stopAll ();

    play the clip of guy walking to AxScene
    campScene.guyAtCampScene.gotoAndPlay ("guyGoingToAx");

    check the label to see if axScene must appear
    campScene.guyAtCampScene.addEventListener (Event.ENTER_FRAME, addScene);
    }

    Your best bet to solve why things happen is to make use of the trace function.  In this case, you may have a trace run every time this listener can addedand any time it is deleted.  In this way, you should be able to see if it was added in after he deleted.  If there are several places where it is added, then adjust your tracks to indicate which line is involved as well.

  • nesting, click functions?

    Add an event listener is easy, but how would I go about creating a progressive script. I have a next button that gives the directions and I'll have the strangest find how edge wants me to do things. The JS I nests just CLICK listeners.

    example:

    Click on: "Hi!"

    Click on: "Let's learn about heaven.

    Click on: "the sky is blue".

    I'm trying to find how to do this with a single symbol.

    Looks like my way of thinking aloud fixed my own question.

    Added to the timeline:

    Label = "A";

    Added, and then click:

    var pos = sym.getPosition)

    Switch (label)

    {

    case "One": alert (pos);

    }

  • Click on staging of substitute

    Hello

    I'm creating a banner advertisement on the edge and have added an action click on stage to open the web address of customers. It works very well.

    However, there is a point in the announcement that their e-mail appears and they want it is a clickable link that opens the users email client, I added this by using the click action and

    window.open ("mailto:[email protected]", "_self"); 

    and I tried

    window.top.location.href = "mailto: " [email protected] ';

    But it seems that scene click action replaces the text click action, and of course you can not move the scene to be behind the text.

    Is it all the same around anyone know?

    Thank you

    Lee

    History of the newspaper, better NOT to make "clickable" scene, but they have a separate div (perhaps the lowest in the hierarchy of the elements Panel) clickable. Better yet, to assign a block of text with the web address and have this clickable to the web address. To do this, and the action of email click should be fine.

    D

  • Withdrawal of a button event listener.

    I added an event listener 'click' to a button, but I would like to remove once the button is clicked, it is not active/clickable more. Here's the Basic code:

    {sym.$('button'). Click (Function ()})

    Here, I need to make this clickable button no longer

    });

    Thank you.

    one way...

    {sym.$('button'). Click (Function ()})

    Here, I need to make this clickable button no longer

    do smething here then click handler Unbind

    SYM. $('bouton') .unbind ("click");

    });

    Unbind documentation here.

    HTH

    Darrell

  • Adding an event doubleclick on Graphic Image Online

    Hi all

    I am trying to add a doubleClickEvent to an InlineGraphicElement, so that a pop-up window appears and I can enter a new width and height. I have a problem adding a listener for the doubleClick event to an image I am about to add as a line chart. 1. before or after that I'm inserting the image with insertInlineGraphic(source,width,height), how can I add a double-click event listener? 2. once, I get a mouse doubleclick event works, how again can I access the selected or one doubleclicked image so I can change the width and height attributes?

    Thank you much for the help!

    Justin

    We need expose the eventMirror property - it's a bug. I'll make the change today. Because there side effects I rename it to getEventMirror and it will no longer have a Get accessor.

    Richard

  • create a shortcut on the desktop link when right click in Firefox

    When I use Internet Explorer and that I right click when I am on a Web site, there is an option to create a shortcut to this site on my desktop.

    When I use Firefox and I click right when I'm on a Web site, there is no option.

    I want to know how to insert this option in Firefox to do a right click for me.

    Here is the Mozilla help page:

    http://support.Mozilla.com/en-us/KB/creating%20A%20desktop%20shortcut%20To%20A%20Web%20page

    Drag the icon of the site (which is the symbol of address bar on the left) on desktop, and then rename the shortcut to your Web site.

    DeskCut module works, BUT it needs to be changed in the Option section after installation:
    DeskCut options
    A. name tab of the
    1. name of the Options file: generating the file name of the page title
    B. Path tab
    1 sets the path... Browse... Choose where to place the shortcut (usually on the desktop)
    [In Win7, it's C:\User\username\desktop ""]
    C. OK!

    Now, it should work!

    What a pain that Mozilla should have added a right-click feature "Create a shortcut" in Firefox!

  • Listener e-mail about all message boxes

    Hi all

    I tried to implement (what I thought was) a receiver of simple messages. I have the code in its own class that implements FolderListener, according to which everything he needs to do is to recover messages sent to any of the message boxes that the device has. After that, it will check certain properties of the message, but I'm stuck at the real listener/detection part.

    Using the BB code has tried to extract "INBOX" of type "Folder" and by adding the listener to this, but since entered an approach more high level that performs this action throughout the store:

    class MailListener extends MainManager implements FolderListener {
      Message _newMessage;
      String _cipherText;
    
      MailListener() {
        Session.getDefaultInstance().getStore().addFolderListener(this);
      }
    
      public void messagesAdded(FolderEvent event) {
        _newMessage = event.getMessage();
    
        UiApplication.getUiApplication().invokeLater(new Runnable() {
            public void run() {
              Dialog.alert("Got an email");
            }
        });
      }
    }
    

    However, on receipt of an email, the message "to receive an email' fails to display - makes me think of the earpiece does not work properly, as the call of Dialog.alert works well if it is placed in the constructor.

    Can you see where I am going wrong?

    Thank you!

    Will be

    Here's a slightly more updated version of the article you found:

    http://supportforums.BlackBerry.com/T5/Java-development/global-events-and-global-event-listeners/TA-...

    The approach to the use of a Global event and FolderListener is the recommended approach for this kind of requirement.  Recommended, because it is safe, made the appropriate context for you and isolates the treatment of electronic mail (which exists in the earpiece of your file) from your code.

    There are other means, less fresh generals and/or coding of requirement, but there is no safer way.

    As an example of another way, you might have shared in RuntimeStore storage space.  You could have a treatment of your Application that expects data to be included in the RuntimeStore collection.  Then the listener needs to do is pop the data in the RuntimeStore - your Application running in its own context, will pick up these data and can treat it as he likes.

    By the way the reference will not work, because you always have the problem of running your code in another context.

    I tried to explain the basics of Applications and their context (or address spaces, or whatever you want to call them), in this post.

    http://supportforums.BlackBerry.com/T5/Java-development/ControlledAccess-exception-for-persistent-St...

  • SMS for outgoing SMS listener throws IOException immediately after the open call

    I had already created a class for sending SMS messages which worked perfectly until I added the listener. When the listener is added as soon as I start the thread throws an IOException exception who am I hurting? The only thing I can think is some kind of wire problem, please help.

    Here's the SMS & Listener class:

    private static final class SmsMessage    {        private String _address;        private String _msg;
    
            public SmsMessage(String address, String msg)        {            _address = address;            _msg = msg;        }
    
            public Message toMessage(MessageConnection mc)        {            TextMessage m = (TextMessage)mc.newMessage(MessageConnection.TEXT_MESSAGE,"sms://" + _address);            m.setPayloadText(_msg);            return m;        }    } // SmsMessage
    
       private final class SendThread extends Thread    {        private static final int TIMEOUT = 500; // ms        private Vector _msgs = new Vector(10); // Queue of 10        private volatile boolean _start = false;
    
            // queue requests        public synchronized void send(String address, String msg)        {            _start = true;            _msgs.addElement(new SmsMessage(address, msg));        }
    
            public synchronized void stop()        {            _stop = true;            try {                if ( _mc != null ){                    _mc.close();                }            } // catch (IOException e ) {                catch (Throwable t) {                t.printStackTrace();                System.exit(0);            }
    
            }
    
            public void run()        {            try {                //closed by the stop() method                _mc = (MessageConnection)Connector.open("sms://");
    
                    if (_mc != null)                {                    // set a listener to trap outgoing sms messages                    _mc.setMessageListener(new OutboundSMSListener());                }                for(;;)                {                    while( !_start && !_stop)                    {                        try {                            sleep(TIMEOUT);                        } // catch (InterruptedException e) {                            catch (Throwable t) {                                t.printStackTrace();                                System.exit(0);                            }                    }                    if ( _stop )                    {                        return;                    }
    
                        while(true)                    {                        try {                            SmsMessage sms = null;                            synchronized (this)                            {                                if ( !_msgs.isEmpty() )                                {                                    sms = (SmsMessage)_msgs.firstElement();                                    // take it out of the queue once we sent it                                    _msgs.removeElement(sms);                                }                                else                                {                                    _start = false;                                    break;                                }                            }
    
                                _mc.send(sms.toMessage(_mc));
    
                            } // catch (IOException e) {                            catch (Throwable t) {                                t.printStackTrace();                                System.exit(0);                        }                    }                }            } // catch (IOException e)              catch (Throwable t) {                t.printStackTrace();                System.exit(0);              }        }    } // SendThread
    
        private static final class OutboundSMSListener implements OutboundMessageListener    {        public void notifyIncomingMessage(MessageConnection messageconnection)        {            // we don't care about incoming sms messages right now        }
    
            public void notifyOutgoingMessage(Message message)        {            Dialog.alert("Detected An Outgoing SMS Event");        }    }
    

    Thank you. Makes sense.

  • How can I keep my top bar with "delete" on it to go away when I click it. I want to remove successive emails using the button Delete on top of my Windows Live Mail

    I want to delete several emails in Windows Live Mail. When I click on the button Delete in the upper part, the entire bar disappears. I want to keep it there all the time to use it to remove some of the emails but it keeps going away after a single use.

    Right click on the home tab and click cut the Ribbon to deselect.

    You can also ensure that the delete button is always visible by showing it on the Quick Access toolbar at the top of the window. There is a drop-down menu at the right end of the QUICK access with the controls bar, and others can be added by right-clicking on any command on the Ribbon and select Add to quick access toolbar.

  • Listening port configuration Oracle reboot without touching listener.ora?

    Hello

    during the installation of a database in oracle restart the environment, right now I'm adding a listener to data through srvctl like this:

    srvctl add listener-l o LSNR_ ${Database} {ORACLE_HOME} Pei "TCP: ${PORT}".

    srvctl setenv listener -l LSNR_$ {Database} t ORACLE_BASE = ${ORACLE_BASE}

    In addition, I add the appropriate to the listener.ora corresponding lines: (example)

    LSNR_PLAY =

    (DESCRIPTION_LIST =

    (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP (PORT = 8029))(HOST = sol001.hypoport.local))

    )

    )

    ADR_BASE_LSNR_PLAY = / ora01/app/oracle

    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LSNR_PLAY = WE

    ADMIN_RESTRICTIONS_LSNR_PLAY = WE

    It works as well for a long time I I'm not touching any configuration of the listener. But when I'm trying to change some parameters of the listener, an oracle agent rewrites the listener.ora file on its own in order to reflect these changes.

    So I wonder if I can completely jump to touch the listener.ora on my own file and let this agent to this work, while all configurations with srvctl (or maybe lsnrctl). But it would take to activate / ADMIN_RESTRICTIONS way ENABLE_GLOBAL_DYNAMIC_ENDPOINT permanent using these utilities. Is this possible? How?


    THX

    Robert


    ==================================

    IG is 11.2.0.4

    DB is 11.2.0. [34]

    So, just adding

    ADMIN_RESTRICTIONS_ = WE

    to the listener.ora just. Everything needed is generated by an agent of the basic config with "srvctl add listener." Other "lsnrctl set" specific settings must be entered manually on the listener.ora if necessary.

    Thank you.

Maybe you are looking for