PDA

View Full Version : scroll pane and tmp_mc


skjc
01-13-2006, 10:59 PM
i would like to attach a movie clip to the scroll pane component -

this.scrollpane.tmp_mc.attachMovie("x","x_mc",1) does not seem to work (scrollpane is the instance name)

by attach i mean have it appear in the scrollpane so it scrolls not just attached to it?

any ideas?

thank you

flashead
01-13-2006, 11:13 PM
First attach it.
Then use setScrollContent() to set it inside the scrollpane.
this.scrollpane.setScrollContent(x_mc);

skjc
01-14-2006, 11:09 AM
ty flashead but no go with this yet:

this.scrollpane.tmp_mc.attachMovie("x","x_mc",1);
this.scrollpane.setScrollContent(x_mc);

i will read up some more on it and try to find out why it is not working.

skjc
01-18-2006, 03:15 PM
i am now returning to this as i just cant get it to work - any ideas as its killing me

this.scrollpane.tmp_mc.attachMovie("x","x_mc",1);
this.scrollpane.setScrollContent(x_mc);


scrollpane is the instance name of the scrollpane component (dropped on the stage). x is the mc in the library (exported for as).

flashead
01-18-2006, 04:49 PM
I didn't mean attach your mc 'into' your scollpane...
I just meant attach it. the setScrollContent takes care of the rest.
this.attachMovie("x","x_mc",1);
this.scrollpane.setScrollContent(this.x_mc);

Renge
01-18-2006, 06:58 PM
I'm loading xml data into textfields that are within a mc (named "event_mc", which is also its identifier/linkage name).

Btw, if I place that mc on the stage and publish, the data shows up. So that's working.

I'd like to now have that mc show up inside a scrollpane component, which I've placed on the stage (only element on the stage), and have given it an instance name of "scrollpane".

I tried adding the code that's been talked about here, modified for my needs:
this.attachMovie("event_mc","x",1);
this.scrollpane.setScrollContent(this.x);

But nothing happens.

I've provided the .fla & xml files.

Help...& Tnx!

skjc
01-19-2006, 10:22 AM
the only way i can get it to work is by using

this.scrollpane.contentPath = "mcname";

i have just looked at a similar post on her e which says that setScrollContent is not applicable to v2 and to use contentPath - which i found - thank you