Ok I have posted this on Actionscript also, but I really need a quick answer if possible and more people tend to look here…
I am loading different submovies into a movie clip symbol on my main movie timeline, and am using an “OnClipEvent” action to find out how much is loaded etc.
To do this I have attached the following script to the movie clip symbol the sub movie is loading into. The instance of this movieclip symbol is called “BGtarget”:
I have another movie clip symbol on my main timeline called “shutters” which is basically my loading sequence. It shows the percentage loaded, and has a vertical loading bar which scales up.
On frame 31 of “shutters” I have the following code:
if (_root.BGtarget.percent>99.9) {
gotoAndPlay(32);
}
stop();
if (_root.BGtarget.percent>99.9) {
gotoAndPlay(32);
}
if you are wondering why I have the same command before and after the “stop();” it was just too ensure no stupid syntax error (eg. tell it to go to 32, but then tell it to stop so it doesn’t go to 32) - its not important, it should work anyway.
I want it to go and play frame 32 of “shutters” when loading is complete.
What it does:
scales the bar fine
increases percentage fine.
However it gets to 100% then stops. Nothing happens after that, it fails to goto frame 32 and play it?
WHY IS THIS!??!
It works fine offline, just online it wants to do this for some unknown reason, please help!
The movies that are loading in are different backgrounds.
A friend checked the link out and he says that the first background loaded in fine for him but when he went to change background it got stuck at 100%, until he clicked the button to change it and then it loading in fine - still a problem.
For me its gets stuck on loading the first background in and everyone after that first time.
i think that its not working because you don’t have a loop there. Try this… in frame 32 of shutters put this code:
gotoAndPlay(_currentFrame - 1)
and then change the numbers in frame 31 to tell it to go to frame 33. That should work. then you can adjust your frames after that.
The problem is: There is no loop. Once your frame is played, it stops checking the if statement because it isn’t called again. Remove the stop() and do what i said above and it should work.
I thought initially the looping needed would be provided by the onclip event enterframe action, I even tried something similar to the solution at one point I must have enterred something wrong cause even then it didn’t work
Looking through somebody elses .Fla is often very difficult and time consuming (I know from experience) especially if its this kind of problem, I really appreciate it!