| David Stiller 2006-04-08, 6:32 pm |
| JOE121,
> HOW TO GET TEXT SAME SIZE ON ALL
> SCREEN SETTINGS
All screen settings? There's more than dimensions to account for, you
should realize. Generally speaking, everything looks bigger on an 800x600
screen than it does on something higher res. Do you care about people
viewing your content in cell phones and PDAs? Those screens are tiny.
> I have created a website and Published it with the
> following settings: 100% x 100% and Exact fit
>
> So that the website could be viewed ful screen on
> all browsers
That doesn't mean full screen. That means "the full extent of the
browser's view port," as in, the area of the browser that displays content.
Many users don't keep their browsers maxmized ... I certainly don't. I
often have open an instance of Word, Outlook, Photoshop, etc., and several
browsers. My browsers are rarely full screen, and if course, the smaller
the browser is sized -- let alone the screen dimensions -- the smaller the
text and everything else is, if the SWF displays at 100%.
> The only problem that I have got is that is MY TEXT,
> on a 800*600 screen monitor the text shrinks and
> disorts. On a 1024*768 and higher screen setting
> the text increases it size.
The reason it shrinks on 800x600 is because the browser's view port is
small on a screen of that resolution.
> Please could someone help me and let me know how I
> could keep the text to one size in all screen settings.
If everything else in the SWF resized per the browser, but the text
didn't -- just imagine what would happen. On 800x600 screens, the visuals
that *contain* your text might get too small to, well, to contain your text.
Your asking a bottle to get smaller but still hold the same amount of
Mountain Dew. At some point, you'd have to write some logic into your SWF
to determine when "enough is enough" and when to size the text according to
what it thinks ist he "right size" for a given user.
In order to write logic into your SWF, you'll have to use ActionScript.
ActionScript will come easily enough to you if you're a programmer. If you
aren't, you're still okay, but it will take you longer to "get it."
Press F1 to get to your Help files, then look up the "Stage class" entry
of the ActionScript 2.0 Language Reference. Classes define objects in
ActionScript, and just about everything is an object. Most objects feature
properties, methods, and events. Properties are characteristics of the
object, methods are things the object can do, and events are things the
object can react to. You'll see a Stage.onResize event, which reacts to the
occurrence of the Stage being resized (which is what happens when you have
your movie set to 100% and the browser is resized). So, you can write a
function and assign it to that event, thus "handling" that event.
Your event handler can do whatever you want it to. Look up some of the
other class entries to find out what you can do. The MovieClip class, for
example, shows that all movie clips (all movie clip objects -- start
thinking in terms of objects, now) have _xscale and _yscale properties that
affect their widths and heights. Check out the TextField class to see what
functionality is available to you. You could, for example, change the font
size of any of your dynamic text fields in response to the size of the
Stage.
Here's a tutorial on repositioning content when a movie is resized.
Keep in mind, you're not limited to changing _x and _y properties (which
describes repositioning) ... you can change whatever properties or invoke
whatever methods you like.
http://www.moock.org/asdg/technotes/relayout/
David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."
|