Results 1 to 7 of 7

Thread: how appear mouse tool tip (on mouse over) on image that is clickable

  1. #1
    Join Date
    Jan 2012
    Posts
    74
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default how appear mouse tool tip (on mouse over) on image that is clickable

    in Flex(FB4.1)
    how appear mouse tool tip (on mouse over) on image that is clickable?
    eg "click to go to Home Page".

    Also how appear mouse tool tip (on mouse over) on image that is draggable?
    eg "Drag to cart to insert this product inside cart".

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Could you try to be a bit more descriptive? If you're just looking for an AS3 tooltip, do a quick google search:

    http://www.google.com/search?client=...UTF-8&oe=UTF-8

  3. #3
    Join Date
    Jan 2012
    Posts
    74
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default

    I mean when mouse over the particular item (image or image/button or ...) just near the mouse cursor appear a label "click me to go to Home Page" or "drag and drop me in cart to add me"...

  4. #4
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try the link I gave you.

  5. #5
    Join Date
    Jan 2012
    Posts
    74
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default

    not in AS3, there is no attribute on mxml element?

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Try this, changing as and where needed:

    Code:
    // create one buttonObj for all your buttons
    
    var buttonObj:Object={};
    
    //////////////////////////////////////change nothing above ////////////////////////////////////
    
     
    
    //the next 3 lines need to be done for all your buttons
    
    buttonObj[yourbutton.name] = ["hello",2,2];
    
    yourbutton.addEventListener(MouseEvent.MOUSE_OVER,addToolTipF) ;
    
    yourbutton.addEventListener(MouseEvent.MOUSE_OUT, removeToolTipF);
    
     
    
    ////////////////////////////////////change nothing below/////////////////////////
    
    function addToolTipF(e:MouseEvent):void{
    
    var a:Array = buttonObj[e.currentTarget.name];
    
    var tf:TextField=new TextField();
    
    buttonObj[e.currentTarget.name].push(tf);
    
    tf.text=a[0];
    
    tf.multiline=false;
    
    tf.autoSize="left";
    
    tf.border=true;
    
    addChild(tf);
    
    tf.x=a[1]+e.currentTarget.x;
    
    tf.y=a[2]+e.currentTarget.y;
    
    }
    
     
    
    function removeToolTipF(e:MouseEvent):void{
    
    removeChild(buttonObj[e.currentTarget.name][3]);
    
    buttonObj[e.currentTarget.name].splice(3,1);
    
    }
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Jan 2012
    Posts
    74
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default

    i used tooltip attribute in mxml visual element... I will try also your code!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •