A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Open big jpg images from flash projector

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Location
    Lebanon
    Posts
    573

    Open big jpg images from flash projector

    Hello all,
    I am working on a photo gallery cd, the user will have the option to download the high Res format. a folder on the cd contains all high res images in jpg format.

    Now the problem is that I want the user to get one image at a time, that is to be able to save the image on his hard disk after seeing it in the viewer. What i did is that i made a link to the big image from flash that'll open in in IE (using getURL) but the thing is that BIG images (above 1.8 MB) can't open in IE

    So, i want something, maybe an exe that can be launched from flash and that'll be given a parameter to open a photo. If any one has another idea or solution please let him share it here.

    thanks alot!

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    use getURL("somepage.html", _blank);
    and this is the html for somepage.html
    Code:
    <html>
    <body>
    <iframe name="i" height="100%" width="100%" src="yourbigoljpeg.jpg"></iframe>
    <script type="text/javascript">
    document.i.document.execCommand('SaveAs');
    </script>
    </body>
    </html>

  3. #3
    Senior Member
    Join Date
    Feb 2002
    Location
    Lebanon
    Posts
    573
    thanks moagrius for your quick solution!

    but the iframe is not showing the image, and the saved image is not the correct image file (it saves a small file with size = 180 bytes only)

  4. #4
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    my fault, i scripted it inline so it popped before the image had loaded. just make it a function and call it onload of the iframe. here's a working sample

    http://qozix.com/dev/w.html


  5. #5
    Senior Member
    Join Date
    Feb 2002
    Location
    Lebanon
    Posts
    573

    thanks

    Thanks! I figured it out before

    the issue is that it works only in IE (which may not be the default browser)

    My problem was with RGB images vs CMYK, i had to convert all the images to RGB and they worked fine.

    thanka again for your help
    regards

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