set movieclip-size in actionscript 2
i'd like to load an external image in a movieclip via
createEmptyMovieClip(..)
m开发者_如何学GocName.loadMovie( imageName )
trying to set the mc-size via
mcName._width = 100
mcName._height = 100
nothing changes. furthermore - any possibilities to zoom or stretch the image to get the size provided from the mc?
You need to wait until the movie is done loading. You can use getBytesLoaded and getBytesTotal to make sure it's complete. Or better yet, use the MovieClipLoader class.
Once the loaded image appears on the stage, _height and _width should return the boundaries of what is visible. Unless of course, you set them to another value, which will stretch or compress the image.
精彩评论