A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23

Thread: load all .jpgs from directory in 2 columns x 10 rows

  1. #21
    Senior Member
    Join Date
    Mar 2002
    Posts
    334
    no problem

    To add your links put the code on the empty movie clip that is on the main stage (picHolder)

    What you'll need to do is get the name of the current movie clip and then that should tell you how to get the image you wanted.

    Example.

    (I just realized an easy way to do this but you'll have to change one thing in your current code first)

    Change the duplicateMovieClip() function that you are using to duplicate the picture holder.. name the duplicate movie the same as the pic you're going to be sending to it.

    Code:
    copyOfHolder = "nameOfYourPicture"+i;
    	duplicateMovieClip(_root.picHolder,copyOfHolder ,i);
    Ok so then on the stage go to the picHolder movie clip and right click and go to actions. Now do something like

    Code:
    thePic = this._name + ".jpg";
    
    onPress()
    {
       getURL(thePic);
    }

    that should work... If I get some time and you cannot figure it out I will try an example for ya

  2. #22
    Senior Member
    Join Date
    Mar 2002
    Posts
    334
    oh wait, that last solution probably wont work cause the name it returns i'm pretty sure is level_0.movieClipName

    Ok so here is what you do. On the blank movie clip that we are duplicating, create a variable called thePic; but dont set a value for it.

    Now in the main time line in that for loop (at the end of it)
    Code:
    	_root[copyOfHolder].thePic  ="myPicture"+i+".jpg";
    now in that blank movie clip

    Code:
    onPress()
    {
      getURL(thePic);
    }
    that should work.

  3. #23
    Senior Member
    Join Date
    Jul 2001
    Posts
    198
    Thanks so much for all your help. well I am close...!!

    Here is where I have my current version.

    Basically, when I click on the thumbnail, I want the affiliated photo (the normal sized one) to appear in another movie-clip...not sure how to send that info to the onPress() event.??

    If you'd like...
    http://www.studioxmedia.com/imager_ver1.fla


    Thanks again for all your help.
    fitchic77

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