Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    This little Earth.
    Posts
    383
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question urgent :( Flash submenu

    i've got a problematic submenu here (at least, it's problematic for stupid ol me).
    I've got a menu in flash, and clicking on one link "menu items" is supposed to bring up a submenu. What I did was make the submenu a movie clip ("submenu"). Through the Library I chose the Export with ActionScript option for it. Then, for the link on the main menu ("menu items"), I put this for Actions:

    on (release) {
    _root.attachMovie(submenu,submenu,100);
    _root.submenu._x = 11.3;
    _root.submenu._y = 180;
    _root.submenu.gotoAndPlay("startMovie");
    }

    Didn't work. So I tried putting the movie clip in a separate layer that stays there throughout the timeline. Then, on the first frame of the whole movie, I put an action:

    _root.submenu._visible = false;

    and on "menu items":

    on (release){
    _root.submenu._visible = true;
    }

    No good. (well, i knew it was a lame try...) What happened instead was that the submenu was just visible all the time.

    So then I tried playing around with _alpha.

    But no matter what I do it doesn't work.

    I figured one definite way out would be to just make a duplicate of the current frame, but with the submenu turned visible. But I'd rather not do that and do it using ActionScript instead, coz I've got a trillion different frames.

    What's the most normal approach used for submenus, and what am I doing wrong in my code?
    'If you don't stand for something, you'll fall for anything.'

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Provo, UT
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    did you set the movie export properties on the movie clip? If you do not know what that is then right click the movie in the library and choose "inkage..." Then type a name into the box. Then, your attach statement should look like this.

    Code:
    _root.attachMovie("submenu linkage name", "submenu new name" level);
    so you're missing quotes and thats it if your export linkage name is submenu.

    Good luck

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    This little Earth.
    Posts
    383
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks that was my problem.

    ps.
    Code:
    _root.attachMovie("submenu linkage name", "submenu new name" [SIZE=large],[/SIZE] level);
    'If you don't stand for something, you'll fall for anything.'

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Provo, UT
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, i missed the comma. I did it in a hurry and didn't have time to edit it. See ya!


  •  

    Posting Permissions

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