# How can i adjust placement of \_mc on the stage, if that makes sense

**URL:** <https://forum.kirupa.com/t/how-can-i-adjust-placement-of--mc-on-the-stage-if-that-makes-sense/329113>\
**Category:** flash\
**Created:** [July 21, 2012, 8:43pm UTC](https://forum.kirupa.com/t/how-can-i-adjust-placement-of--mc-on-the-stage-if-that-makes-sense/329113 "2012-07-21T20:43:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemoverload](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@systemoverload](https://forum.kirupa.com/u/systemoverload)\
**Post date:** [July 21, 2012, 8:43pm UTC](https://forum.kirupa.com/t/how-can-i-adjust-placement-of--mc-on-the-stage-if-that-makes-sense/329113/1 "2012-07-21T20:43:56Z")

</div>

Hello,

I’m pretty new at Flash and just reverse engineered this code to fulfill my needs but I have hit a stumbling block, I have a stage that is 780 x 560 px and I want to place a movieclip within a frame on the page. Right now the code tells the movieclip to start at the beggining of the stage and scrolls to the end of the stage and I want it to start like 100px in and end like 100px from the end of the stage, if that makes sense. Here is the code with my dummy notes:

//  
// NOTES ABOUT THE GALLERY  
// EACH THUMB SHOULD BE 140H x 260W  
// EACH THUMB IS RGB, 72dpi, and JPG 7 QUALITY  
// EACH IMAGE IS ALSO RGB 72dpi but full res not cropped JPG 7 QUALITY @ 5.75" High  
//  
import mx.transitions.Tween;  
import mx.transitions.easing.\*;  
this.createEmptyMovieClip(“container”,1);  
// Number of images to show in thumb strip  
var imagesNumber:Number = 15;  
// Start Scrolling on load = true Scroll after clicking image = false  
var scrolling:Boolean = true;  
var imagesWidth:Number = 0;  
var spacing:Number = 0;

for (i=1; i\<=imagesNumber; i++) {

container.attachMovie(“thumb”+i,“thumb”+i+"\_mc",i);  
myThumb\_mc = container[“thumb”+i+"\_mc"];

myThumb\_mc.\_x = imagesWidth;  
imagesWidth += myThumb\_mc.\_width+spacing;  
//myThumb\_mc.\_x = (i-1)\*myThumb\_mc.\_width;  
//  
// Tell thumbstrip to run through the center of stage"/2"  
// adjust the divider to change placement  
//  
myThumb\_mc.\_y = (Stage.height-myThumb\_mc.\_height)/2.5;  
// Thumbs open at XXX%  
myThumb\_mc.\_alpha = 100;  
myThumb\_mc.largerImage = i;  
// Rolled over thumbs change to XXX%and back with the RollOut function  
myThumb\_mc.onRollOver = function() {  
this.\_alpha = 100;  
};  
myThumb\_mc.onRollOut = function() {  
this.\_alpha = 100;  
};  
// After being clicked image chages to XXX% until rolled on again  
myThumb\_mc.onRelease = function() {  
this.\_alpha=100;  
for (i=1; i\<=imagesNumber; i++) {  
var myClip = container[“thumb”+i+"\_mc"];  
myClip.enabled = false;  
}  
//  
// Tells image to open in the center of the stage"/2"  
// adjust the divider to change placement  
//  
scrolling = false;  
\_root.attachMovie(“image”+this.largerImage,“large\_mc”,2);  
large\_mc.\_x = 67  
large\_mc.\_y = 117  
//  
// Fade in and fade out functions  
// Starts at X to X alpha and at what speed  
//  
new Tween(large\_mc, “\_alpha”, Strong.easeOut, 0, 100, 0.5, true);  
new Tween(container, “\_alpha”, Strong.easeOut, 100, 50, 0.5, true);  
large\_mc.onRelease = function() {  
this.enabled=false;  
scrolling = true;  
var myFadeOut = new Tween(large\_mc, “\_alpha”, Strong.easeOut, 100, 0, 0.5, true);  
new Tween(container, “\_alpha”, Strong.easeOut, 50, 100, 0.5, true);  
myFadeOut.onMotionFinished = function() {  
for (i=1; i\<=imagesNumber; i++) {  
var myClip = container[“thumb”+i+"\_mc"];  
myClip.enabled = true;  
}  
large\_mc.removeMovieClip();  
};  
};  
};  
}  
//  
// Speed of thumbstrip based on x position of the cursor  
//  
container.onEnterFrame = function() {  
if (scrolling) {  
this.\_x += Math.cos((-\_root.\_xmouse/Stage.width)\*Math.PI)\*15;  
if (this.\_x\>0) {  
this.\_x = 0;  
}  
if (-this.\_x\>(this.\_width-Stage.width)) {  
this.\_x = -(this.\_width-Stage.width);  
}  
}  
};

So it loads images and thumbs from the library that were imported to the stage in the flash file. Any help would be really appriciated, thanks!
