A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Stand Alone Photo Placement Question

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    23

    Stand Alone Photo Placement Question

    Season's Greetings All! I have a problem I could use a hand with. I am using MX 2004 PRO and developing an app for CD-ROM distribution. I have the need to include several hundred photos in the app, approx. 8 per printed page. I have imported all the photos into the library since you cannot dynamically load and print them off CD.

    I need the script to insert a photo instance from the library into the "holder" mc's I have created. The code below works great and loads the photos from outside Flash in, but I need to use the library instance instead for printing purposes. This is probably very easy, but I am a sales manager, not a Flash script guru! So...basically what do I use to replace LoadMovie to get the same result from a library instance of the photo?

    I load 2 variables into _root: phStart(x) and phEnd(x) to tell app which photos to begin and end with.

    n=1;
    photo = phstartB;
    while (photo <= phendB) {
    LoadMovie("pic" + photo + ".jpg","holder" + n);
    photo++;
    n++;
    }

    Thanks much for any help you can give me!

    Jason

  2. #2
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425

    have you tried attachMovie()?

    I think maybe you can give the image in the libraray an Identifier under the "Linkage" options for the library item. You can name it using your variable structure as you have for the images themselves.

    Then use movieclip.attachMovie() instead of loadMovie like:

    this["holder" + n].attachMovie("pic" + photo,"attachedPic"+photo, someDepth);

    I'm pretty sure this would work for you.


    What's the problem with loading images using loadMovie() on CD? Can't you just use relative filepath to the images on the disc? Also, if that's your exact ActionScript there, I'm not sure if loadMovie() will run if you've written it case insensitive as LoadMovie()...
    :: scott ::

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    23
    Scott,

    I thought of that too, but to add an linkage identifier, you must add a URL for a picture. I am not using an URL but on disc. Is there a way to fool it into putting the file path in place of the URL?

    The problem with the loadMovie (my typo) command is that why it works fine in loading the images, once you hit the "Print" button, all the pages print without the loaded content. About a year ago I tried to solve this problem and was basically told it was impossible to print MULTIPLE dynamically loaded pages because the content won't stay loaded and only the frame in focus would print with content. This seems odd because the text based variables remain on each page (loaded from external .txt files) but the pictures disappear.

    I did try an experiment putting photo1 in a MC and attachMovie that clip, which worked, but once again when printed, the MC was gone. Any other ideas?

  4. #4
    flip-flopper scottPadgett's Avatar
    Join Date
    Jan 2005
    Location
    Boston
    Posts
    425
    Oh, OK I see your problem. I don't have any experience printing from a Flash app. Maybe you could have the app open Reader and PDF versions of the pages for printing?
    :: scott ::

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