Results 1 to 2 of 2
  1. #1
    Member Vulf's Avatar
    Join Date
    Nov 2011
    Location
    Germany
    Posts
    9

    Question How can I get website dimensions?

    I need to center something... so I need website dimensions.. should I use getWebsitePropertyByID() method (or anything else)? How?

    I used var p:PageVO; p=Moto.getInstance().getPageVOByID(1); to get PAGE height (p.height), but what method should I use for getting website width and height ... ?

    It should be enough if I can get holder_1 parameters (width and height), but I don't know how to do this...

    [/xml/structure.xml]

    <motoStructure>
    <website backgroundImage="" defaultPreloaderLinkageName="WebsitePreloader">
    <contentHolders>
    <holder id="1" type="website" x="0" y="0" width="980" height="1200" top="0" bottom="0" left="0" right="0" locked="false" depth="10" stretched="true">
    <name><![CDATA[On The Entire Website]]></name>
    </holder>
    ....
    ....

    Thank you!

  2. #2
    Hello,

    If you need to get the currect browser area, you should get the stage width and height:

    stage.stageWidth
    stage.stageHeight

    As to the website dimensions, they are constant. They are set in the website.xfl and moto.xfl properties in Flash.

    Best regards,

    Paul

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •