Easy one about movie clips

How do I make it so that when I click a button, a movie clip from my library (it’s a window with text in it) comes up at a set x,y coordinate? i’ve tried different functions but i think i’m way off. Thanks!

Why don’t you have the mc on the stage, and put its keyframe in frame 2 of the mc (so that it is invisible in frame 1). Then you can have the button do something like:

on (release) {
tellTarget("/mcname")
gotoAndPlay(2)
}

when you click on other buttons, other windows come up. they could have any combination of windows open at different times. so putting them in frames wouldn’t really work.

You can achieve exactly what you want.

First, in the library, right-click the MC and go to linkage. Check Export for Actionscript and make sure Export in first frame is checked also. Give it the identifier name of let’s say textMC.

Now on the button, have this code:

on (release) {
    attachMovie("textMC", "textMC2", 1);
    textMC2._x = 100;
    textMC2._y = 100;
}

attachMovie puts in a MC on the canvas. “textMC” is the identifier we gave it. “textMC2” is the new name of it. 1 is the depth so it comes on top of other objects. The rest is self-explanatory :).

Hope it works,
Sharif.

Thanks so much! it works. one more question: once that movie clip has loaded, how do i make another movie clip load within it?

nevermind, answered my own question, thanks Reefster!

No problem :).