PDA

View Full Version : Changing scrollpane content from within the pane


malignus
12-20-2004, 03:48 AM
Okay, so I've got this flash website with a bunch of menu buttons that load pages inside a scrollpane using the contentpath command.

I decided to have a few of the scrollpane pages have "next" and "prev" buttons. I tried programming one of the buttons with this code, which works just fine with my buttons outside the scrollpane, but which doesn't load the desired page with my button inside the scrollpane:

on(press){
_root.myScrollPane.contentPath = "page_news_12.7.04"
}

How would I make this happen with my button inside the scrollpane?

malignus
12-21-2004, 01:23 PM
Oh, come on. Does no one know the answer to this?

Whenever I try clicking the "previous" button, it gives me this error message:

Error opening URL "file:///C|/Documents%20and%20Settings/USER/My%20Documents/Tomfoolio/Tomfoolio.com/Source/page_news_12.7.04"

And I don't know if this has anything to do with it, but I get this message whenever I test out the scene.

**Error** Symbol=page_news_12.19.04, layer=buttons, frame=1:Line 1: Mouse events are permitted only for button instances
on (press) {

It doesn't make much sense to me, since the button in question is, in fact, a button. Any ideas?

niks
12-21-2004, 08:06 PM
I think you run onpress event for a movieclip insted a button.
Anyway try this sample.

malignus
12-21-2004, 09:09 PM
Thanks, I found the problem!