MouseOut event seems to cancel Click event

Im using a state for rollovers of a button, and a state for
the click of the same button, this causes a problem when the user
clicks the button. Instead of the click state being activated
instead i see a brief blinking of the click state and then suddenly
the app reverts to the mouseOut state, how can I tell FLEX that the
click event is more important then the mouseOut event?
EXAMPLE
<mx:Canvas mouseOver="currentState='rollOver'"
mouseOut="currentState='rollOut'"
click="currentState='clicked'">
in this example, when you click the canvas you will end up at
the "rollOut" state instead of the "clicked" state but it appears
the clicked state may be displayed for a brief moment as the app
kind of blinks before showing the "rollOut" state. Oh and I've
tried to remove the event listener on click but it doesn't appear
to be fired as the event listener is not removed. HELP!?!

"octagonatron" <[email protected]> wrote in
message
news:g8feue$iee$[email protected]..
> Im using a state for rollovers of a button, and a state
for the click of
> the
> same button, this causes a problem when the user clicks
the button.
> Instead of
> the click state being activated instead i see a brief
blinking of the
> click
> state and then suddenly the app reverts to the mouseOut
state, how can I
> tell
> FLEX that the click event is more important then the
mouseOut event?
>
> EXAMPLE
> <mx:Canvas mouseOver="currentState='rollOver'"
> mouseOut="currentState='rollOut'"
click="currentState='clicked'">
>
> in this example, when you click the canvas you will end
up at the
> "rollOut"
> state instead of the "clicked" state but it appears the
clicked state may
> be
> displayed for a brief moment as the app kind of blinks
before showing the
> "rollOut" state. HELP!?!
How bout
mouseOut="currentState!='clicked'?currentState='mouseOut':currentState='clicked'"
or mouseOut="mouseOutHandler()"
private function mouseOutHandler():void{
if (currentState!='clicked') currentState='mouseOut';

Similar Messages

  • CSS advice for Image scale mouseover/mouseout event

    Hi,
    I'm trying to add CSS to an image to create a mouseover/mouseout event. I just can't seem to get it to work.
    I wan't the the scale of the image to increase to 1.5 on mouseover, then return to 1 on mouseout.
    Any advice on the CSS coding would be greatly apreciated....
    Also how would I make an image hover whilst mouseove?.
    Thanks, Mike

    In mouseover event:
            var escalaX=1.5;
            var escalaY=1.5;
            image.getSymbolElement().css({
                "-webkit-transform":"scaleX(" + escalaX + ")",
                "-moz-transform":"scaleX(" + escalaX + ")",
                "-o-transform":"scaleX(" + escalaX + ")",
                "-ms-transform":"scaleX(" + escalaX + ")"
            image.getSymbolElement().css({
                "-webkit-transform":"scaleY(" + escalaY + ")",
                "-moz-transform":"scaleY(" + escalaY + ")",
                "-o-transform":"scaleY(" + escalaY + ")",
                "-ms-transform":"scaleY(" + escalaY + ")"
    if your image is not a symbol, then you must to use sym.$("image").css(... syntax.
    If you prefer animation and not instantaneous change, you can to see this thread: http://forums.adobe.com/message/5590639

  • I have just installed OS X Mavericks and I can't seem to right click on the track pad.

    I have just installed OS X Mavericks and I can't seem to right click on the track pad.
    Also the track pad seems to be slower/ not picking up all my finger movements.

    You might want to take the computer to an Apple Store or an AASP and have them give you an estimate, at least, on how much it would cost to 'fix' the trackpad - I've no idea what the cost would be. The trackpad on MBPs is one of the most sensitive elements in the computer's design. They usually don't go bad, but yours seems to be giving you some trouble: so just make a Genius Bar appointment and just get an estimate - might be something simple.

  • Hello, I recently uploaded about 250 photos from my phone onto iPhoto. However, when I go to view them, they have already been auto-cropped. It seems I must click "Edit," and then "Crop," and then expand the box to the fullest size. Any suggestions?

    Hello, I recently uploaded about 250 photos from my phone onto iPhoto. However, when I go to view them, they have already been auto-cropped. It seems I must click "Edit," and then "Crop," and then expand the box to the fullest size. I don't have enough time to undo this auto-crop with all 250 photos. Any suggestions?

    @SuperMan
    I noticed this as well when navigating through the photo gallery on my iPhone. 
    If you (and he) are asking about iPhone operation then you are in the wrong place - this is the iPhoto for Mac forum - there are forums for the iPhone, iPad and iPod touch as well as iPhoto for IOS -
    I do not see any cropping in iPhoto on the Mac for either camera or iPhone photos (I use PhotoStream with auto import to get my iPhone photos to iPhoto on my Mac) - and given the way iPhoto works it is really not possible to have auto-cropping - the only thing that I see even close to that is that when you select edit ==> drop the default crop is slightly smaller than the photo - but unless you accept that nothing is changed and the photo is exactly as imported
    LN

  • I was charged twice when I purchased the software last night.  I cant seem to cancel one order or find any place to notify Adobe.  Suggestions?

    I was charged twice when I purchased the software last night.  I cant seem to cancel one order or find any place to notify Adobe.  Suggestions?

    Thank you Rajshree,
    I assume that I can still use the product, and that they did not cancel
    both subscriptions?
    Norm Boshoff
    Norm Boshoff  M.Div. CIP, CADC II, BRI-II,
    Board Registered Intervention Specialist
    (949)-813-9506.mobile
    800-619-4662.helpline
    E-mail: [email protected]
    230 Wave Street
    Laguna Beach, CA 92651
    In compliance with the Health Portability and Accountability Act "HIPAA"
    (rule 104-91), this message is intended for use of the individual or entity
    to which it is addressed and may contain information that is privileged and
    confidential. If the reader of this electronic message is not the intended
    recipient or the employee or agent responsible for delivering the message
    to the intended recipient, you are hereby notified that any dissemination,
    distribution or copying of this communication is strictly prohibited.
    If you have received this electronic message in error, please notify the
    sender at 949-813-9506 and purge the electronic message immediately without
    making any copy or distribution.

  • Have a macbook with the old fashioned trackpad. Sometimes when I am typing, it seems like someone clicks my trackpad. I have set my macbook up to where you have to press the trackpad button instead of just tap the track pad. Any ideas?

    Have a macbook with the old fashioned trackpad. Sometimes when I am typing, it seems like someone clicks my trackpad. I have set my macbook up to where you have to press the trackpad button instead of just tap the track pad. Any ideas?

    Sometimes during the "old-fashion" macbooks there is different feelings in the way you control it. Take it to the apple store and I am Pretty sure they can tell you what is going on and if it is "Time for a Upgrade".

  • Mouseout event in VBox

    I can't seem to detect a mouse event (MouseOut) on an
    Accordion menu. I can do it on the TabBar but am not able to do it
    on the children. I know I am missing something fundamental here.
    The purpose is to make Accordion (id=locations) property
    Visible=False when MouseOut occurs on the submenu. Any
    enlightenment would be appreciated greatly.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Canvas width="753" height="300"
    verticalScrollPolicy="off" horizontalScrollPolicy="off" x="0" y="0"
    >
    <mx:Script>
    <![CDATA[
    import mx.events.ItemClickEvent;
    import mx.controls.TabBar;
    import mx.collections.ArrayCollection;
    [Bindable]
    public var STATE_ARRAY:ArrayCollection = new
    ArrayCollection([
    {label:"Home", data:"Home"},
    {label:"Locations", data:"Locations"}
    public function leavemenu(event:MouseEvent):void
    locations.visible=false;
    public function testIt(event:MouseEvent):void
    if (event.target is Button)
    {textarea2.text=textarea2.text + 1;
    var index:int =
    bar.getChildIndex(DisplayObject(event.target));
    var tab:Button = Button(bar.getChildAt(index));
    if (tab.label=="Home")
    locations.visible=false;
    if (tab.label=="Locations")
    locations.visible=true;
    locations.x=tab.x;
    locations.y=bar.height+bar.y-2;
    locations.height=locations.numChildren*21;
    if (event.target is VBox)
    textarea2.text=textarea2.text + 2;
    ]]>
    </mx:Script>
    <mx:Canvas x="478" y="93" width="275" height="404"
    mouseOver="leavemenu(event)">
    </mx:Canvas>
    <mx:TabBar width="600" id="bar" x="0" y="72"
    mouseOver="testIt(event)"
    height="20">
    <mx:dataProvider>
    {STATE_ARRAY}
    </mx:dataProvider>
    </mx:TabBar>
    <mx:Accordion width="150" id="locations"
    visible="false"> <!--21 pixels height per line-->
    <mx:VBox label="Bethel, CT" width="100%" height="100%"
    mouseOver="testIt(event)">
    </mx:VBox>
    <mx:VBox label="Branford, CT" width="100%" height="100%"
    mouseOver="leavemenu(event)">
    </mx:VBox>
    </mx:Accordion>
    <mx:TextArea x="603" y="74" height="18" width="103"
    id="searchbox"/>
    <mx:Button x="707" y="74" label="Search" width="46"
    height="18" fontFamily="Arial"/>
    <mx:TextArea x="327" y="28" id="textarea2"/>
    </mx:Canvas>
    <mx:Image x="0" y="93" source="images/DSC02878.JPG" />
    <mx:TextArea id="textarea1" width="150" x="92" y="546"
    visible="true"/>
    </mx:Application>

    Hi,
    The following example uses the vbox mouse wheel event to control the list box selected index, its just a simple test but it shows that vbox can accept the mousewheel event- one small caveat the vbox has to gain the mouse focus which requires it to be clicked on first in this example.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" creationComplete="appInit()">
    <fx:Script>
    <![CDATA[
    import mx.events.FlexEvent;
    import mx.collections.ArrayCollection;
    [Bindable] private var myData:ArrayCollection= new ArrayCollection([
    {Key:1,state:'ACT',name:'Australian Capital Territory'},
    {Key:2,state:'NSW',name:'New South Wales'},
    {Key:3,state:'NT',name:'Northern Territory'},
    {Key:4,state:'QLD',name:'Queensland'},
    {Key:5,state:'SA',name:'South Australia'},
    {Key:6,state:'TAS',name:'Tasmania'},
    {Key:6,state:'WA',name:'Western Australia'},
    {Key:7,state:'VIC',name:'Victoria'}]);
    private function appInit(): void
    myBox.addEventListener(MouseEvent.MOUSE_WHEEL,mouseScroller);
    protected function button1_clickHandler(event:MouseEvent):void
    if (lst.height==115) lst.height=300 else lst.height=115;
    private function mouseScroller(e:MouseEvent): void
    if (e.delta < 0 && lst.selectedIndex > 0) lst.selectedIndex -=1;
    if (e.delta > 0 && lst.selectedIndex < myData.length) lst.selectedIndex +=1;
    ]]>
    </fx:Script>
    <s:List id="lst" x="113" y="77" width="236" height="115" dataProvider="{myData}" labelField="name"></s:List>
    <s:Button x="156" y="48" label="Change Height" click="button1_clickHandler(event)"/>
    <mx:VBox x="371" y="48" width="200" height="200" backgroundColor="#726E6E" id="myBox">
    </mx:VBox>
    </s:Application>

  • Is there a way to keep an animation playing for a mouseout event when you start a new one?

    I have some buttons that on mouseover they animate scaling up and on mouseout they scale back down. This is working great except the scenario when a user mouse's over one button then immediately mouse's out to the next button the animation on the first button abruptly stops and the animation starts on the current button. Is there a way to keep the animation playing for the first button AND have the animation play work for the second button?
    I have uploaded a quick demo to illustrate what I mean. Also I've uploaded the project file if anyone can find a solution. Thanks!
    Dropbox - edgeAnimateButtonSample.zip

    You need to create two symbols for these two buttons, so that both can play simultaneously.
    I have created a sample for you @ https://www.dropbox.com/s/e59agt7mr8r785l/newedgeAnimateButtonSample.rar?dl=0
    hth,
    Vivekuma

  • I have a new Airbook and I cannot seem to right click to copy, paste and the other options?

    Hey Everyone... Can someone please tell me how to get my right click working on my trackpad?  On my mac book pro it works but on this airbook nothing happens when i right click.. to do any of my wanted options I have to highlight then go to the edit menu.!
    Thanks Tammy

    you can right click wither by Clicking or tapping with two fingers, or clicking on the bottom right corner of the trackpad. you can change this by going into System Preferences, Track Pad, Point & Click, Right Click.
    alternatively you can always do a normal click while holding down Control.

  • Can't seem to cancel my student annual subscription?? Help?

    Hey, I have been trying for MONTHS to cancel my subscription. But I keep getting links like Cancel your membership or subscription | Creative Cloud . As if its either messing with me or its just trying to delay my cancellation. Each new link i get, it leads me back to this same link (up there). Can someone please help me? Thank you. I do not want to continue paying for a program Im currently not using for another 3 months. Thanks~

    This is an open forum, not Adobe support... You need Adobe support to cancel a subscription
    -cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • Xfa.event.cancelAction cancels all subsequent actions

    I have created an expenses form which has a number of mandatory and optional fields.   To ensure no expenses are submitted with a value of 0, I have added a check which sets xfa.event.cancelAction = 1 on the presubmit event of my email submit button.  This works, but the problem is that it seems to cancel all subsequent actions too.  I have tried adding xfa.event.cancelAction = 0; in the postsubmit event, but this does not work.
    Does anyone have any ideas?
    Thanks, Paul

    Hi Paul,
    Put an extra visible button which will be your submit button.
    This "extra" button will do validations and all pre-submission checks.
    Once all checks have passed, then execute a "hidden" email submit button.
    Code Example:
    var formPassedValidations = false;
    <do all your validations here - eg: check if values are not zero>
    if (formPassedValidations == true)
         btnHiddenEmailSubmit.execEvent("click");
    else
         <show validation err message>
    hope this is what you are looking for... have fun!
    Regards,
    Luigi D'Amico
    8 BIT PLATOON
    design develop deploy
    www.8bitplatoon.com

  • Overlapping elements and events

    Hello all
    I can't reproduce such scenario in Edge Animate: the large box has mouseover trigger, on mouseover the button appears - after click, the page opens. On box mouseout, the button disappears.
    Have a look: https://dl.dropboxusercontent.com/u/145862/adobe_forum/Untitled-3.html
    The problem is that when the mouse leaves grey area, mouseout event fires. If I put the layer with button below the large transparent box, button stays visible, but click event doesn't work.
    Source files: https://dl.dropboxusercontent.com/u/145862/adobe_forum/overlapping_buttons.zip
    Mac OS 10.7.5 Edge Animate CC 3.0 Thank you in advance! cg.

    Hello,
    It seems you want this: overlapping revised.zip - Box
    Built with Edge 1.5
    Tested on Yosemite and Safari 8.0.2

  • Why does URLStream complete event get dispatched when the file is not finished loading?

    I'm writing an AIR kiosk app that every night connects to a WordPress server, gets a JSON file with paths to all the content, and then downloads that content and saves it to the kiosk hard drive. 
    There's several hundred files (jpg, png, f4v, xml) and most of them download/save with no problems.  However, there are two f4v files that never get downloaded completely.  The complete event does get dispatched, but if I compare the bytesTotal (from the progress event) vs bytesAvailable (from the complete event) they don't match up; bytesTotal is larger.  The bytesTotal (from the progress event) matches the bytes on the server. 
    The bytesLoaded in the progress event never increases to the point that it matches the bytesTotal so I can't rely on the progress event either.  This seems to happen on the same two videos every time. The videos are not very large, one is 13MB and the other is 46MB.  I have larger videos that download without any problems.  
    [edit] After rebooting the compter, the two videos that were failing now download correctly, and now it's a 300kb png file that is not downloading completely.  I'm only getting 312889 of 314349 bytes.
    If I paste the url into Firefox it downloads correctly, so it appears to be a problem with Flash/AIR.
    [edit] I just wrote a quick C# app to download the file and it works as expected, so it's definitely a problem with Flash/AIR. 
    Here's the code I'm using:
    package  {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.ProgressEvent;
        import flash.net.URLRequest;
        import flash.net.URLStream;
        [SWF(backgroundColor="#000000", frameRate="24", width="640", height="480")]
        public class Test extends Sprite {
            private var fileSize:Number;
            private var stream : URLStream;
            private var url:String = "http://192.168.150.219/wordpress2/wp-content/uploads/2012/12/John-Butler-clip1.f4v";
            public function Test() {
                if (stage)
                    init();
                else
                    this.addEventListener(Event.ADDED_TO_STAGE, init);
            private function init(e:Event=null):void {
                this.removeEventListener(Event.ADDED_TO_STAGE, init);
                stream = new URLStream();
                stream.addEventListener(ProgressEvent.PROGRESS, onLoadProgress);
                stream.addEventListener(Event.COMPLETE, onLoadComplete);
                stream.load(new URLRequest(url));
            private function onLoadProgress(event:ProgressEvent):void {
                fileSize = event.bytesTotal;
                var percent:Number = event.bytesLoaded / event.bytesTotal * 100;
                trace(percent + "%");
            private function onLoadComplete(event:Event):void {
                trace("loaded", stream.bytesAvailable, "of", fileSize);
                // outputs "loaded 13182905 of 13184365"
                // so why is it "complete" when it isn't finished downloading?

    Thanks for your quick reply !
    I am relatively new to programming so please bear with me on this as I still haven't managed to grasp some of those things that "make perfect sense". If I am setting mouseEnabled to false doesn't that mean that the object no longer gets MouseEvents ?
    If I have understood you correctly then once the mouseEnabled is set to false the btn object is removed from the objects recognizable by the mouse - hence dispatching a mouseout event (and I am guessing here) from the mouse?
    I still don't get it though, if the listeners are set to the object and the object is no longer accessible to the mouse why is the event still being dispatched ?
    I get it that the making of the object unavailable to the mouse causes the "removing" (deactivating) of the object from under the mouse,
      step 1. deactivate object, and  step 2. (as a result of step 1) register the removal of the object.
    but why is the mouse still listening after step 1?
    Even if the action is that of "out" (as in the object is no longer under the mouse) it still is an action isn't it ? so haven't we turned off the listening for actions ?
    I promise I am not trying to drive you crazy here, this is just one of those things that I really want to get to the root of !
    Thanks,

  • Onshow event needed for using behavior with AP elements

    Lector has "onShow" and "onHide" actions for layout objects (the equivalent of AP elements). They are my favorite and most used actions. Unfortuneately, Lector will does not reveal the code, so I can't see how they accomplish the actions. I am using Dreamweaver to build my wife's elementary school library web site. I want to use the same onShow and onHide actions (events/functions) for AP elements in Dreamweaver, but they don't exist on the tag inspector list for using with behaviors. Does anyone know how I can make behaviors work when an AP element hides or shows on the screen? This is not the same thing as showing or hiding an AP elemeent for events such as onClick or onmouseover. I find it very curious why Dreamweaver does not have onShow or onHide events along with onClick, onMouseOver, etc. Thanks.

    "Lector" was a late night typo. It is "Lectora", which is an industry leading WBT development tool. My main gripe about it is its proprietary nature--over protective of the code it generates. Lectora will not allow you to see the complex xml code it generates when it creates a web page. (When I display one of the Lectora generated pages in Dreamweaver, it is all xml giberish.) But Lectora is an easy to use, well organized, powerful, automated WBT development tool. Two of its most useful actions for AP elements are the onShow and onHide actions. So when you show or hide an AP element, the physical action of the element hiding or showing will cause a behavior to occur on the same AP element or another AP element.
    For example, say the mouseover Show event for "Element0" causes "Element1" to become visible on the screen. The onShow action provided by Lectora can cause a behavior to automatically occur on Element1 when it "shows" on the screen--no mouse action on elment1 is needed to cause the behavior to happen. Dreamweaver seems to require some sort of mouse action with regard to Element1 to cause a behavior to happen. A problem seems to occur with stacking AP elements and having to use exclusively mouseover and mouseout events on an AP element to cause a behavior(s) to occur. The browser seems to always get confused as to which of the stacked AP elements is supposed to be acting on the mouse action, even if the z order is correct. That is why the onShow and onHide events are so poweful--they don't require another mouse action while the mouse pointer is over the stacked group of AP elements to cause a behavior to happen on the element that was just caused to show or one that was just exposed by another element being hidden. With Lectora's onShow and onHide actions, it works all the time--the browser never gets confused.
    The onShow and onHide actions in Lectora are my favorite because they don't require a second mouse action on an element to cause a behavior to happen. I find that very distressing in Dreamweaver in trying to create highly interactive web pages in Dreamweaver that I can't use onShow and onHide events. It is hard to imagine that only the Lectora creators have the ability/genius to create onShow and onHide code that works for AP element on web pages.
    I can't show you any examples because I create WBT for Federal government projects and I am not allowed to publicly display any of the content. And I can't tell you how Lectora accomplishes it bacause I can't understand their complex, criptic, auto-generated xml code. So I hope I have been able to adequately explain problem here.I can't use Lectora to create the web pages for my wife because she needs to be to maintain her web site using Dreamweaver.
    Thanks in advance for your help.

  • Missing Mouse Events

    I’ve noticed that it is possible to miss mouse events
    if you move the mouse very quickly. For example, if you quickly
    move the mouse off a control, you can fairly easily miss the
    MouseOut event. Is there a Best Practice way to get around this?
    Thanks!!

    If you move your mouse quickly over an object, you can fairly
    easily miss the mouseout event. This is especially true if the
    object you are moving the mouse over is fairly small.

Maybe you are looking for

  • How to use CLIENT_TEXT_IO more fast?

    Hello, I'm using new features for Forms 10g like WebUtil, but I can't fine work with file manipulation - CLIENT_TEXT_IO. The loading of the text file with 7mb size, delay 15-30 minutes, is not good. I like know one other way for this works more fast,

  • How do i make my movies in iItunes go under Tv shows

    How do i make my movies in iItunes go under Tv shows im lost.....

  • KM Search API for "Date" Property

    Hi, I've a problem with the following code. SearchQueryBuilder searchQueryBuilder = new SearchQueryBuilder(); Calendar c = new GregorianCalendar(); c.set(2005, 05, 30); searchProperty = new SearchPropertyFormat(); searchProperty.setName("myProp"); se

  • Fluid layout since the beginning

    hello. i have a website with a fluid layout. in the website i have only one element that is "fluid" (it's kind of a mediaplayer which is suppoused to be always in the center of the page). i write some line of code...and it works...but only if i resiz

  • HT5278 update will download but will not process

    I am trying to update my iPhone and the software will update, but when it goes to process, it tells me to check my settings and that the system timed out.  Any ideas how to problem solve?