A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: loadMovie image dimensions

Hybrid View

  1. #1
    Senior Member flamedude's Avatar
    Join Date
    Jun 2003
    Location
    Vancouver, BC
    Posts
    252

    loadMovie image dimensions

    Hi guys,

    I am making a new site with a fairly complicated gallery section. It shows an array of thumbnails and when you click a thumbnail the movie loads the larger image counterpart into a section above the thumbnails and then shifts the thumbnails to just below the large version.

    I am using the loadMovie method with a moviecliploader. Is there a way for flash to find the height and width of the jpeg/image that is loading without having to fully loading it first? I need my movie to know the dimensions of the image whilst it is loading with the MCL you see. Will flash do this? At the moment I have a seperate data var that holds the dimensions of the large image, but if I do not need this then all the better.

    Thanks for any advice,

    Steven.

  2. #2
    Flasher
    Join Date
    Nov 2002
    Posts
    171
    Hey. Ive made a few applications with similar needs, but never found a way of doing this. Not sure its possible im afraid.

  3. #3
    Flasher
    Join Date
    Nov 2002
    Posts
    171
    on second thought - someting ive never tried - maybe the image your loading might contain some info about its dimensions after a certain amount of it has loaded.

    You could try and trace out its width and height when your loader detects that say, 1k of the image has loaded in...

    just a thought....

  4. #4
    Senior Member
    Join Date
    Nov 2005
    Location
    Milan
    Posts
    119
    As far as I know, it has to load completely. You could store your image info in XML, put the width and height as attributes of the xml node, at least that way you'd have them instantly...

  5. #5
    Senior Member flamedude's Avatar
    Join Date
    Jun 2003
    Location
    Vancouver, BC
    Posts
    252
    Yeah i feared as much. I will have to stick to keeping the dimensions of the image in the database as well. Ah well, its not too bad i guess!

    Thanks for the advice.

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