I am building, block by block a project that will have about 350 frames. There are similarities and differences between frames that would allow copying and pasting large blocks of frames to create new blocks. Navigation would be within blocks. After completing a block, there would be a need to go to the next block.
In the first several frames that I've set up, (a frame 1, frame 2 and 9 additional frames representing a small version of a block, I've noticed that a dynamic text box, button, variables seem to need unique names for each key frame (they're all key frames). If I accidently duplicate a frame, and fail to rename (instance names) items, functions I get debug errors: identifying duplicate items. So it appears that each frame (in what will be 350) will need the script edited and changing names for any of these items.
That's the question: assuming that I will need to stay with my 350 frame design, are there any possble economies of naming that I can use? The discreet blocks are (in number of frames) 16, 16, 70, 70, 70, 70 (plus a landing frame before each block, and a few frames at the end, after the last block for scores, results, discussion.
Any suggestions appreciated.
If you need to repeat code in different frames, then you need to come up with unique names for variables and functions. How you go about naming tthem is your call, whatever makes sense to your way of thinking.
One thing to consider though... if you think you need to create the same functions in different frames, there is agood possibility that you do not have to. You can usually work out some way of having the same single set of functions and variables working for you along the entire timeline, only needing to define them once in frame 1. In your other posting today you saw that extending the variable along the timeline makes it available for that whole extent. The same applies to functions, and you can often write functions generically so that they can serve the same purpose at different locations along the timeline.
Instance names won't be a problem except if you have the same objects in adjacent frames and try to change the names between them. Instance names are inherited by same objects in preceding adjacent frames.
Thanks, Ned for your helpful suggestions.
I guess I can make the task easier by using find/replace in each frame script.
I wondered if another option is to build 4-6 separate smaller projects (FLA's), then somehow import and combine them? I'm not familiar with using other Flash items inside of a "primary" project, but wonder if this would offer additional possibilities? If items have same names in separate projects, then imported in, can this in any way work? Just don't want to have multiple final files. Would like final compile to include everything, if possible.
The 4 larger items (70 + frames each) are basically the same, except a few tweaks. So potentially re-useable, if I can figure out how without naming conflicts.