Bind / unbind help please

I am trying to get my head around link/unlink (or on / off) with the following scenario:

1 rectangle and a red ellipse. When you hover over the rectangle, the ellipse becomes blue. When you mouseout/mouseouthandler(), the ellipse turns red again.

2. If you click on the rectangle stays blue ellipse (unbind mouseover/mouseout/mouseouthandler()).

3. If you double-click the rectangle, everything returns to the State, it was in the beginning (bind mouseover/mouseout/mouseouthandler()).

In the control panel actions, I added the code is:

passage of the mouse...

element var is sym.$("Ellipse").css ("background-color", "blue");.

mouseout/mouseouthandler()...

element var is sym.$("Ellipse").css ("background-color", "red");.

Click on...

var element = sym.$("Rectangle").off ("mouseout/mouseouthandler()");

DblClick...

var element = sym.$("Rectangle").on ("mouseover");

var element = sym.$("Rectangle").on ("mouseout/mouseouthandler()");

1 and 2 seem to work fine, but double clicking does nothing. I know this must seem Basic, but since the separation mouseout/mouseouthandler() on click seems to work very well, I can't work on why I can't connect on double click.

Any help gratefully received. Edge using animate CC (but will probably get the last version in a few days if that makes a difference).

Hi there, MilkStudio

Sorry I took so long.

I think I have a solution for you. In the work, I use v2014.1.1 and at home I v2014.0 - version number, that you reported is not one that I recognize so I hope you can open my files! These earlier versions seem to be a little different in how they deal with the code.

Here's a link: Dropbox - unbind2.zip

I imported the Panel Scripts jQuery (jquery - 2.0.3.min.js), and I think it will be bundled with the files, but if you have a really early version of the edge, you may need to use the yepnope trick to import jquery - I understand that very well because I have not used the first versions of the edge!

I did it as a slightly different way from the one I described earlier. Instead of use the classes that I used a variable - this way, the code is much less crowded and you will see what is happening better. I also used the built in functions for the rectangle button, rather than put everything in compositionReady - when I tried to use the code from earlier (that I had to work in a more recent version of the environmental assessment, in the job), it does not work! Maybe something that I did wrong, but I decided to disassemble everything instead.

We have a variable: 'clicked' and 2 functions called 'Tockées' and "Towhat" in compositionReady. We change the variable to 1 when the user clicks the rectangle and back to 0 when you double click.

The mouseout/mouseouthandler() function simply checks that the value of the variable is to see whether he should go back our Red Ellipse.

I hope that all makes sense - I always get my head around things like myself - I'm a Flash Dev, who is trying to learn Javascript, so there may be a more elegant solution to this, but that's how I would do it at my stage of development.

I put a lot of comments in the file to make it more clear.

See you soon

A

Tags: Edge Animate

Similar Questions

Maybe you are looking for

  • Establishment of an iPhone 6

    I have a new iPhone sitting here 6. It was my daughter, but she has recently updated. I'm not sure of the procedure established for me, choose to do so. Any advice? There is no SIM card, it says, as I load up.Thank youMichael Mitchell, Belleville, ON

  • Fingerprinting fails after updating iOS 9,3/9.3.1

    Long story short : iPhone 6, I downloaded iOS 9,3/9.3.1 of fingerprint scanner stopped working the same day.  Apple refuses to acknowledge the update of iOS could have abandoned my scanner. I downloaded the update from iOS9.3 about a week ago.  That

  • Passing parameters to windows Explorer

    There used to be a way to make Windows Explorer open in a specific folder. This was done from the command line or a batch file. Is it still possible with the version of Vista that I like to do it under the control of the program from VBA in Access 20

  • How to install the version full of windows 7 on a new hard drive

    I got a new hard drive and install a full version of windows 7 on it, what I need to do something special or just install the new hard drive, then install windows 7

  • Traffic and VPN security ACL

    I use a PIX 515 with ASA 7.2. I have a couple of tunnels and remote access configuration. The same PIX is used as a firewall between the inside users and the Internet. I'm sure there is a setting for access remote vpn connections to be exempt from th