ferrisb
10-26-2006, 09:18 PM
I love MovieClip.scrollRect. It's awesome. However, I've seen two differing opinions on how to use it properly, both claiming to be better. I've used it both ways, and personally can't see a difference, so I'm hoping someone can offer a compelling argument for one method over the other.
Let's say that I have a MovieClip that I'm going to use as a basic scrollpane. For simplicity, _root.scrollPaneMC.content is where everything is attached.
Method 1: Create a flash.geom.Rectangle, and apply that using _root.scrollPaneMC.scrollRect = myRectangle. Then, I adjust the _x & _y of scrollPaneMC.content
Method 2: Same setup as above, however, I adjust the .x & .y of myRectangle, and reapply the scrollRect of the MovieClip each time I adjust the rectangle.
Both give the same appearance to the end user, but I haven't seen a performance difference with either method.
So, what are your opinions?
Let's say that I have a MovieClip that I'm going to use as a basic scrollpane. For simplicity, _root.scrollPaneMC.content is where everything is attached.
Method 1: Create a flash.geom.Rectangle, and apply that using _root.scrollPaneMC.scrollRect = myRectangle. Then, I adjust the _x & _y of scrollPaneMC.content
Method 2: Same setup as above, however, I adjust the .x & .y of myRectangle, and reapply the scrollRect of the MovieClip each time I adjust the rectangle.
Both give the same appearance to the end user, but I haven't seen a performance difference with either method.
So, what are your opinions?