A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: go to frame label based on variable

  1. #1
    Senior Member
    Join Date
    May 2000
    Posts
    347
    If I havea variable "haircolor" set to "blonde" how do I script it so that on the push of a button it tells a movie clip to go to frame label " haircolor" and get it to go to the label blonde? please hurry, thanks

    rubbersharkman

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    273
    Code:
    gotoAndPlay([haircolor]);
    Spyder

  3. #3
    Hi there;

    I had the same problem, so I tried the above and I couldn't get it to work, but did get the following to work:

    PathToMovieClip = "test/Hair"
    set(PathToMovieClip + ":TargetLabel", "blonde");
    tellTarget (PathToMovieClip)
    {
    gotoAndPlay (TargetLabel);
    }

    Brad.

    PS: I also noticed that your label name cant start with a number, or Flash will parse the number out and try to go to the frame number instead. Try using text labels for everything and it should be ok. Good luck !

  4. #4

    My 2 Cents...

    Check

    http://www.azholding.com/flash/frames_labels.swf

    and get the fla

    http://www.azholding.com/flash/frames_labels.fla

    made in flash 5.

    It has bout 30 frames, one label every 10 frames.
    Just check it out.


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