dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Finding the width and height of a loaded JPG

  1. #1
    Member
    Join Date
    Jun 2001
    Location
    UK
    Posts
    63

    Finding the width and height of a loaded JPG

    Hi,

    How can I find the width and height values of a JPG I load in to my movie? I'm using the loadmovie command to do this using SwishMax (latest version)

    The reason for this is that I'm trying to create a dynamic way of resizing a shape, which is behind the loaded JPG, according to the dimension of the original JPG.
    Last edited by Formant; 09-06-2004 at 12:20 PM.

  2. #2
    Member
    Join Date
    Jun 2001
    Location
    UK
    Posts
    63
    Typical, after scratching my head for the last few hours I find the answer myself after posting here

    onLoad () {
    graphicW = graphic._width;
    graphicH = graphic._height;
    }

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    United States
    Posts
    892
    Hi Formant,

    Thank you for posting your solution so others can learn also.

    Thanks.

    jwr
    When all is said and done -- "You MUST be Born Again!" John 3:3

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