1 Replies - 1441 Views - Last Post: 13 April 2008 - 08:38 AM

#1 kadarkarai  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-March 08

Photo Gallery in Flash 8

Posted 09 April 2008 - 06:29 AM

:) Hai Friends,

I want to create Photo Gallery for my site using flash 8 script please help my problem is

1. Reduce Image in specified size at runtime.
2. Image Effect at runtime
3. Thumb Image from original image

because user image are all in differend size.. .

please help me thanks in advances bye take care

This post has been edited by kadarkarai: 09 April 2008 - 06:51 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Photo Gallery in Flash 8

#2 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: Photo Gallery in Flash 8

Posted 13 April 2008 - 08:38 AM

This will scale an image to fit within a predetermined area:

// set the thumbnail size and scale amount (1 = 100% = no scale)
var thumbWidth:Number = 100;
var thumbHeight:Number = 80;
var scaleFactor:Number = 1;

// determine the amount of scaling required
if(imageToShrink._width > thumbWidth) { scaleFactor = thumbWidth / imageToShrink._width; }
if(imageToShrink._height * scaleFactor > thumbHeight) { scaleFactor = thumbHeight / imageToShrink._height; }

// scale the image
imageToShrink._width *= scaleFactor;
imageToShrink._height *= scaleFactor;


You have not defined an "Image Effect", so I can't help you there.

Duplicating an image is too easy of a question, so I will not answer it. Simply look it up in the Flash User Guide, or do a web search for "as2 copy image".

[di]
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1