More actions to one button


i want make pause/play button, shifting between 2 symbols clicking.

 

does know how implement pictures instead of

the on/off html-text on button, according following code marie goodwyn captured site:

http://www.edgehero.com/articles/interactivity

 

 

 

 

 

//******************************** demo toggle button ******************

//                                    setvariable.                    * 

//                              marie goodwyn edgehero              *

//**************************************************************************

 

 

//set value of symbol variable

sym.setvariable("onoff", true);

// click event

sym.$('btn').click(function(){

          // variable

          var onoff = sym.getvariable("onoff");

          if (onoff == true) {

             sym.$('ellipse').css({'background-color':'green'});

                    sym.$('btnlabel').html('off');

                    // reset variable false next click

                    sym.setvariable("onoff", false);

          }

          else {

                    sym.$('ellipse').css({'background-color':'red'});

                    sym.$('btnlabel').html('on');

                    // reset variable false next click

                    sym.setvariable("onoff", true);

          }

});

you can change image this:

  sym.$('divname').css({'background-image':'url("images/offimage.jpg"'});



More discussions in Edge Animate CC


adobe

Comments

Popular posts from this blog

Thread: Ubuntu and MySQL ?

Thread: Job Opening - Linux Systems Administrator