Please Help - Path Problems

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

  1. #1

    Default Please Help - Path Problems

    Hi,
    this is a question about a movie found under [url]www.flashkit.com[/url] >
    Movies: Scripting : Physics : Elastic Button.

    If I try to put the 'Bouncing Button'movie clip into another movie
    clip the script won´t work anymore.
    I think it has something to do with the targetpathes !? Any sugestions
    ?
    Thanks
    script for Flash MX:

    onClipEvent (enterFrame) {
    k = 0.8;
    damp = 0.7;
    orgzx = _width;
    orgzy = _height;
    zx = _width;
    zy = _height;
    lower = _x-(_width*0.5);
    higher = _x+(_width*0.5);
    bottom = _y+(_height*0.5);
    top = _y-(_height*0.5);
    scale = 3;
    }
    onClipEvent (enterFrame) {
    inside = (_root._xmouse>=lower) && (_root._xmouse<=higher);
    outside = (_root._xmouse<lower) || (_root._xmouse>higher);
    func = (_root._ymouse<top) || (_root._ymouse>bottom);
    if (inside) {
    zx = orgzx*scale;
    zy = orgzy*scale;
    }
    if (outside) {
    zx = orgzx;
    zy = orgzy;
    }
    if (func) {
    zx = orgzx;
    zy = orgzy;
    }
    ax = (zx-_width)*k;
    vx += ax;
    vx *= damp;
    _width += vx;
    ay = (zy-_height)*k;
    vy += ay;
    vy *= damp;
    _height += vy;
    }
    Diamonos Guest

  2. Similar Questions and Discussions

    1. importFileInto path problems
      Hi! I have problems with the paths that use this function with each situation. In projector author or local shockwave I can pass the all path or...
    2. Path problems
      There's the searchCurrentFolder property that's set true by default. OF course Quicktime must be installed on the windows system ( not standard...
    3. graphics path problems
      I've had this problem before and can't remember how to repair it. when I publish my move, I get an error that a graphic cannot be found. I see...
    4. SWF export path problems
      When exporting from Freehand MX to swf the paths of my illustration in certain instances change line weights they are OK in the freehand swf preview...
    5. Path problems on PC to mac transfer
      I've created a crossplatform project. I am using a MAC with Toast to burn my CDs. At this point in time I'm only interested in burning the PC side...
  3. #2

    Default Please Help - Path Problems

    Hi,
    this is a question about a movie found under [url]www.flashkit.com[/url] >
    Movies: Scripting : Physics : Elastic Button.

    If I try to put the 'Bouncing Button'movie clip into another movie
    clip the script won´t work anymore.
    I think it has something to do with the targetpathes !? Any sugestions
    ?
    Thanks
    script for Flash MX:

    onClipEvent (enterFrame) {
    k = 0.8;
    damp = 0.7;
    orgzx = _width;
    orgzy = _height;
    zx = _width;
    zy = _height;
    lower = _x-(_width*0.5);
    higher = _x+(_width*0.5);
    bottom = _y+(_height*0.5);
    top = _y-(_height*0.5);
    scale = 3;
    }
    onClipEvent (enterFrame) {
    inside = (_root._xmouse>=lower) && (_root._xmouse<=higher);
    outside = (_root._xmouse<lower) || (_root._xmouse>higher);
    func = (_root._ymouse<top) || (_root._ymouse>bottom);
    if (inside) {
    zx = orgzx*scale;
    zy = orgzy*scale;
    }
    if (outside) {
    zx = orgzx;
    zy = orgzy;
    }
    if (func) {
    zx = orgzx;
    zy = orgzy;
    }
    ax = (zx-_width)*k;
    vx += ax;
    vx *= damp;
    _width += vx;
    ay = (zy-_height)*k;
    vy += ay;
    vy *= damp;
    _height += vy;
    }
    Diamonos 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