A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Switching Rotation Direction

  1. #1
    Member
    Join Date
    Dec 2000
    Posts
    73
    I have a MC on the stage which I have finally managed to get rotating using:

    onClipEvent (enterFrame) {
    _rotation = RotateBox;
    RotateBox = RotateBox+5;
    }

    on the MC.

    Is it possible to reverse the rotation when the mouse is over the MC,
    I've tried using an invisible button with the folowing

    on (release) {
    tellTarget ("_root.box") {
    _rotation = n;
    }
    n = -5;
    }
    but it doesn't work

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    237
    heeee

    try

    n=n-5

  3. #3
    Here, try this.
    The script on the MC should read:

    onClipEvent(load){
    rot = 5;
    }
    onClipEvent(enterFrame){
    _rotation += rot;
    }


    Place the invisible button within rotating MC and use the following script on the button:

    on(rollOver){
    rot = -rot;
    }
    on(rollOut){
    rot = -rot;
    }

    Let me know how you get on.

    Bingoman

  4. #4
    Senior Member
    Join Date
    Nov 2000
    Posts
    237
    ohh somthing wrong...

    give this action into blank mc

    and give action to button goto and play blank mc

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi..
    Your codes fine, just needs a couple of adjustments:

    onClipEvent (load) {
    _root.rot = 5;
    }
    onClipEvent (enterFrame) {
    _rotation +=_root.rot;
    }

    If your buttons are in the MC then do the same.

    Good luck.

  6. #6
    Member
    Join Date
    Dec 2000
    Posts
    73
    thanks bingoman,

    worked a treat..

    Originally posted by bingoman
    Here, try this.
    The script on the MC should read:

    onClipEvent(load){
    rot = 5;
    }
    onClipEvent(enterFrame){
    _rotation += rot;
    }


    Place the invisible button within rotating MC and use the following script on the button:

    on(rollOver){
    rot = -rot;
    }
    on(rollOut){
    rot = -rot;
    }

    Let me know how you get on.

    Bingoman

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