A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Controling mcs from one swf to another swf

  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    Canada
    Posts
    29
    Ok need some help on a tough problem.

    I have an animated menu that is set to open once when a button on the parent level is pressed.
    however there is a home button on the animated menu that tweens in back to its hidden position when pressed.
    The problem is when the button on the parent level is pressed after the home button, the menu doesn't open.
    The menu is on a different level and i have tried to Unload the swf and it doesn't what to reset the menu. Here is the script I am using for the button on the parent level

    on (press) {
    if (_root.ctr<1) {
    loadMovieNum ("menutop.swf", 2);
    _root.ctr++;
    }
    }
    Thank you to any one that can help me.

  2. #2
    Senior Member
    Join Date
    Feb 2002
    Posts
    536
    I didn't understand at all... but anyway, i'll post a code...

    home button
    Code:
    on (release) {
      if (_level0.isPressed ne "home") {
         _level0.isPressed = "home";
         loadMovieNum("yourmov.swf",2);
      }
    }
    button in the parent level.
    Code:
    on (release) {
      if (_level0.isPressed ne "parentButton") {
         _level0.isPressed = "parentButton";
         loadMovieNum("anothermov.swf",2);
      }
    }

    What that code does? It checks the isPressed variable, if the value are the same of the button it doesn't do anything, otherwise, load your movie and set a variable...

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