Skip to main content
June 2, 2010
Question

Content won't scroll?

  • June 2, 2010
  • 3 replies
  • 1021 views

Hi

I have a movieclip linked to a scrollPane.

It loads into it fine.  The problem is that the scrollPane won't scroll the full size of the movieclip.

The movieclip is about 1000 high. If I set the scrollpane size to 500 by 500, it'll scroll down about 600y of the movieclip, but no further.

How do you tell a scrollPane to allow scrolling the full size of it's content?

And on a similar thread, is there a way to tell a whole swf to scroll?  So if you have a swf that's 1000x 500y, and it's dynamic content becomes 1000x 800y, can you make the whole swf scroll like an html page, or do you have to encase all the content in a scrollpane?

Thanks

Shaun

This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
September 2, 2010

apply the invalidate() method to your scrollpane after loading is complete.

Participant
September 4, 2010

Thanks kglad

but that didn't seem to help, though to be honest, I'm not absolutely sure how to use the 'invalidate()'

I've attached the code below - hopefully you'll spot this newbies error!

I thought I'd add 2 buttons that simply changed the source between a .swf and a .jpg.  If I load the .swf, no scrollbars, if I load the .jpg, then scrollbars appear??

///////////////////////////////////////////////////////////////////////

import flash.events.Event;

stop();

stage.invalidate();
Gigs.verticalLineScrollSize = 10;
Gigs.verticalPageScrollSize = 10;
Gigs.horizontalLineScrollSize= 20;

bGigs.addEventListener(MouseEvent.CLICK,LoadGig);
function LoadGig(evt:Event):void{
      Gigs.source = "Gigs.swf";
}
bPoster.addEventListener(MouseEvent.CLICK,LoadPoster);
function LoadPoster(evt:Event):void{
      Gigs.source = "SyntronixPoster.jpg";
}

/////////////////////////////////////////////////////////////////////////

Many thanks for your help so far

kglad
Community Expert
Community Expert
September 4, 2010

try:


import flash.events.Event;

stop();


Gigs.verticalLineScrollSize = 10;
Gigs.verticalPageScrollSize = 10;
Gigs.horizontalLineScrollSize= 20;

Gigs.addEventListener(Event.COMPLETE,loadcompleteF):

bGigs.addEventListener(MouseEvent.CLICK,LoadGig);
function LoadGig(evt:Event):void{
      Gigs.source = "Gigs.swf";


}
bPoster.addEventListener(MouseEvent.CLICK,LoadPoster);
function LoadPoster(evt:Event):void{
      Gigs.source = "SyntronixPoster.jpg";
}

function loadcompleteF(e:Event):void{
Gigs.update();
}

September 1, 2010

Hi.

Try to set the scroll value (interval) for the sliders using:

    scrollpaneName.verticalLineScrollSize = 10;     //<---
    scrollpaneName.horizontalLineScrollSize= 20;  //<--- just example numbers

Best regards

Peter

Participant
September 2, 2010

Thanks for the suggestion, but that hasn't helped.

If I simply change the source from a .jpg to a .swf the scrollbars disappears.

The annoying thing is, I've had it working and live on the web, but all of a sudden it's stopped working.  It's as if I've applied a setting somewhere without realising.

Participant
September 1, 2010

Hi Celebritymusic

I think I have the same problem as you.  If I load a .swf into a scrollpane, the scrollbars disappear, but if I load a .jpg into the same scrollpane, it works as expected - is this the same for you?

If it is - is anyone else finding the same issue, or is everyone else's scrollpanes functioning correctly?

The silence is deafening on this subject!

Thanks