PDA

View Full Version : Scrollpane with attached movie


rrh
01-12-2007, 08:42 AM
I've attached content to a scrollpane by using this:

scrollarea.content.attachMovie("bigm","bigm",1);

The attached movie shows up, but if the attached movie extends below the bottom of the content, it doesn't extend the scrolling so you can see the whole thing. How do I make it so it will scroll to show all of the attached movie?

rrh
01-14-2007, 11:36 PM
All this code is in the second frame:

smallm.onRelease = function () {
scrollarea.content.attachMovie("bigm","bigm",1);
scrollarea.content.bigm._y+=400;
scrollarea.content.lineStyle (5, 0xFF00FF, 100);
scrollarea.content.moveTo(50,100);
scrollarea.content.lineTo(100,1000);
}

So I can see the top part of the movie I attached appear in the scroll pane, but it won't scroll to show the whole thing. What should I do differently?

Mazoonist
01-15-2007, 02:28 AM
Instead of using attachMovie, you should just give the scrollpane instance a contentPath:

scrollarea.contentPath = "bigm";

Where bigm is the linkage ID name of a movie clip set for export.

rrh
01-15-2007, 03:11 AM
I did use the content path, but what do I do if I want to attach multiple things?

What I ultimately want to do is attach a bunch of pictures in a row, and allow the scrollpane to scroll through all of them. So I was trying to set contentPath to a generic blank movie, and attach the pictures.

Mazoonist
01-15-2007, 03:19 AM
Okay, I haven't really dealt with that before. Hopefully someone who has can give you some advice.

rrh
01-15-2007, 04:44 AM
Aha. I found a good example here. (http://blog.kirupa.com/?p=30)

And I found what I'm missing:
scrollarea.invalidate();