Load external swf, buttons don't work, tried everything, head hurts

I’ve been banging my head against the wall on this one.

I have my main site (index.swf) that I put a button on one of the sections and the actionscript on the timeline.

Here is the AS on the timeline of my main site (index.swf):


pgroup1.onPress = function(){
createEmptyMovieClip("picgroup1", 1);
picgroup1.loadMovie("http://rberry883.home.comcast.net/petpics.swf");
picgroup1._x = 0;
picgroup1._y = 160;
picgroup1.border=false;
}

** this will load the external swf (petpics.swf) just fine but the buttons don’t work. The button instance name is “pgroup1”.

And here is the AS code that is on the movie clip of my external swf (petpics.swf) that is supposed to let the buttons function:


onClipEvent(load){
        this._x = 200;
        this._y = 50;
        this.div = 5;
}
onClipEvent(enterFrame){
        this._x += (endX-_x)/div;
        this._y += (endY-_y)/div;

_parent.btnp1.onRelease=function(){
        this.endX= 200;
        this.endY= 50;
};
_parent.btnp2.onRelease=function(){
        this.endX= -50;
        this.endY= 50;
};
_parent.btnp3.onRelease=function(){
        this.endX= -300;
        this.endY= 50;
};
_parent.btnp4.onRelease=function(){
        this.endX= 200;
        this.endY= -150;
};
_parent.btnp5.onRelease=function(){
        this.endX= -50;
        this.endY= -150;
};
_parent.btnp6.onRelease=function(){
        this.endX= -300;
        this.endY= -150;
};
}

Now this swf works on its own if I take the “_parent” tags off ( I also tried with this.) but same results. The buttons have instance names btnp1 - btnp6 and are used to move the movie clip with an instance name of “se” but the buttons don’t work when loaded into my main site.

Here is my page I uploaded it to, Once loaded, click on the Photos button and then on the #1 button on the right and you’ll see the external swf load but the buttons won’t work.

My site: http://rberry883.home.comcast.net

Any help is appreciated.

rberry88

tried _parent._parent ??

check this tutorial it should answer your problem, click here.

No, that didn’t help. I’m loading my external .swf into an emptyMovieClip that is defined by actionscript which also contains the code for the buttons. That tutorial just puts the AS on the button and calls the premade MC that is already place on the stage into action.

I’m trying the _parent._parent method now, will post results in a little bit.

Thanks for the help though, every little bit helps.

edit I tried the _parent._parent. method and that didn’t work, I also tried this._parent._parent. and that didn’t work either.

Here is the swf on its own (in a separate location) that shows how it is supposed to work. http://rberry883.home.comcast.net/movies/petpics.swf

The .fla is in the zip file above, if someone could help me get it loaded into an emptyMovieClip on my main site so the buttons function I would greatly appreciate it.

Okay, got it solved. I cleared all the AS on the frame and typed it all in again using _parent. and it works fine now.