Tuesday, March 8, 2011
week 10 A
Even after the files were loading, I had a problem with their unloading. At least, I thought I had a problem with their unloading. The files would unload upon self removal. The real problem was that they couldn't pass control back to the parent. The parent couldn't ask the child if it was finished, and the child couldn't tell the parent if that it was finished. No information could be passed to the other. They probably could have, if the script was external. It's internal, however. The only solutions I could come up with were: A] externalize all the scripts, which would have required rewriting the entire project; B] call the parent from the child and jumping to the appropriate frame, which would kill the RAM; or C] check to see if the child is on the stage. 'C' sounds good. I was able get the parent to ask the child what it's index is. Unfortunately, it doesn't pass -1 if not present. Instead, it throws an error. Fortunately, I can still use the error to check this.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment