Hi:


I have a clip [container], inside another clip [main], which sits on the main timeline.

On the clip "main" are the following clip events and actions:


onClipEvent (load) {
_width=25;
finalW=25;
_height=25;
finalH=25;
}
onClipEvent(enterFrame){
_width +=((finalW - _width)/4);
_height +=((finalH - _height)/4);
}


Then, on a button, the following event and actions:

on (release) {
_root.main.finalW=500;
_root.main.finalH=375;
_root.main.container._x=-250;
_root.main.container._y=-187.5;
}

I am loading a movie [image1.swf] into the clip named "container." This external swf is 500x375, so, as you see above, I am positioning the clip it is loaded into [container] relative the clip container resides in [main], so that the loaded movie will be centered when loaded. So far, so good...

Here is the event and actions used to load the movie:

on (release) {
_root.main.container.loadMovie ("image1.swf");
}

Now comes the problem: Everything loads fine, centered, but the little box [see example] I put in the clip "main" rescales, and I get an unexpected animation/scaling on the loaded movie, which I don't want.

I put up a test page [only 12k total]:

http://www.ekigroup.com/baker/photographyDemo.swf

The top button will rescale the clip named "main," as expected, which contains the little box, loaded at 25x25px.

The top 2 text fields show the width and height of of "main." The bottom two, the width and height of "container." As you can see, they both end up being the same size, but the little box shrinks when "image1.swf is loaded into "container." Again, this is not what I want. What I want to do is to scale the box in the clip [main], as you see initially, then load "image1.swf" into "container," which should fit neatly INSIDE of the box.

Any ideas on why this isn't happening, and how to fix it?


Below is an example of what I want the finished product to look/act like, but I had to load the external file behind "main" in the main timeline. Unfortunately, I want to add masking later on, so this won't work:


http://www.ekigroup.com/baker/photographyDemo2.swf

BTW, the way these demos are set up, you have to click on the top button first, then the bottom button.




James
He is risen!!!












[Edited by jamescover on 09-24-2002 at 04:52 PM]