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

  1. #1

    Default mouseOver?

    Hi

    I would like a movieclip to move when I the mouse is over (just a couple of
    pixels) and then move back again when the mouse is moved away. I tried with
    this action scripts:

    onClipEvent(mouseMove){
    gammelPosisjon2 = _root.hovedMeny.knapp2._y;
    ny2 = _root.hovedMeny.nyPosisjon2;
    myX = _root._xmouse;
    myY = _root._ymouse;
    if (this.hitTest(myX, myY, false)){
    if (gammelPosisjon2 < 0){
    this._y +=2;
    }
    }
    if (this.hitTest(myX,myY,true)){
    if (gammelPosisjon2 < 6){
    this._y +=2;
    }
    }
    }

    ...but this is apparently only when the mouse actually moves/not moves over
    the clip. Are there any kind of "mouseOver" actions or something which I can
    use, or any other way to do this.

    I am useing this an my buttons (which I each is inside a moviecklip), which
    I want to move when the mouse is over

    thanx
    nicco

    --
    __________________________________

    Nicolaj Tidemand
    Gullhauggrenda 33
    1354 Bærums Verk
    Tlf. privat: 67561827
    Mobil: 93440975
    Hjemmeside: [url]www.stud.ntnu.no/~nicolaj[/url]
    __________________________________


    Nicco Guest

  2. Similar Questions and Discussions

    1. Message on mouseover
      Please link to the following for understand the question I have ----> http://www.ca.com/channel/cpp/ Please mouseover OEM or SMB or ESP etc and...
    2. mouseover effect
      I want to create a mouseover effect which colors the row when the mousepointer goes over a row. I use this code in the itemDataBound event If...
    3. mouseOver not rollOver
      On Flash 5, I want to go to the previous frame when the pointer is over the button. With rollover, it goes one frame at a time as I have to roll...
    4. Best Mouseover script
      Hi all, A really simple question but that has caused some problem to me: What is the best script to use if I want the cursor to change to a...
    5. MouseOver events?
      Mark wrote: In Access it's the On Mouse Move event. Look that up in Help and see if that will do what you want. hth Hugh
  3. #2

    Default Re:mouseOver?

    so you mean you want it be in a constant state of movement when the mouse is over? not just an on(rollOver) event handler? try this:

    onClipEvent(enterFrame){ //attached to a MC, constantly executed
    if(this.hitTest(_root._xmouse, _root._ymouse,true){
    //your movement script
    }
    }

    HTH


    -beally-
    -------------------------
    &quot;Senior Member&quot; - experienced at messing things up
    CurrentProject - feedback appreciated
    abeall webforumsuser@macromedia.com Guest

  4. #3

    Default Re: mouseOver?

    i think you've misunderstood the use of the true and false flags for
    hitTest - these are not whether the clip has been HIT or not, but whether to
    test for the clips actual shape (true), or it's bounding box (false).

    So, to use abeall's script as a basis, at it's most basic you could use
    something like:

    onClipEvent (enterFrame) {
    //attached to a MC, constantly executed
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
    //your move away script
    } else {
    //your move back script
    }
    }


    HTH
    }`¬P



    "Nicco" <nicolaj@online.no> wrote in message
    news:bgm6e1$264$1@forums.macromedia.com...
    > Hi
    >
    > I would like a movieclip to move when I the mouse is over (just a couple
    of
    > pixels) and then move back again when the mouse is moved away. I tried
    with
    > this action scripts:
    >
    > onClipEvent(mouseMove){
    > gammelPosisjon2 = _root.hovedMeny.knapp2._y;
    > ny2 = _root.hovedMeny.nyPosisjon2;
    > myX = _root._xmouse;
    > myY = _root._ymouse;
    > if (this.hitTest(myX, myY, false)){
    > if (gammelPosisjon2 < 0){
    > this._y +=2;
    > }
    > }
    > if (this.hitTest(myX,myY,true)){
    > if (gammelPosisjon2 < 6){
    > this._y +=2;
    > }
    > }
    > }
    >
    > ..but this is apparently only when the mouse actually moves/not moves over
    > the clip. Are there any kind of "mouseOver" actions or something which I
    can
    > use, or any other way to do this.
    >
    > I am useing this an my buttons (which I each is inside a moviecklip),
    which
    > I want to move when the mouse is over
    >
    > thanx
    > nicco
    >
    > --
    > __________________________________
    >
    > Nicolaj Tidemand
    > Gullhauggrenda 33
    > 1354 Bærums Verk
    > Tlf. privat: 67561827
    > Mobil: 93440975
    > Hjemmeside: [url]www.stud.ntnu.no/~nicolaj[/url]
    > __________________________________
    >
    >

    Peter Blumenthal 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