A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] [F8] Gallery- Movie Clip possibly stretching images?

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    27

    [RESOLVED] [F8] Gallery- Movie Clip possibly stretching images?

    I've tried re-sizing my movie clip, and it appears to stretch some of my gallery photos. How do I stop it from doing this, without actually altering the movie clip's size? There are many different sizes and shapes of photos, so I can't have it set to a certain size...

    Pre-thanks to any help.

  2. #2
    Ivor1 ivor1's Avatar
    Join Date
    Aug 2006
    Location
    Dundee, Scotland
    Posts
    478
    You can specify the size of an element in Flash so that it stays the same regardless of any resizing of the browser, so if you made each photo into a movie clip you could apply some no-resize actionscript.
    http://www.communitymx.com/blog/index.cfm?newsid=766

  3. #3
    Senior Member indogo's Avatar
    Join Date
    Dec 2005
    Posts
    282
    If its of any use I use this to resize images to fit within a frame whilst maintaining the aspect ratio....centering could be added if required

    Code:
    onclipevent(load){
    if (this._width > 400){
    this._height=this._height*400/this._width;
    this._width=400;
    }
    
    if (this._height > 350){
    this._width=this._width*350/this._height;
    this._height=350;
    }
    
    }
    Its in the movieclip that the image is loaded to.

    mike

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