dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Button Interactivity in AS 3

  1. #1
    Member
    Join Date
    Jan 2002
    Posts
    82

    resolved [RESOLVED] Button Interactivity in AS 3

    Hi,
    I am brand new to AS 3 and find myself very confused about how to use buttons that i think should be simple.

    i have 5 simple buttons built and in one FLA. i also have corresponding movie clips which are also very simple. i'd like each button, when clicked, to load a movie clip in the same spot depending on which button is clicked (i did this in AS 2 by just loading into a new level, but clearly that AS 3 doesn't allow for that). i have figured out what i believe to be the correct Script to load the movie when the button is clicked (see below).

    BUT my issues at this point -
    1. should i be putting all the movie clips in the same FLA, on their own layer? if not, how do i load them when the button is clicked.
    2. if putting them in the same FLA, and on the stage, works, then how do i load/unload when each button is clicked, so that the Movie Clips don't overlap?

    blytheMov.stop();
    blythebeck.addEventListener (MouseEvent.CLICK, startClip);
    function startClip(event:MouseEvent):void {
    blytheMov.play();

    }


    THANKS in advance for any help!

  2. #2
    Member
    Join Date
    Jan 2002
    Posts
    82
    AMENDMENT to this. i have put up the incomplete site so that anyone willing to help can see how what i've described is set up.

    thenaughtykitchen.tv

    You'll see the 5 pink tabs at the top. those tabs will basically be the buttons (they'll have a word i.e. "recipe", etc).
    So what i want to happen is - when a button is pressed, a new graphic (like the text sitting on the left) will replace whatever info is sitting where the text is now. so i just need to be able to load/unload what's in that spot, using the buttons.
    i have tried to research this and can't make sense of AS3.

    thanks again for any help!
    Last edited by Ashcraft; 11-28-2007 at 03:11 PM.

  3. #3
    Member
    Join Date
    Jan 2002
    Posts
    82
    i got an answer - it uses all the buttons and clips on top of each other and making them visible only when the button is pressed. works great!

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