Size of loaded picture

Hallo everybody,
I need to establish size of picture (*.jpg) loaded in swf file. I used this script for load the picture:

_root.createEmptyMovieClip(picture, 9876);
loadMovie(obrazok.jpg, 9876);

but traced number is always 0 however the real size of picture is 256 x 192. How should I change the script for it works?

_root.createEmptyMovieClip(“picture”, 9876);
_root.onEnterFrame = function(){
if(picture.getBytesLoaded == picture.getBytesTotal && picture.getBytesTotal > 0){

I dont know why but it doesnt work. Output window isnt even opened…

[AS]if (picture.getBytesLoaded() == picture.getBytesTotal() && picture.getBytesTotal()>0) {[/AS]

it makes no change. picture is shown nice but nothing else.

The code works fine. What do you want to do exactly?

exactly? i want to align about 15 different sized pictured loaded with code:
for (i=0; i<87; i++) {, i);
loadMovie(picArray*, i);
setProperty(i, _x, 125*i);
setProperty(i, _y, 0);


pictures are good aligned by width because their width is the same. But aligment by height is wrong because it on the top of pic and i want align them on the middle. how can do I this?

You could try something like this, I’m not sure if this would be the best way though.
[AS]clips = [];
for (i=0; i<87; i++) {
clips* = group.createEmptyMovieClip(“pic”+i, i);
clips*._x = 125i;
group.createEmptyMovieClip(“preloader”, 9876);
// change this value to whatever you need
group.preloader.ycenter = 100;
group.preloader.onEnterFrame = function() {
if (clips.length) {
for (i=0; i<clips.length; i++) {
if (clips
._width) {
clips*._y = this.ycenter-clips*._height/2;
clips.splice(i, 1);
} else {

It works, It really works!!!
Thank you very much for your help. :wink:

You’re welcome. =)