Hello all, I have a homemade scrollbar in one scene that works fine (mask over movieclip that moves depending on scrollbar). I would like users to be able to click a link from another scene that takes them to a place in the movieclip (like #anchors in html). I’ve tried doing this from a button in scene “Calendar”:
on (release){
_root.gotoAndPlay(“Classes”);
_root.contentClasses._y -= 100;
}
“Classes” is a label on the first frame of the scene “Classes”.
“contentClasses” is the name of the movieClip that I want to move up.
contentClasses is not in the scene where the button is.
The code takes me to the scene fine, it just doesn’t do anything to contentClasses.
I have also tried
on (release){
_root.gotoAndPlay(“Classes”);
secondClass();
}
Where secondClass() is a function inside “Classes” that moves contentClasses. This doesn’t do anything either.
I’ve tried:
(in the first frame of the button scene)
var moveClassesContent:Boolean = false;
(on the button that’s taking me to the “Classes” scene)
on (release){
moveClassesContent = true;
_root.gotoAndPlay(“Classes”);
}
And in the “Classes” scene:
if (moveClassesContent == true){
secondClass();
}
secondClass = function() {
contentClasses._y -= 200;
moveClassesContent = false;
}
The function secondClass works, because when I call it no matter what the value of “moveClassesContent” is, it does what it is supposed to do. So basically, I need “moveClassesContent” to actually change when I click the button, but for some reason it is not.
What this all bottles down to is: how do I send a variable, call a method, or change a global variable using a button in one scene to another scene.
Thanks,
Micah