Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:40:12+00:00 2026-06-11T06:40:12+00:00

i want to build a project base on actionscript3.and it needs to re-size its

  • 0

i want to build a project base on actionscript3.and it needs to re-size its stage area to fit the the customer’s web browser’s viewing size or fit it when customer change the web browser’s size.

There is no fixed aspect ratio but have a minimal(for example 640×480) size and a maximum size(1600×1000). when the customer’s web window’s length is less than the minimal size , a scroll bar would appear in that dimension ,so the user can see the whole stage using scroll bar .when customer’s web window’s size is larger than maximum size ,the flash application would appear at the top-center.and it needs to be working on most of the web browsers including IE 6.

when the stage size is changed ,the content on the stage wouldn’t scale.in my case,the project has dozens of view,every view needs to handle size change and rearrange their elements, i thought this would be a huge work,so need any suggestion to build a project like this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:40:13+00:00Added an answer on June 11, 2026 at 6:40 am

    Firstly, the resizing will be managed by JavaScript / CSS, not ActionScript. That said, there are some things that you need to do in ActionScript to prepare for this behaviour.

    Firstly, you mentioned that you don’t want all of the content in the SWF to scale with the web page. To counter this default behaviour, you need to change the scale mode that the stage will use:

    stage.scaleMode = StageScaleMode.NO_SCALE;
    

    Another thing that I find makes scalable websites easier to work with is to set the top-left corner of the SWF to 0,0. By default if you scale up a SWF, 0,0 will remain in the same place with some ‘padding’ representing the new size. By that I mean, if you scale up the SWF by 200 pixels across and it was originally 400 pixels across, 0,0 will fall 100 pixels into the SWF from the left side rather than representing the top-left corner. Here’s what you can do to correct that:

    stage.align = StageAlign.TOP_LEFT;
    

    These two things will help your embedded SWF act in a more expected manner which will likely help you throughout your project.

    Finally, you mentioned that you have many viewable objects on the screen that need to react to the stage / browser window being resized. This is quite easy to deal with using Event.RESIZE. You can attach a listener to the stage to deal with this event and pass information across to each of your viewable objects reflecting the changes.

    You can create a class that has a handleResize() method, which will be a base class for your view objects:

    class ViewComponent extends Sprite
    {
    
        public function handleResize(width:int, height:int):void
        {
            trace(width, height);
        }
    
    }
    

    Each of these objects can be listed within another class that manages the overall view, like this:

    class ViewManager extends Sprite
    {
    
        public var viewComponents:Vector.<ViewComponent>;
    
    
        public function ViewManager(stage:Stage)
        {
            viewComponents = new Vector.<ViewComponent>();
            stage.addEventListener(Event.RESIZE, _manageResize);
        }
    
    
        private function _manageResize(e:Event):void
        {
            for each(var i:ViewComponent in viewComponents)
            {
                i.handleResize(e.target.stageWidth, e.target.stageHeight);
            }
        }
    
    }
    

    This way you can simply list your ViewComponents within the ViewManager and deal with each appropriately in it’s own class by overriding handleResize().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to build my android project with ndk so i created my make
I have a website project that I want to build using CruiseControl.net. On one
I'm working on a project which I want to build up OO. Now I
I am using boost build in my project and now i want to use
I create an Android project for build my custom widget, and I want to
I want to change the build system path for building my VC++ project in
I want to use leiningen to build and develop my clojure project. Is there
I want to pack the project into a zip-file and have the build date
I would like to build a simple animation for a school project. I want
My project structure has these base packages. a.b.c.core a.b.c.web a.b.c.common And core,web,common packages will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.