A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Photo Gallery Question

Threaded View

  1. #10
    Junior Member
    Join Date
    Sep 2006
    Location
    Vancouver BC
    Posts
    24
    WOOTS!! TY very much for your explanations, advice and time! It has paid off ... after hours and hours messing around with the code and what everyhting does .. I have FINALLY figured out what i needed to alter to get contentpane3 to function with 1 and 2

    so .. just incase anyone else needs this thread to hlp them with this same issue

    on the "thumbs" movie clip actionscript the code is THIS
    ---------------------------------------------------------------------
    __proto__ = Object.KC8.prototype; // make this mc a KC8 object

    for (i = this.thumb_first; i <= this.thumb_last; i++){
    var m = o_rmc_btn(105,105,0xfff8f0,'th'+i,i,120*(i - this.thumb_first),0); // add the buttons
    m.f = this.img_path + i + '.jpg';
    m.pressed = function(){
    _root.contentpane2.setContent(4,this.f,0,1);
    }
    m = m.createEmptyMovieClip('img',1);
    m._x = m._y = 2;
    m.loadMovie(this.img_path + this.thumb_prefix + i + '.jpg'); // load a thumbnail
    }

    scrollRect = null; // clear the preset clipping rectangle
    _component._update(true); // update the scrollers of the contentpane component
    -------------------------------------------------------------------------

    Here is the NEW code to allow contentpane3 to operate with the same buttons as contentpane2 reacts with.
    ----------------------------------------------------------------------
    __proto__ = Object.KC8.prototype; // make this mc a KC8 object

    for (i = this.thumb_first; i <= this.thumb_last; i++){
    var m = o_rmc_btn(105,105,0xfff8f0,'th'+i,i,120*(i - this.thumb_first),0); // add the buttons
    m.f = this.img_path + i + '.jpg';
    m.t = this.img_path + i + '.txt';
    m.pressed = function(){
    _root.contentpane2.setContent(4,this.f,0,1);
    _root.contentpane3.setContent(4,this.t,0,1);
    }
    m = m.createEmptyMovieClip('img',1);
    m._x = m._y = 2;
    m.loadMovie(this.img_path + this.thumb_prefix + i + '.jpg'); // load a thumbnail
    }

    scrollRect = null; // clear the preset clipping rectangle
    _component._update(true); // update the scrollers of the contentpane component

    ------------------------------------------------------------------------
    I added this line:
    _root.contentpane3.setContent(4,this.t,0,1);

    And this line:
    m.t = this.img_path + i + '.txt';
    -----------------------------------------------------------------------

    So ... in the end it was simpler than all the other tactics i had been trying lol .. Now all i gotta do is tweak the text and the contentpane3 to match my site design and POOF descriptions that load with the IMG!



    p.s. Sorry for the long post

    edit to say .. after messing with the text .. how do i make the background of the .txt files black to display white text? Currently it shows a white rectangle with the text description in black on my black background. Looks kinda sloppy now... maybe a .gif text img ..... not sure ... if ya got any suggestions im all ears .. until then .. ill tweak what i got going and see if i cant smooth it out some. Its late .. so . im prolly just tired lol.

    Gnight
    Last edited by taurusguy; 06-05-2008 at 03:00 AM.

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