actionscript newbie trouble

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default actionscript newbie trouble

    hi there, i'm trying to trigger a colour change in an movie clip as i drag it over another on, sounds simple but its driving me mad, any help would be great

    dr_ross Guest

  2. Similar Questions and Discussions

    1. actionscript newbie
      I am trying to create a very simple interface. I have a button and grey square filled with text off the screen. What I want to happen is this:...
    2. Hide button in actionscript. (newbie)
      Hi, I have a button in my movie that i'd like to make disappear when a value reaches a certain limit. The script for the button is: on...
    3. Actionscript newbie: simple stop issue
      Hello everyone. I'm trying to get a nested movie to stop playing when a 'stop' button is clicked. This movie is nested within two other movies,...
    4. Newbie Trouble with Settings
      I recently upgraded to Flash MX and am having trouble setting it so that when you are drawing a rectangle or oval or anything actually you can see...
    5. Newbie: Trouble w/ O'Reilly example
      I am trying to work with example code from "Programming PHP" chapter 8. The example is the "Business Listing" application. All the files are in...
  3. #2

    Default Re: actionscript newbie trouble

    if mc2 is your draggable movieclip and you want to change its color when it
    collides with mc1, attached to mc2 you can use:

    on (press) {
    this.startDrag();
    testI=setInterval(_root.testF,100);
    }
    on (release) {
    this.stopDrag();
    clearInterval(testI);
    }

    and attached to a frame use:

    myC = new Color(mc2);
    function testF() {
    if (mc1.hitTest(mc2)) {
    myC.setRGB(0xff0000);
    } else {
    myC.setRGB(0xffff00);
    }
    }

    kglad Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139