-
Senior Member
[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
-
Do you have your frames labeled "one" and "two"?
-
Are all the instances of knapp1 and knapp2 named and available for the entire timeline of vred1?
-
Senior Member
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
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|