Solved

Flash auto-width

Posted on 2009-04-02
3
564 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 125 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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.
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.

624 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