A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: need help from flash expert!

  1. #1
    Junior Member
    Join Date
    Nov 2005
    Posts
    10

    need help from flash expert!

    so here's the deal... i am working on a collaborative project with 7 other people. we were split into 2 groups-- programmers and designers. for some reason i was put into the programmers group. i barely know anything about flash.

    we are working on a website which displays various artwork from our department. click here to see image. basically, what happens here is that when you click on next, the "gallery" scrolls right to the next 6 thumbnails. what we want to do is to have the thumbnails in the gallery dynamically loaded.

    i was wondering if anyone is willing to help out by donating some time so i can try to figure this out. if anyone can, that would be awesome.

    thongirl27@yahoo.com

  2. #2
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    let's get to work. for starters, to load images dynamically, you need a container to hold them, normally a movieclip placed on the stage.
    you would give the movieclip an instance name and then load the image to the movieclip, i.e.
    movieclip.loadMovie("yourImage.jpg").
    How many sets of 6 do you need?
    Last edited by EQFlash; 11-21-2005 at 05:49 PM.
    If you don't think you're going to like the answer, then don't ask the question.

  3. #3
    Junior Member
    Join Date
    Nov 2005
    Posts
    10
    there are 144 images total so there will be 24 sets of 6. instead of using the actual work. we will be uses dummy images for both the thumbnails and the images.

  4. #4
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    ok, tall order, but can be done. first the thumbs should be small, say about 100 x 100 each. so they will easy to handle. Let me see what I can put together for you. unless you get a better solution from 1 of the other flashers here.
    If you don't think you're going to like the answer, then don't ask the question.

  5. #5
    Junior Member
    Join Date
    Nov 2005
    Posts
    10
    well, actually... the thumbs are depicted in the link i placed above. i believe those are 166x128. the idea is that when you click on one of those, it opens up the larger image which will be 550x410.

  6. #6
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    no problem, I just like to use square thumbs a 100 because it cuts down on math work, but 166 x 128 is good. I'm almost done. Im using flash designed images instead of real images. Just for demonstration purposes only.
    If you don't think you're going to like the answer, then don't ask the question.

  7. #7
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,834
    I found this by going to the actual flash folder and from there: /Samples and Tutorials/Samples/ActionScript/Galleries/

    Code:
    //****************************************************************************
    //Copyright (C) 2005 Macromedia, Inc. All Rights Reserved.
    //The following is Sample Code and is subject to all restrictions on
    //such code as contained in the End User License Agreement accompanying
    //this product.
    //****************************************************************************
    
    /* 
    Tree component image gallery example
    This example shows you how to use the Tree, ProgressBar and Loader 
    components to build a simple gallery.
    */
    
    var my_pb:mx.controls.ProgressBar;
    var my_ldr:mx.controls.Loader;
    var my_tree:mx.controls.Tree;
    
    my_pb._visible = false;
    my_pb.indeterminate = true;
    my_pb.setSize(160, 30);
    my_pb.source = my_ldr;
    my_pb.mode = "polled";
    var pbListener:Object = new Object();
    pbListener.complete = function(evt:Object) {
    	evt.target._visible = false;
    };
    my_pb.addEventListener("complete", pbListener);
    
    var treeDP_xml:XML = new XML();
    treeDP_xml.ignoreWhite = true;
    treeDP_xml.onLoad = function(success:Boolean) {
    	if (success) {
    		my_tree.dataProvider = this.firstChild;
    	}
    };
    
    treeDP_xml.load("gallery_tree.xml");
    var treeListener:Object = new Object();
    treeListener.change = function(evt:Object) {
    	var treeNode:XMLNode = evt.target.selectedItem;
    	if (treeNode.attributes.src != undefined) {
    		my_pb._visible = true;
    		my_ldr.load(treeNode.attributes.src);
    	}
    };
    my_tree.addEventListener("change", treeListener);
    Last edited by swak; 10-08-2007 at 07:42 AM.
    .

  8. #8
    Junior Member
    Join Date
    Nov 2005
    Posts
    10
    Ok, I also sent you a few emails containing some of the .swfs we have so far so you can have a better understanding of what we're doing.

  9. #9
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,834
    if you look down at the bottom, you'll find this bit of code: treeDP_xml.load("gallery_tree.xml");
    the "gallery_tree.xml" is the name of the external file that gets loaded. It's the file that you change in order to change the list of picture that will be loaded. I'm emailing you the whole thing.
    .

  10. #10
    Junior Member
    Join Date
    Nov 2005
    Posts
    10
    I'm still having issues with this... Might anyone else be able to assist me?

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