A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: choosing a frame label for later use

  1. #1
    cartoonfox bacon man's Avatar
    Join Date
    Dec 2002
    Location
    cardiff
    Posts
    634

    choosing a frame label for later use

    hi. (i'm using flash mx)

    is there anyway of choosing a certain frame label on button press, and then telling it (on a frame code) to go to that the current chosen label?

    eg

    here is what i'm trying on the button. "contact" is another frame label in the same timeline.
    ------------------------------------------------------------------------

    on (press) {
    gotoAndPlay(24);
    chosen = "contact";
    }

    ------------------------------------------------------------------------



    and here's what i'm trying on frame 30
    ------------------------------------------------------------------------

    chosen.gotoAndPlay();

    ------------------------------------------------------------------------


    obviosly its not working, but can you see what i'm trying to do? depending on what button you press, it goes to frame 24, plays to frame 30, and then goes to the chosen frame label (in the same timeline) depending on what button you presssed (and the chosen frame label in the button code)


    so the contact button code will look like this
    ------------------------------------------------------------------------

    on (press) {
    gotoAndPlay(24);
    chosen = "contact";
    }

    ------------------------------------------------------------------------
    and the profile button code will look like this
    ------------------------------------------------------------------------

    on (press) {
    gotoAndPlay(24);
    chosen = "profile";
    }

    ------------------------------------------------------------------------
    etc.


    thanks.

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    gotoAndPlay(chosen);

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

  3. #3
    cartoonfox bacon man's Avatar
    Join Date
    Dec 2002
    Location
    cardiff
    Posts
    634
    OMG, of course, an expression!!!! i'm so stupid!!

    thanks loads man, i've been trying for ages, lol!!

    your a life saver!!

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