ok, I have a mc called: “preloader.swf” that is the first thing people see.
I use this .swf to preload a rather large “main.swf” file into it (the reason I don’t just put the preloader inside “main.swf” on the first few frames is because I got a bunch of linked library items with the “export to first frame” option selected and that makes the library load before the actual file so putting a pre-loader there is pointless).
the “main.swf” consists of 2 frames:
Frame 1:
nothing, just a stop(); on the action layer.
Frame 2:
that’s where everything is. It’s mostly all AS designed website.
The “preloader.swf” is 4 frame long and that’s what I got (I tried sticking as close as possible from the lib tutorial on this site).
If I just put the 1st frame load action, the movie loads fine. And the preloader works fine with a mc from within like in the tutorial. If I do a trace() on getBytesTotal I get 0 (zero). And the gotoAndStop(2) doesn’t work either (even without the “if” statement). So I’m thinking the problem is probably the way I reference the “main.swf” with _level1.etc…
What’s the correct syntax then?
It looks right from everything I read everywhere, but I guess I missed something…
I’m puzzled and getting very frustrated over this one… HELP!!!
yeah at a quick glance it looks alright, lemme look at it a little further and if I cant see anything Ill make an example and see if I cant get it to work for me…
another thing: iI just tried commenting the
//_root.gotoAndStop(4);
and the “main.swf” loads… But of course “preloader.swf” never get to frame 4…
So the reference to the _level works and the problem is somewhere else…
I’m getting trully confused now…
driving me more and more crazy!!
ok most likely whats going on is that since you are checking the level directly after (well only one frame) you try to load the swf, _level1 is still not defined by the time that code runs. It will be, to flash, undefined. Hense both getBytesTotal and Loaded will also both be undefined and hense immediately equal to each other so you’ll go to frame 4 pretty fast. Also at that time _level1.gotoAndStop is called but since level 1 still isnt defiened at this point, it never gets to frame 2.
I did a post on here either in this forum or the mx forum about loading movies and how this happens with levels.
I could never have thought about that…
A few days that I’ve been looking in the completely wrong direction (is that english? not my 1st language… sorry!)…
Ho, well…