How to set scroll position???

Publishing Print2Flash Documents embedding them in Flex applications
Post Reply
psunniaitec
Posts:15
Joined:Tue Jan 22, 2008 5:09 am
How to set scroll position???

Post by psunniaitec » Fri Feb 01, 2008 12:07 am

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.

staff
Posts:267
Joined:Sat Dec 15, 2007 4:48 pm

Re: How to set scroll position???

Post by staff » Fri Feb 01, 2008 4:01 am

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.

Post Reply