This content has been marked as final. Show 3 replies
1st off, let me say that it is more effort than it's worth to try to
correctly scale the stage as you are asking. It is possible, but there
are some serious issues. Most raster (bitmap) graphics do not scale
well, text will get distorted, and quite a few other media types will be
messed up. If you find that you have media that does not scale well,
you'll need to write some custom code to deal with them. Basically, the
commands which control the size of the stage are
Check them out in the help file for more specifics. Anyway, make a
#movie script with the following code:
on startMovie me
--save this for when someone maximizes the screen later
on zoomwindow --on maximize
vLeft = ((the deskTopRectList-(the stage).drawRect)/2.0).integer
vTop = ((the deskTopRectList-(the stage).drawRect)/2.0).integer
(the stage).rect = the desktopRectList
(the stage).drawRect = rect(vLeft,vTop,vLeft+(the
on resizeWindow --on restore
I modified your code in this way:
(the stage).drawRect = rect(0,0,0+fScale*nOriWidth,0+fScale*nOriHeight)
The value of fScale is calculate in some previous code. That will get result near to what I want. But there is a serious problem: Texts become rough and ugly after scaling. Is there any method to overcome it?
> I modified your code in this way:
> (the stage).drawRect =
> The value of fScale is calculate in some previous code. That will get
> result near to what I want. But there is a serious problem: Texts
> become rough and ugly after scaling.
That's because it takes the image of the text and scales it, rather than
increasing the font size of the text and scaling the rect of the sprite.
> Is there any method to overcome it?
Yes: do not change the drawRect. Instead, scale and reposition the
individual sprites, and also increase the font size of members of text
Or instead of having text sprites directly on the stage, you could have an
non-antialiased text member at three or four times the size you need it and
copy its .image to the required size bitmap member using copyPixels, which
will antialias it for you, then show that bitmap on the stage.