# Can it be done? - dynamically change script

**URL:** <https://forum.kirupa.com/t/can-it-be-done-dynamically-change-script/263199>\
**Category:** Uncategorized\
**Created:** [June 13, 2008, 9:06am UTC](https://forum.kirupa.com/t/can-it-be-done-dynamically-change-script/263199 "2008-06-13T09:06:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![masskontroll](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@masskontroll](https://forum.kirupa.com/u/masskontroll)\
**Post date:** [June 13, 2008, 9:06am UTC](https://forum.kirupa.com/t/can-it-be-done-dynamically-change-script/263199/1 "2008-06-13T09:06:30Z")

</div>

Hi there! I’m working on a site which has hundreds of frames. Each frame has an extensive piece of script, in which a booktitle is repeated about 50 times. That title is unique to that frame. Right now, I’m copying the script to each individual frame and changing the title with seek & replace. That means I have about 1000 lines of script which are nearly identical. It would be sooo much better, if I could alter the title dynamically with each frame. I would have the ‘master’ script, and a small piece of script which targets the title inside that masterscript.

Like if the title is ‘daylight’, I now use this:  
issue01.container\_mc.loadMovie (“models/daylightT01.jpg”);

Is there a way to use 1 script along the entire timeline, like this:  
issue01.container\_mc.loadMovie (“models/-dynamictitle-T01.jpg”);

…and in the ‘daylight’ frame, I’d use something like “-dynamictitle- = daylight” to change the ‘generic’ booktitle -dynamictitle- to the ‘specific’ booktitle of that frame, causing the script to run the actions specific to that booktitle?

Thanks for reading this all ; ) Any help/suggestions much appreciated!
