SetProperty on Movie Clip

Alright ppl, last question for the week, I promise!

So I’m trying to set the width and height of a movie clip symbol. Initially, on the stage the movie clip is set to w = 400, h = 350. Whenever I load a 400x350 image on the clip (from a button), it looks way too wide. So I tried to fix this by adding setproperties for width and height on the action for the button.

[AS]
on (release) {
_root.photo._width = 400;
_root.photo._height = 350;
loadMovie(“pics/1.jpg”, _root.photo);
}
[/AS]

The first time I click on the button, it’s still way too wide… the second time (and beyond) after that it’s fine. What can I do to fix this problem?

I would try this first.

on the button…

on (release) {
        loadMovie("pics/1.jpg", _root.photo);
}

… then attached to the movie clip itself I’d put this

onClipEvent(data){
        _root.photo._width = 400;
        _root.photo._height = 350;
}

the onClipEvent “data” fires it’s actions any time the movie clip has finished loading anything. It may be that you were setting the params initialy, but had them thrown off again by the loading of the jpg. (the clip will resize to whatever dimensions the image is that you are loading.)

let us know how that works.