FORUMS: list search recent posts

Interesting problem with _height and _width properties

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Infected cell
Interesting problem with _height and _width properties
on Mar 15, 2006 at 9:13:12 pm

Hi,

I found some interesting problem with _height and _width properties than I tryed
to make some proportions for MC wich is depend on browser resolution

So, I`d make function:

function screenC() {
MC._width = (2095.1 / 1276) * Stage.width;
MC._height = (1592.6 / 2095.1) * slogs._width;
MC._x = 0;
MC._y = Stage.height;
}
screenC();
var fullScreen:Object = new Object();
fullScreen.onResize = function() {
screenC();
};
Stage.addListener(fullScreen);

some remarks:
2095.1 - _100% width of MC
1592.6 - _100% height of MC
1276 - _100% of width browser resolution (1280x1024)

(2095.1/1276) - is exact proportion between widht of MC and browser resolution, it equals about 1.64
(1592.6/2095.1) - exact proportion between height and width of MC, somethinf about 0.76

(2095.1 / 1276) * Stage.width; - _width of MC which is proportionally depends on Stage.width
(1592.6 / 2095.1) * slogs._width; - _height of MC which is proportionally depends on _width MC

So,
then I`d create some textField to check _width and _height of Stage
testText.text = Stage.width + "*" + Stage.height

Than I am changing a browser size my textField shows me all changes (width and height)
but function mentioned below is not working.....

More interesting thing:

If I am deleting: MC._height = (1592.6 / 2095.1) * slogs._width;

then MC._width - works fine
but together are not works....

I`d try to find out any solution in this case but did not find at this moment.....

Help....!!!!!!!





Best regards,
Alexey Kharitonov.
http://www.infectedcell.com
mailto:contact@infectedcell.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]