Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadMovie error

Status
Not open for further replies.

herre

Programmer
Joined
Sep 2, 2005
Messages
5
Location
BE
Hello guys,

I'm stuck here. I've made a newslist, with lots of flas mx components in it wich are filled up with xml-data. When I run the swf, everything works fine.

Now I want to preload the movie, so I make a new .fla where I add the following code:

----------------------------------------------------
_root.createEmptyMovieClip("holder_mc", 0);
var mc = _root["holder_mc"];
mc.loadMovie("nieuwslist.swf");
this.onEnterFrame = function() {
var p = 100*mc.getBytesLoaded()/mc.getBytesTotal();
if ( p >= 100 ) {
mc._visible = true;
}
}
----------------------------------------------------

The preload works fine, my nieuwslijst.swf is preloaded, but then it goes wrong: all the component fields are empty.

It seems to me that it only works when I use :
------------------------------------------
_root.loadMovie("nieuwslijst.swf");
------------------------------------------

But then I don't have a preloader of course :-).

I have loaded the nieuwslijst.swf, fla and xml in a zip:

Does somebody now what I'm doing wrong ?

Kindly regards,

Herre
 
sounds like a path problem

all works with swf but not when loaded in holder_mc

you are going to have to add holder_mc to the paths for the data to show
 
Thanks guys! The _lockroot solved my problem!

That makes my day!!

Herre
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top