8 Replies Latest reply on Oct 17, 2016 12:22 PM by kglad

    Word construct

    nuurx23171713

      Hi, I'm new to flash animate. I wanted to create ABC word construct game. basically the student will create words from the given letters.  Lets say, I have the letters CTA, and wish to make the word CAT out of them, I want those letters to be draggable which I was so far able to achieve but  would also like to check the sequence in which the student have placed the letters to make sure he is right. this i wasn't able to achieve. is there a code that can check the sequence of letters? My other question, can you make a movie clip object into a  variable, for example if A1 is a movie clip, how would you make it a variable?

       

      help me please with this, if you're pro at flash, I would appreciate if you could make an example

       

      A1= letter A

       

      this is the code I'm using for dragging

       

       

       

       

      A1.addEventListener(MouseEvent.MOUSE_DOWN, dragTheObject);

      A1.addEventListener(MouseEvent.MOUSE_UP, item1Release);

       

       

       

       

      function dragTheObject(event:MouseEvent):void {

      var item:MovieClip=MovieClip(event.target);

      item.startDrag();

      var topPos:uint=this.numChildren-1;

      this.setChildIndex(item, topPos);

      }

       

      function item1Release(event:MouseEvent):void {

      var thisItem:MovieClip=MovieClip(event.target);

      thisItem.stopDrag();

      };