5 Replies Latest reply on May 1, 2006 9:52 AM by speedeee

    Nested Buttons

    nipiv
      Hi guys,

      i am a fresher in actionscript... i have a problem with my flash file

      i have a problem with a nested button... i have a main button But_main and which has 2 buttons in it.

      the problem i am facing is:
      before telling u the problem i will give u a brief about my flash file....
      - my file has a button and the button by default has a mouse over effect where it scales up but 25%.
      - It also has 2 text nested in it which is also are buttons.

      my problem:
      when i am on the main button it scales up but once it comes across the text button it scales down automatically.
      i knw y it happens.... thats because it goes over another button so its out off the main button and on the text button.

      but can any one tell me the solution how can both my button work simultaniosly

      i hope i am abel to explain my problem properly...

      pls help...

        • 1. Re: Nested Buttons
          babo_ya Level 3
          Not really. Not sure what your problem is.
          • 2. Re: Nested Buttons
            Damnnationx
            Takeing a guess here but i think i know what hes trying to say....

            he has a button say called Dave_BUT in this button he has a text like a label. now i could be wrong but what i think he is saying is that when he trys to scale the buttons text from 1 point to another it goes wrong as it pases over another button..

            Answer i belive is really basic flash Treat the button as a scene in it self create symbol "button" then you got ya 3 states and your 4th being hit area. Select which state you wish to change ie if its ya over state then use the 1st frame and then insert key frame. after inserting youre key frame you should be able to insert a simbol, say youre text... then open that as a symbol and if i got this right you shoudl be able to insert frames thus creating an animation inside the buttons state...once you have done that youl end up with Dave_BUT that you can drag n drop into youre scene....mental note here you should also be able to insert action script for the button also....in case this sounds like gobledy ****** check this tutorial out which i came across explains it better than i

            ps the info im trying to forward to you is at the end of this tutorial btu to be honest the guy rocks so watch whole movie he makes it so simple...

            http://tutorials.learnflash.com/videos/freebeginCreatingButtons.html

            hope it helps
            • 3. Re: Nested Buttons
              nipiv Level 1
              hi Damnnationx & babo_ya,

              Sorry but i think u all dint get my problem... and its totally my mistake i made u all lost some where...

              This is how my file is
              - i have a button (any shape) (say call it Mom_But just for reference )
              - in the button i have 2 text which are also buttons. (call this buttons Child1 and Child2)
              - on the mouse over of the circle i have made it expand.

              here is where my problem is:
              - when i take my mouse over the circle it expands...
              - BUT when it comes over the text buttons(Child1 / Child2) it contracts back to the same shape and the it expands again once it out from the Child1 / Child2 button. Hope am abel to explain my problem properly.

              if u all can give me ur email id i can send u the file and u wud knw what exactly yhe problem is.... any ways Damnnationx thank u for the tutorial its was really good...
              • 4. Re: Nested Buttons
                Damnnationx Level 1
                so you have a button called mom with an over state with a circle in it which during the over state youve animated to expand? then when you come off the over state it goes back to an up state which is not expanded?

                im still confused but send me the file il have a look

                damnnationx@hotmail.com
                • 5. Re: Nested Buttons
                  speedeee
                  I am failry new to ActionScript but have recently dealt with the very same issue.

                  I think you need to have an onRollOver event for the child buttons which says something to the effect of "if the button is already expanded then keep the button expanded."