External swf problem

If i use this script it works perfect when viewing it in preview.

on (press) {
tellTarget (“gallery”) {
gotoAndStop(“paintings”);
}
}

When i now load this swf with the script into a other swf then the button can’t locate the target anymore how can i fix this ?
Anybody have a idea ?