A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: hiding levels

  1. #1
    Member
    Join Date
    Aug 2000
    Posts
    33

    Red face

    Hi! I wish to have many buttons which will load different movies into different levels. As soon as one movie loads in a level, I wish to have the other levels, if visible, to hide. How do I hide the initial level immediately so that the new movie shows. Thanks a lot in advance.
    Regards,
    Ghaps

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Location
    Cluj-Napoca, Romania
    Posts
    319
    pun on each level tat you want to hide a keyframe with a stop() action attached. Label this keyframe "empty". In this frame not object exist on the stage (keyframe on each layer and delete all graphics).

    then, on the movie you load, put on first keyframe (or where you want hidde level 0) the action:
    _level0.gotoAndStop("empty").


  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    33

    Wink

    Thanks PGpaul for the trouble that you have taken. But, my problem is a bit different. How do I know that which level is visible if I have multiple levels, and according to that make that one invisible, when another level loads? If I know the level that is visible, then your method is perfect. Thank you again,
    Ghaps

  4. #4
    Member
    Join Date
    Aug 2000
    Posts
    33

    Wink

    Thanks PG for the trouble that you have taken. But, my problem is a bit different. How do I know that which level is visible if I have multiple levels, and according to that make that one invisible, when another level loads? If I know the level that is visible, then your method is perfect. Thank you again,
    Ghaps

  5. #5
    Senior Member
    Join Date
    Sep 2000
    Location
    Cluj-Napoca, Romania
    Posts
    319
    Manny ways to do this...
    For example, set a variable on each movie,
    isVisible = 1 if the movie is vizible and
    isVisible = 0 if is not.

    Then make a loop (for i=1; i < moviesNo; i++){ if (eval("_level" + i + ".isVisible")) gotoAndStop("hidden")}
    and after that tell to the movie you want visible to play from the somme keyframe.

    The problem is different if you can't edit the loaded movie.
    In this case you should load the each movie in an empty MC,
    let say "container_i". Then set "container_" + i + "_visible" = 0.


  6. #6
    Member
    Join Date
    Aug 2000
    Posts
    33

    Angry

    Thanks for the trouble that you have taken. I think I got the answer to my question. I indeed am grateful.
    Regards,
    Ghaps

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