var size = cc.winSize;
var scrollView = new ccui.ScrollView();
scrollView.setDirection(ccui.ScrollView.DIR_VERTICAL);
scrollView.setTouchEnabled(true);
scrollView.setBounceEnabled(true);
scrollView.setBackGroundColorType(ccui.Layout.BG_COLOR_SOLID);
scrollView.setBackGroundColor(cc.color(255,255,255));
//scrollView.setBackGroundImageScale9Enabled(true);
scrollView.setContentSize(cc.size(720, 1280));
scrollView.setInnerContainerSize(cc.size(720, (1280*2)));
scrollView.setAnchorPoint(cc.p(0.5, 0.5));
scrollView.setPosition(cc.p(360, 640));
this.addChild(scrollView);
The position of the button starts in the middle.
scrollView.setPosition(cc.p(360, 0));
if i change the y position, it gives different look.
I think you are making the same mistake that I made when I first started working with cocos2d-x. I was under the assumption that when you change the anchor point of an object it affects the positioning of its children as well, however, this is not the case with cocos2d-x. Changing the anchor position only affects the object itself. Its children are always positioned from the bottom-left corner of the object.
So if you were to leave the scroll views anchor point at (0,0) and its position at (0,0) you would get the exact same result.
Also, I should point out a few things about scroll views.
When you call addChild on a scroll view it adds them to the inner container NOT the scroll view itself so the children (i.e. button in your case) are now being positioned from the bottom left corner of the inner container.
The inner container begins scrolled to the top so in your case half of the inner container is below the screen.
Hope this helps!