2 Replies Latest reply on Oct 6, 2007 10:31 AM by abeall

    Editing a Rich Symbol with a Script

      Scenario: I made a rich symbol. I made a symbol script to manipulate some features of this symbol (like text, or the fill color of a rectangle in the background, etc). Later on, I wanted to add another text area, so I edited the symbol and added one. Presto: all of my existing instances, on the .png, now had this object. (Hooray, halfway done.)

      I saved this symbol over my old version in my common library. Then I chose Modify > Symbol Script and set the new text field to have mutable textChars for the one in the common library. I grab this symbol from the Common Library tab and drop it into my .png. I get a message that says:

      One or more library items already exist in the document
      (radio button) Don't replace existing items
      (radio button) Replace existing items

      I hit replace, but my new instance of the symbol doesn't have the new scripted text area in Symbol Properties. Neither do any of my old instances. I try again, grabbing again from the common library, and this time say don't replace, in case I'm just failing to understand utterly, but that doesn't help either.

      If I make a new .png, and drag the symbol over from the Common Library tab, I get a new instance of the symbol that DOES have the new text area script! So I know I made it right. I could just delete the symbol from my library in the original .png, and then reimport the symbol, but I really, really don't want to do that. I currently have upwards of 25 instances of this object in my original .png and manually changing the Symbol Properties (they're all different) for each utterly defeats the point of having made them into symbols. I want to change the template, and thus all of them.

      Is there any way for me to "update" the scripts of existing symbols from one in my common library? The actual physical changes (adding the text area) worked just fine, but the script didn't seem to "take" for some reason. I thought this was the entire point of the "Replace existing items" popup, but I guess not. Any help would be very, very much appreciated.
        • 1. Re: Editing a Rich Symbol with a Script
          heathrowe Most Valuable Participant
          I don't fully understand the scenerio above, but:

          To add an instance of a current Symbol onto your document, drag/drop it from the Library Panel instead of the Component Panel. This will avoid the Replace message.

          • 2. Re: Editing a Rich Symbol with a Script
            abeall Level 3
            So if I understand correctly, when you drag the new instance from the Common Library and choose to replace all existing symbols by the same name, it replaces the symbol contents, but the script/editable properties aren't on any of the old symbols?

            It should work as you'd expect, where all existing symbols are completely replaced and take on the new symbol graphic contents AND the new script. However, I think that what you describe may have been a bug that was fixed in an update. Do you have the latest update for Fireworks? You can check by going to Help > Updates. That will check for any new updates. A number of important updates pertaining to Rich Symbols were made.

            Unfortunately, some of the updates might not be compatible with old symbols(I'm not sure of that), so you may find getting updates won't fix your existing problem, but you shouldn't have this problem in the future.

            JFYI, this is my usual workflow with Rich Symbols:
            1) Create a symbol, don't save it to the common library, usually use 9-slice scaling
            2) Open symbol, edit it a lot, name all my important elements
            3) Close the symbol, create various instances around the canvas in different sizes
            4) Save symbol to Common Library
            5) Create script
            6) Drag instance from Common Library to stage, choose to replace(update) all existing symbols
            7) Now all my symbols have the scripted properties, available in Window > Symbol Properties

            If you are doing something similar(which it sounds like you are) but the script is NOT propogating to your old symbols, then something is amiss, and I'd bet you need an update.

            Good luck.