1 Reply Latest reply on Apr 24, 2008 5:03 PM by Newsgroup_User

    new to director mx 2004

    dexs345
      i am new to director know the basics really with lingo. not comming from a programming background i would like to meke a game where images are falling from the top of the screen to the bottom.

      this i have done in a predefined order. image1, image2, image3... and so on but i would like to add bit of random code that makes the image drop in a random order ther are 5 images and if the images is clicked on the image will dissapear and a finish sign will appear.....

      the lingo i have at the moment for one pic is as follows....

      on mouseDown
      global totalScore
      if the clickon=1 then
      sprite(1).member="empty"
      totalScore = Score + 1
      put totalScore into field "Score"
      end if



      end

      on enterFrame
      if sprite(1).locV > 400 then
      sprite(1).locV = 200
      else
      sprite(1).locV = sprite(1) .locV + 1
      end if

      if this is too long to explain then accept my appologies.

      regards

      Dexter
        • 1. Re: new to director mx 2004
          Level 7
          dexs345 wrote:
          > i am new to director know the basics really with lingo. not comming from a
          > programming background i would like to meke a game where images are falling
          > from the top of the screen to the bottom.
          >
          > this i have done in a predefined order. image1, image2, image3... and so on
          > but i would like to add bit of random code that makes the image drop in a
          > random order ther are 5 images and if the images is clicked on the image will
          > dissapear and a finish sign will appear.....
          >
          > if this is too long to explain then accept my appologies.
          >
          > regards
          >
          > Dexter
          >

          Assuming you have already done the falling image (if not use a tween
          place the image at the top for the start and where you want it to end
          for the end. The number of frames you use for the tween and the number
          of frames per second will determine the smoothness of that animation.
          To make the image disappear, just add a script to the member that make
          it disappear when clicked such as:

          on mouseUp
          set the visible of sprite x to FALSE (or) sprite(x).visible = 0
          end

          x of course is the sprite channel you assigned the image to.