hi, this may be a lame question but… what exactly is “stage”, or “Stage” in AS2?. I mean… the stageWidth property (Width in as2) - it’s the width of my flash movie, which I set in document properties in flash, right? by default, when you create a new fla, it’s 550.
but where do I find the width value set in the HTML file when embedding the swf?
[COLOR=Gray]<embed src=“movie.swf” width=“1000” …
[COLOR=Black]I always thought that when I set the width in HTML to 1000 and open the file in browser, then stage.stageWidth = 1000. But stageWidth remains at the value of 550, the original size set in the fla file, no matter what width I set in HTML.
I need this because all of the objects in my movie are positioned and resized at runtime. I need a movieclip to be x=0,y=0 and to have the width value set to the value defined in HTML, in this case 1000. but when I use myMovieClip.width=stage.stageWidth, it’s only 550 px wide.
[/COLOR][/COLOR][COLOR=Gray]
[COLOR=Black]Pls help![/COLOR]
[/COLOR]
Thanks for the link, it helped a bit, but…
It still doesn’t fully work. I managed to stretch the controls (it’s a video player) to the width and height set in HTML, but I need to scroll to find them.
Check it out here: http://oliver.bratritriku.cz/CSFD/flvplayer/player.html
All objects have the correct size and placement, but the dimensions set in fla are bigger than those in HTML, so you need to zoom in, zoom out (to enable the scrolling cursor) and move the whole movie to see them.
From the AS3 docs on the flash.display.Stage.stageWidth property:
When the value of the scaleMode property is set to StageScaleMode.NO_SCALE, the stageWidth property represents the width of Flash Player. This means that the stageWidth property varies as you resize the Flash Player window. When the value of the scaleMode property is not set to StageScaleMode.NO_SCALE, the stageWidth property represents the width of the SWF file as set during authoring in the Document Properties dialog box. This means that the value of the stageWidth property stays constant as you resize the Flash Player window. This property cannot be set.
ie. this number will not change if scaleMode is set to NO_SCALE.