5 Replies Latest reply on Aug 9, 2011 5:58 AM by Ned Murphy

    Cloning text without any relationship...how ?

    Envirographics Level 1

      Hi

      Flash CS5

      I wish to e.g create a clone of a text box, I have named the text in properties, I select it and go copy paste in place and it is also with the same property name, so any coding affecting the one will affect that one also. If I rename this in properties maybe I will be ok and ind that it now is seen independently of the original item.

       

      It seems that copy paste creates a linked item, delete or alter the one and the other ones changes also.

       

      What's the best way to utilise something you have created and make a clone  to then modify this without the source also being influenced by the changes ?

       

      Envirographics

        • 1. Re: Cloning text without any relationship...how ?
          Ned Murphy Adobe Community Professional & MVP

          If you copy and paste a textfield and it has the same instance name, only one of them will work with code.  You need to name them differently to have get text assigned to them using code.

           

          For objects such as movieclips, or other library symbols, if you copy and paste them on the stage, they are still the same library symbol, so canging one changes all of the instances.  If you want to create different instances you need to duplicate them in the library, not on the stage, and you need to be sure they do not contain other library symbols that might be changed as well.

          • 2. Re: Cloning text without any relationship...how ?
            Envirographics Level 1

            Hi,

            Understood on MC's in lib etc.

            For the text box it was that I simply wanted to ensure I used the same text attributes and so by copy>paste in place that would see to that, I dont wish to have code assign text to that box as such. So if I retype in the text I want in the cloned box and rename the box in properties, its then not going to be affected by anything.....yes ?

             

            Your mention of having code assign text to a box sounds useful, didnt know that was possible :-)

             

            I must find out more !

             

            Envirographics

            • 3. Re: Cloning text without any relationship...how ?
              Ned Murphy Adobe Community Professional & MVP

              If you are not assigning text to a textfield using code you should use static textfields.  When ypu place textfields on the stage manually, there are three types you can select for that textfield... static, dynamic, and input.  Static is best if you have no intention to assign text using code.  You do not need to (actually can not) assign a name to a static textfield... and if you weren't planning the use code, you wouldn't have to assign a name for any of them.

               

              Using a static textfield gives you the benefit of not needing to embed the font.  All characters that you write into a static textfield are saved as if they were drawn in.

              1 person found this helpful
              • 4. Re: Cloning text without any relationship...how ?
                Envirographics Level 1

                <<If you are not assigning text to a textfield using code you should use static textfields>>

                We are not assigning text to the field but having the text box visibility on or off with code.

                 

                ... and are coding them as such, we have six district titles all named in properties, at the moment, e.g  for when District4 is viewed :-

                 

                DistrictTitle1.visible=false;
                DistrictTitle2.visible=false;
                DistrictTitle3.visible=false;
                DistrictTitle4.visible = !Title4.visible
                DistrictTitle5.visible=false;
                DistrictTitle6.visible=false;

                 

                I can see as you say that static text has no ability to be recognised in code, so they must be dynamic text.

                 

                We will as you say need to embed the font.

                 

                Something else to discover how to do.

                 

                Envirographics

                • 5. Re: Cloning text without any relationship...how ?
                  Ned Murphy Adobe Community Professional & MVP

                  If you are manually planting the textfield on the stage, in the properties panel you should see a button labelled "Embed..." that you can use to assign characters to the textfield for the font being used for it.

                  1 person found this helpful