dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: 3d menu sequence

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    7

    3d menu sequence

    I am using the following code to rotate a 3d wheel that is a image sequence...it works!!!! but, I only want it to work in a certain area. How can i constrain this to work within a specific y coord.

    here is the code:

    onClipEvent(load){
    stop();
    speed = 15;
    }
    onClipEvent(mouseDown){
    xRef = _root._xmouse;
    frameRef = _currentFrame;
    }
    onClipEvent(mouseMove){
    if (Key.isDown(1)){
    frame = (frameRef + Math.floor((_root._xmouse - xRef)/speed)) % _totalframes;
    if (frame <= 0) frame = _totalframes + frame;
    gotoAndStop(frame);
    }
    }

    Thank you for you time and help!
    Last edited by designhustler; 06-26-2004 at 07:04 AM.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    add another condition in your statement:
    if(_root._xmouse>100 &&_root._xmouse<300)
    etc.. same for _ymouse if you want too.

    gparis

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