5 Replies Latest reply on Nov 18, 2014 12:40 PM by kglad

    Can't create property if instance has a name

    Karaczono

      Hi

       

      In one FLA file I have two symbols: Symbol1 and Symbol2

      Symbol1's instance name is 's1'

      Symbol2's instance name is 's2'

      Both symbols I exported to the run time shared library

       

      If I add to the stage the Symbol1 and then write code: trace(s1.s2); then I can see in output: [object Symbol2]

       

      Next if I:

       

      -create new FLA file, and import those assets to it

      -import SWC of previous FLA to that one

      -add to the stage Symbol1

      -edit instance name of Symbol1 and set it to 's1'

       

      then write code: trace(s1.s2); then I can see in output: [object Symbol2]

       

      Everything works fine till now.

       

      But if I in that first FLA file where are both symbols, I edit class definition for Symbol1 and saved it as Symbol1.as

      If I test that first FLA everything is OK

      but if I test second FLA that import assets

      that also has the same code: trace(s1.s2); then I can see in output: Access of possibly undefined property s2 through a reference with static type Symbol1.

       

       

       

      What is wrong?