A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Question

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Posts
    15

    Question

    This may be a stupid question and I think I'm moderately good at Flash but I'm cluelss when it comes to complex things like the following.

    I would like to the following:
    That when you click on a button, another button appears, like it is shown on www.shania-twain.com

    Does anyone know how to do this? I've searched the net for fla source files or tutorials for about two hours now but cannot find anything.

    Thanks for your help.

    -jamie

  2. #2
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    That is done with MCs...

    create a button & then create a MC with the other buttons in it...

    put the following script on the 1st button:

    on(rollOver) {
    attachMovie("MCname","MCname",1);
    }

    on(rollOut){
    unloadMovie("MCname");
    }

    make sure that when you create the MC, you check "Export for ActionScript"...

    then, in the MC, align the buttons to where you want them to appear on the main stage...

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    Thanks I will try that right away.
    But what is a MC??

    -jamie

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The first button tells a movieclip ( containing more buttons ) to start playing. The first frame of the movieclip is empty with a stop action so it does not show until it is told to play.
    You tell a movieclip to start playing with...

    on(release){
    buttonMC.play();
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    Originally posted by jamiestevens
    Thanks I will try that right away.
    But what is a MC??
    -jamie
    Aah, sorry. MC stands for MovieClip. I'm such an idiot. Sorry

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Ooops, didnt see your post mraspiller, sorry.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  7. #7
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    pellepiano method is probably more correct. the rollover/out method would involve using invisible buttons and stuff and things could get complicated...

  8. #8
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    I tried what mraspiller suggested.
    And when I enter the first button, the movie clip DOES show up. However when I leave the button, the movie clip disappears right away, so I have no chance to click on the buttons in the movie clip.

    Any idea? Like I said, it should be like on www.shania-twain.com

    Thanks a lot
    -jamie

  9. #9
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    Doesn't anyone have a clue? Any help is greatly appreciated.
    Thanks.

  10. #10
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Refferring to my earlier post.
    If you want the new buttons to stay put ( so you can choose them ), just add a stop action in the movieclip.
    Then you can close it with rollOvers on other buttons.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  11. #11
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    I have a stop action in my movie clip. The movieclip buttons disappear anyway when I leave the original button (that calls the movie clip).

    I don't quite understand it.
    Do you mean the movieclip buttons only disappear when clicking on another button (that tells them to unload)??

    I'm afraid I'm clueless here

  12. #12
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You should have one stop action at frame one and one stop action when the buttons are visible.That way they cant disappear unless you click the button again ( which just would make the buttons visible again).

    Any other button would have an action that tells the movieclip to go to frame 1 and stop (not visible).

    // For instance
    on(rollOver){
    buttonMC.gotoAndStop(1);
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  13. #13
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    But that would mean that the movieclip buttons would be visible until I click on another button. But I actually want them to disappear when I leave either the original button (that calls the movieclip buttons) or when I leave the movieclip buttons.

    Or am I mistaken about this?

    Does anyone have a FLA file for this or know where a tutorial for this is offered??

    Thanks for ANY help.

    -jamie

  14. #14
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Would be easier for someone here to correct your .fla if you attached it.

  15. #15
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    Oakie, this hasn't correct graphics yet but once I know how it works I can add it to my movie.
    And thanks for any help.
    Thank you
    -jamie
    Attached Files Attached Files

  16. #16
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Get to work... Pellepiano!

  17. #17
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Im working...... =)

    Heres one solution. It gets a little more complicated when you want to close on RollOver.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  18. #18
    Member Mofo SwirlyKing's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    476
    Here, I've made one that's pretty simple conceptually and works really well.

  19. #19
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    Thanks a million to both of you!!!
    It's working. Yipee!!!

    -jamie

  20. #20
    Junior Member
    Join Date
    Feb 2003
    Posts
    15
    I think there still is a slight problem. I worked with the button supplied by SwirlyKing.

    Everything works okay so far. The only problem is that the buttons (of the submenue) remain visible when I click somewhere else in the stage. But the submenue buttons should disappear when I remove my mouse from the submenue buttons or from the main button (where the submenue belongs to).

    I hope that was clear and it'd be great if someone could give me a tip. Somehow I need sort of an action that lets the movie clip skip to picture #1 when the mouse leaves the movieclip.



    Thanks for your help
    -jamie

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