Design4Horses,
Woops! I'm not sure now if you're replying to clbeech or me,
so I hope
I didn't end up hijacking this thread. I just wanted to make
sure you
understood you can use Flash CS3 to code in ActionScript 2.0.
> No...I'm in Actionscript 2.
Coding in AS2 is fine, but you also have to make sure that
your FLA file
is configured for AS2. See File > Publish Settings >
Flash > ActionScript
version.
> I do have an instance name of container on the movie
clip
> container.
>
> Would it have to do with the button calling the
loadMovie
> being within another movie clip?
The hierarchical arrangement of your movie clips makes all
the
difference. clbeech's suggestion was this:
loadMovie('people.swf', _parent.container);
... which makes sense if container exists in the timeline of
the parent
movie clip. You can get a quick idea whether or not you're
correctly
referencing that container by using a trace statement:
trace(_parent.container);
loadMovie('people.swf', _parent.container);
Try that and see what you get in the Output panel.
> Here's what I've done:
> - I have my main movie. (MAIN)
> - Within MAIN movie, I created a movie clip that slides
sideways
> (upon loading) and contains a series of buttons.
(CONTACTBOX)
With ya so far.
> - I am placing the loadMovie code on a button within the
> CONTACTBOX movie clip.
> - The exernally loading swf is supposed to load in MAIN.
So where's the movie clip with the instance name
"container"?
> Would the "parent" still apply here? I think so...
In ActionScript 2.0, the concept of a movie clip's parent is
controlled
by the MovieClip._parent property -- in other words, a
_parent property
(with underscore) -- which is available to all movie clips,
because all
movie clips are defined by the MovieClip class.
If you're using on() to attach code directly to your button,
then the
button's "point of view" is that of the movie clip in which
it resides. In
this case, it sounds like that would be your CONTACTBOX clip.
So in a
sense, your on() code thinks it exists in the timeline of
CONTACTBOX. The
parent of CONTACTBOX would be what you're calling MAIN --
that is, the main
timeline. So if your CONTACTBOX clip (actually, a button *in*
that clip,
but using on()) is referencing _parent.container, then
there's got to be a
movie clip with the instance name "container" in the main
timeline.
It doesn't sound like there's such a clip in this case.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."