gotoandPlay problems

How do I tell a specific movieClip to gotoandPlay when I’m in another movieClip? I have tried defining the paths and I can get anything but gotoandPlay to work. I’ve posted .fla’s to illustrate what I can’t get done.
Thanks,
Joesighting

They are on another thread I posted.
http://www.kirupaforum.com/forums/showthread.php?t=71205

posted where?

double check that all your clips have instance names. Then start at _root and set the path to your specific movie clip, for example

_root.someclip.someotherclip.myspecificclip.gotoAndPlay(2);

:hr:

Woops

They are on another thread I posted.
http://www.kirupaforum.com/forums/s...ead.php?t=71205

link doesn’t work :frowning:

http://www.kirupaforum.com/forums/showthread.php?t=71205

I have a main page (mainexample.swf) which has a button on it and an empty movieClip with an instance name of “content”.

The button’s script is

on (release) {
loadMovie(“dragexample.swf”, “content”);
}

It opens “dragexample.swf” into the empty movieClip “content”.
Simple enough and it works fine.

Then “dragexample.swf” has two objects in it, a movieClip with the instance name of “circle” and a movieClip with the instance name of “square”.

The movieclip circle has a button in it with this script on it.

on (press) {
startDrag("_root.content.circle");
}
on (release) {
stopDrag();
if (_root.content.circle._droptarget == “/square”) {
_root.content.circle.gotoandPlay(“shake”);
}
}

“shake” is referring to a frame label of the button which contains an animation to load when “circle” is dropped over “square”.

My problem is getting the script to carryout the “gotoandPlay” command, and I assume it has something to do with the paths.

Any help would be appreciated.

This is nitpicky and you probably already have this but in your code above you wrote gotoandPlay when it should be gotoAndPlay (capital A in and).

Otherwise - did you try setting the entire path for square?

I don’t have flash here so can’t look at your file. :frowning:

Ok so I figured it out finally, with the help from a cousin of my brothers friend who is a programmer. LOL We took a different approach, but it works perfectly. I thought I’d post it in case anybody might need it.

on (press) {
*unloadMovieNum(1);
*startDrag(this);
}
on (release) {
*stopDrag();
*if (this._droptarget.indexOf("/square") >= 0) {
**gotoandPlay(“shake”);
*}
}

The reason I do a .indexOf("/square") … is because the actual value is probably something like content/square … but since i don’t know exactly what it is, this works.* Also, all that “root.content.circle” stuff didn’t ever seem to work for me, so I changed it to “this” … that way it is a relative object and it won’t matter what context it is in.

Thanks to everybody who gave me input.

Joesighting