Load movie something?

simple question here, just cant seem to figure it out. i want it so that when someone clicks a button, an animation goes. kinda like when a button is clicked and a little box comes up and it gets bigger in size. an example is at www.superhere.net …when you click the words on the bottom, a box pops up. im making this simple question really complicated, haha. all i want is a box (movie clip) to pop up when i click a button. ive tried putting it in both keyframes of the down and hit frames but nothing seems to work. help me out if you can heh.

You need to make the animation an MC on its own - seperate from the button. Then when you place the MC on stage give it an instance name, like “window”. Then go to your button and insert a telltarget code such as this:

on (release) {
tellTarget ("_root.window") {
play();
}
}

This tells the button when a user clicks it to play the animation called “window” on the main stage. This is a very simple explanation. Hope it helps, post any more questions you may have.
Peace

PS be sure you have a stop action in the MC named “window” so it doesnt play on its own.

ok so i made the mc and added the actionscript to the button, but where would i place the mc? just on the main stage? or in one of the keyframes of the button? whenever i play it, it keeps saying

Target not found: Target="_root.window" Base="_level0"

maybe its something i did wrong but this only pops up when i click the button. is there a certain place i should put the mc?

Two things, mi amigo…

tell Target is a deprecated command. So, you should try not to use it.

I think what you’re really looking for is AttachMovie

in order to use it, your MC in your library must have a linkage ID

myMovieClip.attachMovie(idName, newName, depth [, initObject] )

is the syntax.

Give the movie clip an “Instance Name.” Then put this action on the button:

on (release) {
tellTarget ("_root.INSTANCENAME") {
play();
}
}

Of course the place with INSTANCENAME is the name of the Instance Name on the movie clip.

Tell us if it worked. I tested it and my actionscript worked, and I would recommend it because it doesn’t get too complicated. (salesman :))

ok so the movie clip doesnt have to be on the main timeline? just in my library? or does it…

i’ll try it out as soon as i figure out where it goes! haha thanks for the help

it does for the last example… In the case of using “attachMovie();” method, it doesn’t need to be on the stage.

ok ive almost got it to work. when i click the button but done let go, the movie clip plays…but as soon as i let go of the button, this pops up:

Target not found: Target="_root.box" Base="_level0"

do you know what i did wrong?

i was checking out some of the tutorials here and came across this one
http://www.kirupa.com/developer/flash5/telltarget.asp

even though its for flash 5 i figured it would still work in flash mx. i have the same code as in the tutorial but when i test the movie this pops up

Target not found: Target="/box" Base="_level0"

does it not work the same in flash mx?

In either case, it sounds like you forgot to name the mc instance called “box”. I would double check to make sure it’s there, and to make sure that it resides on the _root.

ok i went back and checked, and the MC is named box and the _root thing is there and it still doesnt work. :frowning:

soo frustrating!

just attach your fla (zip file) or send it to me at [email protected]

I’ll take a look.