Syntax question

Hi,

I am working with external movies and
I would like to know the real difference between:

loadMovie(“one.swf”,emptyMC);

loadMovieNum(“one.swf”, 1);

emptyMC.loadMovie(“one.swf”);

Which one is better to use when working on a fla. (CDrom work)?
What is the advantage of using empty MC’s?

Ok…on va essayer…

Items 1 and 3 are basically the same, n°1 uses a function, n°3 a movie clip method, but the result is the same: the content s loaded into an empty clip. advantage: you can use all movieclip methods on that: make it invisible untill the swf is fully loaded, then place it where you want (_x and _y) and make it visible…change the alpha…

N°2 loads into a level (level 1 here), which means
-the swf will always be places at x=0, y=0
-the swf will “loose” it’s background color, it’s the level0/main swf that dictates the bgcolor to all levels

So it really depends on the use. For example, I load in an swf with snow over my menu; at the moment it’s in a level so it covers the whole menu; if i wanted the snow to show just in a certain part, i would load into a clip, set the x and y and the size as desired…

Helps?

yes it helps …thx

But is it possible to use level(like in example 2) in :

emptyMC.loadMovie(“one.swf”);
emptyMC._level = 1;

Also to unload , is this correct?

unloadMovieNum(1);

Mel*

[inEdit:got distracted - all above came while I had reply open]

after creating an “emptyMovieClip” then one could:

on (specifyEvent);
loadMovie(“nameofMovietoload”, “nameofEmptyClip”)
to play a loaded swf inside of a clip within the parent clip
the third ver. works the same as this
-or-
on (specifyEvent);
loadMovieNum(“nameofMovietoLoad”, (levelNumber))
to play loaded content ‘over’ lower numbered levels and/or replace movies prev. loaded on same level

I couldn’t tell you whether or not one is better for CD’s

You can’t assign a _level to a clip.
With existing clips, all you can use is swapDepth to make them appear higher or lower in the stacking order.

Yeah, levels are for layering movies not clips…
… I left out “-or - without using a clip”…
it’s late

Like this?

emptyMC.loadMovie(“one.swf”);
emptyMC._x = -230;
emptyMC._y = -178;
emptyMC.swapDepths(100);

emptyMC.loadMovie(“two.swf”);
emptyMC._x = -230;
emptyMC._y = -178;
…?

But then how do i force the other external swf to go behind?

no no no :slight_smile:
if you load into the same clip,
you will replace the previous content!
each clip can only contain one loaded swf.

what is it you wanna do? (wanadoo, lol)

and if you use the swapDepths like this, you’ll switch the depth of emptyClip with whatever other clip was at depth 100 in _root…
I have the feeling this is not so clear, huh?

hum,…yes its all confusing to me…

i 'll try to explain my problem:

On my main scene, I have several external mcs loading into emptymcs…

When i press button A, I want :
emptyMC.loadMovie(“one.swf”); to come forward

When i press button B, I want:
emptyMC.loadMovie(“two.swf”); to come forward and one to disappear…

I dont want to be just behind…but totally disappear because i have some sounds in there…

grrr… hope its clear ! :slight_smile:

well why not just load them one at a time on demand into the same clip then ? … prev loaded swf will get ‘bumped’ as next one loads - one clip…changeable swf’s

Well, perfect!
If you WANT each new loaded clip to replace the previous, just load into the same empty clip all the time…except if you’re wanting one.swf to fade out before showing/loading two.swf…
As you’re doing this loading , apparently, on quite a few buttons, it would be better coding just writing a function to which you pass as a parameter the name of the swf to load…

yes thats what i did first, but that doesnt work…

when i press buttonA, the external swf loads fine, but when i press button B nothing happens.

This is the code for each button,…

on (press) {
emptymc1.loadMovie(“subone.swf”);
emptymc1._x = -230;
emptymc1._y = -178;
}

(to recap on my main scene, i call an external movie “one.swf”.
In that one.swf i have a mc where buttons call another externals movies.) Is it a path problem than? Do i need to add _root before emptymc1 ?

sorry i replied before …

Just read your post…

Yes i will try loading into the same emptymc…

thanx again !

Merci beaucoup !
Thank you!

I use one emptymc…and it works now…!!

:slight_smile: