Flash MX _x, _y question

Basically what I want to do is load an external movie after an x and y value have been changed based on each buttons selection. Has anyone done this before?

http://www.pinemerchants.com

For those of you who aren’t confused (lol) I’m having problems doing so.

Everytime I tried to get it to work it would just replace the main movie with whatever is being loaded no matter what level it was loaded onto (weird). Also, If I changed the level it would then take the loaded movie and apply the x and y of other buttons on it (stretching text etc).

Can anyone give me som insight to maye a better way of doing this?? :crazy:

Pretty helpful board.

Duuuuuuh ? What do you mean ? Exactly ? Give us (ok me :P)an example, or a description how it should be

Yeah, I didn’t answer cause I didn’t get it. Do you not want that movieClip to move around when you hit buttons?

Heh, Ok… I’ll try again cause it seems you guys aren’t quite getting it (sorry tough to explain lol).

the blue square in the middle has its x, y, height and width values changed based on what button is pressed at the top. That part is fine (as you can see from the site). The problem starts next.

What I want to do is have a movie load externally when you press “gallery” for example BUT only load once the box has reached it’s final destination (x, y, height, width).

Basically if the box is still moving I don’t want a movie to load.

The problem I’m facing is that it won’t allow me to load a movie in without it being controlled (oddly) by the same destination points (x, y, h, w)… It basically takes the text I have in a box and flash pretends it’s the main blue box… so when you click on different buttons it stretches and warps the text.

I will post my code below so you can get a better understanding of what I did. Thanks.

Main timeline:

if (!first)
{
with (stage)
{
_root.targetH = _height;
_root.targetW = _width;
_root.targetX = _x;
_root.targetY = _y;
}
first = true;
_root.loadFlag = true;
_root.movieName = “main.swf”;
}

with (stage)
{
_height += (_root.targetH -_height) /7;
_width += (_root.targetW -_width) /7;
_x += (_root.targetX -_x) /7;
_y += (_root.targetY -_y) /7;
}

with (stage)
{
//trace(_x+" “+_y+” “+_height+” "+_width);
if( Math.round(_x) == _root.targetX && Math.round(_y) == _root.targetY && Math.round(_width) == _root.targetW && Math.round(_height) == _root.targetH && !_root.loadFlag)
{
with (_root)
{
//loadMovie(_root.movieName, 20);
loadMovieNum(_root.movieName, 20);
}
_root.movieName = “”;
_root.loadFlag = true;
}
}

Button script:

on (press)
{
_root.targetW = 480;
_root.targetH = 130;
_root.targetX = 10;
_root.targetY = 45;
_root.loadFlag = false;

}

on(release)
{
_root.movieName = “gallery.swf”;
//loadMovieNum (“gallery.swf”, 2);
_root.loadFlag = false;
unloadMovieNum (20);
}

Well, If I understand you correctly, I would put in different emptyMovieClips as targets to load into. Then your external swf files will either conform to the original size of which it was made, or different parameters that you would set when calling in that swf. Does that work? Or do I still not get it?