The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 4 of 4

Thread: Stage size in Actionscript 3

  1. #1

    Stage size in Actionscript 3

    Hi all, I just landed here after a very long google search, and now finally decided to ask you. I even found the question here on kirupa.com, but answered to someone using AS 2:
    http://www.kirupa.com/forum/showthread.php?t=269949

    I want to get the real size of my SWF, because I want to be able to dynamically add as much content as fits into it, depending on the width of the html-container it's embedded in. I though this would be done with the Stage properties, but in AS 3 the stage seems to only have the size of the graphical elements it contains, which means in a "noScale" case there is no updated information about the real size of the whole SWF.

    Does anyone have more experience with this topic? I don't know if stage is the right way to do that in AS 3, but I can't believe it's impossible, as AS3 should be offering more flexibility than AS2.

    Thanks a lot for any advise!

    ------
    Sorry people!
    It was easier than expected - I just didn't realize that the stage.width property in AS 3 has changed to stage.stageWidth!!! Hope that this at least helps some others...
    Last edited by webtussy; March 15th, 2008 at 09:07 AM. Reason: problem is solved...

  2. #2

    Thanks a bunch!

    Quote Originally Posted by webtussy View Post
    Sorry people!
    It was easier than expected - I just didn't realize that the stage.width property in AS 3 has changed to stage.stageWidth!!! Hope that this at least helps some others...
    I was trying to achieve this, and was really confused until I found your post. Many thanks!

  3. #3

    stage size

    I cant get stage.stageWidth to work!!please help.

  4. #4
    hi Try this man


    this.addEventListener(Event.ENTER_FRAME,loop)

    function loop(e:Event):void
    {
    trace(stage.stageWidth)

    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012