Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Flash auto-width

Posted on 2009-04-02
3
Medium Priority
?
568 Views
Last Modified: 2012-05-06
Good Day All...

What is the best way to control the auto-size of a flash banner within <div></div> tags? What I have is a flash banner in the center content area, and I need it to size to 100% width of the container. The height is also resized. This would be usable, except that it creates spacing above and below when the screen is sized down from its original size. I need the content to move in to fill that spacing.

Thanks!
0
Comment
Question by:intelliflex
  • 2
3 Comments
 
LVL 3

Expert Comment

by:Imme-emosol
ID: 24056343
What conent will fill up the spacing?

If the flash content will fill up the spacing , I can say this:
I think you should be able to assign the embed or object an width and height of 100% within the div.

So you might need to give them a position:absolute; as well , don't know exactly.

A search for :
full width full height scaling flash
give enough suggestions on how to do this.

Hope that will help.
0
 
LVL 14

Expert Comment

by:tomaugerdotcom
ID: 24059790
It's also recommended to embed your Flash SWF using SWFObject rather than the default Adobe / DreamWeaver way of doing things.

SWFObject is free and can be downloaded here: http://code.google.com/p/swfobject/
0
 
LVL 14

Accepted Solution

by:
tomaugerdotcom earned 500 total points
ID: 24059795
If you're looking to "stretch" your flash content here is a tip:

exactFit

By default, Flash Player will scale a SWF with a fixed aspect ratio (equivalent of setting scale = "showAll"). If you want the SWF to fit the browser 100% in both directions, you must set the "scale" parameter to "exactFit". Note that this will probably distort your SWF.

Static publishing requires adding two <param> elements as follows:

<object id="flashcontent" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
  <param name="movie" value="/lab/_common/sample-masked.swf" />
  <param name="scale" value="exactFit" />
  <!--[if !IE]>-->
  <object type="application/x-shockwave-flash" data="/lab/_common/sample-masked.swf" width="100%" height="100%">
  <param name="scale" value="exactFit" />
  <!--<![endif]-->
    <p>Please update your Flash Player</p>
  <!--[if !IE]>-->
  </object>
  <!--<![endif]-->
</object>
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question