6 Replies Latest reply on Mar 17, 2010 5:26 AM by Chorale0001

    Probleme with mouseLeave/mouseenter

    Chorale0001 Level 1



      I am a novice with Director 11.5 but i am currently working on a project that require to have a zoom ( and unzoom) effect on multiple sprite.


      Now some of those sprite are partially on top of each other, while other are only linked by a thin sprite.


      sprite 1 : big star

      sprite 2 : small box siting on top of one of the star branch, partially over it

      sprite 3 : small box siting on top of one of the star branch, partially over it

      sprite 4 : small box siting on top of one of the star branch, partially over it

      sprite 5 : thin line ( 5 pixel wide ) starting from sprite 2, and linking sprite 6

      spirte 6 : another small box not touching sprite 1 to 4.


      the Idea is that sprite 1 to 4 are always visible in their unzoom state. When the mouse enter either of them, they zoom In. When you click one of the sprite (let say sprite 2), it will deploy sprite 5 and 6 as an extension of sprite 2 while keeping sprite 1 to 4 zoomed.


      There is no unzoom or zoom effect on sprite 5 and 6.


      If you click again sprite 2, it will undeploy sprite 5 and 6. No unzoom of sprite 1-4

      If you click sprite 6, it undeploy sprite 5 and 6 and unzoom sprite 1-4


      Probleme #1 :


      2 sprite partially on top of each other., let say sprite 2 is partially on top of 1, and partially on top of nothing, when i enter the sprite, everything zoom In just fine, using on both sprite




      mouseenter me








      but when i move the mouse from sprite 1 to sprite 2 ( or 3 or 4), ( which are partially on top of 1 ) the Zoom in effect happen again.


      I know it is logical than it will happen because both sprite got the script to do that ( in case the mouse enter either sprite 2 to 4 instead of sprite 1). But how do i make it so that director dont do that when the mouse is entering either sprite 2 to 4 coming from the inside of sprite 1 ?


      Probleme #2 :


      When i click sprite 2, it will deploy sprite 5 and 6, sprite 5 linking sprite 6 and 2 together while all other sprite stay zoomed in, how do i prevent the unzoom effect from happening, when you want to reach the sprite 6 ? because i use for the moment the




      mouseleave me








      on all sprite so that the unzoom effect happen when you really want that thing to unzoom so that you can read back your current page.


      How do i make sure people can actually reach sprite 6 without having to follow the thin line of sprite 5 ?


      Is there a way to have a "detection" zone wide enough around sprite 5 to have a good chance for the customer to reach the sprite 6 without causing an unzoom ? and remember that there is no zoom in command on those sprite but sprite 1-4 have zoom and unzoom command.


      Any solution ?


      The whole system need to be editable in case we had more branch to the star.


      My idea is using the IF command, but somehow my skills are too low to fully understand that. i hope with your help to improve myself and get this thing working


      Thx for any insight


      Message was edited by: Chorale0001


      Message was edited by: Chorale0001

        • 1. Re: Probleme with mouseLeave/mouseenter
          James Newton, ACP Level 3

          Hi Chorale0001,
          Could you post some images on-line somewhere so that we can imagine better what it is that you are trying to achieve?
          Are you using the Score to animate the zoom effects, or are you using Lingo to change the size of the sprites?

          • 2. Re: Probleme with mouseLeave/mouseenter
            Chorale0001 Level 1

            Hi openspark.


            Thanks for your answer.


            I am using the score to animate the zoom effects at the current speed of 4 frame between the zoom and unzoom state ( may be less or more )

            As for posting some images on-line, i don't know if my client will allow it. I will try to be more precise in my description.


            We are speaking about the menu of a website that i am currently building, and i'm the graphist/designer.


            The Sprite 1 is in the middle of the screen and serve an anchor for the menu itself as well as a design element,. currently the star will have 6 branch, each with a button on the top of each one but overing the tip of the branch, those button are sprite 2-3-4 of my exemple ( yes i know, there is 3 missing but those other 3 dont have any sub-menu). 3 of those button, Sprite 2-3-4 will have a sub-menu of X number of button ( sprite 6 and above) while all of those button will be linked by a graphic element ( sprite 5). It is important to note that all the sub-menu will be outside of sprite 1.


            So on the idle state, sprite 1 and all the 6 button on the star will be on their unzoom state in the center of the page, so that they don't mess with the content of the website. When someone hover the mouse on any part of those sprite, it zoom in full size ( +40 %) and the sprite 1 and all the 6 button become available to navigate.


            When someone click button 2-3-4 ( sprite 2-3-4), the right sub-menum and only it's own sub-menu, will unfold using sprite 5 and 6 ( multiple number of sprite 6, exact number yet to be decided by the client). Doing so, the sprite 1-2-3-4 state don't change, no unzoom nor zoom effect.


            It is also important to note that the whole menu is going to always be available and will never be invisible.


            That's the most accurate description i can give you without having actually post a screenshoot, but if the client allow it, i will post it Monday evening.


            For the description of the 2 problemes i am facing right now, see the original post please.


            Thanks for your help.


            Message was edited by: Chorale0001

            • 3. Re: Probleme with mouseLeave/mouseenter
              Chorale0001 Level 1

              All right everyone.


              Here is a lot more explanation with exemple.


              First of all, here is an exemple online http://www.episodesoft.com/demo/.




              This demo is free from bug and is working in its current state, minus those probleme that need to be solved and then added to improve the concept.


              You can also find the director file with all the sprite included in the demo


              Please keep in mind that the main menu will have 6 buttons and that i expect to have  sub-menu with at least 3-6 buttons each.


              This exemple is working except all the probleme i've got.


              Probleme #1:


              The big yellow circle should have a MOUSELEAVE for an event when you leave the area, But when i do that, and i hover the mouse over the button and leave the button, the script goes mad and keep jamming itself playing 2 frame on a loop, forward and backward. it is most likely a probleme of GO.


              Probleme #2:


              Once i click the button "service & solution" i cannot use the concept of zoom and unzoom if you move out of the menu, If i leave a MOUSELEAVE on the button itself, it will close everything or will expect an event.


              Probleme #3:


              There should be a way once the "service & solution" has been click and the sub-menu is open, to make the menu close itself properly if you move the mouse too far ... Is there a way to make an invisible detection zone ? or use a TEMPO followed by a detection to see if you are still outside, then Close the menu OR/AND if you click outside also close the menu. Remember, there will be a lot of page, so it is require that the menu and the click outside dont reset on the index page.. you need to stay on the current page.


              Probleme #4:


              Again if i put a MOUSELEAVE on the button "Service&solution" and the yellow circle, it prevent me from reaching the sub-menu, and i cannot imagine being forced to follow the small line that link the 2 button. Is there a way to make again a detection zone OR a tempo option ?.


              Probleme #5:


              Idem everything should refold to the closed state if you dont do anything for a while, or leave anything, i don't find how to do that.


              Probleme #6:


              i've published using the setting of having a JPG displayed while you are starting the shockwave, but somehow it doesnt seem to work.


              Probleme #7:


              Is there a way to not have to duplicate the menu on each page so that in the timeline, i have 1 section with the menu, and all the require page there after. Because right now i think i have to duplicate the menu on each page, and then also duplicate all the script of the menu. There is surely a way to lighten all that.




              Is there a way top make the stage clickable so when you click the stage you just jump back to whatever Frame is require ?


              The viewer should be able at all time to click outside the menu and go back in the closed state, also should be able to easely go to any button without having to go back.


              Any clue or help would be welcome, this is my very first contract with director, and i just finished the school where you learn only 20 % of what is require for the market. As a bonus, you can download the director and all image ( you might need to update them ) from http://www.episodesoft.com/demo/demo.rar



              Thanks for any help.


              Please forgive my average english, i'm not english.


              Message was edited by: Chorale0001


              Message was edited by: Chorale0001, i've added Probleme #7

              • 4. Re: Probleme with mouseLeave/mouseenter
                Chorale0001 Level 1

                Any idea ? anyone ?

                • 5. Re: Probleme with mouseLeave/mouseenter
                  Chorale0001 Level 1

                  Hurray. or almost half hurray !


                  I solved probleme 2 to 5 by putting a huge box, bigger than the score, in backgroup, on Lighten setting so it is invisible with a mousedown option. this way when i click anywhere but on my sprite, it do exactly what i wanted.


                  however i cannot find the solution for the probleme 1-6-7.


                  Please help :S

                  • 6. Re: Probleme with mouseLeave/mouseenter
                    Chorale0001 Level 1

                    Probleme Solved.


                    Thanks to everyone, but for the most part Openspark


                    See http://forums.adobe.com/thread/597511