A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [RESOLVED] Simple Gallery with text help.. PLEASE!

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    13

    resolved [RESOLVED] Simple Gallery with text help.. PLEASE!

    Here's what I have/need. I have tried several galleries available on the koolexchange with no avail. The closest one was Blanius' simple gallery which looked really promising, but I couldn't figure it out to save my soul.

    Basically my main page has 3 content panes, named gallery, gallery_text, and gallery_thumbs. I am trying to put together a script that populates the thumbs' pane with thumbnails, 3 in a row, scrolling up and down.

    [][][]
    [][][]
    [][][]
    []

    When clicked, a thumbnail would load a corresponding image into the gallery pane with some kind of transition, as well as a caption in the text content pane.

    I can just cram a bunch of images into the fun file and do it all manually but that just stinks! I am trying to get it to populate the thumbnail content pane by reading the directory 'thumbs'. I am assuming that there will be an xml file required for the captions, but I am pretty noob at this stuff, so I'm unsure.

    At this point it is just driving me nuts and I would pay some one for some help, I have torn other galleries apart and just don't ee the functionality to do what I need, and it can't be too complicated, can it?


    The files: http://www.tony-king.com/bsk1000.zip

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    The best way to do what you want, is probably to create a movieclip with some actionscript that is reading the images and places them at the right position so you get that three in a row layout.
    Add that movieclip to the symbol library and provide a link name for it.
    When you have done that, you can select the link name for content in the content pane.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    13
    Does anyone have the Actionscript to accomplish this? I can't get mine to do anything but break =/

  4. #4
    Junior Member
    Join Date
    Sep 2006
    Location
    Vancouver BC
    Posts
    24
    I just wanted to point you guys to my thread on this .... i was using necromanthus gallery .. which i dont think you can find anymore .. but after making a few adjustments to it .. it works great .. i havent applied the changes of the gallery discussed in my online version of my site .. but its coming once i update all my galleries.

    http://board.flashkit.com/board/showthread.php?t=768742

    Check it out ... hope the info in that thread can hlp.

  5. #5
    That web bloke Stoke Laurie's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    869
    Here's the link to necro's gallery http://necromanthus.com/KoolMoves/AK/AK.html
    take a look about in there, he has loads of good stuff.

  6. #6
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    In case you want to use the approach I mentioned before, create a movieclip in the symbol library with a link name and specify that link name as content for the gallery_thumbs contentpane.

    The code to put inside the movieclip in the symbol library is
    Code:
    var i = 0;
    while (i < 11){
      var th = this.createEmptyMovieClip('th' + i, i);
      var ti = th.createEmptyMovieClip('img', 0);
      th._x = (i % 3) * 80;
      th._y = Math.floor(i / 3) * 80;
      i++;
      th.filename = i + '.jpg';
      ti.loadMovie('thumbs/' + th.filename);
      th.onRelease = function(){
      	_root.gallery.setContent(4, 'gallery/' + this.filename);
      }
    } 
    lineStyle(0,0,0);
    lineTo(th._x + 80, th._y + 80);
    scrollRect = null;
    _component._update(true);

  7. #7
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    Here you go.

    Using Wilbert's excellent code example Here it is fixed for you.

    Note for the text to show you need a file for each image called
    1.txt
    2.txt etc..... in the gallery folder.
    Attached Files Attached Files

  8. #8
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    I already helped him out with his requests Bret.

    @tkingstl,
    At the 'Thread Tools' drop down menu there's an option to mark a thread 'Resolved'.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center