Page 1 of 1

How to set scroll position???

Posted: Fri Feb 01, 2008 12:07 am
by psunniaitec
in my application i tried to set the scrollposition of one document with respect to another document like:

public function check():void{
doc1.getScrollPosition(curpos);
}
public function curpos(pos:Object):void{
trace(pos);
doc2.setScrollPosition(pos);
}

but its not working !!!

is any change required. please help.

Re: How to set scroll position???

Posted: Fri Feb 01, 2008 4:01 am
by staff
The line setting scroll position should look like this:

Code: Select all

doc2.setScrollPosition(new Print2Flash.Point(pos.x,pos.y))
There is a type incompatibility between Object and Print2Flash.Point types. Perhaps, we need to modify Print2Flash component in the future to return Print2Flash.Point type in getScrollPosition method return value handler.