Solved

Flash auto-width

Posted on 2009-04-02
3
554 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
Comment Utility
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
Comment Utility
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 125 total points
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now