A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Hide all items not clicked

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    250

    Hide all items not clicked

    Hello,

    I'm trying to createa menu effect whereas when one item is clicked any previous clicked items will be removed from the stage.

    In the code below, I get the item name clicked, then attempt to hide all other items not matching the current selected name.

    Any ideas would be greatlyappreciated.


    //------------------------------ hide all items not clicked -----
    function hideallothers(){

    for(var prop in this){
    if(this[prop] instanceof MovieClip || this[prop] instanceof Button){
    this[prop].onRelease = function(){
    trace("this_name=" + this._name);
    xpos= this._x;
    if(this[prop]=this._name){
    this[prop]._x=2000; //hide all other/any current selevceted items
    trace("xpos==" + xpos);
    }
    }
    }
    }
    }

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    do u mean only the buttons which have been clicked BEFORE dissapear or all the buttons?
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  3. #3
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    do u mean only the buttons which have been clicked BEFORE dissapear or all the buttons?
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center