dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Actionscript movement

  1. #1
    love is real grumpmonkey's Avatar
    Join Date
    Apr 2001
    Location
    england
    Posts
    173

    [F8] Actionscript movement

    hi,
    I'm having a little problem with a scripted movement on this menu:
    http://www.andrewpawleydesign.co.uk/nandb/index.html
    (the flash menu in the banner).
    there are two main elements
    1. the menu
    2. the background which actually a button

    the menu is positioned of the stage and has this script:
    code:

    onClipEvent (load) {

    _level0.my_hm.targX =2 ;
    _level0.my_hm.targY = -206;


    }
    onClipEvent (enterFrame) {

    cX = _level0.my_hm._x;
    cY= _level0.my_hm._y;
    difX = cX- _level0.my_hm.targX;
    difY = cY- _level0.my_hm.targY;
    setProperty( _level0.my_hm, _x, cX-(difX/5));
    setProperty( _level0.my_hm, _y, cY-(difY/5));
    }



    the button has this code to move the menu back on to the stage:
    code:

    on (rollOver) {
    _level0.my_hm.targX =2 ;
    _level0.my_hm.targY = 0;

    }


    simple stuff....
    now the problem is this. I would like the menu to slide back out on a rollout. but if i put this code on the button. as soon as i rollover he menu it tries to move out again. Follow?
    So my question is where should i put my rollout action to make the menu dissapear?
    many many thanks for your help.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    on (rollOut) {
    _level0.my_hm.targX = 2 ;
    _level0.my_hm.targY = -206;
    }

    like this?

    gparis

  3. #3
    love is real grumpmonkey's Avatar
    Join Date
    Apr 2001
    Location
    england
    Posts
    173
    Hey gparis thanks for the speedy reply.
    I've already tried this, you would think it would work but it doesn't, the problem is that as soon as i roll onto the menu i rollout of the button. Is ther a why of setting some sort of 'roll off swf' command so that we one rolls out of the menu banner it flies up?
    cheers for your help

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