onRelease functionality

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

  1. #1

    Default onRelease functionality

    Site example:
    [L=http://www.nex2us.com/templates/wunl/index.htm]http://www.nex2us.com/template
    s/wunl/index.htm[/L]

    Hello all,

    *Warning possible stupid n00b question coming...

    I have a question regarding the onRelease command. Why is it on some
    invisible buttons the onRelease command works on a single click while others
    work on a double click? The site example above allows for a single click when
    entering the country, however, clicking on 'Products' requires a double-click.
    Once a double-click is performed, then it will open with a single click. Here
    is the code that I have used for "Country Select":

    eng_button.onRelease = function() {
    gotoAndPlay("pre_close");
    };

    Here is the code for "Products":

    on (release) {
    prod_but.onRelease = function() {
    loadMovie("products.swf", "prod");
    };
    }

    Now... the obvious difference is ( on (release) {} ). I can see that. But is
    that why? it would appear that there are 2 "onRelease" instances for the
    prod_but (product button). I have not changed the code to remove the ( on
    (release) {} ) as of yet simply because the code is on the button itself and I
    wanted to know if it would mess anything up before i made this change. I know,
    a bit too cautious - but hey - I've already had to start from scratch once...
    don't wanna have to do it again :oD

    Thanks for any and all of your help in advance...

    Big_SeckC

    Big_SeckC Guest

  2. Similar Questions and Discussions

    1. onRelease function on a movieclip that is dynamically generated
      I am dynamically generating movieclips. j = 5; for (var i = 1; i<j; i++) { _root.attachMovie("mcInfo", "mc_info"+i, i); _root._y = yposition;...
    2. onRelease and getURL
      Is this correct: btn.onRelease = function(){ getURL("mysite.com/it_training/training.htm", _self); } I want to go to a new web page in the...
    3. onpress onrelease>>what's the diff?
      i made separate swf's for my song files when i use loadMovieNum for each file they start playing simutaneously...i'd like to know the command to stop...
    4. onRelease
      I would like to attach a "gotoandstop" for each image i have displayed. my images are being populated via a dataset from a CFC. I can display all my...
    5. lingering movieclip, will not go back to label onRelease
      Hi. I'm having a problem with a movieclip on my main timeline that I want to appear on each click of my nav. buttons, it's a page transistion that...
  3. #2

    Default Re: onRelease functionality

    Ok,

    Took a huge deep breath and I changed the code:

    prod_but.onRelease = function() {
    loadMovie("products.swf", "prod");
    };

    ...and it works on a single click now... Learned something new today - looks
    like you cant add the onRelease funtion directly to a button without adverse
    effects. I have to test the other buttons to make sure they work too!

    Thanks!

    Big_SeckC

    Big_SeckC 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