-
[Stuck] can't loop through imported SWFs
[I originally posted to AS3, before realizing that I had given up on AS3 after several hours... now trying to get AS2 to work]
Flash 10, CS4, AS2
Learned experts,
Just upgraded to CS4, and I can't figure out how to load one .swf after another, allowing each to be run once, and only once. I don't think I should have to alter the target movies, as I should be ale to tell when the laoded movie is at it's last frame.
So I have an string[] that holds the filenames of the target swfs to load. In effect:
movieURL = "path/to/movie.swf"; // changes based on loaded URLs in an array
mcHolder.loadMovie(movieURL, "mcHolder") // anchor Movie in Library
while (mcHolder._currentFrame < mcHolder._totalFrames) {
// let movie play once...
}
..on the main timeline. "mcHolder" is the exported, and instance, name of a blank Movie in the library. It is the only object in the main/parent movie.
But this does not work. All I want is to go through each movie, in the order of the array. I already know how to iterate through the Array.
What I need is a way to tell when the running movie is at the last frame so I can use loadMovie() to load another movie and run it.
I tried Loader(), but it was a real pain to get it work, and I never got close. I'm stuck!
TIA!
pat
-
hmmm, your situation is a bit more complicated than it meets the eye.
please do try to zip everything and post it here.
A lot more code than that will have to be implemented.
-
toltec7,
Thanks, but there is no solution. A flash file only needs one frame, so frame count is a poor way to determine if a file is done. In addition, a flash file can use labels and frame #s to loop itself, and never reach the last frame.
Thus, the only solution was to time each for a given period. Yuo know, giving each a fair, equal shake.
The problem now (the only one left) is how to play a remote swf file locally. I started a thread here (http://board.flashkit.com/board/showthread.php?t=797446) to hopefully get past this deal-breaker.
Thanks for writing, though!
pat
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|