Results 1 to 2 of 2

Thread: xml photogallery thumbs prob.. plz help

  1. #1
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy xml photogallery thumbs prob.. plz help

    i am doing xml photogallery for my project.
    i completed doing the gallery part but at one point i am stucked.
    here i am loading thumbnails into thumb_mc in _y direction. i have two buttons (up_btn and down_btn) for the thumb_mc to move up and down directions.

    for up_btn the script is :-
    on (press, rollOver) {
    this.thumbnails._y -= 77;
    }

    and for down_btn the script is:-
    on (press, rollOver) {
    this.thumbnails._y += 77;
    }

    but the thumb_mc is moving further than the wanted range. how to say upto the displayed thumbs range only.? plz help

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    use if/else statements.

    Remember also when you are dealing with equalities of a single var to double up your signs. So something like:

    Code:
    on(press){
       if (this.thumbnails._y >= 77){
          this.thumbnails._y -= 1);
          }
       else if (this.thumbnails._x >= 77){
          this.thumbnails._x -= 1);
          }
    }
    Now this isn't exact, as I don't know the rest of your coding, are you using arrays, loadMovie() etc, but this should get you an idea.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •