A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Scripting Questions & mouse values

  1. #1

    Scripting Questions & mouse values

    I have made a small slide show. It is controlled by a "filmstrip" that I have applied a small script to, to make it horizontally navigateable. I got the code from this tutorial:

    http://www.flashkit.com/tutorials/In...-744/index.php

    And I can get it to work, sort of. Attached is the sample .fla. When I publish, My mouse is activating the scroller, but not only when it is actually over the scroller. Here is the script:

    onClipEvent (mouseMove) {
    xmousepos1 = _xmouse;
    ymousepos1 = _ymouse;
    if (xmousepos1>xmousepos2 && ymousepos1>-98 && ymousepos1<-33) {
    _root.scrollclip.nextFrame();
    }
    if (xmousepos1<xmousepos2 && ymousepos1>-98 && ymousepos1<-33) {
    _root.scrollclip.prevFrame();
    }
    if (ymousepos1<-98 || ymousepos1>-33) {
    play();
    }
    xmousepos2 = _xmouse;
    ymousepos2 = _ymouse;
    }

    Now, the tutorial told me, that I would have to alter the values-98, and -33, to fit my own movie. Problem is, I don't know what these relate to, or what to change them too...Any ideas? I have been trying to bust this out for two days, and just can;t get it right...Please assist!

    Q

  2. #2
    Senior Member Adam14's Avatar
    Join Date
    Feb 2004
    Location
    Ontario Canada
    Posts
    1,116
    I just read through the tutorial, those numbers have to do with the height of your "strip" and also the relation to where the strip is on your stage. You want the menu to scroll when the mouse isn't on it, but once the mouse is over it you want something else to happen. These values check if the mouse is over it or not. Read, the last page of the tutorial again, it tells you how to go about fine tuning it. Hope this clarifies it in any way.

    Adam

  3. #3
    Thanks, but where do I find my values? Just by using the rulers?


    Q

  4. #4
    Senior Member Adam14's Avatar
    Join Date
    Feb 2004
    Location
    Ontario Canada
    Posts
    1,116
    I've never used rulers, but I did up a quick fla for you which, hopefully, should be able to give you your values.

    Adam
    Attached Files Attached Files

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center