Simple AS function question

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Simple AS function question

    Why will this not work

    home_btn.onRollOver = setInterval(delayAction,2000,home);

    function delayAction (framename:String)
    var name:String = framename
    _root.gotoAndStop("name")


    when this does?
    caseman_btn.onRollOver = function ()
    _root.gotoAndStop("caseman")


    I am trying to get delayed reaction to the Rollover
    Thank

    roninDLC Guest

  2. Similar Questions and Discussions

    1. Need Simple Answer to Simple Contribute/Firefox question
      Hello all; I've tried the Adobe help in CS3, tech support, phone support, this forum, other forums, Mozilla, and nowhere can I get a straight...
    2. SImple question?
      Can anyone please tell me how to keep 2 windows open so that as soon as I click on one of them, the other one does not minimise and have to be...
    3. Simple Sorting Function for a Dynamic Table
      Hello everyone, I was wondering if their was a way in dreamweaver to allow your site users to sort the data displayed in a dynamic table on your...
    4. Simple function
      On Tue, Dec 07, 2004 at 14:49:14 -0300, MaRCeLO PeReiRA <gandalf_mp@yahoo.com.br> wrote: Why not use a CASE statement? SELECT id, CASE WHEN...
    5. a function is not called (simple)
      Hi everybody, Why does endFigure(0 is not called? Thanks, Jean Pierre
  3. #2

    Default Re: Simple AS function question

    i'm not sure that you can assign just anything to the onRollOver
    onRollOver is a special event property and the setInterval returns
    a reference to that Interval which i doubt can be assigned to onRollOve

    try this




    findapollo Guest

  4. #3

    Default Re: Simple AS function question

    that works, but is there a way to delay the rollover altogether. That way if a user cuts across another button the menu doesn't change?

    I may have not made my question very clear.
    roninDLC Guest

  5. #4

    Default Re: Simple AS function question

    if you want to do this you should set the onRollOut to clear the interval
    before it processes

    home_btn.onRollOut = function()
    clearInterval(_global.home_btn_delay)


    if you didn't want to clear the delay when they rolled out only reset it
    to a different location when they went over another button

    another_btn.onRollOver = function()
    clearInterval(_global.btn_delay)
    _global.btn_delay = setInterval(delayAction,2000,"otherLabel")


    for this you would use the same _global.button_delay for the even handle
    clearing it and resetting it on each button to a unique location

    findapoll

    findapollo Guest

  6. #5

    Default Re: Simple AS function question

    that works great! Only one problem: If i start on button1 and scroll across button2 to button3. The button2 is firing. Anyway to kill that unless the mouse is still on the actual button.
    roninDLC Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139