A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: ._visible=false; not working..

  1. #1
    Member
    Join Date
    Mar 2014
    Posts
    32

    ._visible=false; not working..

    Hello, I know this is very basic and easy thing to do, but I have no idea, why its not working..
    So I want 3 movie clips to not be seen after a click of button. Also, when the button is pressed, movie goes to frame 2(it works).

    My code I put on the button :

    on(release){
    gotoAndPlay(2);
    mc_a._visible=false;
    mc_b._visible=false;
    mc_c._visible=false;
    }



    any ideas?

  2. #2
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Because you are navigating to frame 2 first, then you put invisible the clips but they doesn't exist anymore in the new frame. Just change slightly your script to this:

    on(release){
    //first hide your clips
    mc_a._visible=false;
    mc_b._visible=false;
    mc_c._visible=false;

    //then goto and stop frame 2
    gotoAndPlay(2);
    }
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  3. #3
    Member
    Join Date
    Mar 2014
    Posts
    32
    Quote Originally Posted by angelhdz View Post
    Because you are navigating to frame 2 first, then you put invisible the clips but they doesn't exist anymore in the new frame. Just change slightly your script to this:
    I tried, but still not working. I can still see those 3 movie clips in the second layer too.
    But thanks for helping!

  4. #4
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    on(release){
    //first hide your clips
    _root.mc_a._visible=false;
    _root.mc_b._visible=false;
    _root.mc_c._visible=false;

    //then goto and stop frame 2
    gotoAndPlay(2);
    }
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

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