all groups > flash actionscript > february 2005 >
You're in the

flash actionscript

group:

refreshPane();


refreshPane(); grover970
2/10/2005 10:08:55 PM
flash actionscript:
I am pulling a bunch of images into a scrollPane. And they are importing fine.

The problem comes when I call the refreshPane(); to reset the scroller to
scroll thru the images.

As soon and I use scrollInstance.refreshPane();
the images nolonger load into the pane.

anyone know why?
Re: refreshPane(); rlc5611
2/11/2005 1:34:03 AM
You must be using MX 2004. In MX, refreshPane() would update the scrollpane
after you loaded content. MM deviously changed the functionality of
refreshPane() in MX 2004. Now what refreshPane() should really be called is:
completelyWipeOutallMyGoodThatIspentSoMuchTimeDoingandStartAllOverwithNewContent
FrustratingMeIntheProcess(); But, since they took away novice mode, that would
be too much to remember to type in the action script panel so they called it
refreshPane() instead. What you want is: mypaneinstance.redraw(true); That
will update the pane's awareness that you have new content and it will adjust
the scroll bars accordingly.
Re: refreshPane(); Peo
2/11/2005 11:48:11 AM
[quoted text, click to view]

lol

Re: refreshPane(); grover970
2/15/2005 5:48:28 PM
thanks for the laugh.
Re: refreshPane(); rlc5611
2/16/2005 12:57:55 AM
No that should work assuming it is MX 2004, the path is right and you wait for
the content to be loaded before executing it. The only other thing I can think
of is to try to use the 'invalidate' method before the redraw but, according to
the Flash documentation, you shouldn't need to. If you place dynamic content
into the scrollpane, the scrollpane is only aware of the X,Y registration
points of the dynamic content. If you have a scrollpane that is 200 pixels wide
and place a clip in that is 300 pixels wide with its registration point in the
middle, the scrollpane will think your content is only 150 pixels wide and not
draw any scrollbar. It does not examine the size of the content - only its
location.
Re: refreshPane(); rlc5611
2/16/2005 9:37:55 AM
I am going to take back what I said about the registration points. I think the
scrollpane can determine the overall size of its content but it does seem to be
time-dependent. I was looking at an old project where I was loading objects
from the library. If I add dynamic content and immediately redraw, it behaves
differently than if I wait a bit to do the redraw. So it looks like the
scrollpane needs time to understand its content. That makes sense. I guess you
could place a progess listener on it and redraw after all is complete but I
have some doubts that it would always work. If I load empty clip holders into
the pane and then fill those clips, the listener might only pick up the load of
the empty clips. It can be gotten around with a custom listener that would
ensure all added content had _width and _height before doing the redraw.
Re: refreshPane(); grover970
2/16/2005 3:56:38 PM
I am inserting dynamic content.

Unfortunate that all this extra code has to be used to make a component work
when it is meant to be drop and go.

THis is my first experience with MX 2004, and every time I have used a
component I have run into these obsticles.

I am frustrated to the core.
Re: refreshPane(); rlc5611
2/16/2005 4:37:47 PM
I was looking at an fla I did a while ago. I stopped using the components for
all the problems they have but in that movie I added dynamic content larger
than the pane's normal area. I added a small background rectangle that I later
resized to be larger than my content and did a redraw four times consecutively
and it eventually came out the right size. When I did not add the background
clip, the scrollpane only expanded to cover the mc registration points. I was
digging around in the scrollpane today and it has its own load listener
embedded. There are third party components and I remember a scrollpane that
cost $5. At that price, the MM UI components are just not worth the time and
effort. I do like MX 2004 but I don't like messing with the components any more
(except for the data grid).
Re: refreshPane(); grover970
2/16/2005 4:59:08 PM
Re: refreshPane(); the fleece
2/16/2005 6:22:05 PM
the
completelyWipeOutallMyGoodThatIspentSoMuchTimeDoingandStartAllOverwithNewContent
FrustratingMeIntheProcess();
method of the new components is what has made me just rewrite my own ones.
they always work, and if I need aded functionality it is easy to add



Re: refreshPane(); rlc5611
2/17/2005 3:28:57 AM
I was looking again at my old file this AM which was created in V7.01 to see
what I could find out about the load listener in the scrollpane. Now I am using
V7.2. Long story short is that I was starting to trace through all the
objects/functions and then decided to start all over with a new file. The V7.01
scrollpane and the V7.2 scrollpane are very different even though they look
identical. I think I remember seeing this before on other components. Just be
aware that if you have files created in 7.01 with components that you will not
be using the 7.2 components unless you expunge the old ones from the fla in
some manner (and I am not convinced that just deleting and replacing from the
library alone actually works). Anyway, I am going to dig around on the 7.2
scrollpane a bit.
AddThis Social Bookmark Button