I’m trying to set up a preloader for my movie, and I’m having some trouble with paths etc. My main timeline has two movieclips, one for the preloaded content, and one for the preloader. The instance name of my content mc is ycmovie, so I’ve used the code below to try to access the loading details. My preloader mc contains the following:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
_root.ycmovie.ifFrameLoaded ("loaded") {
_root.ycmovie.gotoAndPlay("moviestart");
}
Whenever I preview I get the following message:
**
Error Symbol=loader, layer=as, frame=1:Line 7: Expected a field name after ‘.’ operator.
_root.ycmovie.ifFrameLoaded (“loaded”) {**
I assumed the field name was the instance name? But obviously I’m using incorrect syntax in the path. Can anyone help me out here?