I’ve attached a .fla that loads your image and then turns it into a button.
While I was making this, I realized what it was that’s been causing you problems. Silly me, I should have thought of this before, but it slipped my mind. The trick is this: you can’t turn images into buttons.
This is because in order for a button to work, it has to have some kind of vector-based content which the mouse can detect. I.e. the mouse has to be able to detect that it is over something in order to click on that something. An image is not vector based, so the mouse can’t really tell that it’s over the image. When you load an image into an empty clip, Flash still considers that clip an empty clip as far as mouse interactivity goes.
To counter this, you simply create an invisible block of color over the image and set that invisible block of color as the button. That’s what I did in the .fla.
On the other hand, you can edit the _x, _y, _xscale, _yscale, _alpha, etc. of the loaded image, but as we said earlier, this has to be done after the movie is loaded. I’ve put all the code that modifies the clip (changing it’s properties, creating an invisible overlay button, etc) inside one function called setMovieProperties(). That function is not called until the “swonking” function says the image is totally loaded (a “swonking” function is a function that checks for when something is loaded).
Unfortunately, movieClips don’t have an “onLoad” event handler that works like the “onLoad” handlers do for XML and LoadVars objects (wouldn’t it be nice if MovieClips did). So we have to check whether the bytes have completely loaded. This is an annoying process, but you’ll see how I did it with my “swonking” function (compare my code with the code you just posted above for ideas).
Also, I’ve used the setInterval() function to execute the swonking function over and over again. If you’re not familiar with setInterval(), check out it’s entry in the actionscript dictionary.
Okay, that should give you some ideas and tips for proceeding.