# Move Movieclip from different scene

**URL:** <https://forum.kirupa.com/t/move-movieclip-from-different-scene/235847>\
**Category:** flash\
**Created:** [August 15, 2007, 6:47am UTC](https://forum.kirupa.com/t/move-movieclip-from-different-scene/235847 "2007-08-15T06:47:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![micah](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@micah](https://forum.kirupa.com/u/micah)\
**Post date:** [August 15, 2007, 6:47am UTC](https://forum.kirupa.com/t/move-movieclip-from-different-scene/235847/1 "2007-08-15T06:47:59Z")

</div>

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
