Flash Variable help..Pleeze

Out of context: Reply #1

  • Started
  • Last post
  • 2 Responses
  • jkosoy0

    use global variables here, it'll be much easier.

    assuming the variable you want to pass is called which_button_pushed...

    on the first frame in your timeline, write:

    _global.which_button_pushed;

    now whenever you reference whcih_button_pushed (you don't need the '_global.' part) the program will know what you're talking about. so if you're putting code on the buttons, one of 'em might look somethin like this:

    on(release)
    {
    which_button_pushed = 1;
    }

    and then in your movie clip...

    switch(which_button_pushed)
    {
    case 1:
    gotoAndPlay("frame_1");
    break;

    case 2:
    gotoAndPlay("frame_2");
    break;

    case 3:
    gotoAndPlay("frame_3");
    break;
    }

View thread