dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Possible to disable onRollOver???

  1. #1
    Chemist
    Join Date
    Oct 2002
    Location
    San Francisco
    Posts
    204

    Possible to disable onRollOver???

    I am trying to disable and enable onRollOver of certain buttons based on what is clicked and I can't seen to get it to work. This is the code I am working with:

    Code:
    but1.onPress = function() {
    	but1.onRollOver.enabled = false;
            but2.onRollOver.enabled = true;
    }
    but2.onPress = function() {
    	but1.onRollOver.enabled = true;
            but2.onRollOver.enabled = false;
    }
    Thanks a lot for any help!

  2. #2
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    delete but1.onRollOver;

    enable goes for the whole button, all actions..

    but1.enabled = false;

    for example.

  3. #3
    Chemist
    Join Date
    Oct 2002
    Location
    San Francisco
    Posts
    204
    I want the button enabled still. I just need the onRollOver state turned off.

    Thanks for your help!!!

  4. #4
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    I posted how to removed the RollOver..

    I was stating that 'your enable usage' is ONLY for the whole button.

  5. #5
    Chemist
    Join Date
    Oct 2002
    Location
    San Francisco
    Posts
    204
    Whispers,
    After deleting the onRollOver on the button, how would I get the onRollOver back? I want to be able to turn onRollOver off/on

    Thanks!!!

  6. #6
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    add you rollOver code again.. or make a function that does it for you.. so you just call a function, instead of adding the code each time..

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