A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Slide outs HELP! *SOB*

  1. #1
    Junior Member
    Join Date
    May 2002
    Posts
    14
    I have created a rollover slide out effect in flash..
    when I rollover the botton a movie clip plays and it slides out, now my problem is that when I rollout and the move clip is half way "out" I need it to slide back from that half way possition. hos do I do this Please help me

    Bruce

  2. #2
    Denim Demon
    Join Date
    Jun 2002
    Location
    Outside of society
    Posts
    514
    Ah. . . no problem.
    First of all, don't use motion tween. Use a script that updates the _x position.
    Here you go. . .

    First what I did was make a button that set a variable called onIt:

    on (rollOver) {
    onIt=true;
    }
    on (rollOut) {
    onIt=false;
    }


    Then I named my slide out object instance name "slider."
    [Edited by davyPaycheck on 08-14-2002 at 10:42 AM]

  3. #3
    Denim Demon
    Join Date
    Jun 2002
    Location
    Outside of society
    Posts
    514

    continued from previous post

    Then this code goes on the slider movie clip:

    onClipEvent (enterFrame) {
    if (this.onIt==true) {
    if (_root.slider._x<557) {
    _root.slider._x+=20;
    }
    }
    }
    onClipEvent (enterFrame) {
    if (this.onIt==false) {
    if (_root.slider._x>295) {
    _root.slider._x-=20;
    }
    }
    }

  4. #4
    Denim Demon
    Join Date
    Jun 2002
    Location
    Outside of society
    Posts
    514
    You can update the numbers to suit your needs.


    Now here's a question: why do my posts on FK get cut short?

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