Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

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