The second one doesn't work, because 'this' doesn't mean anything in this context. With a loadMovie, the first part is the name of the clip to load, the second is the name of the clip to load it into, and it needs "" around it.
No. If you add an empty movie clip to the stage, you can load a movie clip into it with an onClipEvent (enterFrame). Get the attachment, it's for MX, and just make sure you have entry.swf in the same folder you save it to.
The only reason why it's working, is because you're using loadMovieNum - which you shouldn't, it should be only loadMovie when loading in an holder clip! -, and what in fact is happening is that your loading "entry.swf" on _level0, thus replacing your main movie with the new loaded movie.
I have a folder here with the main movie, a target clip, and a load-into-the-target-movie-from-the-folder clip that proves it works. I know, I know, it ain't supposed to work, and it's driving me nuts too. So check the attachment out. Both swf's and both fla's are in the zipper. Tell me WTF is happening.
What we have here is an external swf loading into a target that is on the main timeline. I assume that means level0??? The target uses the usual name and instanace name, but the button code is:
on (release) {
loadMovieNum ("flamx.swf", 1);
}
OK, that should load it into level1, but... it loads the external into the MC, every time, and not only that, but I can drag that clip anywhere around the stage, and it will still load the swf into it. It's driving me bats, cause it should not work at all.
On top of that, I can't build a new file with target clip and load an external swf into it now using loadMovie, for some reason. I've tried twice today, and I have done this a dozen times before and it worked as expected. Now, they don't work.
I take that back, I just made one and it worked as usual. Phew...
The only point is, that it can be done. It can come in handy for loading random clips from an array into the clip, which can be moved at will anywhere on the stage.
It'll also allow chup to use an onclipEvent to load his movie.
Go to www.cruciallimit.com.Than go to lab and choose flash.There you can download a documented fla, which teachs how to load external swfs into target with transitions and preloader.
Nothing went wrong. But there is a way to make an onClipEvent load a movie. Either on load or enterFrame. It's just a round about way to do it.
Sorry, forgot, you can see it here. This is set for an enterFrame event, [frame 60]. At frame 60, the main movie loads a second movie into a target, which you can move anywhere you want on the stage. I have tested it on a load event and it works the same way, only no wait.
OK, this is a zip with 3 fla's in it. You should open all three to the same folder and make swf copies. Look in the flamx.fla and check the first frame action script. That's the kicker. The other two fla's are one for an enterFrame event, [60], and one for a load event, first and only frame. You have a lot more control over the loaded movie if you make the target the same size as the loading movie. And you can put the target anywhere on stage you want and alpha it to 0 so it doesn't show if you want. It's really quite simple.
Also, this is loading a movie as an external resource, so it isn't in the library, but to work, the flamx.swf, [or your own movie clip] has to be in the same folder to work, either on your PC, or on your server.