5 Replies Latest reply on Sep 25, 2006 7:57 AM by exPluda?

# diference between holder._height and _root._height

Hello,

I need to define the stpo scrool point for my holder movieclip, but i'm not getting any result, can someone please have a look?

the code

trace(_root.holder._y);
trace(_root.holder._height);
if (_root.holder._y == 0) {
trace("ok");
} else {
_root.holder._y += 52;
}
};
trace(_root.holder._y);
if (_root.holder._y == (_root.holder._height-this._y)) {
trace("ok");
} else {
_root.holder._y -= 52;
}
};

basically I get the holder._height and I need to calculate if the end of my holder is 15 pixel up my button, so I can stop scrool

Thanks
• ###### 1. Re: diference between holder._height and _root._height
Should you be using <= instead of ==?

if (_root.holder._y <= 0) {
_root.holder._y = 0;
trace("ok"):
} else ...

Same type of thing with the other one:

if (_root.holder._y >= (_root.holder._height-this._y)) {
.
.
.

Tim
• ###### 2. Re: diference between holder._height and _root._height

no, that doesn't work.

in this particular case, using my test.txt to retrieve the number of icons I have, I get _root._height = 715 and _root.holder._height = 647.5, my swf is 500 pixel height, so I must find a solution to make flash calculate how much he nedds to scroll until he stops.

the problem here is the _root.holder._height witch is not always the same, since this is dinamic

Thanks again for help :-)
• ###### 3. Re: diference between holder._height and _root._height
Pluda,