A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] easy goto but doesn´t work

  1. #1
    Senior Member gordonart's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    267

    [F8] easy goto but doesn´t work

    I don´t know why but this function doesn´t work.

    They idea is when you click on this mc it goes to another frame and set the var grader to a specific value.
    The first gradtal-command below works but then it stops. Can´t figure out what is wrong. I guess it´s a easy thing.

    gradtal = function(a,b,c){
    a.onRelease = function(){
    grader = b;
    vred1.gotoAndStop(c);
    gradruta.gotoAndStop(c);
    trace("ugnen:"+ grader);
    }
    }
    /////
    gradtal(vred1.knapp1,100,"one");
    gradtal(vred1.knapp2,125,"two");
    Mattias Gordon
    illustrator/ animator

  2. #2

  3. #3
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Are all the instances of knapp1 and knapp2 named and available for the entire timeline of vred1?

  4. #4
    Senior Member gordonart's Avatar
    Join Date
    Jun 2003
    Location
    Sweden
    Posts
    267
    Yes, they are labeled "one" and "two".

    When I only use
    gradtal(vred1.knapp1,100,"one");

    it works but when I add
    gradtal(vred1.knapp2,125,"two");

    it does not work.

    I tried first only to use the vred1_mc and to check which the _currenframe was and if it was on a specific frame it should move on to another specific one. But I could not get it to work.

    I tried several ways of doing it without getting it to work.

    knapp1 and knapp2 are not avaible on the entire timeline of vred1.
    Must they be that to work?
    Mattias Gordon
    illustrator/ animator

  5. #5
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Quote Originally Posted by gordonart
    knapp1 and knapp2 are not avaible on the entire timeline of vred1.
    Must they be that to work?
    When the 'gradtal' function is called, the movieclip passed in must be on the stage, and if the movieclip is later removed from the stage it will lose the functionality assigned to it by the function.

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