Disable scrolling

Using Print2Flash Document API
Post Reply
marcrock
Posts:10
Joined:Thu Jul 18, 2013 2:24 pm
Disable scrolling

Post by marcrock » Thu Jul 25, 2013 10:51 am

Please, the use of the function enableScrolling(enable) is not clear for me. Could you place a simple example, please? I'm trying it inside flash but am getting errors...

Code: Select all

function onPageLoaded(e:Event):void {
	P2FDoc.enableScrolling();
}
How to use that "enable" argument?

Thanks!

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

Re: Disable scrolling

Post by staff » Thu Jul 25, 2013 11:32 am

You should pass a Boolean parameter to the enableScrolling function call:
  • false - if you want to disable scrolling;
  • true - if you want to enable scrolling.
So to disable scrolling you need to make the following call:

Code: Select all

P2FDoc.enableScrolling(false);

marcrock
Posts:10
Joined:Thu Jul 18, 2013 2:24 pm

Re: Disable scrolling

Post by marcrock » Thu Jul 25, 2013 1:00 pm

Thanks by your reply. In reality this was the first thing I did but occurred a problem just after I did that: the swf loaded document seems to appear with some percentage of transparency, dimmed. The code I have used and that really stopped the scrollbar was:

Code: Select all

function OnLoaded(e:Event) {
	P2FDoc = P2FDocLoader.getDoc();
	P2FDoc.enableScrolling(false);
}
It worked indeed, but the loaded swf files became dimmed.
Would be a way to call the scrollpane component inside the swf file so I can change its properties?

Thank you very much in advance!

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

Re: Disable scrolling

Post by staff » Thu Jul 25, 2013 2:02 pm

To get access to the ScrollPane inside the document, use the following reference:

Code: Select all

P2FDoc.DocArea
Here P2FDoc is a reference to the document returned from the getDoc call.

marcrock
Posts:10
Joined:Thu Jul 18, 2013 2:24 pm

Re: Disable scrolling

Post by marcrock » Thu Jul 25, 2013 3:49 pm

Cool. No scrollbars and no dragging anymore. Just one more question: do you know how can I change the hand cursor when the user mouse over it?

Regards.

Post Reply