Gettting the width of the movie when in fullscreen mode

The problem I am encountering is the following. I have designed my movie which is 500x500 pixels. I use the publish settings to make it 100% width and 100% height in HTML. Now in the first frame of my movie I ask it to show me the width of the movie (_root._width). When I view the movie in the test environment(CTRL+ENTER) the width is returned correctly. When I view it in explorer, the movie is enlarged as it should, but the width returned in 500, not the real width of the movie.

More in depth:

I also get the mouse position in the movie just to see whats going on, the mouse goes to a (-) value as you move it to the left of the screen, this is very weird, since the top left corner should be value x:0 y:0;

Any help on how I could get the correct width of the movie will be greately appreciated.

_root.width will not change based on the html document. it would need a database and would be done in something like php, where it would be sent back to flash. No matter what you do to the size of the movie, the flash swf movie is still 500 x 500. It is just being stretched. I don’t know what you’re trying to do, but I think there’s a way to get the resolution of a computer…

Thanks for your reply,

Actually you can see it here Go to “Version 4”. Now imagine the client wants this movie on the whole screen.

But I educated him to understand that there are still less priviledged people with small resolutions of lets say 1024x768 :-). When he is working at 1280x1024 in a 21’’ monitor.


Well, I am still quite confused… could you give me the source. Also, if you want the swf to always appear in fullscreen, open the actual swf in explorer, it will scale it to the size of the screen.

Its ok I decided to set a width and height for the movie, instead of stretching it to fit the entire browser.

Thank you for your help.

For the sake of argument, I don’t have that code to post but I will try to explain it better. If we have a 200x200 movie and we publish it using the “percent” option in he HTML tab, and we give it a value of 100% for both width and height, the movie in Internet Explorer will not be 200x200 pixels anymore, it will be scaled to fit the browser. The value of _root._width will be 200 even though the movie has been scaled to fit the whole brower. Try it with a blank movie and a label component to trace the _width and you’ll se what I am on about.

Again thanks for the initial replya