0 Replies Latest reply on Aug 30, 2006 11:26 PM by Newsgroup_User

    Help needed when dynamically creating new stage sprites

    Level 7
      Morning folks,

      I'm feeling very rusty when asking this question! It feels like I should
      know the answer but simply unable to comprehend where I'm going wrong at the
      moment!!

      I'm in the process of creating a Director piece that involves the user
      having to drag "shapes" onto a pre-defined grid [drag and drop style] --
      there are currently three different types of shape that can be dragged of
      which many of the shapes can be of the same type. So I need to display the
      three shape types on one side of the screen and allow the user to drag and
      drop as many as they wish to the girded area.

      I've written the drag and drop routine but now having difficulty in
      producing the dynamic creation of a new draggable shape; so far I've managed
      to create a new "shape" sprite from my cast library and placed it in the
      correct location. Then I create and add a new instance of my "Drag and Drop"
      behaviour onto the newly created sprite, but this is where it goes wrong --
      although I can drag the dynamically created sprite, once dropped Director
      complains of not knowing what its local properties are, for example I'm
      unable to reference the locH and locV of the newly created sprite!

      I'm really at a loss on this one and would appreciate any kind of guidance!

      Many thanks in advance, Mark ;-)