Loading External Movie

Hi

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.

Any advice?

:frowning:

What is the code you are using to position the loaded .swf where you want it on the stage?

the code is as follows

on (release) {
_root.empty.loadMovieNum(“kari.swf”, “_level1”);;
}

and it works, but just does not play the movie when opened.

Maybe I’m confused (I usually am :)). Let me see if I get you right here.

  1. You loaded the shockwave and it played fine, but it was not placed where you wanted it.

  2. You managed to place the loaded clip at a specific location, but when you did that, it no longer plays.

  3. 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?

No you guessed right, your not going crazy!

I Have tried placing a “this.play();” on the first frame of the loaded clip but still no good. :-\

I might have to rethink my idea.
:sigh:

Perhaps this has something to do with it.

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)

Let me know if that works.

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.

I have a similar problem. My code goes like this…

[AS]
on (release) {
_root.createEmptyMovieClip(“movieloader”,1);
_root.movieloader._width = 200;
_root.movieloader._height = 200;
_root.movieloader._x = 10;
_root.movieloader._y = 200;
_root.movieloader._alpha = 100;
_root.movieloader.loadMovie(“heading.swf”,1);

}
[/AS]

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.

weird!

Hi aurelius,

I have tried your method this just seems to open the movie on a new page filling the entire browser window.

I have only started with action scripting recently, so I think I might just be me making stupid mistakes. I’ll keep trying…

Thanks
:hair:

Hi Paz,

Could you post your .fla? Maybe we could take a look and something might pop out at us.

aurelius

Hi aurelius,

Sorry my file is too large to attach do you have an email address i may forward this on to?

Paz

Sorry just ignore that I see the email button :wink:

Okay, I got the files. They appear to work fine to me. What is it exactly that is the problem?

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!

Thanks
Paz

yeah, it loads all three images for me, no problems. weird. I wonder why it won’t work for you?

Do you have any idea, why this is?

As i don’t understand this at all anymore. Please can some body shed some light on this!

As this has stopped me from working even before i’ve really got started.

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?

Yes that is what is supposed to do, but it doesn’t do that here.

What browser are you using and is it running on windows, currently i’m working in Flash MX, on windows MX using explorer 6.

can you think of any other reason why this might not be working here?

Weird. I’m using Flash MX, Windows 98SE, and IE 5.

I’m pretty stumped on why it won’t work for you . . .

one thought . . . maybe your Flash Players aren’t updated. What do you get when you run this:


trace(getVersion());

I’m not sure out of date Flash players are the problem, but better safe than sorry.