A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: ROLLOUT HELP! i cant combine it with onrelase()

  1. #1
    Que paso, que paso, vamos ahi? Don Ramon's Avatar
    Join Date
    May 2004
    puerto rico

    ROLLOUT HELP! i cant combine it with onrelase()

    ok so heres my problem, kinda long post but its because of the detail i put in it. it looks like a bug that flash has but i already tried and it doesnt seem to be. Ive tried this on MX and MX 2004.

    ok so i have this presentation here :linky

    as you can see, a submenu appears for each respective category. each submenu is a movieclip. inside it, there are nested movie clips for each item button.

    the code embedded for each submenu is:

    on (rollOut) {
    this._visible = false;

    after the menu interactivity is built everything's working fine right?

    then the next step is to write the onrelease() code for each of the buttons to tell them which section to go etc.

    now the buttons on(release) code DOESNT WORK!

    Then i erase the rollout code i put on the submenu and guess what? NOW THE BUTTONS CODE WORKS LIKE A CHARM GRRRRRRRRR

    ive jumped to the conclusion that: if you have a movie clip that has a
    On(rollOut) statement, AND it has one or more nested movieclips that have on (release) satements in them (say...buttons)...the on (release) code will not function.

    -if you could please take a couple of minutes and do this example:
    make a movie clip

    -create several buttons that opens any url inside of your movie clip

    -place the movie clip in the main timeline and write an On(rollOut) statement, it doesnt matter if it doesnt have any code at all

    -tell me what you got and/or any worarounds to this

    ive absolutely ran out of ideas to work around this problem, this definitely is holding me back and i need to deliver this proyect this week or im definitely screwed

    HELP ME!!!
    Last edited by Don Ramon; 04-10-2006 at 01:32 PM.
    Drink milk!

  2. #2
    The Flashman earl223's Avatar
    Join Date
    Sep 2000
    Marikina City, Philippines
    Buttons within a button wont work.

    Technically, assigning a Button event to a movieclip will make Flash treat that movieclip as a button. The thing is, if you have two buttons on the main timeline, and put one on top of the other, the top button will work, and the other wont. A movieclip with an onRelease event will work, but all buttons/movieclips with button events INSIDE that moviclip won't work. Removing the onRollOver from the main movieclip technically "changes" it back to a movieclip, so now... all buttons inside that mc will work.
    i eat actionscripts for breakfast

  3. #3
    Que paso, que paso, vamos ahi? Don Ramon's Avatar
    Join Date
    May 2004
    puerto rico
    that info is very much appreciated, i never had any idea of that fact at all. any workarounds that i could try?
    Drink milk!

  4. #4
    Bach the Nerd
    Join Date
    Jun 2005

    nested button workaround

    Here's a workaround for you, hope it's not to late to help you. I was having your same problem, but this technique works like a charm. It's kind of a long-handed approach though.

    Instead of nesting buttons or button-like movieClips inside of movieClips which have rollOver and rollOut functions, you can draw what your buttons would look like right inside of the movieClip itself. Then add an onRelease event to the movie clip which reads the position of the mouse and decided what to do accordingly. Make sense?

    Here's the code that I used to decide where the mouse was and what to do:

    onRelease = function() {
    	if(_ymouse > 25 && _ymouse < 52) {
    		if(_xmouse > -70 && _xmouse < -40)
    			//actions here
    		else if(_xmouse > 40 && _xmouse < 60) {
    			//other actions here
    If you need clarification, let me know and I'll send you a sample .fla or something.

    Good luck!


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