I am trying to create a online portfolio and wanted to open an external movie in a specific place. I have now managed to do this, but now it opens where I want it does not play my movie that it opens. (code below)
on (release) {
_root.empty.loadMovieNum(“kari.swf”, “_level1”);;
}
If I don’t place the external movie within the area I would like it in, and have it just open the movie will play quite happily.
Maybe I’m confused (I usually am :)). Let me see if I get you right here.
You loaded the shockwave and it played fine, but it was not placed where you wanted it.
You managed to place the loaded clip at a specific location, but when you did that, it no longer plays.
You’re wondering how to make it play now that you moved it to the specific location.
Is that right, or am I talking crazy here?
Did the code you provided work before you managed to move the clip to a specific place? If so, then the problem is probably with some other code, probably the code that you used to place the loaded clip at a specific place?
Or perhaps you meant “specific level” when you said “specific place”?
Have you tried placing a “this.play();” on the first frame of the loaded clip?
I checked the actionscript dictionary for movieClip.loadMovieNum(), but found that it was only listed as a global function (just a plain old “loadMovieNum()” rather than being attached to a movieClip). I could have sworn loadMovieNum was both a global and movieclip method, but the doc says it’s not. But if you think about it, that makes perfect sense. After all, loadMovieNum is loading into a level rather than another movieclip.
So maybe just try:
on (release) {
loadMovieNum("kari.swf", "_level1");
}
And then use:
_level1._x = 50;
_level1._y = 50;
to place the clip where you want on the stage.
(I noticed just now that you’re code has two semicolons, that’s probably just a typo on the forum, but check your code just in case)
The alternative is to use loadMovie() instead of loadMovieNum();
The later loads movies into levels, as aurelius explained. The former loads an external movie into a target movie clip, using the following syntax
targetClipInstance.loadMovie(“url”);
then you can move the movie around all you like by simply calling
targetClipInstance._x=50;
or something like that.
the loadMovieNum uses the upper left corner of the stage as a registration point for the player. So when you load a movie into level 2 it lines up it’s upper left corner with the registration point, and ends up being unmovable.
I don’t think that you can do
_level1._x=50; The x and y possition of a level are always 0/0
Please ignore me if this is a stupid question but why are you putting “_level1” in quotes like that? If you want it loaded one level about the _root why not just put
loadMovieNum(“Kari.swf”, 1);
?
Sometimes you’ll find you have to tweak the placement of the stuff in the external swf on IT’S stage to get it to line up the way you want but I have had much success with the above method for loading external swfs, especially if they are smaller than my main movie.
Now, if i delete the width and height property for the clip, it works just fine. However, if I introduce them, i think the external swf file is loaded, but it does not display its contents.
When the .swf file has opened it should allow the three buttons to change images, but if you go over the buttons or press them, the images don’t change.
Please let me know if it is operating in this correct way for you!
Just to be sure, here’s what happens with the .fla you sent me. When the .swf first starts up, there’s a big picture on the screen. On the left are the three little buttons. When I pass my mouse over each of them, the big picture slides off and a new picture slides on the screen. Thes pictures take up the full screen with the exception of the grey bar on the left side of the screen (in which the three buttons reside at the bottom). Is that what it’s supposed to do?