1 Reply Latest reply on Nov 15, 2007 12:53 PM by kglad

    EventListener problem

      This is example from tutorial, but i can`t make it to process 13 line, unless i delete 9-11 lines, but then listener is skipped, thats bad, couse all photos are showed one by one without waiting... my button is named: `next`. working with Flash CS3 ActionScript 2.

      1. var x = 1;
      2. _root.createEmptyMovieClip("MyImagesHolder", 0);
      3. var MyArray = new Array();
      4. var i = 0;
      5. while (i<=NumberOfImages) {
      6. MyArray = LocationToImages+i+FileType;
      7. i++;
      8. }

      9. NextListener = new Object();
      10. next.addEventListener("click", NextListener); //!!!!
      // Call the code below if the next button is clicked
      11. NextListener.click = function() {
      12. x = x+1;
      13. loadMovie(MyArray[x], _root.MyImagesHolder);
      14. }
      15. stop();

      Mainly i want to do something like 9 small pictures, and then i click on one of them, on the right to them opens big one. on this example it should work only with button, not pusshing the photo, and it is not i want, but i want to understand, what is wrong with my example above.
      so, if someone could correct an error + get an example or link to tutorial, how to make every photo be iteractive, if clicked, on the right opens big one...
      now photos are as graphic, not converted to symbols, and i don`t know if it`s worth to do so...
      ok, thanx, and forgive for my spelling ;]