Hi there,
I am developing flash application in Adobe Flash CS3 with height - 100% and width = 100% at the time of publishing.
But flash not resize according to resolution.
I made flash application in 1024px X 768 px resolution.

please help if you know the solution.

Regards,
Arun

Dani AI

Generated

Note: Flash Player reached end-of-life in December 2020 and modern browsers no longer run SWFs by default. If this is for a legacy intranet or local testing, the steps below still apply. For public sites consider migrating to HTML5.

was right to ask about the HTML container — the SWF will only scale if its embedding and parent elements allow it. Common causes are a fixed pixel height on the page, missing parent heights (so height:100% does nothing), or the SWF/stage being set to a scale mode that prevents the content from reflowing.

Quick checklist and fixes:

  • Ensure ancestors have a defined height. Example CSS that makes 100% work:
html, body, #flashContainer {
  height: 100%;
  margin: 0;
  padding: 0;
}
#flashContainer { width: 100%; }
  • Use percentage dimensions on the embed/object (or SWFObject) and set the Flash scale param if you want automatic scaling:
<object id="flashContainer" width="100%" height="100%" data="app.swf" type="application/x-shockwave-flash">
  <param name="movie" value="app.swf" />
  <param name="scale" value="showall" />
</object>
  • Inside the SWF (ActionScript 3) you must handle layout when the player size changes. Typical pattern:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, onResize);

function onResize(e:Event):void {
  var w:Number = stage.stageWidth;
  var h:Number = stage.stageHeight;
  // reposition or scale your UI here
}
  • If you want robust cross-browser embedding and sizing use SWFObject for embedding rather than the auto-generated HTML. See SWFObject for examples.

For : check the HTML wrapper you mentioned (fixed pixel height will stop resizing) and decide whether you want the SWF to scale automatically (showall/exactfit) or to implement a responsive layout inside the SWF (NO_SCALE + resize handling).

Recommended Answers

All 2 Replies

Hello gtpArun,

are you using that file flash in a HTML page?

check the size of the component that is loading you flash file :)

Hello gtpArun,

are you using that file flash in a HTML page?

check the size of the component that is loading you flash file :)

Yes i am using that flash file in HTML page, and in html page i put width = 100% and height = 800 px

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.