loadMovieNum settings?

i use this AS to load an extrnal movie (song1.swf)

[AS]loadMovieNum(“song1.swf”, 66);[/AS]

but dont know how give it a _root.“name” so that i can call it later.

Thanks in advance
Bonna

When a SWF file is
loaded into a level, you can use the syntax, _levelN, where N is the level number, to target the
SWF file.

This is out of the AS Dictionary…don’t know if this can help or not. It also says:

If you want to specify a target instead of a level, use loadMovie() instead of loadMovieNum().

That’s about all I can help.

Adam

thank you…

If i use “_level66” get this error
"Left side of assignment operator must be variable or property."

and when i use “66” i get this ?

Scene=Scene 1, Layer=action, Frame=2: Line 87: ‘)’ expected
if (66.getBytesLoaded() == 66.getBytesTotal()) { loadinglamp._visible = false; }

??dont understand much of it, because as far as i can count there are just as many “(” as there is “)” ??

hmm but thanks anyway

what if you try _level66.song1? Sorry if I’m wasting your time with this, just made the jump to mx2004 from flash 5 a week ago, but I can fill in the blanks until the people who know what they’re doing show up :slight_smile:

Adam

no doesnt mater at all, better some help than no, so thank you very much, i would be completly blank if you hadn’t replyed. So thank you.

Now there is no error but i cant see if it works (but thats maby because there is an error in my preloader scrip). but i have a question. Does the debug also work on extarnal movies (song1.swf) ?

I’m not sure about the debug, but is there anyway you could post a link to your fla? And, have you tried any kind of a trace to see if it’s working even a little bit? So maybe you could narrow down the problem?

Adam

hmm okay you kinda lost me there with the trace. What is a trance ?

http://www.jksdesign.dk/controller/controller2.html

i wanted the loading lamp to turn on will the song1.swf was loading, just like the pause lamp i showen when the song is paused. but as you can see nothing happens.

you can use a trace to see if something is actually working or not, ie:



onClipEvent(enterFrame){
if (this.hitTest(_root.ball)){
	trace("YO");
}
}

What this does is if the “if” statement is true, the word YO appears in the output window when tested. You had said:

"Now there is no error but i cant see if it works (but thats maby because there is an error in my preloader scrip). "

I thought maybe you could add a trace in there to see if it is indeed working, and yet being held up by something else instead.

Adam

oh okay thank a lot.

but should i just make my action script like this or what ?
[AS]
if (_level66.song1.hitTest(_root.ball)){
trace(“YO”);
}
[/AS]

nevermind my last question i found the asawer.

and i have now tested the movie with a trace, and all the resault show that it shoud work, but it just doen’t look like it does.

http://www.jksdesign.dk/controller/controller3.html

Is there anyway you can post you fla? I tried going to those links, but with my dial-up, I couldn’t get the song1.swf to load…I waited 5 minutes or so, but it was still loading.

Adam

here is the fla

http://www.jksdesign.dk/controller.fla

Ok I came up with a solution for you. Each time you hit the play button, the movie is advanced one frame. The if statement at the bottom tells the loadinglamp to turn off if the song is loaded. If you add this:


loadinglamp._visible=true;

under the stop() in each frame’s actionscript, the loading lamp should stay on until the if statement at the bottom turns it off. It’s hard to gauge when the files are all on one machine, hence too little of a loading time to tell. Try this, though, it should work.

Adam

I didnt get mush of that post ?

i should add the

[AS]loadinglamp._visible=true;[/AS]

to the stop(); in the top off the actionscript like:

[AS]stop(loadinglamp._visible=true;);[/AS]

or what ? and how shoud it work ? sorry if its just me but i can’t see any logic in that ?

The way it seems to me is that each time you press the play button, the framehead is advanced one frame. Each new frame has a new song in it. The loadinglamp._visible = false is working, but the light isn’t going on to begin with. At least that was what was happening for me, but like I said, with all the files being on one computer, the loading time was too quick for me to notice the lamp being on. Sorry, it seemed like it should work. I meant more like this:


stop();
loadinglamp._visible=true;

sorry I couldn’t be more help…
Adam

no its okay… but when i upload it to my webhotel, i cant see the lamp ether ? thats what i fine wierd ?

When you are loading the songs, does it take long enough for you that it should show? I did a trace on the lamp being true and false and they both show like they’re working, I think it’s just too fast for me to see.

Like, have a look at this, you’ll see the light becomes true and then false again.