2 Replies Latest reply on Dec 2, 2007 8:52 AM by (John_Fraser)

    Substituting symbols at runtime in Flash CS3

      Can symbols be substituted at run time in a similar way that dynamic text can be altered by flash coding at run time? What I am aiming at is the program decides what to present to the user using just one bit of timeline and one set of frames (which would incorporate motion tweening and I guess some action script). So the program might show a lion chasing a dog, or a dog chasing a cat, or a cat chasing a rat... without all these having to be explicitly individually created on the stage.

      One not-very-elegant solution that occurs to me, could be to have multiple sets of layers showing each of these, occupying the same bit of timeline, and to dynamically set alpha to zero for unwanted symbols. But I think there must be more elegant solutions. And my solution might mean multiple editing changes were needed if I wanted to change the start position of the tween, for instance. And the code would be 'majorly' revisited to add new animal choices.

      Any suggestions? (I should be able to understand most explanations - I am an experienced procedural languages programmer, but I am new to Flash - I've been learning to use it for less than a month.) If the answer is Actionscript 3 code, then a quick mini-example of the type of instructions would be great!

      Many thanks
      John