We just launched Widgetic! Add beautiful HTML5 widgets to your website. See Widgets >
LOGIN Don't have an account yet?   Register

Forgot password?

Size Priority

If you downloaded any of our Flash Components, you already know we define the size in the HTML code, as well as in the XML code. Well, let me tell you we define the size in the ActionScript code as well, and if we don’t, we resize the component to take the entire Stage size.

I’ll briefly explain why we do this, and what are the advantages of doing it like this.

The way the Flash Component resizes, is by reading the componentWidth and  componentHeight values, but the priority is:

  1. HTML.
  2. XML.
  3. Stage size (or ActionScript passed).

How to resize the component?

The reason for which we define the size in three places, is the functionality we built into our Flash Components, and that is, the ability for them to work in HTML pages as well as other Flash projects, depending on your needs:

  1. If you use the Flash Component inside an HTML page, than you define the size in HTML. If the Flash Component finds this size, it will ignore the other values (xml, AS).
  2. If you use it inside your Flash project, you will use your own embedding code for your SWF file, so there won’t be any HTML to pass the size to our Flash Component. This means you will have to pass the size in XML. Make sure that when you init the component, you pass NaN for the componentWidth and componentHeight. Otherwise, the values you pass to the init function will be used instead of the values read from XML.
  3. If you want to use the Flash Component, in your Flash project, at the size that’s used in the FLA, than don’t pass any size to the XML file, but pass it in the init function. Otherwise the Component will take the Flash Stage size.

Fill part of the swf size

If you use the component inside an HTML page, you will notice that we pass the componentWidth and componentHeight values like this:

flashvars.componentWidth = stageW;
flashvars.componentHeight = stageH;

That’s because we have the stageW and stageH values (meaning the swf size) defined, and we want the component to take the entire swf size.

var stageW = "560";
var stageH = "422";

If for example you want the component to only fill half of the swf width, than you would pass that value to the componentWidth, in this case it would be:

flashvars.componentWidth = 280;

What this will do is it will leave an empty area on the right of the component, which you can use for adding your own content for example, if you edit the FLA.

Fill entire browser window

If you want to fill the entire browser window, what you should do is pass the stageW and stageH values like this:

var stageW = "100%";
var stageH = "100%";

You can either keep the componentWidth and componentHeight passed like this:

flashvars.componentWidth = stageW;
flashvars.componentHeight = stageH;

Or you can delete them, and the component will fill the entire browser window.

Hope this clears things out. If you have any questions, please post them here, and I’ll do my best to explain things better.

This post has 9 comments | Post your comment


February 15, 2010 at 10:51 am

Thanks for the tips. Regarding full screen display; i noticed that if i set stageW = 100%, The component does not automatically resize if the browser window resizes.

Is there a way around this?


Lucas Machado Duarte

May 5, 2010 at 11:27 am

Is the maximum size 560px? Can’t have a size up to this? When I resize up to 560px I get a blank space. How can I fix it?
Thanks a lot!



May 6, 2010 at 2:48 am

Jon, at the moment no. We’ll update the components in the future to support this as well.

Lucas, it should work for any component. What is the one you are trying this for?


Lucas Machado Duarte

May 6, 2010 at 4:50 am

I was trying to do it in XML Banner Rotator. When I set stageW and flashvars.componentWidth a size up do 560px I get a blank space.

Lucas Machado Duarte

May 6, 2010 at 8:14 pm

I was using de XML Banner Rotator


Andrei Potorac

October 12, 2010 at 3:28 am

Try now please.



February 2, 2011 at 10:40 pm

i cant resize the rotator … after i read all in ur artical i still finding a problem to resize



February 3, 2011 at 2:17 am


Thanks for using our component. If you don’t have a support ticket, please buy one and then send us a link to your web page at support@flabell.com.

We’ll figure what the problem might be and help you with this.


February 2, 2014 at 4:58 am

Oh my goodness! Incredible article dude! Many thanks, However I am experiencing problems with your RSS. I don’t understand the reason why I can’t subscribe to it. Is there anyone else having similar RSS issues? Anyone that knows the answer can you kindly respond? Thanks!!


Leave a Reply

blog entries RSS Feedproducts RSS Feed


Warning: Invalid argument supplied for foreach() in /nfs/c03/h01/mnt/55300/domains/flabell.com/html/app/webroot/blog/wp-content/plugins/flabell/flabell.php on line 272

Popular Files

Download the plugin above
Read more about Flabell WordPress plugin


Search the blog