createEmptyMovieClip Issue!?

I’m creating an emptymovieclip with the onPress of another movie clip. I would like that movie clip to fade in using AlphaTo from fuse kit. Buuut, it only seems to work if i create the Emptymovieclip outside of the onPress:

import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup( Shortcuts, PennerEasing );
//This will create the movieclip but the alphaTo does nothing
var depth = getNextHighestDepth();

balloon_mc.onPress = function() {
container._visible = true;
createEmptyMovieClip(“container”,depth);
container.loadMovie(“kickedinNuts.swf”, container);
container._x = 50;
container._y = -270;
container._alpha = 100;
container.alphaTo(0,2,“easeInQuad”);
}
///////////////////////////////////////////
//The alphaTo works on this one but the movie clip shows up
//before the onPress
var depth = getNextHighestDepth();
createEmptyMovieClip(“container”,depth);
loadMovie(“kickedinNuts.swf”, container);
container._x = 50;
container._y = -270;

balloon_mc.onPress = function() {
container.alphaTo(0,2,“easeInQuad”);

}

Any suggestions or explanation to why this is happening?? Thanks in advanced??

This cannot work as the createEmptyMovieClip call is incoorect…

balloon_mc.onPress = function() {
container._visible = true;
createEmptyMovieClip(“container”,depth);
container.loadMovie(“kickedinNuts.swf”, container);
container._x = 50;
container._y = -270;
container._alpha = 100;
container.alphaTo(0,2,“easeInQuad”);
}

Here you are creating a clip called container in the scope of your balloon_mc clip. You also seem to be setting it’s _visible property before you have even created it!!!

In your second example you create the container, then use the onPress to tween but don’t hide the container before loading.

Try this…

var depth = getNextHighestDepth();
createEmptyMovieClip(“container”,depth);
container._x = 50;
container._y = -270;
container._visible = false;
loadMovie(“kickedinNuts.swf”, container);

balloon_mc.onPress = function() {
this._parent.container._visible = true;
this._parent.container.alphaTo(0,2,“easeInQuad”);

}

My last bit of advice would be for you to read the help files for MovieClipLoader and stop using loadMovie!

Thank you for your response, i appreciate it. I tried:

Try this…

var depth = getNextHighestDepth();
createEmptyMovieClip(“container”,depth);
container._x = 50;
container._y = -270;
container._visible = false;
loadMovie(“kickedinNuts.swf”, container);

balloon_mc.onPress = function() {
this._parent.container._visible = true;
this._parent.container.alphaTo(0,2,“easeInQuad”);

}

but for some reason the movie clip is visible even though i traced it and it says that container._visible = false before i press the balloon_mc? I don’t really understand how it is visible when it says that the visibility is false??

You could try reversing the order by which you add the new swf and turn visibility off for the container:


loadMovie("kickedinNuts.swf", container);
container._visible = false;

I’m not quite sure myself how loading a swf-file is handled, but I think when you load it to a container, it replaces the whole MovieClip with itself, rendering any previous action to it inert.