I created an empty movie clip on the stage to load external swf’s and in my most top layer I have a mc (mc_mask) to create the transitions between the swf’s. I made the following fuction to create the empty movieclip, rescale mc_mask and to load about.swf into the emptyMovieClip:
this.createEmptyMovieClip("container", 1);
container._x = 0;
container._y = 79;
function scaleMask(clip, height, speed) {
clip.onEnterFrame = function() {
var hdiff = height-this._height;
this._height += hdiff/speed;
if (Math.abs(hdiff)<2) {
this._height = height;
loadMovie ("about.swf", "container");
}
};
}
scaleMask(mc_mask, 0, 3);
My first problem is that about.swf is only loaded when it’s outside of the function. I placed it inside of the function because I only want it to be loaded after mc_mask is completely rescaled.
My second problem is:
I have for buttons on my stage(btn_about, btn_service, btn_products and btn_contact), which I want to communicate with mc_mask. In other words, how do I tell mc_mask that btn_service is pressed and that service.swf is the one to be loaded in container.
Is there somebody who has an answer to my questions?