Hi,
I’ve successfully used a preloader that I built from a tutorial on the internet. In the movie where it is functioning correctly, all the actions are on the main timeline.
But now I’m trying to use the same preloader for a movie where the main action, instead of being on the main timeline, is a movieclip of about 60 frames that is controlled by buttons on the main timeline. When I tried using the same preloader setup as I had used previously, it didn’t work. I’ve tried various changes, but my limited ActionScript knowledge isn’t up to the task.
For the preloader in its original configuration, two layers are added to the main timeline, each having five frames. Five empty frames are added to each of the other layers, so that their starting points line up where the preloader layers’ frames end. The preloader layers are:
Actions Layer: Five empty keyframes, with the code gotoAndPlay(1); in the fifth frame (so that the preloader loops until the loading is completed).
Preloader Layer: The first five frames are keyframes that have the “Loading” message. The sixth frame is a keyframe labeled “start.” Following the sixth keyframe are a bunch of empty frames that span the length of the main timeline. At the end of this layer is a keyframe labeled “end.” The first keyframe of this layer has the code:
ifFrameLoaded ("end") {
gotoAndPlay ("start");
}
So, my question is, can I adapt the script so that it will work in a situation where the main action is not on the main timeline but is, instead, a movieclip? If so, how would the code or setup be changed to do that? Or is a completely different approach needed?
Thanks!
Bill
I’ve successfully used a preloader that I built from a tutorial on the internet. In the movie where it is functioning correctly, all the actions are on the main timeline.
But now I’m trying to use the same preloader for a movie where the main action, instead of being on the main timeline, is a movieclip of about 60 frames that is controlled by buttons on the main timeline. When I tried using the same preloader setup as I had used previously, it didn’t work. I’ve tried various changes, but my limited ActionScript knowledge isn’t up to the task.
For the preloader in its original configuration, two layers are added to the main timeline, each having five frames. Five empty frames are added to each of the other layers, so that their starting points line up where the preloader layers’ frames end. The preloader layers are:
Actions Layer: Five empty keyframes, with the code gotoAndPlay(1); in the fifth frame (so that the preloader loops until the loading is completed).
Preloader Layer: The first five frames are keyframes that have the “Loading” message. The sixth frame is a keyframe labeled “start.” Following the sixth keyframe are a bunch of empty frames that span the length of the main timeline. At the end of this layer is a keyframe labeled “end.” The first keyframe of this layer has the code:
ifFrameLoaded ("end") {
gotoAndPlay ("start");
}
So, my question is, can I adapt the script so that it will work in a situation where the main action is not on the main timeline but is, instead, a movieclip? If so, how would the code or setup be changed to do that? Or is a completely different approach needed?
Thanks!
Bill